From 6bdd1c4c0ea567c45fdecb1e858a99ee5da246ad Mon Sep 17 00:00:00 2001
From: amzrk2
Date: Mon, 13 Apr 2020 19:13:39 +0800
Subject: Initial commit

---
 layouts/partials/favicon.html   |  1 +
 layouts/partials/footer.html    |  9 +++++++++
 layouts/partials/head.html      | 23 +++++++++++++++++++++++
 layouts/partials/header.html    |  9 +++++++++
 layouts/partials/math.html      |  5 +++++
 layouts/partials/post-meta.html | 12 ++++++++++++
 layouts/partials/scripts.html   |  5 +++++
 layouts/partials/sidebar.html   | 37 +++++++++++++++++++++++++++++++++++++
 8 files changed, 101 insertions(+)
 create mode 100644 layouts/partials/favicon.html
 create mode 100644 layouts/partials/footer.html
 create mode 100644 layouts/partials/head.html
 create mode 100644 layouts/partials/header.html
 create mode 100644 layouts/partials/math.html
 create mode 100644 layouts/partials/post-meta.html
 create mode 100644 layouts/partials/scripts.html
 create mode 100644 layouts/partials/sidebar.html

(limited to 'layouts/partials')

diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html
new file mode 100644
index 0000000..c152663
--- /dev/null
+++ b/layouts/partials/favicon.html
@@ -0,0 +1 @@
+<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/amzrk2/poal-jsdelivr/amzrk2/favicons/favicon.ico">
\ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..a5317e1
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,9 @@
+<footer>
+    <div class="container-md text-center">
+        <p>
+            &copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> |
+            Powered by <a href="https://gohugo.io/" target="_blank">Hugo {{ hugo.Version }}</a>
+            & <a href="https://github.com/amzrk2/hugo-theme-fuji/" target="_blank">Fuji</a>
+        </p>
+    </div>
+</footer>
\ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..8d035ce
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,23 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+<meta name="HandheldFriendly" content="True" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="Cache-Control" content="no-transform">
+<meta http-equiv="Cache-Control" content="no-siteapp">
+{{ hugo.Generator }}
+{{ partial "favicon.html" . }}
+
+{{ if .IsHome }}
+<title>{{ .Site.Title }} - {{ .Site.Params.subTitle }}</title>
+{{ else }}
+<title>{{ .Title }} - {{ .Site.Title }}</title>
+{{ end }}
+
+{{ $sass := resources.Get "sass/main.scss" }}
+{{ $style := $sass | resources.ToCSS }}
+<link rel="stylesheet" href="{{ $style.Permalink }}">
+<script src="{{ .Site.Params.cdnVanillaLazyloadJS }}"></script>
+
+{{ if or .Params.math .Site.Params.math }}
+{{ partial "math.html" . }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..7f3a254
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,9 @@
+<header>
+    <!-- fake navbar header-->
+    <div class="container-md clearfix">
+        <div class="col-12 p-3">
+            <a id="main-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
+            <span id="sub-title">{{ .Site.Params.subTitle }}</span>
+        </div>
+    </div>
+</header>
\ No newline at end of file
diff --git a/layouts/partials/math.html b/layouts/partials/math.html
new file mode 100644
index 0000000..621a2c8
--- /dev/null
+++ b/layouts/partials/math.html
@@ -0,0 +1,5 @@
+<!-- https://katex.org/docs/autorender.html -->
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI"
+        crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
\ No newline at end of file
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html
new file mode 100644
index 0000000..9d9832d
--- /dev/null
+++ b/layouts/partials/post-meta.html
@@ -0,0 +1,12 @@
+<span class="post-meta-item post-meta-date">
+    <time datetime="{{ .Date }}">{{ .Date.Format "2006-01-02" }} | </time>
+</span>
+<span class="post-meta-item post-meta-tags">
+    {{ if .Params.tags }}
+    {{ range .Params.tags }}
+    <a href="{{ $.Site.BaseURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
+    {{ end }}
+    {{ else }}
+    <span>无标签</span>
+    {{ end }}
+</span>
\ No newline at end of file
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
new file mode 100644
index 0000000..4caf7ba
--- /dev/null
+++ b/layouts/partials/scripts.html
@@ -0,0 +1,5 @@
+<script>
+    var lazyLoadInstance = new LazyLoad({
+        elements_selector: ".lazy"
+    });
+</script>
\ No newline at end of file
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
new file mode 100644
index 0000000..5150a87
--- /dev/null
+++ b/layouts/partials/sidebar.html
@@ -0,0 +1,37 @@
+<div id="widget-pages">
+    <h5>页面</h5>
+    <ul>
+        {{ $currentPage := . }}
+        {{ range .Site.Menus.nav }}
+        <li>
+            <a href="{{ .URL }}">{{ .Name }}</a>
+        </li>
+        {{ end }}
+    </ul>
+</div>
+<div id="widget-tags">
+    <h5>标签</h5>
+    <div>
+        {{ range .Site.Taxonomies.tags }}
+        <span>
+            <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
+        </span>
+        {{ end }}
+    </div>
+</div>
+<div id="widget-links">
+    <h5>链接</h5>
+    <ul>
+        {{ range .Site.Menus.link }}
+        <li>
+            <a href="{{ .URL }}" target="_blank"><span>{{ .Name }}</span></a>
+        </li>
+        {{ end }}
+    </ul>
+</div>
+{{ with .Site.Params.bgmImageChart }}
+<div id="widget-bgm">
+    <h5>番剧</h5>
+    <img class="lazy" src="{{ $.Site.Params.cdnLazyloadSRC }}" data-src="http://bgm.tv/chart/img/{{ . }}" />
+</div>
+{{ end }}
\ No newline at end of file
-- 
cgit v1.2.3