Compare commits
7 Commits
baa292f66a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3adcf97ddc | |||
| 55929232e7 | |||
| 0d85b6d003 | |||
| 38d30e6889 | |||
| d5f138e7d1 | |||
| 9e6238bf03 | |||
| a27eaa399e |
28
config.toml
28
config.toml
@@ -1,14 +1,34 @@
|
||||
baseURL = "http://example.org/"
|
||||
languageCode = "en-us"
|
||||
title = "My New Hugo Site"
|
||||
baseURL = "https://wrong.wang/"
|
||||
languageCode = "zh-CN"
|
||||
title = "wrong.wang"
|
||||
theme = "hugo-w2ng"
|
||||
pygmentsStyle="github"
|
||||
hasCJKLanguage = true
|
||||
enableEmoji = true
|
||||
googleAnalytics = "UA-120056178-1"
|
||||
copyright = "This work is licensed under a CC BY-NC 4.0(署名-非商业性使用 4.0 国际) License."
|
||||
|
||||
[author]
|
||||
name = "王锐"
|
||||
|
||||
disableKinds = ["taxonomyTerm"]
|
||||
|
||||
[params]
|
||||
Footer = "© 2019 王不对 - **[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)** - **[RSS](/index.xml)**"
|
||||
description = "王不对的个人网站"
|
||||
Footer = "© 2019 王不对 - **[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)** - **[RSS](/blog/index.xml)**"
|
||||
HomeDesc = "**[博客](/blog/) 和 [飞行手册](/flight-rules/)中还有很多文章✨**"
|
||||
AuthorName = "王不对"
|
||||
Favicon = "/favicon.jpg"
|
||||
fontsLink = "https://fonts.googleapis.com/css?family=Noto+Serif+SC:400,500,700&display=swap&subset=chinese-simplified"
|
||||
|
||||
[params.CDN]
|
||||
#enable = false
|
||||
enable = true
|
||||
# Host must end with `/`
|
||||
Host = "https://lowentropy.jinxiapu.cn/img/"
|
||||
|
||||
[params.comments.isso]
|
||||
Host = "https://c.jinxiapu.cn/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "博客"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,14 +7,18 @@
|
||||
/* Tailwind's utility classes - generated based on config file */
|
||||
@import "node_modules/tailwindcss/utilities";
|
||||
|
||||
.markdown {
|
||||
@apply text-lg;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
@apply text-3xl my-12;
|
||||
@apply text-4xl my-12;
|
||||
}
|
||||
.markdown h2 {
|
||||
@apply text-2xl my-8;
|
||||
@apply text-3xl my-8;
|
||||
}
|
||||
.markdown h3 {
|
||||
@apply text-lg my-4;
|
||||
@apply text-xl my-4;
|
||||
}
|
||||
.markdown h4 {
|
||||
@apply my-2;
|
||||
@@ -41,28 +45,23 @@
|
||||
.markdown td {
|
||||
@apply p-1;
|
||||
}
|
||||
.markdown thead,
|
||||
.markdown tfoot,
|
||||
.markdown tr:nth-child(even) {
|
||||
@apply bg-gray-200;
|
||||
}
|
||||
.markdown pre {
|
||||
@apply overflow-x-auto p-4 border border-solid border-gray-400 shadow-lg;
|
||||
@apply overflow-x-auto p-4 border border-solid border-black my-4;
|
||||
}
|
||||
.markdown code {
|
||||
@apply bg-gray-200 font-mono text-sm;
|
||||
@apply border-dashed border-b border-black px-1 font-mono text-lg;
|
||||
}
|
||||
.markdown pre code {
|
||||
@apply bg-transparent;
|
||||
@apply px-0 border-none;
|
||||
}
|
||||
.markdown ul {
|
||||
@apply text-base pl-8 list-disc;
|
||||
@apply pl-8 list-disc;
|
||||
}
|
||||
.markdown ol {
|
||||
@apply text-base pl-8 list-decimal;
|
||||
@apply pl-8 list-decimal;
|
||||
}
|
||||
.markdown kbd {
|
||||
@apply text-xs inline-block bg-gray-100 rounded border p-1 align-middle font-normal font-mono shadow;
|
||||
@apply text-sm inline-block bg-gray-100 rounded border p-1 align-middle font-normal font-mono shadow;
|
||||
}
|
||||
.markdown hr {
|
||||
@apply block my-6 mx-auto max-w-md h-px border-t border-black;
|
||||
@@ -71,3 +70,7 @@
|
||||
.markdown a {
|
||||
@apply border-b border-black;
|
||||
}
|
||||
|
||||
.markdown a.footnote-backref, a.footnote-ref {
|
||||
@apply border-none;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
theme: {
|
||||
fontFamily: {
|
||||
'sans': ['Optima', 'Candara', '"Lucida Sans"', 'Calibri', 'Arial', 'source-han-serif-sc', '"Source Han Serif SC"',
|
||||
'sans': ['Optima', 'Candara', '"Lucida Sans"', 'Calibri', 'Arial','Noto Serif SC', 'source-han-serif-sc', '"Source Han Serif SC"',
|
||||
'"Source Han Serif CN"', '"Source Han Serif TC"', '"Source Han Serif TW"', '"Source Han Serif"', '"Songti SC"', '"Microsoft YaHei"', "sans-serif"],
|
||||
'mono': ['Menlo', 'Monaco', 'Consolas', '"Liberation Mono"', '"Courier New"', 'SFMono-Regular', 'monospace'],
|
||||
},
|
||||
|
||||
13
themes/hugo-w2ng/layouts/_default/_markup/render-image.html
Normal file
13
themes/hugo-w2ng/layouts/_default/_markup/render-image.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- $img_destination := .Destination }}
|
||||
{{ if .Page.Site.Params.CDN.enable }}
|
||||
{{ $img_destination = (print .Page.Site.Params.CDN.HOST .Page.File.Dir "/" .Destination) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Title -}}
|
||||
<figure class="max-w-2xl mx-auto rounded overflow-hidden shadow-lg">
|
||||
<img alt="{{ $.Text }}" src="{{ $img_destination | safeURL }}" />
|
||||
<figcaption class="p-2 text-center">{{ with $.Title | safeHTML }}{{ . }}{{ end }}</figcaption>
|
||||
</figure>
|
||||
{{- else }}
|
||||
<img class="mx-auto" alt="{{ $.Text }}" src="{{ $img_destination | safeURL }}" />
|
||||
{{ end -}}
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body class="font-sans">
|
||||
@@ -9,7 +9,7 @@
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
</div>
|
||||
{{- partialCached "footer.html" . -}}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -2,9 +2,9 @@
|
||||
<article itemscope itemtype="http://schema.org/Article" class="max-w-3xl mx-auto leading-relaxed">
|
||||
<header class="flex flex-col meta">
|
||||
{{- partial "taxonomy.html" . -}}
|
||||
<h1 itemprop="name" class="text-center text-3xl my-4 md:my-6">{{ .Title }}</h1>
|
||||
<h1 itemprop="name" class="text-center text-4xl my-4 md:my-6">{{ .Title }}</h1>
|
||||
{{ if not .Params.disableMeta }}
|
||||
<h3 class="text-center text-xl">
|
||||
<h3 class="text-center text-2xl">
|
||||
{{ with $.Site.Params.AuthorName }}
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name">{{ . }}</span>
|
||||
@@ -21,5 +21,14 @@
|
||||
<div itemprop="articleBody" class="content markdown">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- if (and .IsPage .Params.comment | default true ) -}}
|
||||
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
|
||||
<div id="isso-thread"></div>
|
||||
{{ with .Page.Site.Params.comments.isso.Host }}
|
||||
<script data-isso="{{ . }}" data-isso-css="true" data-isso-lang="zh_CN"
|
||||
data-isso-reply-to-self="false" data-isso-reply-notifications="true" data-isso-require-author="true"
|
||||
data-isso-require-email="true" data-isso-vote="true" src="{{ . }}js/embed.min.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -1,6 +1,6 @@
|
||||
<article itemscope itemtype="http://schema.org/Article" class="flex flex-col mt-6 mb-12">
|
||||
{{- partial "taxonomy.html" . -}}
|
||||
<h2 itemprop="name" class="text-2xl"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
<h2 itemprop="name" class="text-3xl"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
<p itemprop="datePublished" content="{{ .Date.Format "2006-01-02" }}" class="">{{ .Date.Format "2006/01/02" }}
|
||||
</p>
|
||||
<div class="py-2">
|
||||
|
||||
@@ -33,8 +33,5 @@
|
||||
</p>
|
||||
<p>{{ .Page.Site.Params.HomeDesc | markdownify }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -4,4 +4,13 @@
|
||||
{{ .Page.Site.Params.Footer | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
{{- if or ( eq .Params.math true ) ( .HasShortcode "math" ) -}}
|
||||
<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>
|
||||
{{- end -}}
|
||||
|
||||
<script src="//instant.page/3.0.0" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>
|
||||
@@ -1,10 +1,37 @@
|
||||
{{ if .Site.IsServer }}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/dev/postcss.config.js") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
{{ else }}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||
{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="force-rendering" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Cache-Control" content="no-transform">
|
||||
<meta name="format-detection" content="telephone=no,email=no,address=no">
|
||||
{{ hugo.Generator }}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/AflB-FG_Virgil-embed.css">
|
||||
{{ if eq .RelPermalink "/" }}
|
||||
<title>{{ .Site.Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{- .Title -}}{{- with .Params.subtitle -}} - {{- . -}} {{- end }} - {{ .Site.Title -}}</title>
|
||||
{{ end }}
|
||||
|
||||
{{- if .Site.IsServer -}}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/dev/postcss.config.js") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
{{ else }}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||
{{ end }}
|
||||
<!-- Fonts -->
|
||||
{{- with .Site.Params.fontsLink -}}
|
||||
{{ printf `<link href="%s" rel="stylesheet" />` . | safeHTML }}
|
||||
{{- end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="shortcut icon" href="{{ .Site.Params.Favicon }}">
|
||||
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
{{ if not $.Site.IsServer }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
@@ -1,7 +1,7 @@
|
||||
<header
|
||||
class="flex flex-col relative border-black border-b-4 md:border-none pb-6 mx-4 md:mx-0 md:w-1/5 md:text-right md:pr-8 bg-white md:text-center">
|
||||
<div class="">
|
||||
<h1 class="text-3xl md:my-12 mt-4 md:mb-12"><a href="{{ .Site.BaseURL }}" style="font-family: AflB-FG_Virgil;">wrong.wang</a></h1>
|
||||
<div>
|
||||
<h1 id="header_logo" class="text-3xl md:my-12 mt-4 md:mb-12"><a href="{{ .Site.BaseURL }}">wrong.wang</a></h1>
|
||||
<p class="font-thin italic">前进</p>
|
||||
</div>
|
||||
<input id="menu-check" type="checkbox" class="hidden" />
|
||||
|
||||
6
themes/hugo-w2ng/layouts/shortcodes/annotate.html
Normal file
6
themes/hugo-w2ng/layouts/shortcodes/annotate.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<span class="inline-block relative">
|
||||
<sup>...</sup>
|
||||
</span>
|
||||
<span class="absolute w-64 border bg-blue-400 hidden inline-block">
|
||||
{{ .Inner | $.Page.RenderString }}
|
||||
</span>
|
||||
3
themes/hugo-w2ng/layouts/shortcodes/center.html
Normal file
3
themes/hugo-w2ng/layouts/shortcodes/center.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='text-center my-6'>
|
||||
{{ .Inner | $.Page.RenderString }}
|
||||
</div>
|
||||
12
themes/hugo-w2ng/layouts/shortcodes/expand.html
Normal file
12
themes/hugo-w2ng/layouts/shortcodes/expand.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="book-expand my-4 overflow-hidden border border-black">
|
||||
<label>
|
||||
<div class="book-expand-head flex justify-between py-1 px-2 border-black border-b border-dotted">
|
||||
<span>{{ default "Expand" (.Get 0) }}</span>
|
||||
<span>{{ default "↕" (.Get 1) }}</span>
|
||||
</div>
|
||||
<input type="checkbox" class="hidden" />
|
||||
<div class="book-expand-content py-1 px-2">
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
5
themes/hugo-w2ng/layouts/shortcodes/math.html
Normal file
5
themes/hugo-w2ng/layouts/shortcodes/math.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ if ( ( eq ( .Get 0 ) "inline")) }}
|
||||
<span class="math inline">\({{- .Inner -}}\)</span>
|
||||
{{ else }}
|
||||
<span class="math display">\[{{- .Inner -}}\]</span>
|
||||
{{ end }}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,14 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "AflB-FG_Virgil";
|
||||
src: url("AflB-FG_Virgil.eot"); /* IE9 */
|
||||
src: url("AflB-FG_Virgil.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
|
||||
|
||||
url("AflB-FG_Virgil.woff") format("woff"), /* chrome、firefox */
|
||||
url("AflB-FG_Virgil.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
|
||||
|
||||
url("AflB-FG_Virgil.svg#AflB-FG_Virgil") format("svg"); /* iOS 4.1- */
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user