diff options
author | tummychow <tummychow@users.noreply.github.com> | 2014-03-14 09:01:21 +0400 |
---|---|---|
committer | tummychow <tummychow@users.noreply.github.com> | 2014-03-14 09:19:59 +0400 |
commit | 3f0005b46ee0e5c450f9202e3a59b4a88c120197 (patch) | |
tree | 44f2ba15e6183471d5238c179bd88c080eb32581 /layouts |
Init
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/chrome/default_foot.html | 7 | ||||
-rw-r--r-- | layouts/chrome/default_head.html | 22 | ||||
-rw-r--r-- | layouts/chrome/head.html | 28 | ||||
-rw-r--r-- | layouts/chrome/sidebar.html | 29 | ||||
-rw-r--r-- | layouts/fixed/single.html | 8 | ||||
-rw-r--r-- | layouts/index.html | 17 | ||||
-rw-r--r-- | layouts/post/single.html | 9 | ||||
-rw-r--r-- | layouts/rss.xml | 24 |
8 files changed, 144 insertions, 0 deletions
diff --git a/layouts/chrome/default_foot.html b/layouts/chrome/default_foot.html new file mode 100644 index 0000000..0780e14 --- /dev/null +++ b/layouts/chrome/default_foot.html @@ -0,0 +1,7 @@ + </div> + </div> + + <label for="sidebar-checkbox" class="sidebar-toggle"></label> + + </body> +</html> diff --git a/layouts/chrome/default_head.html b/layouts/chrome/default_head.html new file mode 100644 index 0000000..4ccac8d --- /dev/null +++ b/layouts/chrome/default_head.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> + + {{ template "chrome/head.html" . }} + + <body> + + {{ template "chrome/sidebar.html" . }} + + <!-- Wrap is the content to shift when toggling the sidebar. We wrap the + content to avoid any CSS collisions with our real content. --> + <div class="wrap"> + <div class="masthead"> + <div class="container"> + <h3 class="masthead-title"> + <a href="/" title="Home">{{ .Site.Params.Title }}</a> + <small>{{ .Site.Params.Tagline }}</small> + </h3> + </div> + </div> + + <div class="container content"> diff --git a/layouts/chrome/head.html b/layouts/chrome/head.html new file mode 100644 index 0000000..1b43d6a --- /dev/null +++ b/layouts/chrome/head.html @@ -0,0 +1,28 @@ +<head> + <link href="http://gmpg.org/xfn/11" rel="profile"> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + + <!-- Enable responsiveness on mobile devices--> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> + + <title> + {{ if eq .Url "/" }} + {{ .Site.Params.Title }} · {{ .Site.Params.Tagline }} + {{ else }} + {{ .Title }} · {{ .Site.Params.Title }} + {{ end }} + </title> + + <!-- CSS --> + <link rel="stylesheet" href="/css/poole.css"> + <link rel="stylesheet" href="/css/syntax.css"> + <link rel="stylesheet" href="/css/lanyon.css"> + <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400"> + + <!-- Icons --> + <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/apple-touch-icon-144-precomposed.png"> + <link rel="shortcut icon" href="/assets/favicon.ico"> + + <!-- RSS --> + <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml"> +</head> diff --git a/layouts/chrome/sidebar.html b/layouts/chrome/sidebar.html new file mode 100644 index 0000000..855a9b4 --- /dev/null +++ b/layouts/chrome/sidebar.html @@ -0,0 +1,29 @@ +<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular + styles, `#sidebar-checkbox` for behavior. --> +<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox"> + +<!-- Toggleable sidebar --> +<div class="sidebar" id="sidebar"> + <div class="sidebar-item"> + <p>A reserved <a href="http://jekyllrb.com" target="_blank">Jekyll</a> theme that places the utmost gravity on content with a hidden drawer. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a>.</p> + </div> + + <nav class="sidebar-nav"> + <a class="sidebar-nav-item {{ if eq .Url "/" }} active {{ end }}" href="/">Home</a> + + {{ $thisperma := .Permalink }} + {{ range .Site.Recent }} + {{ if isset .Params "sidebar" }} + <a class="sidebar-nav-item {{ if eq .Permalink $thisperma }} active {{ end }}" href="{{ .Permalink }}">{{ .Title }}</a> + {{ end }} + {{ end }} + + <a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}/archive/{{ .Site.Params.Github.Head }}.zip">Download</a> + <a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}">GitHub project</a> + <span class="sidebar-nav-item">Currently on {{ .Site.Params.Github.Head }}</span> + </nav> + + <div class="sidebar-item"> + <p>© {{ .Site.LastChange.Year }}. All rights reserved.</p> + </div> +</div> diff --git a/layouts/fixed/single.html b/layouts/fixed/single.html new file mode 100644 index 0000000..7dc117a --- /dev/null +++ b/layouts/fixed/single.html @@ -0,0 +1,8 @@ +{{ template "chrome/default_head.html" . }} + +<div class="page"> + <h1 class="page-title">{{ .Title }}</h1> + {{ .Content }} +</div> + +{{ template "chrome/default_foot.html" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..9c67e98 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,17 @@ +{{ template "chrome/default_head.html" . }} + +{{ $pagination := 5 }} + +<div class="posts"> + {{ range first $pagination .Data.Pages }} + {{ if eq .Type "post"}} + <div class="post"> + <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + <span class="post-date">{{ .Date.Format "Jan 2 2006" }}</span> + {{ .Content }} + </div> + {{ end }} + {{ end }} +</div> + +{{ template "chrome/default_foot.html" . }} diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..26f625c --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,9 @@ +{{ template "chrome/default_head.html" . }} + +<div class="post"> + <h1 class="post-title">{{ .Title }}</h1> + <span class="post-date">{{ .Date.Format "Jan 2 2006" }}</span> + {{ .Content }} +</div> + +{{ template "chrome/default_foot.html" . }} diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 0000000..35f1d80 --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,24 @@ +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ .Site.Title }} </title> + <link>{{ .Permalink }}</link> + <language>en-us</language> + <author>{{ .Site.Params.Author }}</author> + <rights>(C) {{ .Site.LastChange.Year }}</rights> + <updated>{{ .Date }}</updated> + + {{ range .Data.Pages }} + {{ if eq .Type "post"}} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</pubDate> + <author>{{ .Site.Params.Author }}</author> + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + {{ end }} + + </channel> +</rss> |