aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/themes
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-08-02 13:23:35 +0800
committer简律纯 <i@jyunko.cn>2024-08-02 13:23:35 +0800
commite03422873a1788137f120d9c8f34b2be079f0aee (patch)
treef52775951aed0c594a6b1ca4c9432f3bba74ecac /themes
parent2b8db24f956ad99305860c2f8f4cd3a331a76dc6 (diff)
downloadjournal-e03422873a1788137f120d9c8f34b2be079f0aee.tar.gz
journal-e03422873a1788137f120d9c8f34b2be079f0aee.zip
docs: build with hugo
Diffstat (limited to 'themes')
-rw-r--r--themes/hugo-xmag/.github/FUNDING.yml3
-rw-r--r--themes/hugo-xmag/.gitignore5
-rw-r--r--themes/hugo-xmag/LICENSE.md20
-rw-r--r--themes/hugo-xmag/README.md53
-rw-r--r--themes/hugo-xmag/archetypes/default.md4
-rw-r--r--themes/hugo-xmag/hugo-xmag.Rproj16
-rw-r--r--themes/hugo-xmag/images/screenshot.pngbin0 -> 87623 bytes
-rw-r--r--themes/hugo-xmag/images/tn.pngbin0 -> 49120 bytes
-rw-r--r--themes/hugo-xmag/layouts/404.html9
-rw-r--r--themes/hugo-xmag/layouts/_default/list.html52
-rw-r--r--themes/hugo-xmag/layouts/_default/single.html41
-rw-r--r--themes/hugo-xmag/layouts/_default/terms.html22
-rw-r--r--themes/hugo-xmag/layouts/partials/author.html25
-rw-r--r--themes/hugo-xmag/layouts/partials/author_names.html1
-rw-r--r--themes/hugo-xmag/layouts/partials/banner.html7
-rw-r--r--themes/hugo-xmag/layouts/partials/comments.html0
-rw-r--r--themes/hugo-xmag/layouts/partials/foot_custom.html0
-rw-r--r--themes/hugo-xmag/layouts/partials/footer.html34
-rw-r--r--themes/hugo-xmag/layouts/partials/head_custom.html1
-rw-r--r--themes/hugo-xmag/layouts/partials/header.html41
-rw-r--r--themes/hugo-xmag/layouts/partials/info.html0
-rw-r--r--themes/hugo-xmag/layouts/partials/meta.html0
-rw-r--r--themes/hugo-xmag/layouts/partials/prev_next.html6
-rw-r--r--themes/hugo-xmag/static/css/fonts.css13
-rw-r--r--themes/hugo-xmag/static/css/style.css175
-rw-r--r--themes/hugo-xmag/theme.toml12
26 files changed, 540 insertions, 0 deletions
diff --git a/themes/hugo-xmag/.github/FUNDING.yml b/themes/hugo-xmag/.github/FUNDING.yml
new file mode 100644
index 0000000..9a5a186
--- /dev/null
+++ b/themes/hugo-xmag/.github/FUNDING.yml
@@ -0,0 +1,3 @@
+github: [yihui]
+patreon:
+custom:
diff --git a/themes/hugo-xmag/.gitignore b/themes/hugo-xmag/.gitignore
new file mode 100644
index 0000000..ce130a0
--- /dev/null
+++ b/themes/hugo-xmag/.gitignore
@@ -0,0 +1,5 @@
+.Rproj.user
+.Rhistory
+.RData
+.Ruserdata
+exampleSite/public
diff --git a/themes/hugo-xmag/LICENSE.md b/themes/hugo-xmag/LICENSE.md
new file mode 100644
index 0000000..fa77e18
--- /dev/null
+++ b/themes/hugo-xmag/LICENSE.md
@@ -0,0 +1,20 @@
+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/hugo-xmag/README.md b/themes/hugo-xmag/README.md
new file mode 100644
index 0000000..6095d66
--- /dev/null
+++ b/themes/hugo-xmag/README.md
@@ -0,0 +1,53 @@
+# HUGO XMAG
+
+**XMag** is designed based on the Hugo theme [**XMin**](https://github.com/yihui/hugo-xmin), and similarly, features minimalism but with a magazine style on the homepage inspired by [The Signpost](https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost) on Wikipedia.
+
+This theme includes a few cool features:
+
+- Responsive article summary blocks on homepage
+
+- Thumbnails in summary blocks
+
+- Magazine title in Blackletter (&Bfr;&Lfr;&Afr;&Cfr;&Kfr; &Lfr;&Efr;&Tfr;&Tfr;&Efr;&Rfr;)
+
+- Github edit links
+
+- Author info and site info at the bottom of an article
+
+- MathJax for LaTeX math expressions
+
+It also supports features that are probably not even worth mentioning:
+
+- Google Analytics
+
+- highlight.js for syntax highlighting of code blocks
+
+- Display categories and tags on single pages
+
+- Table of contents for single pages
+
+Most features can be configured through `config.toml`, and a few can be enabled by custom layouts. Please see the detailed documentation on the [About](https://xmag.yihui.org/about/) page of the theme website. The source code is available [on Github](https://github.com/yihui/hugo-xmag) (MIT license).
+
+## Quickstart guide
+
+If you are an R user, the easiest way to get started with this theme is to install the **blogdown** package, and [use `blogdown::new_site()` to create a new site](https://bookdown.org/yihui/blogdown/a-quick-example.html):
+
+```r
+install.packages('blogdown')
+blogdown::new_site(theme = 'yihui/hugo-xmag')
+```
+
+If you do not use R, please read on.
+
+**Watch out** The standard [Quickstart Guide](https://gohugo.io/getting-started/quick-start/) fails. In Step 3 do not proceed past `git init`.
+
+Then, to install this theme in your Hugo site
+
+1. Download this repo and unzip it
+1. Change directory to the site root
+1. Copy the downloaded theme into `themes/`: `cp -r ~/Downloads/hugo-mag-master themes/hugo-mag`
+1. Copy the example site into your site root: `cp -r themes/hugo-mag/exampleSite .`
+
+Now resume the Quickstart Guide at Step 5.
+
+[![Screenshot](https://github.com/yihui/hugo-xmag/raw/master/images/screenshot.png)](https://xmag.yihui.org)
diff --git a/themes/hugo-xmag/archetypes/default.md b/themes/hugo-xmag/archetypes/default.md
new file mode 100644
index 0000000..fb98e92
--- /dev/null
+++ b/themes/hugo-xmag/archetypes/default.md
@@ -0,0 +1,4 @@
+---
+title: ''
+date: ''
+---
diff --git a/themes/hugo-xmag/hugo-xmag.Rproj b/themes/hugo-xmag/hugo-xmag.Rproj
new file mode 100644
index 0000000..d64e28b
--- /dev/null
+++ b/themes/hugo-xmag/hugo-xmag.Rproj
@@ -0,0 +1,16 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: knitr
+LaTeX: pdfLaTeX
+
+AutoAppendNewline: Yes
+StripTrailingWhitespace: Yes
diff --git a/themes/hugo-xmag/images/screenshot.png b/themes/hugo-xmag/images/screenshot.png
new file mode 100644
index 0000000..af0bb31
--- /dev/null
+++ b/themes/hugo-xmag/images/screenshot.png
Binary files differ
diff --git a/themes/hugo-xmag/images/tn.png b/themes/hugo-xmag/images/tn.png
new file mode 100644
index 0000000..68f61b4
--- /dev/null
+++ b/themes/hugo-xmag/images/tn.png
Binary files differ
diff --git a/themes/hugo-xmag/layouts/404.html b/themes/hugo-xmag/layouts/404.html
new file mode 100644
index 0000000..c7d0697
--- /dev/null
+++ b/themes/hugo-xmag/layouts/404.html
@@ -0,0 +1,9 @@
+{{ partial "header.html" . }}
+
+<div class="container">
+<main>
+<h1>404 NOT FOUND</h1>
+</main>
+</div>
+
+{{ partial "footer.html" . }}
diff --git a/themes/hugo-xmag/layouts/_default/list.html b/themes/hugo-xmag/layouts/_default/list.html
new file mode 100644
index 0000000..5c1ac2c
--- /dev/null
+++ b/themes/hugo-xmag/layouts/_default/list.html
@@ -0,0 +1,52 @@
+{{ partial "header.html" . }}
+
+<div class="container">
+<main class="list">
+{{ $pages := .Pages }}
+{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
+{{ $paginator := .Paginate (where $pages "Section" "!=" "") }}
+{{ range $paginator.Pages }}
+<section class="article-list">
+ <div class="categories">
+ {{ with .Params.categories }}
+ {{ range first 1 . }}
+ <a href="{{ relURL (print "/categories/" . | urlize) }}">{{ . }}</a>
+ {{ end }}
+ {{ else }}
+ <a>{{ default "Uncategorized" .Site.Params.text.uncategorized }}</a>
+ {{ end }}
+ </div>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
+ <div class="date-author">
+ {{ if .Params.author }}<span class="author">{{ partial "author_names.html" . }}</span> / {{ end }}
+ <span class="date">{{ .Date.Format "2006-01-02" }}</span>
+ </div>
+ <div class="summary">
+ <a href="{{ .RelPermalink }}">
+ {{ with .Resources.GetMatch (printf "%s" .Params.thumbnail) }}
+ <div class="thumbnail"><img src="{{ relURL .Permalink }}" alt="Thumbnail" /></div>
+ {{ else }}
+ {{ with .Params.thumbnail }}
+ <div class="thumbnail"><img src="{{ relURL .}}" alt="Thumbnail" /></div>
+ {{ else }}
+ {{ $img := findRE "<img src=\"[^\"]+\"" .Content 1 }}
+ {{ range $img }}
+ <div class="thumbnail">{{ (print . " alt=\"Thumbnail\" />") | safeHTML }}</div>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ {{ with .Description }}
+ {{ $.Scratch.Set "summary" (markdownify .) }}
+ {{ else }}
+ {{ $.Scratch.Set "summary" ((delimit (findRE "(<p.*?>(.|\n)*?</p>\\s*)+" .Content) "[&hellip;] ") | plainify | truncate (default 200 .Site.Params.summary_length) (default " &hellip;" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
+ {{ end }}
+ {{ $.Scratch.Get "summary" }}
+ </a>
+ </div>
+</section>
+{{ end }}
+</main>
+<nav>{{ template "_internal/pagination.html" . }}</nav>
+</div>
+
+{{ partial "footer.html" . }}
diff --git a/themes/hugo-xmag/layouts/_default/single.html b/themes/hugo-xmag/layouts/_default/single.html
new file mode 100644
index 0000000..173ec3b
--- /dev/null
+++ b/themes/hugo-xmag/layouts/_default/single.html
@@ -0,0 +1,41 @@
+{{ partial "header.html" . }}
+<div class="container">
+<article>
+<div class="article-meta">
+
+ <div class="categories">
+ {{ range $i, $e := .Params.categories }}
+ {{ if $i }} &hercon; {{ end }}<a href="{{ relURL (print "/categories/" $e | urlize) }}">{{ $e }}</a>
+ {{ end }}
+ </div>
+
+ <h1><span class="title">{{ .Title }}</span></h1>
+
+ {{ if .Params.author }}
+ <h3 class="author">{{ partial "author_names.html" . }}</h3>
+ {{ end }}
+
+ {{ with .Params.tags }}
+ <p>{{ default "Tags: " (index $.Site.Params.text "tags") }}{{ range $i, $e := . }}{{ if $i }}; {{ end }}<a href="{{ relURL (print "/tags/" $e | urlize) }}">{{ $e }}</a>{{ end }}
+ </p>
+ {{ end }}
+ {{ partial "meta.html" . }}
+
+</div>
+
+{{ if .Params.toc }}
+{{ .TableOfContents }}
+{{ end }}
+
+<main>
+{{ .Content }}
+</main>
+
+{{ partial "author.html" . }}
+{{ partial "info.html" . }}
+{{ partial "prev_next.html" . }}
+{{ partial "comments.html" . }}
+</article>
+</div>
+
+{{ partial "footer.html" . }}
diff --git a/themes/hugo-xmag/layouts/_default/terms.html b/themes/hugo-xmag/layouts/_default/terms.html
new file mode 100644
index 0000000..2f432ed
--- /dev/null
+++ b/themes/hugo-xmag/layouts/_default/terms.html
@@ -0,0 +1,22 @@
+{{ partial "header.html" . }}
+
+<div class="container">
+<article>
+<main>
+<h1>{{ $.Scratch.Get "Title" }}</h1>
+
+<ul class="terms">
+ {{ range $key, $value := .Data.Terms }}
+ <li>
+ <a href="{{ (print "/" $.Data.Plural "/" $key) | relURL }}">
+ {{ $key }}
+ </a>
+ ({{ len $value }})
+ </li>
+ {{ end }}
+</ul>
+</main>
+</article>
+</div>
+
+{{ partial "footer.html" . }}
diff --git a/themes/hugo-xmag/layouts/partials/author.html b/themes/hugo-xmag/layouts/partials/author.html
new file mode 100644
index 0000000..c4977ab
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/author.html
@@ -0,0 +1,25 @@
+{{ with .Params.author }}
+{{ if eq (substr (jsonify .) 0 1) "["}}
+{{ $.Scratch.Set "page_author" .}}
+{{ else }}
+{{ $.Scratch.Set "page_author" (slice .) }}
+{{ end }}
+
+{{ $.Scratch.Set "author_info" slice }}
+{{ if $.Site.Data.authors }}
+{{ range $.Scratch.Get "page_author" }}
+{{ with (index $.Site.Data.authors .) }}
+{{ $.Scratch.Add "author_info" . }}
+{{ end }}
+{{ end }}
+{{ end }}
+{{ if $.Scratch.Get "author_info" }}
+<section class="article-meta article-footer">
+ <h3>{{ default "About the Author" $.Site.Params.text.about_author }}</h3>
+ {{ range $.Scratch.Get "author_info" }}
+ <p>{{ . | markdownify }}</p>
+ {{ end }}
+</section>
+{{ end }}
+
+{{ end }}
diff --git a/themes/hugo-xmag/layouts/partials/author_names.html b/themes/hugo-xmag/layouts/partials/author_names.html
new file mode 100644
index 0000000..bbbc978
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/author_names.html
@@ -0,0 +1 @@
+{{ replace ((jsonify .Params.author) | replaceRE "[\\[\"\\]]" "") "," (default ", " $.Site.Params.text.author_delimiter) | safeHTML }}
diff --git a/themes/hugo-xmag/layouts/partials/banner.html b/themes/hugo-xmag/layouts/partials/banner.html
new file mode 100644
index 0000000..cc4181c
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/banner.html
@@ -0,0 +1,7 @@
+<div class="banner">
+<a href="{{ relURL .Site.BaseURL }}"{{ if not .Site.Params.banner }} class="text"{{ end }}>
+{{ with .Site.Params.banner }}
+<img src="{{ relURL .src }}" alt="{{ .alt }}" />
+{{ else }}{{ (replaceRE "(&[A-Z]) (fr;)" "$1$2" (replaceRE "([A-Z])" "&$1 fr;" (upper .Site.Title))) | safeHTML }}
+{{ end }}</a>
+</div>
diff --git a/themes/hugo-xmag/layouts/partials/comments.html b/themes/hugo-xmag/layouts/partials/comments.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/comments.html
diff --git a/themes/hugo-xmag/layouts/partials/foot_custom.html b/themes/hugo-xmag/layouts/partials/foot_custom.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/foot_custom.html
diff --git a/themes/hugo-xmag/layouts/partials/footer.html b/themes/hugo-xmag/layouts/partials/footer.html
new file mode 100644
index 0000000..6071ad6
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/footer.html
@@ -0,0 +1,34 @@
+<script async src="//yihui.org/js/center-img.js"></script>
+
+<footer>
+{{ partial "foot_custom.html" . }}
+<div class="footer">
+ <ul class="menu">
+ {{ range .Site.Menus.main }}
+ <li><a href="{{ .URL | relURL }}"><span data-hover="{{ .Name }}">{{ .Name }}</span></a></li>
+ {{ end }}
+ </ul>
+ {{ with .Site.Params.footer }}
+ <div class="copyright">{{ . | markdownify }}</div>
+ {{ end }}
+</div>
+</footer>
+
+{{ if and (not .Params.disable_mathjax) (or (in (string .Content) "\\") (in (string .Content) "$")) }}
+<script src="//yihui.org/js/math-code.js"></script>
+<script async src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+{{ end }}
+
+{{ if and (not .Params.disable_highlight) (in (string .Content) "</pre>") }}
+<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
+<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/r.min.js"></script>
+<script>
+hljs.configure({languages: []});
+hljs.initHighlightingOnLoad();
+</script>
+{{ end }}
+
+{{ template "_internal/google_analytics.html" . }}
+
+</body>
+</html>
diff --git a/themes/hugo-xmag/layouts/partials/head_custom.html b/themes/hugo-xmag/layouts/partials/head_custom.html
new file mode 100644
index 0000000..960789b
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/head_custom.html
@@ -0,0 +1 @@
+<link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" rel="stylesheet">
diff --git a/themes/hugo-xmag/layouts/partials/header.html b/themes/hugo-xmag/layouts/partials/header.html
new file mode 100644
index 0000000..1d3b190
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/header.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {{ $.Scratch.Set "Title" (default .Title (index .Site.Params.text (print "title_" (lower .Title)))) }}
+ <title>{{ if eq ($.Scratch.Get "Title") .Site.Title }}{{ .Site.Title }}{{ else }}{{ ($.Scratch.Get "Title") }} | {{ .Site.Title }}{{ end }}</title>
+ <link rel="stylesheet" href="{{ "css/style.css" | relURL }}" />
+ <link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}" />
+ {{ partial "head_custom.html" . }}
+ </head>
+
+ <body{{if .IsPage}} class="page"{{ end }}>
+ <nav class="header">
+ {{ partial "banner.html" . }}
+ <div class="head-meta">
+ {{ if .IsPage }}
+ <span><a href="{{ relURL .Site.BaseURL }}">{{ (default "Back to Home" .Site.Params.text.back) | safeHTML }}</a></span>
+ {{ if .Params.date }}<span class="date">{{ .Date.Format "2006-01-02" }}</span>{{ end }}
+ {{ if .File.Path }}
+ {{ $RmdFile := (print .File.BaseFileName ".Rmd") }}
+ {{ if (where (readDir (print "content/" .File.Dir)) "Name" $RmdFile) }}
+ {{ $.Scratch.Set "FilePath" (print .File.Dir $RmdFile) }}
+ {{ else }}
+ {{ $.Scratch.Set "FilePath" .File.Path }}
+ {{ end }}
+ {{ $.Scratch.Set "FilePath" (replace ($.Scratch.Get "FilePath") "\\" "/") }}
+ {{ with .Site.Params.github_edit}}
+ <span><a href="{{ . }}{{ $.Scratch.Get "FilePath" }}">{{ (default "Edit this page" $.Site.Params.text.edit) | safeHTML }}</a></span>
+ {{ end }}
+ {{ end }}
+ {{ else }}
+ <span>{{ $.Scratch.Get "Title" }}</span>
+ <span>{{ .Site.Params.text.last_update }}{{ now.Format "2006-01-02" }}</span>
+ {{ $pages := .Pages }}
+ {{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
+ {{ $paginator := .Paginate (where $pages "Section" "!=" "") }}
+ <span>{{ with $paginator }}{{ if .TotalPages }}{{ .PageNumber }} / {{ .TotalPages }}{{ end }}{{ end }}</span>
+ {{ end }}
+ </div>
+ </nav>
diff --git a/themes/hugo-xmag/layouts/partials/info.html b/themes/hugo-xmag/layouts/partials/info.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/info.html
diff --git a/themes/hugo-xmag/layouts/partials/meta.html b/themes/hugo-xmag/layouts/partials/meta.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/meta.html
diff --git a/themes/hugo-xmag/layouts/partials/prev_next.html b/themes/hugo-xmag/layouts/partials/prev_next.html
new file mode 100644
index 0000000..b2ec685
--- /dev/null
+++ b/themes/hugo-xmag/layouts/partials/prev_next.html
@@ -0,0 +1,6 @@
+{{ if .Section }}
+<nav class="post-nav">
+ <span class="nav-prev">{{ with .NextInSection }}<a href="{{ .RelPermalink }}">&larr; {{ .Title }}</a>{{ end }}</span>
+ <span class="nav-next">{{ with .PrevInSection }}<a href="{{ .RelPermalink }}">{{ .Title }} &rarr;</a>{{ end }}</span>
+</nav>
+{{ end }}
diff --git a/themes/hugo-xmag/static/css/fonts.css b/themes/hugo-xmag/static/css/fonts.css
new file mode 100644
index 0000000..2f07028
--- /dev/null
+++ b/themes/hugo-xmag/static/css/fonts.css
@@ -0,0 +1,13 @@
+body {
+ font-family: Optima, 'Lucida Sans', Calibri, Candara, Arial, 'source-han-serif-sc', 'Source Han Serif SC', 'Source Han Serif CN', 'Source Han Serif TC', 'Source Han Serif TW', 'Source Han Serif', 'Noto Serif CJK SC', 'Songti SC', 'Microsoft YaHei', sans-serif;
+}
+blockquote {
+ font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'STKaiti', 'KaiTi', '楷体', 'SimKai', 'DFKai-SB', 'NSimSun', serif;
+}
+code {
+ font-family: "Lucida Console", 'Andale Mono', 'STKaiti', 'KaiTi', 'SimKai', monospace;
+}
+pre code {
+ font-family: "Lucida Console", Monaco, 'STKaiti', 'KaiTi', 'SimKai', monospace;
+ font-size: .85em;
+}
diff --git a/themes/hugo-xmag/static/css/style.css b/themes/hugo-xmag/static/css/style.css
new file mode 100644
index 0000000..40f6622
--- /dev/null
+++ b/themes/hugo-xmag/static/css/style.css
@@ -0,0 +1,175 @@
+body {
+ margin: 0;
+ line-height: 1.5em;
+ background: #fafafa;
+}
+.header div, .container, .copyright, .menu {
+ max-width: 1100px;
+ margin: auto;
+ padding: 0 15px;
+}
+.page .header div, .page .container, .page .copyright, .page .menu { max-width: 900px; }
+.container { hyphens: auto; }
+@media (max-width: 930px) {
+ .page .container { padding: 0; }
+}
+main { margin-bottom: 15px; }
+
+/* header and footer areas */
+.header {
+ border-top: 5px solid #666;
+ border-bottom: 4px double #666;
+ text-align: center;
+ padding: 15px 0 5px;
+}
+.head-meta, .menu {
+ display: flex;
+ justify-content: space-between;
+}
+.header, .list section, article { background: #fff; }
+.banner { font-size: 4em; }
+.banner .text {
+ display: block;
+ line-height: 1em;
+}
+.list {
+ display: flex;
+ flex-wrap: wrap;
+ margin-left: -15px;
+}
+.list section {
+ flex: 1 0 350px;
+ box-sizing: border-box;
+ box-shadow: 0 0 8px #ccc;
+ margin: 1em 0 0 15px;
+ padding: 1em;
+ overflow-x: hidden;
+}
+@media (max-width: 380px) {
+ .list section { flex: auto; }
+}
+@media (min-width: 715px) {
+ .list section { max-width: calc(50% - 15px); }
+ .article-list h1 {
+ overflow-x: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ .article-list h1:hover { white-space: inherit; }
+}
+@media (min-width: 1080px) {
+ .list section { max-width: calc(33.33333% - 15px); }
+}
+.article-list a, .banner a { color: #000; }
+.categories a {
+ font-size: .9em;
+ font-weight: bolder;
+ text-transform: uppercase;
+ color: #666;
+}
+h1 a:hover { text-decoration: underline; }
+.article-list h1 { margin: .2em auto .2em 0; }
+article { padding: 1em; }
+.article-meta {
+ text-decoration: none;
+ background: #eee;
+ padding: 5px;
+ border-radius: 5px;
+}
+.menu, .article-meta, footer, .post-nav { text-align: center; }
+.article-footer { text-align: left; }
+.title { font-size: 1.2em; }
+.article-list h1, .title { line-height: 1.2em; }
+.article-list a, .header a, footer a, .categories a, .active a, .comments a { text-decoration: none; }
+.pagination { text-align: center; }
+.pagination li, .terms li { display: inline; }
+.pagination a { padding: 0 .2em; }
+.footer {
+ background: #666;
+ padding: 1em 0;
+}
+.footer, .footer a { color: #fff; }
+.copyright, .copyright a { color: #ccc; }
+.menu {
+ margin-bottom: .5em;
+ flex-wrap: wrap;
+}
+.menu li {
+ display: inline-block;
+ font-weight: bolder;
+}
+.menu a { padding: .5em; }
+.menu a:hover {
+ color: #000;
+ background: #fff;
+}
+
+hr {
+ border-style: dashed;
+ color: #ddd;
+}
+
+/* code */
+pre {
+ border: 1px solid #ddd;
+ box-shadow: 5px 5px 5px #eee;
+ overflow-x: auto;
+}
+code { background: #f9f9f9; }
+pre code {
+ background: none;
+ padding: .5em;
+ display: block;
+}
+
+/* misc elements */
+img, iframe, video { max-width: 100%; }
+blockquote {
+ background: #f9f9f9;
+ border-left: 5px solid #ccc;
+ padding: 3px 1em 3px;
+}
+
+table {
+ margin: 1em auto auto;
+ border-top: 1px solid #666;
+ border-bottom: 1px solid #666;
+}
+table thead th { border-bottom: 1px solid #ddd; }
+th, td { padding: 5px; }
+tr:nth-child(even) { background: #eee }
+
+.thumbnail {
+ height: 5.1em;
+ width: 6.8em;
+ float: left;
+ overflow: hidden;
+ margin: 5px 8px 5px 0;
+ box-shadow: 0 0 8px #666;
+}
+.thumbnail img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+#TableOfContents, #TOC, .comments {
+ border: 1px solid #eee;
+ border-radius: 5px;
+}
+.comments a {
+ display: inline-block;
+ width: 100%;
+ text-align: center;
+ font-size: 1.2em;
+}
+.terms { padding-left: 0; }
+.post-nav {
+ margin: .5em 0;
+ display: flex;
+ justify-content: space-between;
+}
+.footnotes { font-size: .9em; }
+.footnotes hr {
+ width: 50%;
+ margin-left: 0;
+}
diff --git a/themes/hugo-xmag/theme.toml b/themes/hugo-xmag/theme.toml
new file mode 100644
index 0000000..78e5dd2
--- /dev/null
+++ b/themes/hugo-xmag/theme.toml
@@ -0,0 +1,12 @@
+name = "XMag"
+license = "MIT"
+licenselink = "https://github.com/yihui/hugo-xmag/blob/master/LICENSE.md"
+description = "A minimal magazine theme for Hugo"
+homepage = "https://xmag.yihui.org"
+tags = ["minimal", "magazine", "clean", "simple", "minimalist", "blog", "responsive", "Google Analytics", "Syntax Highlighting"]
+features = ["blog", "magazine"]
+min_version = "0.18"
+
+[author]
+ name = "Yihui Xie"
+ homepage = "https://yihui.org"