commit 7b9c2d82bb06f3b33e42e03178db6b741716051a
parent 327709adb9f121dab53c92b1166ffd2bdd9fad54
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sat, 17 Feb 2018 22:37:39 -0600
Decoupled formatting from blog.
Diffstat:
19 files changed, 2 insertions(+), 512 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,5 +3,6 @@
*/*/*~
public
themes/*
+!themes/.gitkeep
static/isso
-static/MathJax-
\ No newline at end of file
+static/MathJax
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -1,38 +0,0 @@
-{{ partial "header.html" . }}
-
-{{if not .IsHome }}
- {{$title := i18n (lower .Title)}}
- {{ if eq $title ""}}
- <h1>{{ .Title }}</h1>
- {{ else }}
- <h1>{{ $title }}</h1>
- {{ end }}
-{{ end }}
-
-{{ .Content }}
-
-{{if not .IsHome }}
- <ul>
- {{ range (where .Data.Pages "Section" "!=" "") }}
- <li>
- <span class="date">{{ .Date.Format "2006/01/02" }}</span>
- <a href="{{ .URL }}">{{ .Title }}</a>
- <br>
- {{.Description}}
- </li>
- {{ end }}
- </ul>
-{{else}}
- <ul>
- {{ range first 5 (where .Data.Pages "Section" "!=" "") }}
- <li>
- <span class="date">{{ .Date.Format "2006/01/02" }}</span>
- <a href="{{ .URL }}">{{ .Title }}</a>
- <br>
- {{ .Description }}
- </li>
- {{ end }}
- </ul>
-{{ end }}
-
-{{ partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -1,22 +0,0 @@
-{{ partial "header.html" . }}
-<div class="article-meta">
-<h1><span class="title">{{ .Title }}</span></h1>
-{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
-{{ if (lt 0 .Params.date) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
-<p class="terms">
- {{ range $i := (slice "categories" "tags") }}
- {{ with ($.Param $i) }}
- {{ i18n (lower ($i | title)) }} | {{ range $k := . }}<a href="{{ relURL (print "/" $.Site.Language.Lang "/" $i "/" $k | urlize) }}">{{i18n $k}} </a> | {{ end }}
- <br />
- {{ end }}
- {{ end }}
-</p>
-</div>
-
-<main>
-{{ .Content }}
-</main>
-
-<!-- Enable Comments -->
-{{ partial "comment.html" . }}
-{{ partial "footer.html" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
@@ -1,23 +0,0 @@
-{{ partial "header.html" . }}
-
-{{$title := i18n .Title}}
-{{ if eq $title ""}}
- <h1>{{ .Title }}</h1>
-{{ else }}
- <h1>{{ $title }}</h1>
-{{ end }}
-
-{{ .Content }}
-
-<ul class="terms">
- {{ range $key, $value := .Data.Terms }}
- <li>
- <a href="{{ (print "/" $.Site.Language.Lang "/" $.Data.Plural "/" $key | urlize) | relURL }}">
- {{ i18n $key }}
- </a>
- ({{ len $value }})
- </li>
- {{ end }}
-</ul>
-
-{{ partial "footer.html" . }}
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
@@ -1,20 +0,0 @@
-<!-- Sperate from main body -->
-<hr />
-
-<!-- Isso support -->
-<script data-isso="/isso/"
- data-isso-css="false"
- data-isso-lang={{ .Site.Language }}
- data-isso-reply-to-self="false"
- data-isso-require-author="true"
- data-isso-require-email="true"
- data-isso-max-comments-top="10"
- data-isso-max-comments-nested="5"
- data-isso-reveal-on-click="5"
- data-isso-avatar="true"
- data-isso-avatar-bg="#ffffff"
- data-isso-avatar-fg="#710100"
- data-isso-vote="false"
- data-vote-levels=""
- src="/isso/js/embed.min.js"></script>
-<section id="isso-thread"></section>
diff --git a/layouts/partials/foot_custom.html b/layouts/partials/foot_custom.html
@@ -1,9 +0,0 @@
-<!-- MathJax Support -->
-<script src="/js/math-code.js"></script>
-<script async src="/MathJax/MathJax.js?config=TeX-MML-AM_CHTML"></script>
-
-<!-- Translated footer -->
-{{ with i18n "footer" }}
- <hr/>
- {{ . | markdownify }}
-{{ end }}
diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html
@@ -1,18 +0,0 @@
-<!-- Favicon Settings -->
-<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=PY4lvMYpEv">
-<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=PY4lvMYpEv">
-<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=PY4lvMYpEv">
-<link rel="manifest" href="/site.webmanifest?v=PY4lvMYpEv">
-<link rel="mask-icon" href="/safari-pinned-tab.svg?v=PY4lvMYpEv" color="#700000">
-<link rel="shortcut icon" href="/favicon.ico?v=PY4lvMYpEv">
-<meta name="apple-mobile-web-app-title" content="Library of Trantor">
-<meta name="application-name" content="Library of Trantor">
-<meta name="msapplication-TileColor" content="#700000">
-<meta name="theme-color" content="#707070">
-<!-- Title Translation -->
-{{$title := i18n (lower .Title)}}
-{{ if eq $title ""}}
- <title>{{ .Title }} | {{ .Site.Title }}</title>
-{{ else }}
- <title>{{ $title }} | {{ .Site.Title }}</title>
-{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html lang="{{ .Site.LanguageCode }}">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="{{ "/css/isso.css" | relURL }}" />
- <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
- <link rel="stylesheet" href="{{ "/css/fonts.css" | relURL }}" />
- {{ partial "head_custom.html" . }}
- </head>
-
- <body>
- <nav>
- <ul class="menu">
- {{ range .Site.Menus.main }}
- <li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
- {{ end }}
- {{ partial "navi_custom.html" . }}
- </ul>
- <hr/>
- </nav>
diff --git a/layouts/partials/navi_custom.html b/layouts/partials/navi_custom.html
@@ -1,7 +0,0 @@
-{{ if .IsTranslated }}
- {{ range .Translations }}
- <li>
- <a href="{{ .Permalink }}">{{ .Site.Language.LanguageName }}</a>
- </li>
- {{ end}}
-{{ end }}-
\ No newline at end of file
diff --git a/static/css/isso.css b/static/css/isso.css
@@ -1,230 +0,0 @@
-#isso-thread * {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-#isso-thread a {
- text-decoration: none;
-}
-
-#isso-thread {
- padding: 0;
- margin: 0;
-}
-#isso-thread > h4 {
- color: #555;
- font-weight: bold;
-}
-#isso-thread .textarea {
- min-height: 58px;
- outline: 0;
-}
-#isso-thread .textarea.placeholder {
- color: #AAA;
-}
-
-.isso-comment {
- max-width: 68em;
- padding-top: 0.95em;
- margin: 0.95em auto;
-}
-.isso-comment:not(:first-of-type),
-.isso-follow-up .isso-comment {
- border-top: 1px solid rgba(0, 0, 0, 0.1);
-}
-.isso-comment > div.avatar,
-.isso-postbox > .avatar {
- display: block;
- float: left;
- width: 7%;
- margin: 3px 15px 0 0;
-}
-.isso-postbox > .avatar {
- float: left;
- margin: 5px 10px 0 5px;
- width: 48px;
- height: 48px;
- overflow: hidden;
-}
-.isso-comment > div.avatar > svg,
-.isso-postbox > .avatar > svg {
- max-width: 48px;
- max-height: 48px;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 3px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
-}
-.isso-comment > div.text-wrapper {
- display: block;
-}
-.isso-comment .isso-follow-up {
- padding-left: calc(7% + 20px);
-}
-.isso-comment > div.text-wrapper > .isso-comment-header, .isso-comment > div.text-wrapper > .isso-comment-footer {
- font-size: 0.95em;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header {
- font-size: 0.85em;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header .spacer {
- padding: 0 6px;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header .spacer,
-.isso-comment > div.text-wrapper > .isso-comment-header a.permalink,
-.isso-comment > div.text-wrapper > .isso-comment-header .note,
-.isso-comment > div.text-wrapper > .isso-comment-header a.parent {
- color: gray !important;
- font-weight: normal;
- text-shadow: none !important;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header .spacer:hover,
-.isso-comment > div.text-wrapper > .isso-comment-header a.permalink:hover,
-.isso-comment > div.text-wrapper > .isso-comment-header .note:hover,
-.isso-comment > div.text-wrapper > .isso-comment-header a.parent:hover {
- color: #606060 !important;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header .note {
- float: right;
-}
-.isso-comment > div.text-wrapper > .isso-comment-header .author {
- font-weight: bold;
- color: #555;
-}
-.isso-comment > div.text-wrapper > .textarea-wrapper .textarea {
- margin-top: 0.2em;
-}
-.isso-comment > div.text-wrapper > div.text p {
- margin-top: 0.2em;
-}
-.isso-comment > div.text-wrapper > div.text p:last-child {
- margin-bottom: 0.2em;
-}
-.isso-comment > div.text-wrapper > div.text h1,
-.isso-comment > div.text-wrapper > div.text h2,
-.isso-comment > div.text-wrapper > div.text h3,
-.isso-comment > div.text-wrapper > div.text h4,
-.isso-comment > div.text-wrapper > div.text h5,
-.isso-comment > div.text-wrapper > div.text h6 {
- font-size: 130%;
- font-weight: bold;
-}
-.isso-comment > div.text-wrapper > div.textarea-wrapper .textarea {
- width: 100%;
- border: 1px solid #f0f0f0;
- border-radius: 2px;
- box-shadow: 0 0 2px #888;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer {
- font-size: 0.80em;
- color: gray !important;
- clear: left;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer a {
- font-weight: bold;
- text-decoration: none;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer a:hover {
- color: #111111 !important;
- text-shadow: #aaaaaa 0 0 1px !important;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer > a {
- position: relative;
- top: .2em;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer > a + a {
- padding-left: 1em;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer .votes {
- color: gray;
-}
-.isso-comment > div.text-wrapper > .isso-comment-footer .upvote svg,
-.isso-comment > div.text-wrapper > .isso-comment-footer .downvote svg {
- position: relative;
- top: .2em;
-}
-.isso-comment .isso-postbox {
- margin-top: 0.8em;
-}
-
-.isso-postbox {
- max-width: 68em;
- margin: 0 auto 2em;
-}
-.isso-postbox > .form-wrapper {
- display: block;
- padding: 0;
-}
-.isso-postbox > .form-wrapper > .auth-section,
-.isso-postbox > .form-wrapper > .auth-section .post-action {
- display: block;
-}
-.isso-postbox > .form-wrapper .textarea {
- margin: 0 0 .3em;
- padding: .4em .8em;
- border-radius: 3px;
- background-color: #f9f9f9;
- border: 1px solid rgba(0, 0, 0, 0.2);
-/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);*/
-}
-#isso-thread .textarea:focus,
-#isso-thread input:focus {
- border-color: #710100;
-}
-.isso-postbox > .form-wrapper > .auth-section .input-wrapper {
- display: inline-block;
- position: relative;
- max-width: 25%;
- margin: 0;
-}
-.isso-postbox > .form-wrapper > .auth-section .input-wrapper input {
- padding: .3em 10px;
- max-width: 100%;
- border-radius: 3px;
- background-color: #f9f9f9;
- line-height: 1.5em;
- border: 1px solid rgba(0, 0, 0, 0.2);
-
-/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);*/
-}
-.isso-postbox > .form-wrapper > .auth-section .input-wrapper input:focus {
- outline: 0;
- border-color: #710100;
-}
-.isso-postbox > .form-wrapper > .auth-section .post-action {
- display: inline-block;
- float: right;
- margin: 0;
-}
-.isso-postbox > .form-wrapper > .auth-section .post-action > input {
- padding: 5px;
- border-radius: 5px;
- border: 0px;
- color: #710100;
- background-color: #eee;
- cursor: pointer;
- outline: 0;
- line-height: 1.5em;
- text-decoration: none;
- background: #eee;
-}
-.isso-postbox > .form-wrapper > .auth-section .post-action > input:hover {
- background-color: #eee;
-}
-.isso-postbox > .form-wrapper > .auth-section .post-action > input:active {
- background-color: #eee;
-}
-@media screen and (max-width:600px) {
- .isso-postbox > .form-wrapper > .auth-section .input-wrapper {
- display: block;
- max-width: 100%;
- margin: 0 0 .3em;
- }
- .isso-postbox > .form-wrapper > .auth-section .input-wrapper input {
- width: 100%;
- }
- .isso-postbox > .form-wrapper > .auth-section .post-action {
- display: block;
- float: none;
- text-align: right;
- }
-}
diff --git a/static/js/math-code.js b/static/js/math-code.js
@@ -1,20 +0,0 @@
-(function() {
- var i, text, code, codes = document.getElementsByTagName('code');
- for (i = 0; i < codes.length;) {
- code = codes[i];
- if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
- text = code.textContent;
- if (/^\$[^$]/.test(text) && /[^$]\$$/.test(text)) {
- text = text.replace(/^\$/, '\\(').replace(/\$$/, '\\)');
- code.textContent = text;
- }
- if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
- /^\$(.|\s)+\$$/.test(text) ||
- /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
- code.outerHTML = code.innerHTML; // remove <code></code>
- continue;
- }
- }
- i++;
- }
-})();
diff --git a/themes/soresu/LICENSE.md b/themes/soresu/LICENSE.md
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2017 Yihui Xie
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/themes/soresu/archetypes/default.md b/themes/soresu/archetypes/default.md
@@ -1,4 +0,0 @@
----
-title: ''
-date: ''
----
diff --git a/themes/soresu/layouts/404.html b/themes/soresu/layouts/404.html
@@ -1,5 +0,0 @@
-{{ partial "header.html" . }}
-
-404 NOT FOUND
-
-{{ partial "footer.html" . }}
diff --git a/themes/soresu/layouts/_default/list.html b/themes/soresu/layouts/_default/list.html
@@ -1,18 +0,0 @@
-{{ partial "header.html" . }}
-
-{{if not .IsHome }}
-<h1>{{ .Title }}</h1>
-{{ end }}
-
-{{ .Content }}
-
-<ul>
- {{ range (where .Data.Pages "Section" "!=" "") }}
- <li>
- <span class="date">{{ .Date.Format "2006/01/02" }}</span>
- <a href="{{ .URL }}">{{ .Title }}</a>
- </li>
- {{ end }}
-</ul>
-
-{{ partial "footer.html" . }}
diff --git a/themes/soresu/layouts/_default/single.html b/themes/soresu/layouts/_default/single.html
@@ -1,12 +0,0 @@
-{{ partial "header.html" . }}
-<div class="article-meta">
-<h1><span class="title">{{ .Title }}</span></h1>
-{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
-{{ if .Params.date }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
-</div>
-
-<main>
-{{ .Content }}
-</main>
-
-{{ partial "footer.html" . }}
diff --git a/themes/soresu/layouts/partials/footer.html b/themes/soresu/layouts/partials/footer.html
@@ -1,9 +0,0 @@
- <footer>
- {{ partial "foot_custom.html" . }}
- {{ with .Site.Params.footer }}
- <hr/>
- {{ . | markdownify }}
- {{ end }}
- </footer>
- </body>
-</html>
diff --git a/themes/soresu/layouts/partials/header.html b/themes/soresu/layouts/partials/header.html
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html lang="{{ .Site.LanguageCode }}">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>{{ .Title }} | {{ .Site.Title }}</title>
- <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
- <link rel="stylesheet" href="{{ "/css/fonts.css" | relURL }}" />
- {{ partial "head_custom.html" . }}
- </head>
-
- <body>
- <nav>
- <ul class="menu">
- {{ range .Site.Menus.main }}
- <li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
- {{ end }}
- {{ partial "navi_custom.html" . }}
- </ul>
- <hr/>
- </nav>
diff --git a/themes/soresu/theme.toml b/themes/soresu/theme.toml
@@ -1,12 +0,0 @@
-name = "XMin"
-license = "MIT"
-licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md"
-description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS"
-homepage = "https://xmin.yihui.name"
-tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"]
-features = ["blog"]
-min_version = "0.18"
-
-[author]
- name = "Yihui Xie"
- homepage = "https://yihui.name"