Intial site commit
This commit is contained in:
commit
dc11779c23
47 changed files with 1945 additions and 0 deletions
6
archetypes/default.md
Normal file
6
archetypes/default.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
78
config.toml
Normal file
78
config.toml
Normal file
|
@ -0,0 +1,78 @@
|
|||
languageCode = "en-us"
|
||||
theme = "blackburn"
|
||||
|
||||
baseurl = "https://thrrgilag.net/" # Make sure to end baseurl with a '/'
|
||||
title = "Morgan McMillian"
|
||||
author = "Morgan McMillian"
|
||||
|
||||
# Shown in the side menu
|
||||
copyright = "© 2018. All rights reserved."
|
||||
canonifyurls = true
|
||||
paginate = 10
|
||||
|
||||
[indexes]
|
||||
tag = "tags"
|
||||
topic = "topics"
|
||||
|
||||
[params]
|
||||
# Shown in the home page
|
||||
subtitle = "software development and other random bits"
|
||||
brand = "thrrgilag"
|
||||
|
||||
# CSS name for highlight.js
|
||||
highlightjs = "androidstudio"
|
||||
highlightjs_extra_languages = ["yaml"]
|
||||
dateFormat = "02 Jan 2006, 15:04"
|
||||
# Include any custom CSS and/or JS files
|
||||
# (relative to /static folder)
|
||||
custom_css = ["custom.css"]
|
||||
# custom_js = ["js/my.js"]
|
||||
|
||||
[menu]
|
||||
# Shown in the side menu.
|
||||
[[menu.main]]
|
||||
name = "Home"
|
||||
pre = "<i class='fa fa-home fa-fw'></i>"
|
||||
weight = 1
|
||||
identifier = "home"
|
||||
url = "/"
|
||||
[[menu.main]]
|
||||
name = "Posts"
|
||||
pre = "<i class='fa fa-list fa-fw'></i>"
|
||||
weight = 2
|
||||
identifier = "post"
|
||||
url = "/post/"
|
||||
[[menu.main]]
|
||||
name = "About"
|
||||
pre = "<i class='fa fa-user fa-fw'></i>"
|
||||
weight = 3
|
||||
identifier = "about"
|
||||
url = "/about/"
|
||||
[[menu.main]]
|
||||
name = "Topics"
|
||||
pre = "<i class='fa fa-folder fa-fw'></i>"
|
||||
weight = 4
|
||||
identifier = "topic"
|
||||
url = "/topics/"
|
||||
[[menu.main]]
|
||||
name = "Tags"
|
||||
pre = "<i class='fa fa-tags fa-fw'></i>"
|
||||
weight = 5
|
||||
identifier = "tag"
|
||||
url = "/tags/"
|
||||
[[menu.main]]
|
||||
name = "Contact"
|
||||
pre = "<i class='fa fa-phone fa-fw'></i>"
|
||||
weight = 6
|
||||
url = "/contact/"
|
||||
|
||||
[social]
|
||||
# Link your social networking accounts to the side menu
|
||||
# by entering your username or ID.
|
||||
|
||||
# Techie
|
||||
github = "thrrgilag"
|
||||
gitlab = "https://gitlab.dreamfall.space/thrrgilag"
|
||||
mastodon = "https://mastodon.social/@thrrgilag"
|
||||
pnut = "thrrgilag"
|
||||
diaspora = "https://shrekislove.us/u/thrrgilag"
|
13
content/about.md
Normal file
13
content/about.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "About"
|
||||
date: 2018-11-22T06:37:58-08:00
|
||||
draft: true
|
||||
---
|
||||
|
||||
I am thrrgilag, also known as Morgan McMillian. You might stumble across my small open source projects or even my contributions here and there to various other projects where possible. My day job is in the design and development of email security infrastructure. I love software development and get to do a little bit of it in my day job it's mostly a hobby in my spare time.
|
||||
|
||||
|
||||
|
||||
### Software development
|
||||
|
||||
The majority of the code I write is either in Python, JavaScript, or C++. I've also worked in Perl and Java in the past although not much in recent years. I like learning new languages and started working with Go and Rust and hope to start some new projects in the near future. You can find my work on both GitLab and GitHub.
|
24
content/contact.md
Normal file
24
content/contact.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: "Contact"
|
||||
date: 2018-11-22T06:40:38-08:00
|
||||
draft: true
|
||||
---
|
||||
|
||||
My preferred way of keeping in touch is using one of the chat services listed below. You can also reach me by email to gilag at monkeystew dot com.
|
||||
|
||||
|
||||
|
||||
<table class="yoda">
|
||||
<tr>
|
||||
<th>[matrix]</th>
|
||||
<td><a href="https://matrix.to/#/@thrrgilag:monkeystew.net" target="_blank">@thrrgilag:monkeystew.net</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>xmpp</th>
|
||||
<td><a href="xmpp:thrrgilag@monkeystew.net">thrrgilag@monkeystew.net</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Telegram</th>
|
||||
<td><a href="https://t.me/thrrgilag" target="_blank">@thrrgilag</a></td>
|
||||
</tr>
|
||||
</table>
|
39
content/post/goober-0-7-0.md
Normal file
39
content/post/goober-0-7-0.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "Goober 0.7.0"
|
||||
date: 2018-11-23T13:56:31-08:00
|
||||
topics:
|
||||
- Goober
|
||||
- Development
|
||||
tags:
|
||||
- pnut
|
||||
- android
|
||||
draft: true
|
||||
---
|
||||
|
||||
The latest Goober for Android has been released to the Google Play store.
|
||||
This update adds the ability to hide images in the timeline by default and a
|
||||
new profile view allowing you to view a users posts, follow, mute, or block. I
|
||||
also added a couple of tweaks to the post actions menu mostly for myself but
|
||||
perhaps others might find them useful as well.
|
||||
|
||||
<!--more-->
|
||||
|
||||
As usual if you have questions or issues you can find me in the Goober chat on
|
||||
[pnut](https://patter.chat/room/934), [matrix](https://matrix.to/#/#goober:monkeystew.net), or [xmpp](xmpp:goober@chat.monkeystew.net?join).
|
||||
You can also find more information, checkout the source, and file issues on my
|
||||
[GitLab](https://gitlab.dreamfall.space/thrrgilag/Goober) project site.
|
||||
|
||||
### Roadmap
|
||||
|
||||
Goober will be undergoing some significant changes over the next series of
|
||||
updates to strip away the native device dependencies and become more of a true
|
||||
cross-platform mobile application. The two big goals I have in mind will be to
|
||||
support more mobile platforms and to have live automatic updates. Here are some
|
||||
of the things I have in mind in no particular order.
|
||||
|
||||
- Live automatic updates
|
||||
- Expanded OS support (iOS, Ubuntu Touch, & others)
|
||||
- Accessibility
|
||||
- Additional rich post capabilities
|
||||
- Message channel support
|
||||
- Notification support?
|
7
content/post/new-blog.md
Normal file
7
content/post/new-blog.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World! (again)"
|
||||
date: 2018-11-22T06:14:21-08:00
|
||||
draft: true
|
||||
---
|
||||
|
||||
I finally made the jump to using a site generator for my blog along with a new domain name. Rather than migrating the old site I've decided to leave it in place and just place my new posts here. Now that this post is out of the way, on with the show!
|
8
static/custom.css
Normal file
8
static/custom.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
.yoda table {
|
||||
border-spacing: 10px;
|
||||
}
|
||||
|
||||
.yoda th {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
BIN
static/img/favicon.ico
Normal file
BIN
static/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
20
themes/blackburn/LICENSE.md
Normal file
20
themes/blackburn/LICENSE.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 YOUR_NAME_HERE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
257
themes/blackburn/README.md
Normal file
257
themes/blackburn/README.md
Normal file
|
@ -0,0 +1,257 @@
|
|||
# Blackburn
|
||||
|
||||
Blackburn is a clear and responsive theme for [Hugo](//gohugo.io).
|
||||
|
||||
## Overview
|
||||
|
||||
* Based on Yahoo's [Pure CSS](http://purecss.io/) (v1.0.0)
|
||||
* Fixed sidebar with social links:
|
||||
* Twitter
|
||||
* GNU social
|
||||
* Facebook
|
||||
* Google+
|
||||
* Weibo
|
||||
* Tumblr
|
||||
* Instagram
|
||||
* Flickr
|
||||
* 500px
|
||||
* Pinterest
|
||||
* YouTube
|
||||
* Vimeo
|
||||
* Vine
|
||||
* SlideShare
|
||||
* LinkedIn
|
||||
* Xing
|
||||
* Reddit
|
||||
* Hacker News
|
||||
* GitHub
|
||||
* GitLab
|
||||
* Bitbucket
|
||||
* Stack Overflow
|
||||
* Server Fault
|
||||
* Steam
|
||||
* MobyGames
|
||||
* Last.fm
|
||||
* Discogs
|
||||
* Keybase
|
||||
* Client-side syntax highlighting by [Highlight.js](//highlightjs.org) (v9.12.0)
|
||||
* Web analytics by Google Analytics
|
||||
* Comments by Disqus
|
||||
* Icons by Font Awesome (v4.7.0)
|
||||
|
||||
## Demo
|
||||
|
||||
* [Demo](http://themes.gohugo.io/theme/blackburn/)
|
||||
* You can also see it in action on my personal website [here](http://yoshiharuyamashita.com/)
|
||||
|
||||
## Screenshots
|
||||
|
||||
![screenshot](https://raw.githubusercontent.com/yoshiharuyamashita/blackburn/master/images/screenshot.png)
|
||||
|
||||
## Installation
|
||||
|
||||
In your Hugo site directory, run:
|
||||
|
||||
```shell
|
||||
$ mkdir themes
|
||||
$ cd themes
|
||||
$ git clone https://github.com/yoshiharuyamashita/blackburn.git
|
||||
```
|
||||
|
||||
or download from [here](//github.com/yoshiharuyamashita/blackburn/archive/master.zip).
|
||||
|
||||
See [Hugo Quickstart Guide](//gohugo.io/overview/quickstart/) for more information.
|
||||
|
||||
## Configuration
|
||||
|
||||
Example config.toml:
|
||||
|
||||
```toml
|
||||
baseurl = "https://www.example.com/" # Make sure to end baseurl with a '/'
|
||||
title = "Your site title"
|
||||
author = "Your name"
|
||||
# Shown in the side menu
|
||||
copyright = "© 2016. All rights reserved."
|
||||
canonifyurls = true
|
||||
paginate = 10
|
||||
|
||||
[indexes]
|
||||
tag = "tags"
|
||||
topic = "topics"
|
||||
|
||||
[params]
|
||||
# Shown in the home page
|
||||
subtitle = "A Hugo Theme"
|
||||
brand = "Blackburn"
|
||||
googleAnalytics = "Your Google Analytics tracking ID"
|
||||
disqus = "Your Disqus shortname"
|
||||
# CSS name for highlight.js
|
||||
highlightjs = "androidstudio"
|
||||
highlightjs_extra_languages = ["yaml"]
|
||||
dateFormat = "02 Jan 2006, 15:04"
|
||||
# Include any custom CSS and/or JS files
|
||||
# (relative to /static folder)
|
||||
custom_css = ["css/my.css"]
|
||||
custom_js = ["js/my.js"]
|
||||
|
||||
[params.piwikAnalytics]
|
||||
siteid = 2
|
||||
piwikroot = "//analytics.example.com/"
|
||||
|
||||
[menu]
|
||||
# Shown in the side menu.
|
||||
[[menu.main]]
|
||||
name = "Home"
|
||||
pre = "<i class='fa fa-home fa-fw'></i>"
|
||||
weight = 1
|
||||
identifier = "home"
|
||||
url = "/"
|
||||
[[menu.main]]
|
||||
name = "Posts"
|
||||
pre = "<i class='fa fa-list fa-fw'></i>"
|
||||
weight = 2
|
||||
identifier = "post"
|
||||
url = "/post/"
|
||||
[[menu.main]]
|
||||
name = "About"
|
||||
pre = "<i class='fa fa-user fa-fw'></i>"
|
||||
weight = 3
|
||||
identifier = "about"
|
||||
url = "/about/"
|
||||
[[menu.main]]
|
||||
name = "Contact"
|
||||
pre = "<i class='fa fa-phone fa-fw'></i>"
|
||||
weight = 4
|
||||
url = "/contact/"
|
||||
|
||||
[social]
|
||||
# Link your social networking accounts to the side menu
|
||||
# by entering your username or ID.
|
||||
|
||||
# SNS microblogging
|
||||
twitter = "*"
|
||||
gnusocial = "*" # Specify href (e.g. https://quitter.se/yourusername)
|
||||
facebook = "*"
|
||||
googleplus = "*"
|
||||
weibo = "*"
|
||||
tumblr = "*"
|
||||
|
||||
# SNS photo/video sharing
|
||||
instagram = "*"
|
||||
flickr = "*"
|
||||
photo500px = "*"
|
||||
pinterest = "*"
|
||||
youtube = "*"
|
||||
vimeo = "*"
|
||||
vine = "*"
|
||||
slideshare = "*"
|
||||
|
||||
# SNS career oriented
|
||||
linkedin = "*"
|
||||
xing = "*"
|
||||
|
||||
# SNS news
|
||||
reddit = "*"
|
||||
hackernews = "*"
|
||||
|
||||
# Techie
|
||||
github = "yoshiharuyamashita"
|
||||
gitlab = "*"
|
||||
bitbucket = "*"
|
||||
stackoverflow = "*"
|
||||
serverfault = "*"
|
||||
|
||||
# Gaming
|
||||
steam = "*"
|
||||
mobygames = "*"
|
||||
|
||||
# Music
|
||||
lastfm = "*"
|
||||
discogs = "*"
|
||||
|
||||
# Other
|
||||
keybase = "*"
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
* Write Markdown files in `content/post`
|
||||
* Add fixed pages (e.g., about.md) to the side menu by defining them under `[menu]` in the config.toml:
|
||||
|
||||
```toml
|
||||
[[menu.main]]
|
||||
name = "About"
|
||||
pre = "<i class='fa fa-user fa-fw'></i>"
|
||||
weight = 2
|
||||
identifier = "about"
|
||||
url = "/about/"
|
||||
```
|
||||
|
||||
* Override the theme by linking to custom CSS files or URLs:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
custom_css = ["css/my.css"]
|
||||
```
|
||||
|
||||
* Add new behaviours by linking to custom JS files or URLs:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
custom_js = ["js/my.js", "https://cdnjs.cloudflare.com/ajax/libs/zooming/1.4.2/zooming.min.js"]
|
||||
```
|
||||
|
||||
## Shortcodes
|
||||
|
||||
### pure_table
|
||||
```
|
||||
{{< pure_table
|
||||
"columnName1|columnName2|...|columnName99"
|
||||
"dataValue1|dataValue2|...|dataValue99"
|
||||
"dataValue1|dataValue2|...|dataValue99"
|
||||
"dataValue1|dataValue2|...|dataValue99"
|
||||
"... and so on"
|
||||
>}}
|
||||
```
|
||||
|
||||
where each positional parameter is separated by the vertical bar (i.e., |). The resulting `<table>` is set to have `class="pure-table pure-table-striped"`.
|
||||
|
||||
### fluid_imgs
|
||||
|
||||
```
|
||||
{{< fluid_imgs
|
||||
"class|src|alt"
|
||||
"class|src|alt"
|
||||
"... and so on"
|
||||
>}}
|
||||
```
|
||||
|
||||
where each positional parameter is separated by the vertical bar (i.e., |).
|
||||
|
||||
- `class`: specifies a Pure CSS unit class name (**required**)
|
||||
- `src`: specifies the URL of an image (**required**)
|
||||
- `alt`: specifies an alternate text for an image (optional)
|
||||
|
||||
See [here](http://yoshiharuyamashita.com/post/hugo-shortcode-to-show-multiple-images/) for examples.
|
||||
|
||||
### fluid_img (obsolete)
|
||||
|
||||
#### Positional
|
||||
|
||||
```
|
||||
{{% fluid_img "/path/to/img" %}}
|
||||
```
|
||||
|
||||
#### Named
|
||||
|
||||
```
|
||||
{{% fluid_img class="pure-u-1-2" src="/path/to/img" alt="img description" %}}
|
||||
{{% fluid_img class="pure-u-1-3" src="/path/to/img" caption="img description" %}}
|
||||
```
|
||||
|
||||
* `class`, `alt` and `caption` are optional.
|
||||
* See [Pure CSS Grids](http://purecss.io/grids/) for possible `class` values.
|
||||
|
||||
## License
|
||||
|
||||
* [MIT](//opensource.org/licenses/MIT)
|
8
themes/blackburn/archetypes/default.md
Normal file
8
themes/blackburn/archetypes/default.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
+++
|
||||
title = "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||
date = "{{ .Date }}"
|
||||
draft = true
|
||||
tags = []
|
||||
topics = []
|
||||
description = ""
|
||||
+++
|
BIN
themes/blackburn/images/screenshot.png
Normal file
BIN
themes/blackburn/images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
BIN
themes/blackburn/images/tn.png
Normal file
BIN
themes/blackburn/images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
0
themes/blackburn/layouts/404.html
Normal file
0
themes/blackburn/layouts/404.html
Normal file
1
themes/blackburn/layouts/_default/li.html
Normal file
1
themes/blackburn/layouts/_default/li.html
Normal file
|
@ -0,0 +1 @@
|
|||
<li><time>{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04" }}{{ end }}</time> - <a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
11
themes/blackburn/layouts/_default/single.html
Normal file
11
themes/blackburn/layouts/_default/single.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h2>{{ .Description }}</h2>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
18
themes/blackburn/layouts/_default/summary.html
Normal file
18
themes/blackburn/layouts/_default/summary.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<article>
|
||||
<header>
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
|
||||
{{ partial "post_meta.html" . }}
|
||||
|
||||
</header>
|
||||
|
||||
<p>
|
||||
{{ .Summary }}
|
||||
</p>
|
||||
|
||||
{{ if .Truncated }}
|
||||
<footer>
|
||||
<a href="{{ .RelPermalink }}">Read more<i class="fa fa-angle-double-right fa-fw"></i></a>
|
||||
</footer>
|
||||
{{ end }}
|
||||
</article>
|
18
themes/blackburn/layouts/_default/terms.html
Normal file
18
themes/blackburn/layouts/_default/terms.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ul>
|
||||
{{ $data := .Data }}
|
||||
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||
<li>
|
||||
<a href="{{ $value.Name | urlize }}">{{ $value.Name }}</a>
|
||||
<span>({{ $value.Count }})</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
17
themes/blackburn/layouts/index.html
Normal file
17
themes/blackburn/layouts/index.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h2>{{ .Site.Params.subtitle }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{ range ( .Paginate (where .Data.Pages "Type" "post")).Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
3
themes/blackburn/layouts/partials/brand.html
Normal file
3
themes/blackburn/layouts/partials/brand.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ with .Site.Params.brand }}
|
||||
<a class="pure-menu-heading brand" href="/">{{ . | safeHTML }}</a>
|
||||
{{ end }}
|
9
themes/blackburn/layouts/partials/copyright.html
Normal file
9
themes/blackburn/layouts/partials/copyright.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div>
|
||||
<div class="small-print">
|
||||
<small>{{ .Site.Copyright | safeHTML }}</small>
|
||||
</div>
|
||||
<div class="small-print">
|
||||
<small>Built with <a href="https://gohugo.io/" target="_blank">Hugo</a></small>
|
||||
<small>Theme <a href="https://github.com/yoshiharuyamashita/blackburn" target="_blank">Blackburn</a></small>
|
||||
</div>
|
||||
</div>
|
19
themes/blackburn/layouts/partials/disqus.html
Normal file
19
themes/blackburn/layouts/partials/disqus.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ with .Site.Params.disqus }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ . }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{{ end }}
|
1
themes/blackburn/layouts/partials/favicon.html
Normal file
1
themes/blackburn/layouts/partials/favicon.html
Normal file
|
@ -0,0 +1 @@
|
|||
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico" type="image/x-icon" />
|
10
themes/blackburn/layouts/partials/footer.html
Normal file
10
themes/blackburn/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="{{ .Site.BaseURL }}js/ui.js"></script>
|
||||
<script src="{{ .Site.BaseURL }}js/menus.js"></script>
|
||||
|
||||
{{ partial "google_analytics.html" . }}
|
||||
{{ partial "piwik_analytics.html" . }}
|
||||
|
||||
</body>
|
||||
</html>
|
14
themes/blackburn/layouts/partials/google_analytics.html
Normal file
14
themes/blackburn/layouts/partials/google_analytics.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ with .Site.Params.googleAnalytics }}
|
||||
<script>
|
||||
// Never report traffic that originates from local testing.
|
||||
if (window.location.hostname != "localhost") {
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ . }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
69
themes/blackburn/layouts/partials/head.html
Normal file
69
themes/blackburn/layouts/partials/head.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ if .IsNode }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ else }}{{ with .Description }}{{ . }}{{ end }}{{ end }}">
|
||||
{{.Hugo.Generator}}
|
||||
|
||||
<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }}</title>
|
||||
|
||||
<!-- CSS -->
|
||||
{{ $purecss := "https://cdnjs.cloudflare.com/ajax/libs/pure/1.0.0/" }}
|
||||
<link rel="stylesheet" href="{{ $purecss }}pure-min.css">
|
||||
|
||||
{{ "<!--[if lte IE 8]>" | safeHTML }}
|
||||
<link rel="stylesheet" href="{{ $purecss }}grids-responsive-old-ie-min.css">
|
||||
{{ "<![endif]-->" | safeHTML }}
|
||||
{{ "<!--[if gt IE 8]><!-->" | safeHTML }}
|
||||
<link rel="stylesheet" href="{{ $purecss }}grids-responsive-min.css">
|
||||
{{ "<!--<![endif]-->" | safeHTML }}
|
||||
|
||||
{{ "<!--[if lte IE 8]>" | safeHTML }}
|
||||
<link rel="stylesheet" href="/css/side-menu-old-ie.css">
|
||||
{{ "<![endif]-->" | safeHTML }}
|
||||
{{ "<!--[if gt IE 8]><!-->" | safeHTML }}
|
||||
<link rel="stylesheet" href="/css/side-menu.css">
|
||||
{{ "<!--<![endif]-->" | safeHTML }}
|
||||
|
||||
<link rel="stylesheet" href="/css/blackburn.css">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- MathJax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
|
||||
<!-- RSS -->
|
||||
{{ if .RSSLink }}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ .RSSLink }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.highlightjs }}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ . }}.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
{{ range $.Site.Params.highlightjs_extra_languages }}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script>
|
||||
{{ end }}
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "favicon.html" . }}
|
||||
|
||||
{{ range .Site.Params.custom_css }}
|
||||
{{ if findRE "https?://" . }}
|
||||
<link rel="stylesheet" href="{{ . }}">
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ range .Site.Params.custom_js }}
|
||||
{{ if findRE "https?://" . }}
|
||||
<script src="{{ . }}"></script>
|
||||
{{ else }}
|
||||
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</head>
|
11
themes/blackburn/layouts/partials/header.html
Normal file
11
themes/blackburn/layouts/partials/header.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
<div id="layout">
|
||||
|
||||
{{ partial "sidemenu.html" . }}
|
||||
|
||||
<div id="main">
|
17
themes/blackburn/layouts/partials/pagination.html
Normal file
17
themes/blackburn/layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
{{ $prev := "fa fa-chevron-left"}}
|
||||
{{ $next := "fa fa-chevron-right"}}
|
||||
<nav class="pagination" role="pagination">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}"><i class="{{ $prev }}"></i></a>
|
||||
{{ else }}
|
||||
<i class="{{ $prev }}"></i>
|
||||
{{ end }}
|
||||
<span> {{ .Paginator.PageNumber }} / {{ .Paginator.TotalPages }} </span>
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}"><i class="{{ $next }}"></i></a>
|
||||
{{ else }}
|
||||
<i class="{{ $next }}"></i>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
16
themes/blackburn/layouts/partials/piwik_analytics.html
Normal file
16
themes/blackburn/layouts/partials/piwik_analytics.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ with .Site.Params.piwikAnalytics }}
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="{{ .piwikroot }}";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', {{ .siteid }}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="{{ .piwikroot }}piwik.php?idsite={{ .siteid }}" style="border:0;" alt="" /></p></noscript>
|
||||
{{ end }}
|
34
themes/blackburn/layouts/partials/post_meta.html
Normal file
34
themes/blackburn/layouts/partials/post_meta.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<div class="post-meta">
|
||||
|
||||
<div>
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<time>{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04" }}{{ end }}</time>
|
||||
</div>
|
||||
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
|
||||
{{ if isset .Params "topics" }}
|
||||
{{ $count := len .Params.topics }}
|
||||
{{ if gt $count 0 }}
|
||||
<div>
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
{{ range $k, $v := .Params.topics }}
|
||||
<a class="post-taxonomy-topic" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Params "tags" }}
|
||||
{{ $count := len .Params.tags }}
|
||||
{{ if gt $count 0 }}
|
||||
<div>
|
||||
<i class="fa fa-tags fa-fw"></i>
|
||||
{{ range $k, $v := .Params.tags }}
|
||||
<a class="post-taxonomy-tag" href="{{ $baseUrl }}tags/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
31
themes/blackburn/layouts/partials/prev_next_post.html
Normal file
31
themes/blackburn/layouts/partials/prev_next_post.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{ if or (.NextPage) (.PrevPage) }}
|
||||
<div class="prev-next-post pure-g">
|
||||
<div class="pure-u-1-24" style="text-align: left;">
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{ .PrevInSection.Permalink }}"><i class="fa fa-chevron-left"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pure-u-10-24">
|
||||
{{ if .PrevInSection }}
|
||||
<nav class="prev">
|
||||
<a href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }}</a>
|
||||
</nav>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pure-u-2-24">
|
||||
|
||||
</div>
|
||||
<div class="pure-u-10-24">
|
||||
{{ if .NextInSection }}
|
||||
<nav class="next">
|
||||
<a href="{{ .NextInSection.Permalink }}">{{ .NextInSection.Title }}</a>
|
||||
</nav>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pure-u-1-24" style="text-align: right;">
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}"><i class="fa fa-chevron-right"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
35
themes/blackburn/layouts/partials/sidemenu.html
Normal file
35
themes/blackburn/layouts/partials/sidemenu.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!-- Menu toggle -->
|
||||
<a href="#menu" id="menuLink" class="menu-link">
|
||||
<!-- Hamburger icon -->
|
||||
<span></span>
|
||||
</a>
|
||||
<div id="menu">
|
||||
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
<div class="pure-menu">
|
||||
<ul class="pure-menu-list">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="pure-menu-item pure-menu-has-children">
|
||||
<a class="pure-menu-link" href="#">{{ .Pre }}{{ .Name }}</a>
|
||||
<ul class="pure-menu-children">
|
||||
{{ range .Children }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{else}}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ .Pre }}{{ .Name }}</a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ partial "social.html" . }}
|
||||
|
||||
{{ partial "copyright.html" . }}
|
||||
</div>
|
213
themes/blackburn/layouts/partials/social.html
Normal file
213
themes/blackburn/layouts/partials/social.html
Normal file
|
@ -0,0 +1,213 @@
|
|||
<div class="pure-menu social">
|
||||
<ul class="pure-menu-list">
|
||||
|
||||
{{ if .RSSLink }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ .RSSLink }}"><i class="fa fa-rss fa-fw"></i>RSS</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- SNS microblogging -->
|
||||
|
||||
{{ with .Site.Social.diaspora }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ . }}" target="_blank"><i class="fa fa-square fa-fw"></i>diaspora*</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.pnut }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://pnut.io/@{{ . }}" target="_blank"><i class="fa fa-square fa-fw"></i>pnut</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.mastodon }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ . }}" target="_blank"><i class="fa fa-square fa-fw"></i>mastodon</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.twitter }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://twitter.com/{{ . }}" target="_blank"><i class="fa fa-twitter-square fa-fw"></i>Twitter</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.gnusocial }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ . }}" target="_blank"><i class="fa fa-comment fa-fw"></i>GNU social</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.facebook }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://facebook.com/{{ . }}" target="_blank"><i class="fa fa-facebook-square fa-fw"></i>Facebook</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.googleplus }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://plus.google.com/+{{ . }}" target="_blank"><i class="fa fa-google-plus-square fa-fw"></i>Google+</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.weibo }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="http://weibo.com/{{ . }}" target="_blank"><i class="fa fa-weibo fa-fw"></i>Weibo</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.tumblr }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://{{ . }}.tumblr.com/" target="_blank"><i class="fa fa-tumblr-square fa-fw"></i>Tumblr</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- SNS photo/video sharing -->
|
||||
|
||||
{{ with .Site.Social.instagram }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://instagram.com/{{ . }}" target="_blank"><i class="fa fa-instagram fa-fw"></i>Instagram</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.flickr }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://flickr.com/photos/{{ . }}" target="_blank"><i class="fa fa-flickr fa-fw"></i>Flickr</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.photo500px }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://500px.com/{{ . }}" target="_blank"><i class="fa fa-500px fa-fw"></i>500px</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.pinterest }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://pinterest.com/{{ . }}" target="_blank"><i class="fa fa-pinterest-square fa-fw"></i>Pinterest</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.youtube }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://youtube.com/user/{{ . }}" target="_blank"><i class="fa fa-youtube-square fa-fw"></i>YouTube</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.vimeo }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://vimeo.com/{{ . }}" target="_blank"><i class="fa fa-vimeo-square fa-fw"></i>Vimeo</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.vine }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://vine.co/{{ . }}" target="_blank"><i class="fa fa-vine fa-fw"></i>Vine</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.slideshare }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="http://slideshare.net/{{ . }}" target="_blank"><i class="fa fa-slideshare fa-fw"></i>SlideShare</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- SNS career oriented -->
|
||||
|
||||
{{ with .Site.Social.linkedin }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://linkedin.com/in/{{ . }}" target="_blank"><i class="fa fa-linkedin-square fa-fw"></i>LinkedIn</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.xing }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://xing.com/profile/{{ . }}" target="_blank"><i class="fa fa-xing-square fa-fw"></i>Xing</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- SNS news -->
|
||||
|
||||
{{ with .Site.Social.reddit }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://reddit.com/user/{{ . }}" target="_blank"><i class="fa fa-reddit-square fa-fw"></i>Reddit</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.hackernews }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://news.ycombinator.com/user?id={{ . }}" target="_blank"><i class="fa fa-hacker-news fa-fw"></i>Hacker News</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- Techie -->
|
||||
|
||||
{{ with .Site.Social.gitlab }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="{{ . }}" target="_blank"><i class="fa fa-gitlab fa-fw"></i>GitLab</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.github }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://github.com/{{ . }}" target="_blank"><i class="fa fa-github-square fa-fw"></i>GitHub</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.bitbucket }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://bitbucket.org/{{ . }}" target="_blank"><i class="fa fa-bitbucket-square fa-fw"></i>Bitbucket</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.stackoverflow }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://stackoverflow.com/users/{{ . }}" target="_blank"><i class="fa fa-stack-overflow fa-fw"></i>Stack Overflow</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.serverfault }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://serverfault.com/users/{{ . }}" target="_blank"><i class="fa fa-server fa-fw"></i>Server Fault</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- Gaming -->
|
||||
|
||||
{{ with .Site.Social.steam }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://steamcommunity.com/id/{{ . }}" target="_blank"><i class="fa fa-steam-square fa-fw"></i>Steam</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.mobygames }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://www.mobygames.com/developer/sheet/view/developerId,{{ . }}" target="_blank"><i class="fa fa-gamepad fa-fw"></i>MobyGames</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- Music -->
|
||||
|
||||
{{ with .Site.Social.lastfm }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="http://last.fm/user/{{ . }}" target="_blank"><i class="fa fa-lastfm-square fa-fw"></i>Last.fm</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.discogs }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://www.discogs.com/user/{{ . }}" target="_blank"><i class="fa fa-music fa-fw"></i>Discogs</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- Other -->
|
||||
|
||||
{{ with .Site.Social.keybase }}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="https://keybase.io/{{ . }}" target="_blank"><i class="fa fa-key fa-fw"></i>Keybase</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
</ul>
|
||||
</div>
|
17
themes/blackburn/layouts/post/post.html
Normal file
17
themes/blackburn/layouts/post/post.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<h2>{{ .Key }}</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
19
themes/blackburn/layouts/post/single.html
Normal file
19
themes/blackburn/layouts/post/single.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h2>{{ .Description }}</h2>
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
{{ partial "post_meta.html" . }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "prev_next_post.html" . }}
|
||||
|
||||
{{ partial "disqus.html" . }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
7
themes/blackburn/layouts/shortcodes/fluid_img.html
Normal file
7
themes/blackburn/layouts/shortcodes/fluid_img.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ if .IsNamedParams }}
|
||||
<div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}pure-u-1{{ end }}">
|
||||
<img class="pure-img" src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }}>
|
||||
</div>
|
||||
{{ else }}
|
||||
<img class="pure-img" src="{{ index .Params 0 }}" alt="">
|
||||
{{ end }}
|
21
themes/blackburn/layouts/shortcodes/fluid_imgs.html
Normal file
21
themes/blackburn/layouts/shortcodes/fluid_imgs.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{ $paramCount := len .Params }}
|
||||
{{ if gt $paramCount 0 }}
|
||||
<div class="pure-g">
|
||||
{{ range $param := .Params }}
|
||||
{{ $items := split $param "|" }}
|
||||
{{ $itemCount := len $items }}
|
||||
<!-- Item count must be at least 2 as
|
||||
"class" and "src" must be specified -->
|
||||
{{ if ge $itemCount 2 }}
|
||||
<div class="{{ index $items 0 }}">
|
||||
<div style="padding: 0 .2em">
|
||||
<img
|
||||
class="pure-img-responsive"
|
||||
src="{{ index $items 1 }}"
|
||||
alt="{{ if ge $itemCount 3 }}{{ index $items 2 }}{{ else }}{{ "" }}{{ end }}">
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
20
themes/blackburn/layouts/shortcodes/pure_table.html
Normal file
20
themes/blackburn/layouts/shortcodes/pure_table.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{ $fields := (index .Params 0) }}
|
||||
{{ $data := after 1 .Params }}
|
||||
|
||||
<table class="pure-table pure-table-striped">
|
||||
<thead><tr>
|
||||
{{ range split $fields "|"}}
|
||||
<th>{{ . }}</th>
|
||||
{{ end }}
|
||||
</thead></tr>
|
||||
<tbody>
|
||||
{{ range $data}}
|
||||
<tr>
|
||||
{{ $items := split . "|" }}
|
||||
{{ range $items }}
|
||||
<td>{{ . }}</td>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
13
themes/blackburn/layouts/taxonomy/tag.html
Normal file
13
themes/blackburn/layouts/taxonomy/tag.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{ range .Data.Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
13
themes/blackburn/layouts/taxonomy/topic.html
Normal file
13
themes/blackburn/layouts/taxonomy/topic.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{ range .Data.Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
89
themes/blackburn/static/css/blackburn.css
Normal file
89
themes/blackburn/static/css/blackburn.css
Normal file
|
@ -0,0 +1,89 @@
|
|||
.header {
|
||||
font-family: "Raleway", Helvetica, Arial, sans-serif
|
||||
}
|
||||
|
||||
a {
|
||||
color: #3b8bba;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover,
|
||||
a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:visited {
|
||||
color: #265778;
|
||||
}
|
||||
|
||||
.small-print {
|
||||
font-size: 0.8em;
|
||||
margin: 0.6em;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
article > footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.prev-next-post {
|
||||
margin-top: 2em;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 2em;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.prev-next-post .prev {
|
||||
float: left;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.prev-next-post .next {
|
||||
float: right;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#menu {
|
||||
overflow-y: visible;
|
||||
}
|
||||
|
||||
#menu a {
|
||||
padding: 0.6em;
|
||||
}
|
||||
|
||||
#menu .brand {
|
||||
font-family: Raleway;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: none;
|
||||
background: transparent;
|
||||
text-decoration: none;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
#menu .pure-menu {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#menu .pure-menu ul.pure-menu-children {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
i {
|
||||
display: inline-block;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
text-align: center;
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
color: #265778;
|
||||
}
|
255
themes/blackburn/static/css/side-menu-old-ie.css
Normal file
255
themes/blackburn/static/css/side-menu-old-ie.css
Normal file
|
@ -0,0 +1,255 @@
|
|||
body {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.pure-img-responsive {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Add transition to containers so they can push in and out.
|
||||
*/
|
||||
|
||||
#layout,
|
||||
#menu,
|
||||
.menu-link {
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the parent `<div>` that contains the menu and the content area.
|
||||
*/
|
||||
|
||||
#layout {
|
||||
position: relative;
|
||||
left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#layout.active #menu {
|
||||
left: 150px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 150px;
|
||||
}
|
||||
|
||||
/*
|
||||
The content `<div>` is where all your content goes.
|
||||
*/
|
||||
|
||||
.content {
|
||||
margin: 0 auto;
|
||||
padding: 0 2em;
|
||||
max-width: 800px;
|
||||
margin-bottom: 50px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 2.5em 2em 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
margin: 0.2em 0;
|
||||
font-size: 3em;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.header h2 {
|
||||
font-weight: 300;
|
||||
color: #ccc;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content-subhead {
|
||||
margin: 50px 0 20px 0;
|
||||
font-weight: 300;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/*
|
||||
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
|
||||
appears on the left side of the page.
|
||||
*/
|
||||
|
||||
#menu {
|
||||
margin-left: -150px;
|
||||
/* "#menu" width */
|
||||
width: 150px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
/* so the menu or its navicon stays above all content */
|
||||
background: #191818;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/*
|
||||
All anchors inside the menu should be styled like this.
|
||||
*/
|
||||
|
||||
#menu a {
|
||||
color: #999;
|
||||
border: none;
|
||||
padding: 0.6em 0 0.6em 0.6em;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all background/borders, since we are applying them to #menu.
|
||||
*/
|
||||
|
||||
#menu .pure-menu,
|
||||
#menu .pure-menu ul {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
Add that light border to separate items into groups.
|
||||
*/
|
||||
|
||||
#menu .pure-menu ul,
|
||||
#menu .pure-menu .menu-item-divided {
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
/*
|
||||
Change color of the anchor links on hover/focus.
|
||||
*/
|
||||
|
||||
#menu .pure-menu li a:hover,
|
||||
#menu .pure-menu li a:focus {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the selected menu item `<li>`.
|
||||
*/
|
||||
|
||||
#menu .pure-menu-selected,
|
||||
#menu .pure-menu-heading {
|
||||
background: #1f8dd6;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles a link within a selected menu item `<li>`.
|
||||
*/
|
||||
|
||||
#menu .pure-menu-selected a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the menu heading.
|
||||
*/
|
||||
|
||||
#menu .pure-menu-heading {
|
||||
font-size: 110%;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
|
||||
|
||||
/*
|
||||
The button to open/close the Menu is custom-made and not part of Pure. Here's
|
||||
how it works:
|
||||
*/
|
||||
|
||||
/*
|
||||
`.menu-link` represents the responsive menu toggle that shows/hides on
|
||||
small screens.
|
||||
*/
|
||||
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
display: block;
|
||||
/* show this only on small screens */
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* "#menu width" */
|
||||
background: #000;
|
||||
background: rgba(0,0,0,0.7);
|
||||
font-size: 10px;
|
||||
/* change this value to increase/decrease button size */
|
||||
z-index: 10;
|
||||
width: 2em;
|
||||
height: auto;
|
||||
padding: 2.1em 1.6em;
|
||||
}
|
||||
|
||||
.menu-link:hover,
|
||||
.menu-link:focus {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.menu-link span {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-link span,
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 0.2em;
|
||||
}
|
||||
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
position: absolute;
|
||||
margin-top: -0.6em;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.menu-link span:after {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
/* -- Responsive Styles (Media Queries) ------------------------------------- */
|
||||
|
||||
/*
|
||||
Hides the menu at `48em`, but modify this based on your app's needs.
|
||||
*/
|
||||
|
||||
.header,
|
||||
.content {
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#layout {
|
||||
padding-left: 150px;
|
||||
/* left col width "#menu" */
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#menu {
|
||||
left: 150px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
left: 150px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 150px;
|
||||
}
|
248
themes/blackburn/static/css/side-menu.css
Normal file
248
themes/blackburn/static/css/side-menu.css
Normal file
|
@ -0,0 +1,248 @@
|
|||
body {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.pure-img-responsive {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Add transition to containers so they can push in and out.
|
||||
*/
|
||||
#layout,
|
||||
#menu,
|
||||
.menu-link {
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the parent `<div>` that contains the menu and the content area.
|
||||
*/
|
||||
#layout {
|
||||
position: relative;
|
||||
left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
#layout.active #menu {
|
||||
left: 150px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 150px;
|
||||
}
|
||||
/*
|
||||
The content `<div>` is where all your content goes.
|
||||
*/
|
||||
.content {
|
||||
margin: 0 auto;
|
||||
padding: 0 2em;
|
||||
max-width: 800px;
|
||||
margin-bottom: 50px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 2.5em 2em 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.header h1 {
|
||||
margin: 0.2em 0;
|
||||
font-size: 3em;
|
||||
font-weight: 300;
|
||||
}
|
||||
.header h2 {
|
||||
font-weight: 300;
|
||||
color: #ccc;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content-subhead {
|
||||
margin: 50px 0 20px 0;
|
||||
font-weight: 300;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
|
||||
appears on the left side of the page.
|
||||
*/
|
||||
|
||||
#menu {
|
||||
margin-left: -150px; /* "#menu" width */
|
||||
width: 150px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000; /* so the menu or its navicon stays above all content */
|
||||
background: #191818;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
/*
|
||||
All anchors inside the menu should be styled like this.
|
||||
*/
|
||||
#menu a {
|
||||
color: #999;
|
||||
border: none;
|
||||
padding: 0.6em 0 0.6em 0.6em;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all background/borders, since we are applying them to #menu.
|
||||
*/
|
||||
#menu .pure-menu,
|
||||
#menu .pure-menu ul {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
Add that light border to separate items into groups.
|
||||
*/
|
||||
#menu .pure-menu ul,
|
||||
#menu .pure-menu .menu-item-divided {
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
/*
|
||||
Change color of the anchor links on hover/focus.
|
||||
*/
|
||||
#menu .pure-menu li a:hover,
|
||||
#menu .pure-menu li a:focus {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected,
|
||||
#menu .pure-menu-heading {
|
||||
background: #1f8dd6;
|
||||
}
|
||||
/*
|
||||
This styles a link within a selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the menu heading.
|
||||
*/
|
||||
#menu .pure-menu-heading {
|
||||
font-size: 110%;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
|
||||
|
||||
/*
|
||||
The button to open/close the Menu is custom-made and not part of Pure. Here's
|
||||
how it works:
|
||||
*/
|
||||
|
||||
/*
|
||||
`.menu-link` represents the responsive menu toggle that shows/hides on
|
||||
small screens.
|
||||
*/
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
display: block; /* show this only on small screens */
|
||||
top: 0;
|
||||
left: 0; /* "#menu width" */
|
||||
background: #000;
|
||||
background: rgba(0,0,0,0.7);
|
||||
font-size: 10px; /* change this value to increase/decrease button size */
|
||||
z-index: 10;
|
||||
width: 2em;
|
||||
height: auto;
|
||||
padding: 2.1em 1.6em;
|
||||
}
|
||||
|
||||
.menu-link:hover,
|
||||
.menu-link:focus {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.menu-link span {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-link span,
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 0.2em;
|
||||
}
|
||||
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
position: absolute;
|
||||
margin-top: -0.6em;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.menu-link span:after {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
/* -- Responsive Styles (Media Queries) ------------------------------------- */
|
||||
|
||||
/*
|
||||
Hides the menu at `48em`, but modify this based on your app's needs.
|
||||
*/
|
||||
@media (min-width: 48em) {
|
||||
|
||||
.header,
|
||||
.content {
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#layout {
|
||||
padding-left: 150px; /* left col width "#menu" */
|
||||
left: 0;
|
||||
}
|
||||
#menu {
|
||||
left: 150px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
left: 150px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 48em) {
|
||||
/* Only apply this when the window is small. Otherwise, the following
|
||||
case results in extra padding on the left:
|
||||
* Make the window small.
|
||||
* Tap the menu to trigger the active state.
|
||||
* Make the window large again.
|
||||
*/
|
||||
#layout.active {
|
||||
position: relative;
|
||||
left: 150px;
|
||||
}
|
||||
}
|
BIN
themes/blackburn/static/img/favicon.ico
Normal file
BIN
themes/blackburn/static/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
172
themes/blackburn/static/js/menus.js
Normal file
172
themes/blackburn/static/js/menus.js
Normal file
|
@ -0,0 +1,172 @@
|
|||
(function (window, document) {
|
||||
'use strict';
|
||||
|
||||
// Enable drop-down menus in Pure
|
||||
// Inspired by YUI3 gallery-simple-menu by Julien LeComte
|
||||
// [https://github.com/yui/yui3-gallery/blob/master/src/gallery-simple-menu/js/simple-menu.js]
|
||||
|
||||
function PureDropdown(dropdownParent) {
|
||||
|
||||
var PREFIX = 'pure-',
|
||||
ACTIVE_CLASS_NAME = PREFIX + 'menu-active',
|
||||
ARIA_ROLE = 'role',
|
||||
ARIA_HIDDEN = 'aria-hidden',
|
||||
MENU_OPEN = 0,
|
||||
MENU_CLOSED = 1,
|
||||
MENU_PARENT_CLASS_NAME = 'pure-menu-has-children',
|
||||
MENU_ACTIVE_SELECTOR = '.pure-menu-active',
|
||||
MENU_LINK_SELECTOR = '.pure-menu-link',
|
||||
MENU_SELECTOR = '.pure-menu-children',
|
||||
DISMISS_EVENT = (window.hasOwnProperty &&
|
||||
window.hasOwnProperty('ontouchstart')) ?
|
||||
'touchstart' : 'mousedown',
|
||||
|
||||
ARROW_KEYS_ENABLED = true,
|
||||
|
||||
ddm = this; // drop down menu
|
||||
|
||||
this._state = MENU_CLOSED;
|
||||
|
||||
this.show = function () {
|
||||
if (this._state !== MENU_OPEN) {
|
||||
this._dropdownParent.classList.add(ACTIVE_CLASS_NAME);
|
||||
this._menu.setAttribute(ARIA_HIDDEN, false);
|
||||
this._state = MENU_OPEN;
|
||||
}
|
||||
};
|
||||
|
||||
this.hide = function () {
|
||||
if (this._state !== MENU_CLOSED) {
|
||||
this._dropdownParent.classList.remove(ACTIVE_CLASS_NAME);
|
||||
this._menu.setAttribute(ARIA_HIDDEN, true);
|
||||
this._link.focus();
|
||||
this._state = MENU_CLOSED;
|
||||
}
|
||||
};
|
||||
|
||||
this.toggle = function () {
|
||||
this[this._state === MENU_CLOSED ? 'show' : 'hide']();
|
||||
};
|
||||
|
||||
this.halt = function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
this._dropdownParent = dropdownParent;
|
||||
this._link = this._dropdownParent.querySelector(MENU_LINK_SELECTOR);
|
||||
this._menu = this._dropdownParent.querySelector(MENU_SELECTOR);
|
||||
this._firstMenuLink = this._menu.querySelector(MENU_LINK_SELECTOR);
|
||||
|
||||
// Set ARIA attributes
|
||||
this._link.setAttribute('aria-haspopup', 'true');
|
||||
this._menu.setAttribute(ARIA_ROLE, 'menu');
|
||||
this._menu.setAttribute('aria-labelledby', this._link.getAttribute('id'));
|
||||
this._menu.setAttribute('aria-hidden', 'true');
|
||||
[].forEach.call(
|
||||
this._menu.querySelectorAll('li'),
|
||||
function(el){
|
||||
el.setAttribute(ARIA_ROLE, 'presentation');
|
||||
}
|
||||
);
|
||||
[].forEach.call(
|
||||
this._menu.querySelectorAll('a'),
|
||||
function(el){
|
||||
el.setAttribute(ARIA_ROLE, 'menuitem');
|
||||
}
|
||||
);
|
||||
|
||||
// Toggle on click
|
||||
this._link.addEventListener('click', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
ddm.toggle();
|
||||
});
|
||||
|
||||
// Keyboard navigation
|
||||
document.addEventListener('keydown', function (e) {
|
||||
var currentLink,
|
||||
previousSibling,
|
||||
nextSibling,
|
||||
previousLink,
|
||||
nextLink;
|
||||
|
||||
// if the menu isn't active, ignore
|
||||
if (ddm._state !== MENU_OPEN) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if the menu is the parent of an open, active submenu, ignore
|
||||
if (ddm._menu.querySelector(MENU_ACTIVE_SELECTOR)) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentLink = ddm._menu.querySelector(':focus');
|
||||
|
||||
// Dismiss an open menu on ESC
|
||||
if (e.keyCode === 27) {
|
||||
/* Esc */
|
||||
ddm.halt(e);
|
||||
ddm.hide();
|
||||
}
|
||||
// Go to the next link on down arrow
|
||||
else if (ARROW_KEYS_ENABLED && e.keyCode === 40) {
|
||||
/* Down arrow */
|
||||
ddm.halt(e);
|
||||
// get the nextSibling (an LI) of the current link's LI
|
||||
nextSibling = (currentLink) ? currentLink.parentNode.nextSibling : null;
|
||||
// if the nextSibling is a text node (not an element), go to the next one
|
||||
while (nextSibling && nextSibling.nodeType !== 1) {
|
||||
nextSibling = nextSibling.nextSibling;
|
||||
}
|
||||
nextLink = (nextSibling) ? nextSibling.querySelector('.pure-menu-link') : null;
|
||||
// if there is no currently focused link, focus the first one
|
||||
if (!currentLink) {
|
||||
ddm._menu.querySelector('.pure-menu-link').focus();
|
||||
}
|
||||
else if (nextLink) {
|
||||
nextLink.focus();
|
||||
}
|
||||
}
|
||||
// Go to the previous link on up arrow
|
||||
else if (ARROW_KEYS_ENABLED && e.keyCode === 38) {
|
||||
/* Up arrow */
|
||||
ddm.halt(e);
|
||||
// get the currently focused link
|
||||
previousSibling = (currentLink) ? currentLink.parentNode.previousSibling : null;
|
||||
while (previousSibling && previousSibling.nodeType !== 1) {
|
||||
previousSibling = previousSibling.previousSibling;
|
||||
}
|
||||
previousLink = (previousSibling) ? previousSibling.querySelector('.pure-menu-link') : null;
|
||||
// if there is no currently focused link, focus the last link
|
||||
if (!currentLink) {
|
||||
ddm._menu.querySelector('.pure-menu-item:last-child .pure-menu-link').focus();
|
||||
}
|
||||
// else if there is a previous item, go to the previous item
|
||||
else if (previousLink) {
|
||||
previousLink.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Dismiss an open menu on outside event
|
||||
document.addEventListener(DISMISS_EVENT, function (e) {
|
||||
var target = e.target;
|
||||
if (target !== ddm._link && !ddm._menu.contains(target)) {
|
||||
ddm.hide();
|
||||
ddm._link.blur();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function initDropdowns() {
|
||||
var dropdownParents = document.querySelectorAll('.pure-menu-has-children');
|
||||
for (var i = 0; i < dropdownParents.length; i++) {
|
||||
var ddm = new PureDropdown(dropdownParents[i]);
|
||||
}
|
||||
}
|
||||
|
||||
initDropdowns();
|
||||
|
||||
}(this, this.document));
|
46
themes/blackburn/static/js/ui.js
Normal file
46
themes/blackburn/static/js/ui.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
(function (window, document) {
|
||||
|
||||
var layout = document.getElementById('layout'),
|
||||
menu = document.getElementById('menu'),
|
||||
menuLink = document.getElementById('menuLink'),
|
||||
content = document.getElementById('main');
|
||||
|
||||
function toggleClass(element, className) {
|
||||
var classes = element.className.split(/\s+/),
|
||||
length = classes.length,
|
||||
i = 0;
|
||||
|
||||
for(; i < length; i++) {
|
||||
if (classes[i] === className) {
|
||||
classes.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// The className is not found
|
||||
if (length === classes.length) {
|
||||
classes.push(className);
|
||||
}
|
||||
|
||||
element.className = classes.join(' ');
|
||||
}
|
||||
|
||||
function toggleAll(e) {
|
||||
var active = 'active';
|
||||
|
||||
e.preventDefault();
|
||||
toggleClass(layout, active);
|
||||
toggleClass(menu, active);
|
||||
toggleClass(menuLink, active);
|
||||
}
|
||||
|
||||
menuLink.onclick = function (e) {
|
||||
toggleAll(e);
|
||||
};
|
||||
|
||||
content.onclick = function(e) {
|
||||
if (menu.className.indexOf('active') !== -1) {
|
||||
toggleAll(e);
|
||||
}
|
||||
};
|
||||
|
||||
}(this, this.document));
|
18
themes/blackburn/theme.toml
Normal file
18
themes/blackburn/theme.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
name = "Blackburn"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/yoshiharuyamashita/blackburn/blob/master/LICENSE.md"
|
||||
description = "A clear, responsive theme constructed using Pure CSS from Yahoo"
|
||||
homepage = "https://github.com/yoshiharuyamashita/blackburn"
|
||||
tags = ["blog", "personal", "purecss", "responsive"]
|
||||
features = ["blog", "personal", "purecss", "responsive"]
|
||||
min_version = 0.15
|
||||
|
||||
[author]
|
||||
name = "Yoshiharu Yamashita"
|
||||
homepage = "http://yoshiharuyamashita.com"
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = "Responsive side menu"
|
||||
homepage = "http://purecss.io/layouts/"
|
||||
repo = "https://github.com/yahoo/pure"
|
Loading…
Reference in a new issue