diff options
| author | roninro <liumy.f@foxmail.com> | 2022-07-28 17:32:43 +0800 |
|---|---|---|
| committer | roninro <liumy.f@foxmail.com> | 2022-07-28 17:32:43 +0800 |
| commit | c953d353194ae038f1815290337a82c1cb65272c (patch) | |
| tree | 6494ad04f8907cf1136972e2a0b7f6b27d206873 /layouts/_default | |
init
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/baseof.html | 109 | ||||
| -rw-r--r-- | layouts/_default/li.html | 7 | ||||
| -rw-r--r-- | layouts/_default/list.html | 23 | ||||
| -rw-r--r-- | layouts/_default/single.html | 110 | ||||
| -rw-r--r-- | layouts/_default/summary.html | 15 | ||||
| -rw-r--r-- | layouts/_default/terms.html | 20 |
6 files changed, 284 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..2b315e1 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<html lang="{{ .Site.Language.Lang }}"> + +<head> + <meta charset="utf-8"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + + {{ $title := .Title }} + {{ if gt (len $title) 0 }} + {{ $title = print $title " | " .Site.Title }} + {{ else }} + {{ $title = .Site.Title }} + {{ end }} + + <title>{{ $title }}</title> + + {{ with .Site.Params.author }} + <meta name="author" content="{{ . }}">{{ end }} + <meta name="description" content="{{ .Description | default (.Summary | default .Site.Params.description ) }}"> + <meta name="keywords" content="{{ (delimit .Keywords " ,") | default .Site.Params.keywords }}"> + + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/opengraph.html" . }} + + <link rel="stylesheet" href="/css/bootstrap.min.css" crossorigin="anonymous"> + <!-- Hux change font-awesome CDN to qiniu --> + <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" + type="text/css"> + + {{ $options := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" (slice + "sass")) }} + {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} + <link rel="stylesheet" href="{{ $style.Permalink }}"> +</head> + +<!-- hack iOS CSS :active style --> +<body ontouchstart=""> + + {{ $header_img := .Param "header_img" }} + {{ if .IsHome }} + {{ $header_img = .Site.Params.img_home }} + {{ else if eq .Kind "404" }} + {{ $header_img = .Site.Params.img_404 }} + {{ end }} + {{ if $header_img }} + {{ .Scratch.Set "header_img" $header_img }} + {{ end }} + + {{ if and .IsPage (gt .WordCount 400 ) (.Params.toc) }} + {{ .Scratch.Set "toc" true }} + {{ end }} + + <!-- Nav --> + {{ partial "nav.html" . }} + {{ partial "search.html" . }} + + <!-- Page Header --> + {{ partial "intro-header.html" . }} + + {{ block "main" . }} + + <!-- Main Content --> + <div class="container"> + <div class="row"> + {{ if eq .Site.Params.sidebar.enable false }} + + <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 + postlist-container"> + {{ block "container" . }}{{ end }} + </div> + <!-- Sidebar Container --> + <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 + sidebar-container"> + <!-- Featured Tags --> + {{ partial "featured-tags.html" }} + <!-- Friends Blog --> + {{ partial "friends.html" . }} + </div> + + {{ else }} + <!-- USE SIDEBAR --> + <!-- PostList Container --> + <div class="col-lg-8 col-lg-offset-1 col-md-8 col-md-offset-1 col-sm-12 + col-xs-12 postlist-container"> + {{ block "container" . }}{{ end }} + </div> + <!-- Sidebar Container --> + <div class="col-lg-3 col-lg-offset-0 col-md-3 col-md-offset-0 col-sm-12 + col-xs-12 sidebar-container"> + + <!-- Featured Tags --> + {{ partial "featured-tags.html" . }} + {{ partial "short-about.html" . }} + <!-- Friends Blog --> + {{ partial "friends.html" . }} + + </div> + {{ end }} + + </div> + </div> + + {{ end }} + + {{ partial "footer.html" . }} +</body> + +</html>
\ No newline at end of file diff --git a/layouts/_default/li.html b/layouts/_default/li.html new file mode 100644 index 0000000..7adca15 --- /dev/null +++ b/layouts/_default/li.html @@ -0,0 +1,7 @@ +<div class="post-preview item" data-tags="{{ with .Params.tags }} {{- delimit (apply (apply . "lower" ".") "urlquery" ".") "," -}} {{ end }}"> + <a href="{{ .Permalink }}"> + <h2 class="post-title">{{ .Title }}</h2> + <h3 class="post-subtitle">{{ .Params.subtitle }}</h3> + </a> +<hr> +</div>
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..26ce5a0 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,23 @@ +{{ define "main" }} +<div class="container"> + <div class="row"> + <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> + <!-- Article List --> + <div class="mini-post-list"> + {{ range .Pages.GroupByDate "2006" }} + + <section class=""> + <span class="fa listing-seperator"> + <span class="tag-text">{{ .Key }}</span></span> + {{ range .Pages }} + {{ .Render "li" }} + {{ end }} + </section> + {{ end }} + </div> + + </div> + </div> +</div> + +{{ end }}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..c199a65 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,110 @@ +{{ define "main" }} + +<!-- Post Content --> +<article> + <div class="container"> + <div class="row"> + + <!-- Post Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + post-container"> + + {{ .Content }} + + <hr style="visibility: hidden;" /> + <ul class="pager"> + {{ with .Prev }} + <li class="previous"> + <a href="{{ .Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .Title }}"> + Previous<br> + <span>{{ .Title }}</span> + </a> + </li> + {{ end }} + {{ with .Next }} + <li class="next"> + <a href="{{ .Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .Title }}"> + Next<br> + <span>{{ .Title }}</span> + </a> + </li> + {{ end }} + </ul> + <hr style="visibility: hidden;" /> + + <!-- comments --> + {{ partial "comments.html" . }} + + </div> + + <!-- Side Catalog Container --> + {{ $toc := .Scratch.Get "toc" }} + {{ if $toc }} + <div class=" + col-lg-2 col-lg-offset-0 + visible-lg-block + sidebar-container + catalog-container"> + <div class="side-catalog"> + <hr class="hidden-sm hidden-xs"> + <h5> + <a class="catalog-toggle" href="#">CATALOG</a> + </h5> + <ul class="catalog-body"></ul> + </div> + </div> + {{ end }} + <!-- Sidebar Container --> + <div class=" + col-lg-8 col-lg-offset-2 + col-md-10 col-md-offset-1 + sidebar-container"> + + <!-- Featured Tags --> + {{ .Scratch.Set "bottom" true }} + {{ partial "featured-tags.html" . }} + + <!-- Friends Blog --> + {{ partial "friends.html" . }} + </div> + </div> + </div> +</article> + +<!-- async load function --> +<script> + function async(u, c) { + var d = document, t = 'script', + o = d.createElement(t), + s = d.getElementsByTagName(t)[0]; + o.src = u; + if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); } + s.parentNode.insertBefore(o, s); + } +</script> +<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ --> +<script> + async("//cdnjs.cloudflare.com/ajax/libs/anchor-js/1.1.1/anchor.min.js", function () { + anchors.options = { + visible: 'hover', + placement: 'right', + // icon: '#' + }; + anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5'); + }) +</script> +<style> + /* place left on bigger screen */ + @media all and (min-width: 800px) { + .anchorjs-link { + position: absolute; + left: -0.75em; + font-size: 1.1em; + margin-top: -0.1em; + } + } +</style> + +{{ end }}
\ No newline at end of file diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..419ec44 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,15 @@ +<div class="post-preview"> + <a href="{{ .Permalink }}"> + <h2 class="post-title">{{ .Title }}</h2> + {{ with .Params.subtitle }} + <h3 class="post-subtitle">{{ . }}</h3> + {{ end }} + <div class="post-content-preview"> + {{ .Summary | plainify }} + </div> + </a> + <p class="post-meta"> + Posted by {{ with $.Params.author }} {{ $.Params.author }} {{ else }} {{ .Site.Params.author }} {{ end }} on {{ .Date.Format "Mon, Jan 2, 2006" }} + </p> +</div> +<hr>
\ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..ec52911 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,20 @@ +{{ define "main" }} + +<div class="container"> + <div class="row"> + <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> + <!-- Article List --> + <div class="mini-post-list"> + + <section class=""> + <span class="fa listing-seperator"></span> + {{ range .Pages }} + {{ .Render "li" }} + {{ end }} + </section> + </div> + + </div> + </div> +</div> +{{ end }}
\ No newline at end of file |
