add theme code
This commit is contained in:
parent
f85c96600b
commit
4e73d5d1eb
4
layouts/_default/_markup/render-codeblock-mermaid.html
Normal file
4
layouts/_default/_markup/render-codeblock-mermaid.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div class="mermaid">
|
||||
{{- .Inner | safeHTML }}
|
||||
</div>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
1
layouts/_default/_markup/render-heading.html
Normal file
1
layouts/_default/_markup/render-heading.html
Normal file
|
@ -0,0 +1 @@
|
|||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor">🔗</a></h{{ .Level }}>
|
22
layouts/_default/baseof.html
Normal file
22
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}</title>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ partial "header.html" . }}
|
||||
<main class="main-wrapper">
|
||||
<div class="main">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
<div class="side">
|
||||
{{ partial "side-recent.html" . }}
|
||||
{{ partial "side-categories.html" . }}
|
||||
{{ partial "side-tags.html" . }}
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
33
layouts/_default/list.html
Normal file
33
layouts/_default/list.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<section id="archive">
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<div class="group">
|
||||
<h3 class="key">
|
||||
{{ .Key }}
|
||||
</h3>
|
||||
|
||||
{{ range .Pages }}
|
||||
<div class="value">
|
||||
<time class="date" datetime="{{ .PublishDate }}">{{ .PublishDate.Format "01/02" }}</time>
|
||||
|
||||
<div class="title">
|
||||
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
<a class="tags" href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</section>
|
||||
|
||||
{{ end }}
|
49
layouts/_default/single.html
Normal file
49
layouts/_default/single.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<section class="single">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
|
||||
<div class="tip">
|
||||
<time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006/01/02" }}</time>
|
||||
<span class="split">·</span>
|
||||
<span> {{ .WordCount }} words </span>
|
||||
<span class="split">·</span>
|
||||
<span>
|
||||
{{ .ReadingTime }} minutes to read
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="taxonomies">
|
||||
{{ with .Params.categories }}
|
||||
<div>
|
||||
Categories:
|
||||
{{ range . }}
|
||||
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.tags }}
|
||||
<div>
|
||||
Tags:
|
||||
{{ range . }}
|
||||
<a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ if in .Site.Params.mainSections .Type }}
|
||||
<hr />
|
||||
|
||||
{{ partial "comment.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ end }}
|
14
layouts/_default/terms.html
Normal file
14
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<section id="tags">
|
||||
{{ $data := .Data }}
|
||||
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||
{{ if $value.Name}}
|
||||
<span class="tag">
|
||||
<a href="{{ $value.Name | urlize }}">
|
||||
{{ $value.Name }} <span>({{ $value.Count }})</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
42
layouts/index.html
Normal file
42
layouts/index.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<div class="max-wrapper">
|
||||
<div id="list-page">
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $paginator := .Paginate $pages }}
|
||||
{{ range $paginator.Pages }}
|
||||
<section class="list-item">
|
||||
<h1 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
|
||||
|
||||
<div class="tips">
|
||||
<div class="date">
|
||||
<time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006/01/02" }}</time>
|
||||
</div>
|
||||
|
||||
{{ with .Params.Categories }}
|
||||
<div class="categories">
|
||||
<span>Categories:</span>
|
||||
{{ range first 2 . }}
|
||||
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Tags }}
|
||||
<div class="tags">
|
||||
<span>Tags:</span>
|
||||
{{ range first 5 . }}
|
||||
<a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="summary">{{ .Summary }}</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
1
layouts/partials/comment.html
Normal file
1
layouts/partials/comment.html
Normal file
|
@ -0,0 +1 @@
|
|||
<div class="commenting" id="remark42"></div>
|
13
layouts/partials/footer.html
Normal file
13
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<footer class="footer">
|
||||
{{ range .Site.Params.footer_rows }}
|
||||
<div class="footer-row">
|
||||
{{ range .items }}
|
||||
{{ with .pre }}
|
||||
<span class="footer-item">{{ . | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<a href="{{ .url }}">{{ .name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</footer>
|
32
layouts/partials/head.html
Normal file
32
layouts/partials/head.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||
|
||||
{{/* load mermaid if any mermaid code block */}}
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
<script src="{{ "/js/meraid-9.0.0.min.js" | absURL }}"></script>
|
||||
<script>
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.remark42 }}
|
||||
<script>
|
||||
var remark_config = {
|
||||
host: '{{ .host }}',
|
||||
site_id: '{{ .host }}',
|
||||
components: ['embed', 'last-comments'],
|
||||
max_shown_comments: {{ .max_shown_comments }},
|
||||
theme: '{{ .remark42.theme }}',
|
||||
page_title: '{{ .Title }}',
|
||||
locale: '{{ .locale }}',
|
||||
show_email_subscription: {{ .show_email_subscription }},
|
||||
simple_view: {{ .simple_view }}
|
||||
};
|
||||
|
||||
!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" href="{{ "css/syntax.css" | relURL }}" />
|
||||
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
|
||||
<link rel="shortcut icon" href="{{ "/images/favicon.ico" | relURL }}" type="image/x-icon" />
|
22
layouts/partials/header.html
Normal file
22
layouts/partials/header.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<header class="header-wrapper">
|
||||
<div class="header max-wrapper">
|
||||
<a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
|
||||
<ul class="menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="menu-item">
|
||||
{{ if not .Children }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ else }}
|
||||
<a>{{ .Name }}↓</a>
|
||||
<ul class="sub-menu">
|
||||
{{ range .Children }}
|
||||
<li class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
31
layouts/partials/pagination.html
Normal file
31
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{ $pag := $.Paginator }}
|
||||
|
||||
<nav class="pagination">
|
||||
|
||||
{{ $size := 2 }}
|
||||
{{ $current := $pag.PageNumber}}
|
||||
{{ $total := $pag.TotalPages}}
|
||||
{{ $prev := 0 }}
|
||||
{{ range $pag.Pagers }}
|
||||
{{ if or ( and ( ge .PageNumber (sub $current $size) )
|
||||
( le .PageNumber (add $current $size) )
|
||||
)
|
||||
(or (eq .PageNumber 1)
|
||||
(eq .PageNumber $total)
|
||||
)
|
||||
}}
|
||||
{{ if not (eq .PageNumber (add $prev 1) ) }}
|
||||
<span>··</span>
|
||||
{{ end }}
|
||||
{{ $prev = .PageNumber }}
|
||||
|
||||
{{ if eq .PageNumber $current }}
|
||||
<a class="enabled current" href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
{{ else }}
|
||||
<a class="enabled" href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</nav>
|
12
layouts/partials/side-categories.html
Normal file
12
layouts/partials/side-categories.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="side-categories">
|
||||
<h2>Categories</h2>
|
||||
<hr />
|
||||
|
||||
<ul>
|
||||
{{ range $key, $_ := .Site.Taxonomies.categories }}
|
||||
<li>
|
||||
<a href="{{ "/categories/" }}{{ $key | urlize }}">{{ $key }}({{ .Count }})</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
12
layouts/partials/side-recent.html
Normal file
12
layouts/partials/side-recent.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="side-recent">
|
||||
<h2 class="side-title">Recent Posts</h2>
|
||||
<hr />
|
||||
|
||||
<ul>
|
||||
{{ range first 5 (where .Site.RegularPages ".Type" "in" .Site.Params.MainSections).ByDate.Reverse }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
12
layouts/partials/side-tags.html
Normal file
12
layouts/partials/side-tags.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="side-tags">
|
||||
<h2>Tags</h2>
|
||||
<hr />
|
||||
|
||||
<ul>
|
||||
{{ range .Site.Taxonomies.tags.Alphabetical }}
|
||||
<li>
|
||||
<a href="{{ "/tags/" }}{{ .Name | urlize }}">{{ .Name }} ({{ .Count }})</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
8
layouts/robots.txt
Normal file
8
layouts/robots.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
User-agent: *
|
||||
Allow: /posts/
|
||||
Allow: /tags/
|
||||
Allow: /categories/
|
||||
Allow: /about/
|
||||
Disallow: *
|
||||
|
||||
Sitemap: {{ .Site.BaseURL }}sitemap.xml
|
628
static/css/style.css
Normal file
628
static/css/style.css
Normal file
|
@ -0,0 +1,628 @@
|
|||
:root {
|
||||
--fonts-sans-serif: Roboto, Helvetica, Tahoma, Arial,
|
||||
"DejaVu Sans", "Liberation Sans",
|
||||
|
||||
"WenQuanYi Zen Hei", "WenQuanYi Micro Hei",
|
||||
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
||||
"Noto Sans CJK",
|
||||
sans-serif;
|
||||
|
||||
--fonts-serif: PMingLiu, "Times New Roman",
|
||||
"Noto Serif CJK", STSong, SimSun,
|
||||
serif;
|
||||
|
||||
--fonts-mono: "DejaVu Sans Mono", "Liberation Mono", "Noto Sans Mono", "Consolas", "Courier",
|
||||
"Noto Sans Mono CJK",
|
||||
"WenQuanYi Zen Hei Mono",
|
||||
"WenQuanYi Micro Hei Mono",
|
||||
monospace;
|
||||
|
||||
--color-light-1: #e0e0e0;
|
||||
--color-light-2: #e8e8e8;
|
||||
--color-light-3: #f0f0f0;
|
||||
--color-light-4: #f4f4f4;
|
||||
--color-light-5: #fefefe;
|
||||
|
||||
--color-black-0: #909090;
|
||||
--color-black-1: #686868;
|
||||
--color-black-2: #404040;
|
||||
--color-black-3: #282828;
|
||||
--color-black-4: #101010;
|
||||
--color-black-5: #020202;
|
||||
|
||||
--color-fav-0: #EDD5DD;
|
||||
--color-fav-1: #F0B3B2;
|
||||
--color-fav-2: #DE629E;
|
||||
--color-fav-3: #CB3E50;
|
||||
|
||||
--len-0: 0.00rem;
|
||||
--len-1: 0.25rem;
|
||||
--len-2: 0.50rem;
|
||||
--len-3: 1.00rem;
|
||||
--len-4: 1.50rem;
|
||||
--len-5: 3.00rem;
|
||||
|
||||
--font-size-0: 0.8125rem;
|
||||
--font-size-1: 0.875rem;
|
||||
--font-size-2: 1.000rem;
|
||||
--font-size-3: 1.125rem;
|
||||
--font-size-4: 1.250rem;
|
||||
--font-size-5: 1.500rem;
|
||||
--font-size-6: 2.000rem;
|
||||
}
|
||||
|
||||
*, ::before, ::after {
|
||||
font-family: inherit;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: var(--fonts-sans-serif);
|
||||
font-size: 16px;
|
||||
color: var(--color-black-3);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
/* approximately set up the layout of header, footer and main */
|
||||
/**************************************************************/
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
|
||||
align-items: center;
|
||||
|
||||
background-color: var(--color-light-4);
|
||||
}
|
||||
|
||||
/* set up padding and margin of some main elements */
|
||||
.main-wrapper {
|
||||
margin-top: var(--len-5);
|
||||
margin-bottom: var(--len-5);
|
||||
}
|
||||
|
||||
.main-wrapper { display: flex; flex-wrap: wrap; }
|
||||
.main-wrapper > * { height: fit-content; }
|
||||
|
||||
.main { padding: var(--len-4); }
|
||||
.side { padding-left: var(--len-4); }
|
||||
.main { flex: 0 0 72%; width: 72%; }
|
||||
.side { flex: 0 0 28%; width: 28%; }
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.main { padding: var(--len-4); }
|
||||
.side { padding-left: 0; padding-top: var(--len-4); }
|
||||
.main { flex: 0 0 100%; width: 100%; }
|
||||
.side { flex: 0 0 100%; width: 100%; }
|
||||
}
|
||||
|
||||
/* set light background */
|
||||
.header-wrapper,
|
||||
.footer,
|
||||
.main,
|
||||
.side-recent,
|
||||
.side-categories,
|
||||
.side-tags
|
||||
{ background-color: var(--color-light-5); }
|
||||
|
||||
/* place header in the center of header-wrapper */
|
||||
.header-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* let footer stay at bottom of screen */
|
||||
.footer {
|
||||
margin-top: auto;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.max-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/********** set up break point **********/
|
||||
|
||||
.main-wrapper, .header { max-width: 1320px; }
|
||||
@media (max-width: 1399px) { .main-wrapper, .header { max-width: 1140px; } }
|
||||
@media (max-width: 1199px) { .main-wrapper, .header { max-width: 960px; } }
|
||||
@media (max-width: 991px) { .main-wrapper, .header { max-width: 720px; } }
|
||||
@media (max-width: 767px) { .main-wrapper, .header { max-width: 540px; } }
|
||||
@media (max-width: 575px) { .main-wrapper, .header { max-width: none; } }
|
||||
|
||||
/* size the element who has breakpoint limitation */
|
||||
/* .header, .main-wrapper, .main { width: 100vw; } */
|
||||
/* .header-wrapper, .footer { width: 100vw; } */
|
||||
.header-wrapper, .footer { width: 100vw;}
|
||||
.main-wrapper { width: calc(100vw - 2 * var(--len-3));}
|
||||
|
||||
|
||||
/************************/
|
||||
/* set up header layout */
|
||||
/************************/
|
||||
|
||||
.header {
|
||||
padding: var(--len-3);
|
||||
}
|
||||
|
||||
/* place title and menus horizonally */
|
||||
.header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header .menu { justify-content: center; align-items: center; }
|
||||
.header .site-title { text-align: center; }
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.header .site-title {
|
||||
padding-top: var(--len-4);
|
||||
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
.header .menu {
|
||||
flex-wrap: wrap;
|
||||
flex: 0 0 100%;
|
||||
|
||||
margin-top: var(--len-3);
|
||||
padding-top: var(--len-3);
|
||||
border-top: 1px solid var(--color-light-1);
|
||||
}
|
||||
}
|
||||
|
||||
/* setup hyper link style */
|
||||
.header .site-title {
|
||||
text-decoration: none;
|
||||
font-family: var(--fonts-serif);
|
||||
font-size: var(--font-size-6);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/********** set up menus layout **********/
|
||||
|
||||
/* menus and submenus, hover to display, and setup animation */
|
||||
.header .menu-item .sub-menu { visibility: hidden; opacity: 0; transition: opacity 0.25s, visibility 0.25s; }
|
||||
.header .menu-item:hover .sub-menu { visibility: visible; opacity: 1; }
|
||||
.header .sub-menu { position: absolute; }
|
||||
|
||||
/* menu direction */
|
||||
.header .menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.header .sub-menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* remove the unwanted default css in menus */
|
||||
.header ul { list-style: none; margin: 0; padding: 0; }
|
||||
.header li { list-style: none; }
|
||||
|
||||
/* set up spacing of menu items in menu and sub-menu */
|
||||
.header .menu > * { margin-right: var(--len-3); }
|
||||
.header .menu > *:last-child { margin-right: 0; }
|
||||
.header .sub-menu > * { margin-bottom: var(--len-2); }
|
||||
.header .sub-menu > *:last-child { margin-bottom: 0; }
|
||||
|
||||
/* beautify sub menu style */
|
||||
.header .sub-menu {
|
||||
background-color: var(--color-light-5);
|
||||
padding: var(--len-2) var(--len-4);
|
||||
box-shadow: var(--color-light-1) 0px 0px 3px 1px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* beautify menu item */
|
||||
.header .menu-item {
|
||||
font-family: var(--fonts-serif);
|
||||
font-size: var(--font-size-3);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header a { color: var(--color-black-3); text-decoration: none; }
|
||||
.header a:hover { color: var(--color-fav-2); }
|
||||
|
||||
/************************/
|
||||
/* set up footer layout */
|
||||
/************************/
|
||||
|
||||
.footer {
|
||||
padding: var(--len-4) 0;
|
||||
font-size: var(--font-size-1);
|
||||
}
|
||||
|
||||
.footer > * {
|
||||
margin-top: var(--len-2);
|
||||
margin-bottom: var(--len-2);
|
||||
}
|
||||
|
||||
/* credit, license and social layout */
|
||||
.footer .footer-row { display: flex; justify-content: center; }
|
||||
|
||||
.footer .footer-item { margin-right: var(--len-3); }
|
||||
.footer .footer-item:last-child { margin-right: 0; }
|
||||
|
||||
/* beautify hyper link style */
|
||||
.footer { color: var(--color-black-1) }
|
||||
|
||||
.footer a { color: var(--color-fav-2); text-decoration: none; }
|
||||
.footer a:hover { color: var(--color-fav-3); }
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* set up home page's list layout */
|
||||
/**********************************/
|
||||
|
||||
.list-item .tips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: start;
|
||||
align-items: flex-start;
|
||||
|
||||
font-size: var(--font-size-1);
|
||||
color: var(--color-black-1);
|
||||
}
|
||||
|
||||
.list-item .tips > * { margin-right: var(--len-3); }
|
||||
.list-item .tips > *:last-child { margin-right: 0; }
|
||||
|
||||
.list-item .title a { text-decoration: none; color: var(--color-black-2); }
|
||||
.list-item .title a:hover { color: var(--color-fav-2); }
|
||||
.list-item .tips a { text-decoration: none; color: var(--color-fav-2) }
|
||||
.list-item .tips a:hover { color: var(--color-fav-3) }
|
||||
|
||||
.list-item .title { margin: var(--len-2) 0 var(--len-3) 0; }
|
||||
|
||||
.list-item .tags > *,
|
||||
.list-item .categories > *
|
||||
{ margin: 0 var(--len-1); }
|
||||
|
||||
.list-item .summary > * { margin: 0; }
|
||||
.list-item .title { margin: 0 0 var(--len-2) 0; }
|
||||
.list-item .tips { margin: 0 0 var(--len-3) 0; }
|
||||
|
||||
.list-item { border-bottom: 1px solid var(--color-light-2); }
|
||||
.list-item:last-child { border-bottom: 0; }
|
||||
|
||||
.list-item:first-child { padding-top: 0;}
|
||||
.list-item { padding: var(--len-3) 0; }
|
||||
.list-item:last-child { padding-bottom: 0;}
|
||||
|
||||
/**********************/
|
||||
/* set up side layout */
|
||||
/**********************/
|
||||
|
||||
.side h2 { margin: 0; }
|
||||
|
||||
.side ul { list-style: none; margin: 0; padding: 0; }
|
||||
|
||||
.side li { margin-bottom: var(--len-3); }
|
||||
.side li:last-child { margin-bottom: 0; }
|
||||
|
||||
.side hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background-color: var(--color-light-2);
|
||||
|
||||
margin: var(--len-2) 0;
|
||||
}
|
||||
|
||||
.side > * { padding: var(--len-4); }
|
||||
|
||||
.side > * { margin-bottom: var(--len-3); }
|
||||
.side > *:last-child { margin-bottom: 0; }
|
||||
|
||||
.side a { color: var(--color-black-3); text-decoration: none; }
|
||||
.side a:hover { color: var(--color-fav-2); }
|
||||
|
||||
/* horizontally place tags */
|
||||
.side .side-tags li { display: inline-block; margin: var(--len-1) var(--len-1); }
|
||||
|
||||
/*****************************/
|
||||
/* set up single post layout */
|
||||
/*****************************/
|
||||
|
||||
.single {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.single a { text-decoration: none; color: var(--color-fav-2); }
|
||||
.single a:hover { color: var(--color-fav-3); }
|
||||
|
||||
.single .title,
|
||||
.single .tip,
|
||||
.single .taxonomies,
|
||||
.single .content
|
||||
{ width: 100%; }
|
||||
|
||||
.single .taxonomies { margin-top: var(--len-1); }
|
||||
|
||||
.single > hr {
|
||||
border: none;
|
||||
background-color: var(--color-fav-1);
|
||||
height: 1px;
|
||||
|
||||
width: 90%;
|
||||
margin: var(--len-3) 0;
|
||||
}
|
||||
|
||||
.single .title,
|
||||
.single .tip,
|
||||
.single .taxonomies
|
||||
{ text-align: center; }
|
||||
|
||||
.single .tip,
|
||||
.single .taxonomies
|
||||
{ color: var(--color-black-1)}
|
||||
|
||||
.single .taxonomies > * { display: inline-block; }
|
||||
|
||||
.single .taxonomies > * { margin-right: var(--len-3); }
|
||||
.single .taxonomies > *:last-child { margin-right: 0; }
|
||||
|
||||
.single .title {
|
||||
margin: var(--len-2) 0 var(--len-3) 0;
|
||||
font-size: var(--font-size-6);
|
||||
}
|
||||
|
||||
|
||||
/***** set up content style *****/
|
||||
|
||||
.content p code {
|
||||
font-family: var(--fonts-mono);
|
||||
|
||||
background-color: var(--color-light-4);
|
||||
|
||||
padding: 0 2px;
|
||||
border: 1px solid var(--color-light-1);
|
||||
border-radius: 2px;
|
||||
line-height: inherit;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.content pre code {
|
||||
font-family: var(--fonts-mono);
|
||||
|
||||
display: inline-block;
|
||||
|
||||
padding: var(--len-3);
|
||||
|
||||
background-color: var(--color-light-4);
|
||||
border-radius: 3px;
|
||||
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content blockquote {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
padding-left: 1em;
|
||||
margin-left: 0px;
|
||||
border-left: 3px solid #eee;
|
||||
color: var(--color-black-1);
|
||||
}
|
||||
|
||||
.content hr {
|
||||
border: none;
|
||||
height: 2px;
|
||||
background-color: var(--color-light-4);
|
||||
|
||||
width: 80%;
|
||||
margin: var(--len-2) auto;
|
||||
}
|
||||
|
||||
.content table {
|
||||
width: 100%;
|
||||
margin: 40px 0;
|
||||
border-collapse: collapse;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.content th, td {
|
||||
text-align: left;
|
||||
padding-right: 20px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.content table td, td {
|
||||
border-spacing: none;
|
||||
border-style: solid;
|
||||
padding: 10px 15px;
|
||||
border-width: 1px 0 0 0;
|
||||
}
|
||||
.content thead th, th {
|
||||
text-align: left;
|
||||
padding: 10px 15px;
|
||||
height: 20px;
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
cursor: default;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #dadadc;
|
||||
}
|
||||
|
||||
.content tr>td {
|
||||
border: 1px solid #dadadc;
|
||||
}
|
||||
|
||||
.content tr:nth-child(odd)>td {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
.content h1,
|
||||
.content h2,
|
||||
.content h3 {
|
||||
font-weight: bold;
|
||||
}
|
||||
.content p,
|
||||
.content pre {
|
||||
word-break: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.content .markdown-image img {
|
||||
max-width: 100%;
|
||||
}
|
||||
.content .anchor {
|
||||
visibility: hidden;
|
||||
color: var(--color-fav-2);
|
||||
}
|
||||
.content h1:hover a,
|
||||
.content h2:hover a,
|
||||
.content h3:hover a,
|
||||
.content h4:hover a
|
||||
{ visibility: visible }
|
||||
|
||||
.highlight pre {
|
||||
padding: 7px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/********************************/
|
||||
/* setup taxonomies page layout */
|
||||
/********************************/
|
||||
|
||||
#archive {
|
||||
padding-left: var(--len-3);
|
||||
}
|
||||
|
||||
#archive .group {
|
||||
margin: var(--len-4) auto;
|
||||
}
|
||||
#archive .group .key {
|
||||
font-size: var(--font-size-4);
|
||||
margin-bottom: var(--len-2);
|
||||
}
|
||||
#archive .group .value {
|
||||
display: block;
|
||||
font-size: var(--font-size-2);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
#archive .group .value { text-indent: -60px; padding-left: 60px; }
|
||||
#archive .group .value * { text-indent: 0; }
|
||||
#archive .group .value .date { display: inline-block; width: 60px; }
|
||||
#archive .group .value .title { display: inline; }
|
||||
|
||||
#archive .group .value .date { color: var(--color-black-0); }
|
||||
|
||||
#archive .group .value a { text-decoration: none; }
|
||||
|
||||
#archive .group .value a { color: var(--color-black-3); }
|
||||
#archive .group .value a:hover { color: var(--color-fav-2); }
|
||||
|
||||
#archive .group .value .tags {
|
||||
display: inline-block;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#archive .group .value .tags {
|
||||
background: var(--color-light-4);
|
||||
border-radius: 2px;
|
||||
padding: 4px 7px;
|
||||
font-size: var(--font-size-1);
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/**********************/
|
||||
/* setup terms layout */
|
||||
/**********************/
|
||||
|
||||
#tags {
|
||||
max-width: 700px;
|
||||
margin: 48px auto 0 auto;
|
||||
padding: 0 12px;
|
||||
text-align: center;
|
||||
}
|
||||
#tags .tag {
|
||||
display: inline-block;
|
||||
margin: 7px 7px;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
#tags {
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
#tags .tag {
|
||||
display: inline-block;
|
||||
margin: 4px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
#tags .tag a {
|
||||
background: #f2f2f2;
|
||||
padding: 4px 7px;
|
||||
color: #757575;
|
||||
color: #404040;
|
||||
font-size: 14px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
#tags .tag a:hover {
|
||||
color: #0366d6;
|
||||
}
|
||||
|
||||
/***************************/
|
||||
/* setup pagination layout */
|
||||
/***************************/
|
||||
|
||||
.pagination {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
padding-top: var(--len-5);
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
display: inline-block;
|
||||
|
||||
font-size: var(--font-size-2);
|
||||
|
||||
border-radius: var(--len-5);
|
||||
width: var(--len-5);
|
||||
height: var(--len-5);
|
||||
line-height: var(--len-5);
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
color: var(--color-black-2);
|
||||
background-color: var(--color-light-3);
|
||||
|
||||
transition: background-color 0.25s;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: var(--color-fav-0);
|
||||
}
|
||||
|
||||
.pagination a.current {
|
||||
background-color: var(--color-fav-1);
|
||||
pointer-events: none;
|
||||
color: var(--color-black-1);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/***************************/
|
||||
/* setup commenting layout */
|
||||
/***************************/
|
||||
|
||||
.commenting {
|
||||
width: 85%;
|
||||
}
|
85
static/css/syntax.css
Normal file
85
static/css/syntax.css
Normal file
|
@ -0,0 +1,85 @@
|
|||
/* Background */ .bg { color: #272822; }
|
||||
/* PreWrapper */ .chroma { color: #272822; }
|
||||
/* Other */ .chroma .x { }
|
||||
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
|
||||
/* CodeLine */ .chroma .cl { }
|
||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* Line */ .chroma .line { display: flex; }
|
||||
/* Keyword */ .chroma .k { color: #00a8c8 }
|
||||
/* KeywordConstant */ .chroma .kc { color: #00a8c8 }
|
||||
/* KeywordDeclaration */ .chroma .kd { color: #00a8c8 }
|
||||
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
|
||||
/* KeywordPseudo */ .chroma .kp { color: #00a8c8 }
|
||||
/* KeywordReserved */ .chroma .kr { color: #00a8c8 }
|
||||
/* KeywordType */ .chroma .kt { color: #00a8c8 }
|
||||
/* Name */ .chroma .n { color: #111111 }
|
||||
/* NameAttribute */ .chroma .na { color: #75af00 }
|
||||
/* NameBuiltin */ .chroma .nb { color: #111111 }
|
||||
/* NameBuiltinPseudo */ .chroma .bp { color: #111111 }
|
||||
/* NameClass */ .chroma .nc { color: #75af00 }
|
||||
/* NameConstant */ .chroma .no { color: #00a8c8 }
|
||||
/* NameDecorator */ .chroma .nd { color: #75af00 }
|
||||
/* NameEntity */ .chroma .ni { color: #111111 }
|
||||
/* NameException */ .chroma .ne { color: #75af00 }
|
||||
/* NameFunction */ .chroma .nf { color: #75af00 }
|
||||
/* NameFunctionMagic */ .chroma .fm { color: #111111 }
|
||||
/* NameLabel */ .chroma .nl { color: #111111 }
|
||||
/* NameNamespace */ .chroma .nn { color: #111111 }
|
||||
/* NameOther */ .chroma .nx { color: #75af00 }
|
||||
/* NameProperty */ .chroma .py { color: #111111 }
|
||||
/* NameTag */ .chroma .nt { color: #f92672 }
|
||||
/* NameVariable */ .chroma .nv { color: #111111 }
|
||||
/* NameVariableClass */ .chroma .vc { color: #111111 }
|
||||
/* NameVariableGlobal */ .chroma .vg { color: #111111 }
|
||||
/* NameVariableInstance */ .chroma .vi { color: #111111 }
|
||||
/* NameVariableMagic */ .chroma .vm { color: #111111 }
|
||||
/* Literal */ .chroma .l { color: #ae81ff }
|
||||
/* LiteralDate */ .chroma .ld { color: #d88200 }
|
||||
/* LiteralString */ .chroma .s { color: #d88200 }
|
||||
/* LiteralStringAffix */ .chroma .sa { color: #d88200 }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color: #d88200 }
|
||||
/* LiteralStringChar */ .chroma .sc { color: #d88200 }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color: #d88200 }
|
||||
/* LiteralStringDoc */ .chroma .sd { color: #d88200 }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color: #d88200 }
|
||||
/* LiteralStringEscape */ .chroma .se { color: #8045ff }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color: #d88200 }
|
||||
/* LiteralStringInterpol */ .chroma .si { color: #d88200 }
|
||||
/* LiteralStringOther */ .chroma .sx { color: #d88200 }
|
||||
/* LiteralStringRegex */ .chroma .sr { color: #d88200 }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color: #d88200 }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color: #d88200 }
|
||||
/* LiteralNumber */ .chroma .m { color: #ae81ff }
|
||||
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
|
||||
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
|
||||
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
|
||||
/* Operator */ .chroma .o { color: #f92672 }
|
||||
/* OperatorWord */ .chroma .ow { color: #f92672 }
|
||||
/* Punctuation */ .chroma .p { color: #111111 }
|
||||
/* Comment */ .chroma .c { color: #75715e }
|
||||
/* CommentHashbang */ .chroma .ch { color: #75715e }
|
||||
/* CommentMultiline */ .chroma .cm { color: #75715e }
|
||||
/* CommentSingle */ .chroma .c1 { color: #75715e }
|
||||
/* CommentSpecial */ .chroma .cs { color: #75715e }
|
||||
/* CommentPreproc */ .chroma .cp { color: #75715e }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
|
||||
/* Generic */ .chroma .g { }
|
||||
/* GenericDeleted */ .chroma .gd { }
|
||||
/* GenericEmph */ .chroma .ge { font-style: italic }
|
||||
/* GenericError */ .chroma .gr { }
|
||||
/* GenericHeading */ .chroma .gh { }
|
||||
/* GenericInserted */ .chroma .gi { }
|
||||
/* GenericOutput */ .chroma .go { }
|
||||
/* GenericPrompt */ .chroma .gp { }
|
||||
/* GenericStrong */ .chroma .gs { font-weight: bold }
|
||||
/* GenericSubheading */ .chroma .gu { }
|
||||
/* GenericTraceback */ .chroma .gt { }
|
||||
/* GenericUnderline */ .chroma .gl { }
|
||||
/* TextWhitespace */ .chroma .w { }
|
3
static/js/mermaid-9.0.0.min.js
vendored
Normal file
3
static/js/mermaid-9.0.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue