Initial restructuring
This commit is contained in:
parent
c71d9f723b
commit
b1719e8d24
69 changed files with 1133 additions and 3 deletions
0
themes/rb/layouts/404.html
Normal file
0
themes/rb/layouts/404.html
Normal file
11
themes/rb/layouts/_default/baseof.html
Normal file
11
themes/rb/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<main id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
6
themes/rb/layouts/_default/li.html
Normal file
6
themes/rb/layouts/_default/li.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
<small><time>{{ .Date | time.Format (i18n "posts.date") }}</time></small>
|
||||
</a>
|
||||
</li>
|
||||
41
themes/rb/layouts/_default/rss.xml
Normal file
41
themes/rb/layouts/_default/rss.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range where .Site.Pages "Kind" "page" }}
|
||||
{{ if or (eq .Section "posts") (eq .Section "post") }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
8
themes/rb/layouts/_default/taxonomy.html
Normal file
8
themes/rb/layouts/_default/taxonomy.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{{ define "main" }}
|
||||
<h3>{{ .Title }}</h3>
|
||||
<ul id="posts">
|
||||
{{- range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
8
themes/rb/layouts/blog/section.html
Normal file
8
themes/rb/layouts/blog/section.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{{ define "main" }}
|
||||
<h3>{{ i18n "posts.title" }}</h3>
|
||||
<ul id="posts">
|
||||
{{- range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
17
themes/rb/layouts/blog/single.html
Normal file
17
themes/rb/layouts/blog/single.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<header id="post-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div>
|
||||
{{- if isset .Params "date" -}}
|
||||
{{ if eq .Lastmod .Date }}
|
||||
<time>{{ .Date | time.Format (i18n "post.created") }}</time>
|
||||
{{ else }}
|
||||
<time>{{ .Lastmod | time.Format (i18n "post.updated") }}</time>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</header>
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
12
themes/rb/layouts/dev/section.html
Normal file
12
themes/rb/layouts/dev/section.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
<h3>Projects</h3>
|
||||
<ul id="posts">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<small>{{ .Summary }}</small>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
12
themes/rb/layouts/index.html
Normal file
12
themes/rb/layouts/index.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
<h3>Latest blog posts</h3>
|
||||
{{ with .GetPage "blog" }}
|
||||
<ul id="posts">
|
||||
{{- range first 5 .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
<a href="{{ .Permalink }}">Older</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
3
themes/rb/layouts/partials/footer.html
Normal file
3
themes/rb/layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<footer id="footer">
|
||||
{{ .Site.Params.copyright }}
|
||||
</footer>
|
||||
31
themes/rb/layouts/partials/head.html
Normal file
31
themes/rb/layouts/partials/head.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ with .Site.Params.description -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ printf `<link rel="shortcut icon" href="%s">` ("favicon.ico" | absURL) | safeHTML }}
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $resources := slice -}}
|
||||
|
||||
{{ $resources = $resources | append (resources.Get "css/main.css") -}}
|
||||
|
||||
{{ $resources = $resources | append (resources.Get "css/min770px.css") -}}
|
||||
|
||||
{{ $dark := .Site.Params.dark | default "auto" -}}
|
||||
{{ if not (eq $dark "off") -}}
|
||||
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.highlight -}}
|
||||
{{ $resources = $resources | append (resources.Get "css/syntax.css") -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $css := $resources | resources.Concat "css/style.css" | minify }}
|
||||
{{ printf `<link rel="stylesheet" href="%s">` $css.RelPermalink | safeHTML }}
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
</head>
|
||||
12
themes/rb/layouts/partials/header.html
Normal file
12
themes/rb/layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<header id="banner">
|
||||
<h2><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ range .Site.Menus.main.ByWeight -}}
|
||||
<li>
|
||||
{{ .Pre }}<a href="{{ .URL }}" title="{{ .Title }}">{{- .Name -}}</a>{{ .Post }}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
6
themes/rb/layouts/partials/posts.html
Normal file
6
themes/rb/layouts/partials/posts.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<h3>{{ i18n "posts.title" }}</h3>
|
||||
<ul id="posts">
|
||||
{{- range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
14
themes/rb/layouts/project/section.html
Normal file
14
themes/rb/layouts/project/section.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ range .Page.Params.links -}}
|
||||
<li>
|
||||
<a href="{{ .url }}" title="{{ .name }}">{{- .name -}}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
4
themes/rb/layouts/shortcodes/toc.html
Normal file
4
themes/rb/layouts/shortcodes/toc.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<aside id="toc">
|
||||
<h4>Table of Contents</h4>
|
||||
{{ .Page.TableOfContents }}
|
||||
</aside>
|
||||
Loading…
Add table
Add a link
Reference in a new issue