commit dc11779c232c35d546a50bda249daad4747b18fd Author: Morgan McMillian Date: Sat Nov 24 13:02:48 2018 -0800 Intial site commit diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..edcafb9 --- /dev/null +++ b/config.toml @@ -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 = "" + weight = 1 + identifier = "home" + url = "/" + [[menu.main]] + name = "Posts" + pre = "" + weight = 2 + identifier = "post" + url = "/post/" + [[menu.main]] + name = "About" + pre = "" + weight = 3 + identifier = "about" + url = "/about/" + [[menu.main]] + name = "Topics" + pre = "" + weight = 4 + identifier = "topic" + url = "/topics/" + [[menu.main]] + name = "Tags" + pre = "" + weight = 5 + identifier = "tag" + url = "/tags/" + [[menu.main]] + name = "Contact" + pre = "" + 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" diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..5ce2f6e --- /dev/null +++ b/content/about.md @@ -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. diff --git a/content/contact.md b/content/contact.md new file mode 100644 index 0000000..93be32b --- /dev/null +++ b/content/contact.md @@ -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. + +  + + + + + + + + + + + + + + +
[matrix]@thrrgilag:monkeystew.net
xmppthrrgilag@monkeystew.net
Telegram@thrrgilag
diff --git a/content/post/goober-0-7-0.md b/content/post/goober-0-7-0.md new file mode 100644 index 0000000..7d3e348 --- /dev/null +++ b/content/post/goober-0-7-0.md @@ -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. + + + +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? diff --git a/content/post/new-blog.md b/content/post/new-blog.md new file mode 100644 index 0000000..18d6cca --- /dev/null +++ b/content/post/new-blog.md @@ -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! diff --git a/static/custom.css b/static/custom.css new file mode 100644 index 0000000..fc5f9e7 --- /dev/null +++ b/static/custom.css @@ -0,0 +1,8 @@ +.yoda table { + border-spacing: 10px; +} + +.yoda th { + text-align: right; + padding-right: 10px; +} diff --git a/static/img/favicon.ico b/static/img/favicon.ico new file mode 100644 index 0000000..83be519 Binary files /dev/null and b/static/img/favicon.ico differ diff --git a/themes/blackburn/LICENSE.md b/themes/blackburn/LICENSE.md new file mode 100644 index 0000000..e1265aa --- /dev/null +++ b/themes/blackburn/LICENSE.md @@ -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. diff --git a/themes/blackburn/README.md b/themes/blackburn/README.md new file mode 100644 index 0000000..f6959c8 --- /dev/null +++ b/themes/blackburn/README.md @@ -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 = "" + weight = 1 + identifier = "home" + url = "/" + [[menu.main]] + name = "Posts" + pre = "" + weight = 2 + identifier = "post" + url = "/post/" + [[menu.main]] + name = "About" + pre = "" + weight = 3 + identifier = "about" + url = "/about/" + [[menu.main]] + name = "Contact" + pre = "" + 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 = "" + 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 `` 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) diff --git a/themes/blackburn/archetypes/default.md b/themes/blackburn/archetypes/default.md new file mode 100644 index 0000000..d41ff85 --- /dev/null +++ b/themes/blackburn/archetypes/default.md @@ -0,0 +1,8 @@ ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = "{{ .Date }}" +draft = true +tags = [] +topics = [] +description = "" ++++ diff --git a/themes/blackburn/images/screenshot.png b/themes/blackburn/images/screenshot.png new file mode 100644 index 0000000..f3148cc Binary files /dev/null and b/themes/blackburn/images/screenshot.png differ diff --git a/themes/blackburn/images/tn.png b/themes/blackburn/images/tn.png new file mode 100644 index 0000000..ce63409 Binary files /dev/null and b/themes/blackburn/images/tn.png differ diff --git a/themes/blackburn/layouts/404.html b/themes/blackburn/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/blackburn/layouts/_default/li.html b/themes/blackburn/layouts/_default/li.html new file mode 100644 index 0000000..508b8fc --- /dev/null +++ b/themes/blackburn/layouts/_default/li.html @@ -0,0 +1 @@ +
  • - {{ .Title }}
  • diff --git a/themes/blackburn/layouts/_default/single.html b/themes/blackburn/layouts/_default/single.html new file mode 100644 index 0000000..e7ccfd9 --- /dev/null +++ b/themes/blackburn/layouts/_default/single.html @@ -0,0 +1,11 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +

    {{ .Description }}

    +
    +
    + {{ .Content }} +
    + +{{ partial "footer.html" . }} diff --git a/themes/blackburn/layouts/_default/summary.html b/themes/blackburn/layouts/_default/summary.html new file mode 100644 index 0000000..fbd4d8b --- /dev/null +++ b/themes/blackburn/layouts/_default/summary.html @@ -0,0 +1,18 @@ +
    +
    +

    {{ .Title }}

    + + {{ partial "post_meta.html" . }} + +
    + +

    + {{ .Summary }} +

    + + {{ if .Truncated }} + + {{ end }} +
    diff --git a/themes/blackburn/layouts/_default/terms.html b/themes/blackburn/layouts/_default/terms.html new file mode 100644 index 0000000..7215467 --- /dev/null +++ b/themes/blackburn/layouts/_default/terms.html @@ -0,0 +1,18 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +
    +
    + +
    + +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/themes/blackburn/layouts/index.html b/themes/blackburn/layouts/index.html new file mode 100644 index 0000000..132386f --- /dev/null +++ b/themes/blackburn/layouts/index.html @@ -0,0 +1,17 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +

    {{ .Site.Params.subtitle }}

    +
    + +
    + {{ range ( .Paginate (where .Data.Pages "Type" "post")).Pages }} + {{ .Render "summary"}} + {{ end }} + + {{ partial "pagination.html" . }} + +
    + +{{ partial "footer.html" . }} diff --git a/themes/blackburn/layouts/partials/brand.html b/themes/blackburn/layouts/partials/brand.html new file mode 100644 index 0000000..99486da --- /dev/null +++ b/themes/blackburn/layouts/partials/brand.html @@ -0,0 +1,3 @@ +{{ with .Site.Params.brand }} + {{ . | safeHTML }} +{{ end }} \ No newline at end of file diff --git a/themes/blackburn/layouts/partials/copyright.html b/themes/blackburn/layouts/partials/copyright.html new file mode 100644 index 0000000..d188781 --- /dev/null +++ b/themes/blackburn/layouts/partials/copyright.html @@ -0,0 +1,9 @@ +
    +
    + {{ .Site.Copyright | safeHTML }} +
    +
    + Built with Hugo + Theme Blackburn +
    +
    diff --git a/themes/blackburn/layouts/partials/disqus.html b/themes/blackburn/layouts/partials/disqus.html new file mode 100644 index 0000000..6618e45 --- /dev/null +++ b/themes/blackburn/layouts/partials/disqus.html @@ -0,0 +1,19 @@ +{{ with .Site.Params.disqus }} +
    + + +comments powered by Disqus +{{ end }} \ No newline at end of file diff --git a/themes/blackburn/layouts/partials/favicon.html b/themes/blackburn/layouts/partials/favicon.html new file mode 100644 index 0000000..b6d67e3 --- /dev/null +++ b/themes/blackburn/layouts/partials/favicon.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/blackburn/layouts/partials/footer.html b/themes/blackburn/layouts/partials/footer.html new file mode 100644 index 0000000..0ce4001 --- /dev/null +++ b/themes/blackburn/layouts/partials/footer.html @@ -0,0 +1,10 @@ + + + + + +{{ partial "google_analytics.html" . }} +{{ partial "piwik_analytics.html" . }} + + + diff --git a/themes/blackburn/layouts/partials/google_analytics.html b/themes/blackburn/layouts/partials/google_analytics.html new file mode 100644 index 0000000..e3b83a9 --- /dev/null +++ b/themes/blackburn/layouts/partials/google_analytics.html @@ -0,0 +1,14 @@ +{{ with .Site.Params.googleAnalytics }} + +{{ end }} diff --git a/themes/blackburn/layouts/partials/head.html b/themes/blackburn/layouts/partials/head.html new file mode 100644 index 0000000..f31a14b --- /dev/null +++ b/themes/blackburn/layouts/partials/head.html @@ -0,0 +1,69 @@ + + + + + {{.Hugo.Generator}} + + {{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }} + + + {{ $purecss := "https://cdnjs.cloudflare.com/ajax/libs/pure/1.0.0/" }} + + + {{ "" | safeHTML }} + {{ "" | safeHTML }} + + {{ "" | safeHTML }} + + {{ "" | safeHTML }} + {{ "" | safeHTML }} + + {{ "" | safeHTML }} + + + + + + + + + + + + + + {{ if .RSSLink }} + + {{ end }} + + {{ with .Site.Params.highlightjs }} + + + {{ range $.Site.Params.highlightjs_extra_languages }} + + {{ end }} + + {{ end }} + + {{ partial "favicon.html" . }} + + {{ range .Site.Params.custom_css }} + {{ if findRE "https?://" . }} + + {{ else }} + + {{ end }} + {{ end }} + {{ range .Site.Params.custom_js }} + {{ if findRE "https?://" . }} + + {{ else }} + + {{ end }} + {{ end }} + + diff --git a/themes/blackburn/layouts/partials/header.html b/themes/blackburn/layouts/partials/header.html new file mode 100644 index 0000000..2de02e9 --- /dev/null +++ b/themes/blackburn/layouts/partials/header.html @@ -0,0 +1,11 @@ + + + +{{ partial "head.html" . }} + + +
    + + {{ partial "sidemenu.html" . }} + +
    diff --git a/themes/blackburn/layouts/partials/pagination.html b/themes/blackburn/layouts/partials/pagination.html new file mode 100644 index 0000000..43e0891 --- /dev/null +++ b/themes/blackburn/layouts/partials/pagination.html @@ -0,0 +1,17 @@ +{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} +{{ $prev := "fa fa-chevron-left"}} +{{ $next := "fa fa-chevron-right"}} + +{{ end }} diff --git a/themes/blackburn/layouts/partials/piwik_analytics.html b/themes/blackburn/layouts/partials/piwik_analytics.html new file mode 100644 index 0000000..3fac355 --- /dev/null +++ b/themes/blackburn/layouts/partials/piwik_analytics.html @@ -0,0 +1,16 @@ +{{ with .Site.Params.piwikAnalytics }} + + + +{{ end }} diff --git a/themes/blackburn/layouts/partials/post_meta.html b/themes/blackburn/layouts/partials/post_meta.html new file mode 100644 index 0000000..abc6bb9 --- /dev/null +++ b/themes/blackburn/layouts/partials/post_meta.html @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/themes/blackburn/layouts/partials/prev_next_post.html b/themes/blackburn/layouts/partials/prev_next_post.html new file mode 100644 index 0000000..e82380b --- /dev/null +++ b/themes/blackburn/layouts/partials/prev_next_post.html @@ -0,0 +1,31 @@ +{{ if or (.NextPage) (.PrevPage) }} +
    +
    + {{ if .PrevInSection }} + + {{ end }} +
    +
    + {{ if .PrevInSection }} + + {{ end }} +
    +
    +   +
    +
    + {{ if .NextInSection }} + + {{ end }} +
    +
    + {{ if .NextInSection }} + + {{ end }} +
    +
    +{{ end }} diff --git a/themes/blackburn/layouts/partials/sidemenu.html b/themes/blackburn/layouts/partials/sidemenu.html new file mode 100644 index 0000000..4ed0801 --- /dev/null +++ b/themes/blackburn/layouts/partials/sidemenu.html @@ -0,0 +1,35 @@ + + + + + + diff --git a/themes/blackburn/layouts/partials/social.html b/themes/blackburn/layouts/partials/social.html new file mode 100644 index 0000000..63d91ef --- /dev/null +++ b/themes/blackburn/layouts/partials/social.html @@ -0,0 +1,213 @@ + diff --git a/themes/blackburn/layouts/post/post.html b/themes/blackburn/layouts/post/post.html new file mode 100644 index 0000000..4f88857 --- /dev/null +++ b/themes/blackburn/layouts/post/post.html @@ -0,0 +1,17 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +
    +
    + {{ range .Data.Pages.GroupByDate "2006" }} +

    {{ .Key }}

    +
      + {{ range .Pages }} + {{ .Render "li" }} + {{ end }} +
    + {{ end }} +
    + +{{ partial "footer.html" . }} diff --git a/themes/blackburn/layouts/post/single.html b/themes/blackburn/layouts/post/single.html new file mode 100644 index 0000000..904a433 --- /dev/null +++ b/themes/blackburn/layouts/post/single.html @@ -0,0 +1,19 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +

    {{ .Description }}

    +
    +
    + + {{ partial "post_meta.html" . }} + + {{ .Content }} + + {{ partial "prev_next_post.html" . }} + + {{ partial "disqus.html" . }} + +
    + +{{ partial "footer.html" . }} diff --git a/themes/blackburn/layouts/shortcodes/fluid_img.html b/themes/blackburn/layouts/shortcodes/fluid_img.html new file mode 100644 index 0000000..6930dd9 --- /dev/null +++ b/themes/blackburn/layouts/shortcodes/fluid_img.html @@ -0,0 +1,7 @@ +{{ if .IsNamedParams }} +
    + +
    +{{ else }} + +{{ end }} \ No newline at end of file diff --git a/themes/blackburn/layouts/shortcodes/fluid_imgs.html b/themes/blackburn/layouts/shortcodes/fluid_imgs.html new file mode 100644 index 0000000..f899772 --- /dev/null +++ b/themes/blackburn/layouts/shortcodes/fluid_imgs.html @@ -0,0 +1,21 @@ +{{ $paramCount := len .Params }} +{{ if gt $paramCount 0 }} +
    +{{ range $param := .Params }} + {{ $items := split $param "|" }} + {{ $itemCount := len $items }} + + {{ if ge $itemCount 2 }} +
    +
    + {{ if ge $itemCount 3 }}{{ index $items 2 }}{{ else }}{{ +
    +
    + {{ end }} +{{ end }} +
    +{{ end }} \ No newline at end of file diff --git a/themes/blackburn/layouts/shortcodes/pure_table.html b/themes/blackburn/layouts/shortcodes/pure_table.html new file mode 100644 index 0000000..91236bc --- /dev/null +++ b/themes/blackburn/layouts/shortcodes/pure_table.html @@ -0,0 +1,20 @@ +{{ $fields := (index .Params 0) }} +{{ $data := after 1 .Params }} + +
    + + {{ range split $fields "|"}} + + {{ end }} + + + {{ range $data}} + + {{ $items := split . "|" }} + {{ range $items }} + + {{ end }} + + {{ end }} + +
    {{ . }}
    {{ . }}
    \ No newline at end of file diff --git a/themes/blackburn/layouts/taxonomy/tag.html b/themes/blackburn/layouts/taxonomy/tag.html new file mode 100644 index 0000000..e1601e6 --- /dev/null +++ b/themes/blackburn/layouts/taxonomy/tag.html @@ -0,0 +1,13 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +
    + +
    + {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
    + +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/themes/blackburn/layouts/taxonomy/topic.html b/themes/blackburn/layouts/taxonomy/topic.html new file mode 100644 index 0000000..056a6ab --- /dev/null +++ b/themes/blackburn/layouts/taxonomy/topic.html @@ -0,0 +1,13 @@ +{{ partial "header.html" . }} + +
    +

    {{ .Title }}

    +
    + +
    + {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
    + +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/themes/blackburn/static/css/blackburn.css b/themes/blackburn/static/css/blackburn.css new file mode 100644 index 0000000..0ddd380 --- /dev/null +++ b/themes/blackburn/static/css/blackburn.css @@ -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; +} \ No newline at end of file diff --git a/themes/blackburn/static/css/side-menu-old-ie.css b/themes/blackburn/static/css/side-menu-old-ie.css new file mode 100644 index 0000000..5cfc146 --- /dev/null +++ b/themes/blackburn/static/css/side-menu-old-ie.css @@ -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 `
    ` 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 `
    ` 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` `
    ` is the parent `
    ` 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 `
  • `. + */ + +#menu .pure-menu-selected, +#menu .pure-menu-heading { + background: #1f8dd6; +} + +/* + This styles a link within a selected menu item `
  • `. + */ + +#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; +} \ No newline at end of file diff --git a/themes/blackburn/static/css/side-menu.css b/themes/blackburn/static/css/side-menu.css new file mode 100644 index 0000000..7abd61c --- /dev/null +++ b/themes/blackburn/static/css/side-menu.css @@ -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 `
    ` 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 `
    ` 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` `
    ` is the parent `
    ` 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 `
  • `. + */ + #menu .pure-menu-selected, + #menu .pure-menu-heading { + background: #1f8dd6; + } + /* + This styles a link within a selected menu item `
  • `. + */ + #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; + } +} diff --git a/themes/blackburn/static/img/favicon.ico b/themes/blackburn/static/img/favicon.ico new file mode 100644 index 0000000..e1cb609 Binary files /dev/null and b/themes/blackburn/static/img/favicon.ico differ diff --git a/themes/blackburn/static/js/menus.js b/themes/blackburn/static/js/menus.js new file mode 100644 index 0000000..3172361 --- /dev/null +++ b/themes/blackburn/static/js/menus.js @@ -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)); \ No newline at end of file diff --git a/themes/blackburn/static/js/ui.js b/themes/blackburn/static/js/ui.js new file mode 100644 index 0000000..6d7c20b --- /dev/null +++ b/themes/blackburn/static/js/ui.js @@ -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)); diff --git a/themes/blackburn/theme.toml b/themes/blackburn/theme.toml new file mode 100644 index 0000000..99e4f9a --- /dev/null +++ b/themes/blackburn/theme.toml @@ -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"