Update theme and content
This commit is contained in:
parent
76ed4205b9
commit
d4db9d25ed
126 changed files with 2131 additions and 4 deletions
3
themes/crab/layouts/404.html
Normal file
3
themes/crab/layouts/404.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!--{{ partial "header.html" . }}-->
|
||||
Page not found.
|
||||
{{ partial "footer.html" . }}
|
25
themes/crab/layouts/_default/list.html
Normal file
25
themes/crab/layouts/_default/list.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
{{ range sort .Paginator.Pages }}
|
||||
<div id="paginator-page">
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
<div class="content">
|
||||
{{ .Summary | plainify | safeHTML }}
|
||||
...
|
||||
<div id="paginator-page-footer">
|
||||
{{ if not .Date.IsZero }}
|
||||
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
<div id="paginator-page-button">
|
||||
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ if .Params.tags }}
|
||||
{{ partial "tags" .Params.tags }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
9
themes/crab/layouts/_default/single.html
Normal file
9
themes/crab/layouts/_default/single.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
{{ if .Params.tags }}
|
||||
{{ partial "tags" .Params.tags }}
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
3
themes/crab/layouts/index.html
Normal file
3
themes/crab/layouts/index.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ .Content }}
|
||||
{{ partial "footer.html" . }}
|
12
themes/crab/layouts/partials/footer.html
Normal file
12
themes/crab/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © {{ now.Year }} {{ $.Site.Params.copyright }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
63
themes/crab/layouts/partials/header.html
Normal file
63
themes/crab/layouts/partials/header.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/crab.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}{{ .Site.Params.custom_css }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0">
|
||||
{{ .Hugo.Generator }}
|
||||
|
||||
|
||||
|
||||
{{ if isset .Site.Params "mathjax"}}
|
||||
<script type="text/javascript" src="{{ .Site.Params.mathjax }}">
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="header-left">
|
||||
|
||||
<div id="site-logo">
|
||||
<a href="{{ .Site.BaseURL }}"><img src="{{ .Site.BaseURL }}{{ .Site.Params.logoimage }}"></a>
|
||||
</div>
|
||||
|
||||
<div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
|
||||
<div id="site-slogan">{{ .Site.Params.Description }}</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="header-right">
|
||||
{{ if .IsTranslated }}
|
||||
<ul class="language-selector">
|
||||
<li>
|
||||
<a class="selected">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "menu.html" . }}
|
||||
|
||||
{{ if isset .Params "image"}}
|
||||
<div id="featured-image">
|
||||
<img src="{{ .Params.image }}">
|
||||
</div>
|
||||
{{end}}
|
||||
<div id="page-title-container">
|
||||
<div id="page-title">
|
||||
{{ .Title }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div id="article">
|
28
themes/crab/layouts/partials/menu.html
Normal file
28
themes/crab/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<nav>
|
||||
<ul class="first">
|
||||
{{ $currentNode := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}
|
||||
<li><a class="selected">{{ .Name }}</a>
|
||||
{{ else }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ if .HasChildren }}
|
||||
<ul class="second">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}{{ if .HasChildren }} »{{ end }}</a>
|
||||
{{ if .HasChildren }}
|
||||
<ul class="third">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{.URL}}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
16
themes/crab/layouts/partials/pagination.html
Normal file
16
themes/crab/layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ $pag := .Paginator }}
|
||||
{{ if gt $pag.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">← {{ i18n "newer" }}</a></li>
|
||||
{{ else }}
|
||||
<li class="previous-disabled">← {{ i18n "newer" }}</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} →</a></li>
|
||||
{{ else }}
|
||||
<li class="next-disabled">{{ i18n "older" }} →</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
5
themes/crab/layouts/partials/tags.html
Normal file
5
themes/crab/layouts/partials/tags.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<p class="tags">
|
||||
Tags: {{ range . }}
|
||||
<a href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</p>
|
3
themes/crab/layouts/shortcodes/summary.html
Normal file
3
themes/crab/layouts/shortcodes/summary.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div id="summary">
|
||||
{{ .Inner }}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue