First commit
This commit is contained in:
commit
6201e14a9e
18 changed files with 233 additions and 0 deletions
35
layouts/_default/list.html
Normal file
35
layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!-- same as index.html for tags listing -->
|
||||
<div class="container">
|
||||
{{ partial "header" . }}
|
||||
{{ partial "nav" . }}
|
||||
<main class="container">
|
||||
{{ if .Site.RegularPages }}
|
||||
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups }}
|
||||
<h1 class="title is-3">{{ .Key }}</h1>
|
||||
{{ range where .Pages "Section" "posts" }}
|
||||
<article class="columns">
|
||||
<div class="column is-2">
|
||||
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
|
||||
<div class="content is-hidden-mobile">
|
||||
{{ .Summary | plainify | safeHTML | truncate 400 }}
|
||||
{{ if .Truncated }}
|
||||
<br>
|
||||
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
|
||||
<span class="icon-link is-small" style="line-height: 100%">
|
||||
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
||||
</span>
|
||||
<p style="padding:0 5px"></p>more</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ partial "pager" . }}
|
||||
{{ partial "footer" . }}
|
||||
</div>
|
||||
12
layouts/_default/single.html
Normal file
12
layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{{ partial "header" . }}
|
||||
{{ partial "nav" . }}
|
||||
<div class="container">
|
||||
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
|
||||
<h1 class="subtitle is-size-4-mobile is-size-3-desktop">{{ .Title }}</h1>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "jsshare" . }}
|
||||
{{ partial "disqus" . }}
|
||||
{{ partial "footer" . }}
|
||||
34
layouts/index.html
Normal file
34
layouts/index.html
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<div class="container">
|
||||
{{ partial "header" . }}
|
||||
{{ partial "nav" . }}
|
||||
<main class="container">
|
||||
{{ if .Site.RegularPages }}
|
||||
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups}}
|
||||
<h1 class="title is-3">{{ .Key }}</h1>
|
||||
{{ range where .Pages "Section" "posts" }}
|
||||
<article class="columns">
|
||||
<div class="column is-2">
|
||||
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
|
||||
<div class="content is-hidden-mobile">
|
||||
{{ .Summary | plainify | safeHTML | truncate 400 }}
|
||||
{{ if .Truncated }}
|
||||
<br>
|
||||
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
|
||||
<span class="icon-link is-small" style="line-height: 100%">
|
||||
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
||||
</span>
|
||||
<p style="padding:0 5px"></p>more</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ partial "pager" . }}
|
||||
{{ partial "footer" . }}
|
||||
</div>
|
||||
30
layouts/partials/header.html
Normal file
30
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html{{ with .Site.LanguageCode }} lang="{{ . }}"{{ end }}>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{{ $scratch := newScratch }}
|
||||
{{ $scratch.Set "baseURL" .Site.BaseURL }}
|
||||
|
||||
<title>{{ .Title }}{{ if eq .IsHome false }} | {{ .Site.Title }}{{ end }}</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ $scratch.Get "baseURL" }}/css/styles.css">
|
||||
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
|
||||
integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
|
||||
|
||||
{{ with .Site.Params.highlight.style }}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ . }}.min.css" crossorigin="anonymous" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
<script src="{{ $scratch.Get "baseURL" }}/js/highlight.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq "true" .Site.Params.share.enabled }}
|
||||
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials.css" />
|
||||
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials-theme-minima.css" />
|
||||
<script type="text/javascript" src="{{ $scratch.Get "baseURL" }}/js/jssocials.js"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ .Scratch.Delete "baseURL" }}
|
||||
14
layouts/partials/language-switcher.html
Normal file
14
layouts/partials/language-switcher.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<nav class="language-selector layout__language-selector">
|
||||
|
||||
{{ if .IsTranslated -}}
|
||||
{{ range .Translations }}
|
||||
<a rel="alternate" href="{{ .RelPermalink }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .Language.LanguageName }}</a>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ range .Site.Languages -}}
|
||||
{{ if ne $.Site.Language.Lang .Lang }}
|
||||
<a rel="alternate" href="{{ .Lang | relURL }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .LanguageName }}</a>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</nav>
|
||||
19
layouts/partials/nav.html
Normal file
19
layouts/partials/nav.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<div class="container">
|
||||
<nav class="navbar level">
|
||||
<div class="navbar-brand">
|
||||
<a class="nav-item" href="{{ .Site.BaseURL }}"><h1 class="title is-3">{{ .Site.Title }}</h1></a>
|
||||
</div>
|
||||
<div class="navbar-menu has-text-centered is-active">
|
||||
<div class="navbar-end is-centered">
|
||||
{{ range .Site.Params.social }}
|
||||
<a href="{{ .url | absLangURL }}" rel="me">
|
||||
<span class="icon">
|
||||
<i class="{{ .fa_icon }}"></i>
|
||||
</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ partial "language-switcher.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
16
layouts/section/about.html
Normal file
16
layouts/section/about.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ partial "header" . }}
|
||||
{{ partial "nav" . }}
|
||||
<div class="container">
|
||||
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
|
||||
<h2 class="subtitle is-size-4-mobile is-size-3-desktop">{{ .Title }}</h1>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<h2 class="subtitle is-size-5-mobile is-size-4-desktop">Frequent Tags</h2>
|
||||
{{ range .Site.Taxonomies.tags.ByCount }}
|
||||
<a href="/tags/{{ .Name | urlize }}"> {{ .Name }} ({{ .Count }}) </a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{ partial "jsshare" . }}
|
||||
{{ partial "disqus" . }}
|
||||
{{ partial "footer" . }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue