Update for 3.0

This commit is contained in:
nanxiaobei 2019-03-31 20:32:06 +08:00
parent 55dc991f4c
commit 8088299ecb
9 changed files with 394 additions and 445 deletions

View File

@ -1,44 +1,46 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ if not .IsHome }} {{ if not .IsHome }}
<header class="list-header"> <header class="page-header">
{{ if eq .Data.Singular "tag" }}<span>Tagged in</span> {{ if eq .Data.Singular "tag" }}
<h1 class="list-title">{{ .Data.Term }}</h1> <div class="tagged">Tagged in</div>
{{ else }}<h1 class="list-title">Posts</h1> <h1>{{ .Data.Term }}</h1>
{{ else }}
<h1>Posts</h1>
{{ end }} {{ end }}
</header> </header>
{{ end }} {{ end }}
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") (index .Site.Params "paginate" | default 10) }}
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") }}
{{ if gt $paginator.TotalPages 0 }} {{ if gt $paginator.TotalPages 0 }}
{{ range $index, $page := $paginator.Pages }} {{ range $index, $page := $paginator.Pages }}
{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }} <article class="post-entry">
{{ .Scratch.Set "postClass" "first-entry" }} <header class="entry-header">
{{ .Scratch.Set "firstEmoji" "<span class=\"welcome-emoji\">👉</span>" }} <h2>{{ .Title }}</h2>
{{ else }}
{{ .Scratch.Set "postClass" "post-entry" }}
{{ end }}
<article class="post {{ .Scratch.Get `postClass` }}">
<header class="post-header">
{{ safeHTML (.Scratch.Get `firstEmoji`) }}
<h2 class="post-title">{{ .Title }}</h2>
</header> </header>
<p class="post-summary">{{ .Summary | plainify | htmlUnescape }}...</p> <section class="entry-content">
<footer class="post-footer"> <p>{{ .Summary | plainify | htmlUnescape }}...</p>
<p class="post-meta">{{ .Date.Format "2006.1.2" }}</p> </section>
<footer class="entry-footer">
<time >{{ .Date.Format "2006.1.2" }}</time>
</footer> </footer>
<a class="post-link" href="{{ .Permalink }}"></a> <a class="entry-link" href="{{ .Permalink }}"></a>
</article> </article>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $paginator.TotalPages 1 }} {{ if gt $paginator.TotalPages 1 }}
<footer class="list-footer"> <footer class="page-footer">
<nav class="pagination"> <nav class="pagination">
{{ if $paginator.HasPrev }} {{ if $paginator.HasPrev }}
<a class="pagination-prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prevPage" }}</a> <a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prevPage" }}</a>
{{ end }} {{ end }}
{{ if $paginator.HasNext }} {{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} →</a> <a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} →</a>
{{ end }} {{ end }}
</nav> </nav>
</footer> </footer>
{{ end }} {{ end }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -1,12 +1,12 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<article class="post post-view"> <article class="post-single">
<header class="post-header"> <header class="post-header">
<h1 class="post-title">{{ .Title }}</h1> <h1 class="post-title">{{ .Title }}</h1>
<p class="post-meta"> <div class="post-meta">
{{- if or .Params.author .Site.Params.author -}} {{- if or .Params.author .Site.Params.author -}}
{{ .Params.author | default .Site.Params.author }} · {{ end }} {{ .Params.author | default .Site.Params.author }} · {{ end }}
{{- .Date.Format "2006.1.2" -}} {{- .Date.Format "2006.1.2" -}}
</p> </div>
</header> </header>
<div class="post-content">{{ .Content }}</div> <div class="post-content">{{ .Content }}</div>
<footer class="post-footer"> <footer class="post-footer">

View File

@ -10,15 +10,22 @@
<script data-no-instant>InstantClick.init();</script> <script data-no-instant>InstantClick.init();</script>
<script src="{{.Site.BaseURL}}js/highlight.min.js" data-no-instant></script> <script src="{{.Site.BaseURL}}js/highlight.min.js" data-no-instant></script>
<script data-no-instant> <script data-no-instant>
addMenuListener(); hljs.initHighlightingOnLoad();
setMenuListener();
InstantClick.on('change', function() { InstantClick.on('change', function() {
addMenuListener(); document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
});
setMenuListener();
}); });
function addMenuListener() { function setMenuListener() {
var $toggle = document.querySelector('.menu-toggle'); var menuToggle = document.querySelector('.menu-toggle');
var $body = document.querySelector('body'); var body = document.querySelector('body');
$toggle.addEventListener('click', function() {
$body.classList.toggle('noscroll'); menuToggle.addEventListener('click', function() {
body.classList.toggle('no-scroll');
}, false); }, false);
} }
</script> </script>

View File

@ -1,60 +1,60 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}"> <html lang="{{ .Site.LanguageCode }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Title --> <!-- Title -->
<title> <title>
{{- if not .IsHome }} {{- if not .IsHome }}
{{- if eq .Kind "page" }}{{ .Title }} {{- if eq .Kind "page" }}{{ .Title }}
{{- else if eq .Data.Singular "tag" }}{{ .Data.Term }} {{- else if eq .Data.Singular "tag" }}{{ .Data.Term }}
{{- else }}Posts {{- else }}Posts
{{- end }} - {{ end }} {{- end }} - {{ end }}
{{- .Site.Title -}} {{- .Site.Title -}}
</title> </title>
<!-- Meta --> <!-- Meta -->
{{- if eq .Kind "page" }} {{- if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}"> <meta name="description" content="{{ .Summary }}">
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}"> <meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
{{ else }}
<meta name="description" content="{{ .Site.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
{{ end -}}
<!-- Styles -->
<link href="{{.Site.BaseURL}}css/font.css" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/atom-one-dark.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700,700i" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/style.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{.Site.BaseURL}}img/apple-touch-icon.png">
<link rel="icon" href="{{.Site.BaseURL}}img/favicon.ico">
<!-- Generator -->
{{ .Hugo.Generator }}
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "header-include.html" . }}
</head>
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
<header class="header">
{{ if .IsHome }}
<h1 class="title"><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></h1>
{{ else }} {{ else }}
<p class="title"><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></p> <meta name="description" content="{{ .Site.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
{{ end -}}
<!-- Styles -->
<link href="{{.Site.BaseURL}}css/github-gist.min.css" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/style.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{.Site.BaseURL}}img/apple-touch-icon.png">
<link rel="icon" href="{{.Site.BaseURL}}img/favicon.ico">
<!-- Generator -->
{{ .Hugo.Generator }}
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
<button class="menu-toggle" type="button"></button> {{ partial "header-include.html" . }}
<nav class="menu"> </head>
<ul> <body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
{{ $currentPage := . }} <header class="header">
{{ range .Site.Menus.main }} <div class="wrap">
<li class="{{ if $currentPage.IsMenuCurrent `main` . }}active{{ end }}"> {{ if .IsHome }}
<a href="{{ .URL }}">{{ .Name }}</a> <h1 class="logo"><a href="{{.Site.BaseURL}}">{{ .Site.Title }} </a></h1>
</li> {{ else }}
<p class="logo"><a href="{{.Site.BaseURL}}">{{ .Site.Title }} </a></p>
{{ end }} {{ end }}
</ul> <button class="menu-toggle" type="button"></button>
</div>
</header>
<nav class="nav">
<ul class="menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.IsMenuCurrent `main` . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav> </nav>
</header> <main class="main">
<main class="main">

View File

@ -1 +0,0 @@
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs-link{text-decoration:underline}

View File

@ -1,24 +0,0 @@
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 700;
src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZclSds18E.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdr.ttf) format('truetype');
}

1
static/css/github-gist.min.css vendored Normal file
View File

@ -0,0 +1 @@
.hljs{display:block;background:white;padding:.5em;color:#333333;overflow-x:auto}.hljs-comment,.hljs-meta{color:#969896}.hljs-string,.hljs-variable,.hljs-template-variable,.hljs-strong,.hljs-emphasis,.hljs-quote{color:#df5000}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#a71d5d}.hljs-literal,.hljs-symbol,.hljs-bullet,.hljs-attribute{color:#0086b3}.hljs-section,.hljs-name{color:#63a35c}.hljs-tag{color:#333333}.hljs-title,.hljs-attr,.hljs-selector-id,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo{color:#795da3}.hljs-addition{color:#55a532;background-color:#eaffea}.hljs-deletion{color:#bd2c00;background-color:#ffecec}.hljs-link{text-decoration:underline}

View File

@ -1,116 +1,123 @@
/* /*
* Paper v2.0 * Paper v3.0
* A simple & clean hugo theme * A simple, clean, flexible Hugo theme.
* Designed by 21beats (http://21beats.com) * Designed by 21beats (http://21beats.com)
* Updated in 2018.8.16 * Updated in 2019.3.31
*/ */
/* Reset /* Reset
============================================================= */ ------------------------------------------------------------ */
*, *,
*::before, *::before,
*::after { *::after {
box-sizing: border-box; box-sizing: border-box;
} }
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .2);
border-radius: 3px;
}
html { html {
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
body { body {
margin: 0; margin: 0;
font-family: 'Source Sans Pro', sans-serif; color: rgba(0, 0, 0, 0.9);
color: rgba(0, 0, 0, .8); font-family: 'SF Pro Display', 'Microsoft Yahei', 'Helvetica Neue', 'Helvetica', 'Arial',
font-size: 20px; sans-serif;
line-height: 1.6; font-size: 16px;
} }
h1, h2, h3, h4, h5, h6 { article,
margin-top: 0; aside,
margin-bottom: 0; figcaption,
line-height: 1.2; figure,
footer,
header,
main,
nav,
section {
display: block;
} }
h1,
h2,
h3,
h4,
h5,
h6,
p { p {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
strong,
b {
font-weight: 500;
}
ul { ul {
list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a { a {
color: inherit; color: rgba(0, 0, 0, 0.9);
text-decoration: none; text-decoration: none;
} }
figure { figure {
margin: 0; margin: 0;
} }
img { table {
max-width: 100%; border-collapse: collapse;
vertical-align: middle; border-spacing: 0;
} }
button, input, textarea { button,
-webkit-appearance: none; input,
textarea {
padding: 0; padding: 0;
font: inherit; font: inherit;
background: transparent; background: transparent;
border: 0; border: 0;
outline: 0; -webkit-appearance: none;
} }
button, input[type=button], input[type=submit] { button,
input[type='button'],
input[type='submit'] {
cursor: pointer; cursor: pointer;
} }
pre, code { input,
font-family: Menlo, Consolas, monospace; textarea {
font-size: inherit; padding: 0;
border: 0;
outline: 0;
} }
/* Body input:-webkit-autofill,
============================================================= */ textarea:-webkit-autofill {
.list { box-shadow: 0 0 0 50px #fff inset;
background: #f9f9f9; }
img {
display: block;
max-width: 100%;
} }
/* Header /* Header
============================================================= */ ------------------------------------------------------------ */
.header { .header {
display: flex;
justify-content: space-between;
height: 65px; height: 65px;
padding-left: 30px;
padding-right: 30px;
line-height: 65px; line-height: 65px;
} }
.home .header { .header .wrap {
background: #fff; display: flex;
justify-content: space-between;
max-width: 1024px;
margin-left: auto;
margin-right: auto;
} }
.title a { .logo a,
.menu-toggle {
padding-left: 24px;
padding-right: 24px;
}
.logo a {
display: block; display: block;
margin-top: 18px;
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
line-height: 35px;
}
.noscroll {
overflow: hidden;
} }
.menu-toggle { .menu-toggle {
display: block; position: relative;
position: absolute; width: 68px;
top: 0; outline: 0;
right: 0;
z-index: 20;
width: 80px;
height: 65px;
} }
.menu-toggle::before, .menu-toggle::before,
.menu-toggle::after { .menu-toggle::after {
@ -121,6 +128,7 @@ pre, code {
width: 20px; width: 20px;
height: 2px; height: 2px;
background: #000; background: #000;
transition: transform 0.2s;
} }
.menu-toggle::before { .menu-toggle::before {
transform: translate3d(-50%, -5px, 0); transform: translate3d(-50%, -5px, 0);
@ -128,30 +136,36 @@ pre, code {
.menu-toggle::after { .menu-toggle::after {
transform: translate3d(-50%, 5px, 0); transform: translate3d(-50%, 5px, 0);
} }
.noscroll .menu-toggle::before {
transform: translate3d(-50%, -1px, 0) rotateZ(45deg); .no-scroll .menu-toggle::before {
transform: translate3d(-50%, -1px, 0) rotateZ(135deg);
} }
.noscroll .menu-toggle::after { .no-scroll .menu-toggle::after {
transform: translate3d(-50%, -1px, 0) rotateZ(-45deg); transform: translate3d(-50%, -1px, 0) rotateZ(-135deg);
} }
.no-scroll .header {
position: sticky;
top: 0;
z-index: 10;
background: #fff;
}
.no-scroll .menu {
display: flex;
}
.menu { .menu {
display: none; display: none;
}
.noscroll .menu {
display: block;
}
.menu ul {
position: fixed; position: fixed;
top: 0; z-index: 10;
top: 65px;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 10;
background: #fff; background: #fff;
display: flex;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
padding-bottom: 130px;
} }
.menu li { .menu li {
width: 100%; width: 100%;
@ -160,196 +174,171 @@ pre, code {
.menu a { .menu a {
font-size: 20px; font-size: 20px;
} }
/* List
-------------------------------------------------- */
.list {
background: #f5f5f5;
}
.main,
.footer {
max-width: 640px;
margin-left: auto;
margin-right: auto;
}
/* Main /* Main
======================================================================= */ -------------------------------------------------- */
.main { .main {
min-height: calc(100vh - 130px); min-height: calc(100vh - 65px - 60px);
overflow: hidden; padding: 24px;
} }
.list-header, .page-header {
.first-entry > *, margin-bottom: 36px;
.post-entry,
.list-footer {
max-width: 700px;
margin-left: auto;
margin-right: auto;
} }
.list .main { .page-header .tagged {
padding-bottom: 30px; margin-bottom: 2px;
} color: rgba(0, 0, 0, 0.6);
.list-header,
.list-footer {
padding-left: 30px;
padding-right: 30px;
}
.list-header {
margin-top: 30px;
margin-bottom: 30px;
}
.list-footer {
margin-top: 30px;
}
.single .main {
padding-top: 60px;
padding-bottom: 30px;
}
.post-view {
width: 700px;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 767px) {
.main {
min-height: calc(100vh - 155px);
}
.list-header,
.first-entry > *,
.post-entry,
.list-footer,
.post-view {
width: 100%;
padding-left: 30px;
padding-right: 30px;
}
}
/* List header
------------------------------ */
.list-header span {
color: rgba(0, 0, 0, .4);
font-size: 12px; font-size: 12px;
letter-spacing: 2px;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1.5px;
transform: scale(0.9);
transform-origin: left center;
} }
.list-title { .page-header h1 {
font-size: 50px;
}
/* Post
------------------------------ */
.post-meta {
margin-top: 8px;
color: rgba(0, 0, 0, .4);
font-size: 16px;
letter-spacing: .5px;
}
/* First entry */
.first-entry {
position: relative;
min-height: calc(100vh - 65px - 80px);
margin-bottom: 80px;
padding-top: 12vh;
padding-bottom: 12vh;
background: #fff;
}
.welcome-emoji {
font-size: 60px;
line-height: 1;
}
.first-entry .post-title {
font-size: 50px;
transform: translateX(-3px);
}
.first-entry .post-summary {
margin-top: 15px;
margin-bottom: 15px;
font-size: 19px;
}
.post-title {
transform: translateX(-2px);
}
.post-summary {
margin-top: 10px;
color: rgba(0, 0, 0, .4);
font-size: 18px;
}
/* Post entry */
.post-entry {
position: relative;
padding: 30px;
background: #fff;
border-radius: 6px;
}
.post-entry:active {
transform: scale(.98);
transition: transform .1s;
}
.post-entry + .post-entry {
margin-top: 25px;
}
.post-entry:first-child {
margin-top: 40px;
}
.post-entry:hover {
box-shadow: 0 5px 40px -5px rgba(0, 0, 0, .1);
}
.post-entry .post-title {
font-size: 30px; font-size: 30px;
} }
.post-link { .page-footer .pagination {
position: absolute; display: flex;
top: 0;
right: 0;
bottom: 0;
left: 0;
} }
/* Post view */ .page-footer .pagination .next {
.post-view .post-title { margin-left: auto;
font-size: 45px; }
/* Post entry
-------------------------------------------------- */
.post-entry {
position: relative;
margin-bottom: 24px;
padding: 24px;
background: #fff;
transition: box-shadow 0.2s;
}
.post-entry:hover {
box-shadow: 0 10px 80px rgba(0, 0, 0, 0.15);
}
.post-entry:active {
transform: scale(0.98);
transition: transform 0.1s;
}
.entry-header h2 {
font-size: 22px;
}
.entry-content {
margin-top: 8px;
margin-bottom: 14px;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 1.7;
}
.entry-footer {
font-size: 12px;
}
.entry-link {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
/* Post single
-------------------------------------------------- */
.post-header {
margin-top: 12px;
margin-bottom: 36px;
}
.post-title {
margin-bottom: 8px;
font-size: 36px;
transform: translateX(-2px);
}
.post-meta {
font-size: 13px;
color: rgba(0, 0, 0, 0.6);
} }
.post-content { .post-content {
padding-top: 30px; font-size: 17px;
line-height: 1.9;
word-wrap: break-word; word-wrap: break-word;
} }
.post-content h1, .post-content .form-item-title .ant-input,
.post-content h1 {
font-size: 36px;
font-weight: 700;
transform: translateX(-1px);
}
.post-content h1 {
margin-top: 48px;
margin-bottom: 36px;
}
.post-content h2 { .post-content h2 {
margin-bottom: 15px; margin-top: 36px;
margin-bottom: 24px;
font-size: 28px;
} }
.post-content h3, .post-content h3,
.post-content h4, .post-content h4,
.post-content h5, .post-content h5,
.post-content h6 { .post-content h6 {
margin-bottom: 10px; margin-top: 24px;
margin-bottom: 12px;
} }
.post-content h4,
.post-content h5, .post-content h5,
.post-content h6 { .post-content h6 {
font-weight: 400; font-weight: 500;
}
.post-content h1 {
font-size: 45px;
margin-top: 50px;
}
.post-content h2 {
font-size: 32px;
margin-top: 40px;
} }
.post-content h3 { .post-content h3 {
font-size: 28px; font-size: 22px;
margin-top: 30px;
} }
.post-content h4 { .post-content h4 {
font-size: 24px;
}
.post-content h5 {
font-size: 20px;
}
.post-content h6 {
font-size: 18px; font-size: 18px;
} }
.post-content h5 {
font-size: 16px;
}
.post-content h6 {
font-size: 14px;
}
.post-content a { .post-content a {
padding-bottom: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
border-bottom: 1.5px solid rgba(0, 0, 0, .8); }
.post-content del {
text-decoration: none;
background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 100%, transparent 0) 0 50% / 1.2px 1.2px
repeat-x;
} }
.post-content p, .post-content p,
.post-content ul, .post-content ul,
.post-content ol, .post-content ol,
.post-content dl { .post-content dl {
margin-bottom: 20px; margin-bottom: 24px;
} }
.post-content ul, .post-content ul,
.post-content ol { .post-content ol {
padding-left: 20px; padding-left: 20px;
} }
.post-content ul {
list-style: disc;
}
.post-content ul ul {
padding-left: 20px;
}
.post-content ol ol {
list-style: lower-roman;
}
.post-content ol {
list-style: decimal;
}
.post-content li { .post-content li {
margin-bottom: 10px; margin-bottom: 5px;
} }
.post-content li > ul, .post-content li > ul,
.post-content li > ol { .post-content li > ol {
@ -376,8 +365,8 @@ pre, code {
} }
.post-content pre, .post-content pre,
.post-content table { .post-content table {
margin-top: 30px; margin-top: 32px;
margin-bottom: 30px; margin-bottom: 32px;
} }
.post-content table { .post-content table {
width: 100%; width: 100%;
@ -386,145 +375,121 @@ pre, code {
} }
.post-content th, .post-content th,
.post-content td { .post-content td {
padding: 12px; padding: 10px;
border: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.post-content th { .post-content th {
font-size: 14px;
text-align: left; text-align: left;
} }
.post-content pre code {
padding: 20px;
border-radius: 6px;
}
.post-content code { .post-content code {
padding: 3px 6px; margin-left: 4px;
font-size: 0.75em; margin-right: 4px;
padding: 4px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: 0.8em;
white-space: pre-wrap; white-space: pre-wrap;
border-radius: 3px; background: rgba(0, 0, 0, 0.04);
}
.post-content pre {
background: transparent !important;
}
.post-content pre code {
margin-left: 0;
margin-right: 0;
padding: 20px 22px;
line-height: 1.7;
border-radius: 2px;
} }
.post-content blockquote { .post-content blockquote {
margin: 0 0 0 -23px; margin: 0 0 0 -24px;
padding: 0 0 0 20px; padding: 0 0 0 21px;
color: rgba(0, 0, 0, .6);
font-style: italic; font-style: italic;
border-left: 3px solid rgba(0, 0, 0, .8); border-left: 3px solid rgba(0, 0, 0, 0.9);
} }
.post-content hr { .post-content hr {
margin-top: 70px; height: 0;
margin-bottom: 70px; margin-top: 72px;
border: solid rgba(0, 0, 0, .1); margin-bottom: 72px;
border-width: 1px 0 0; text-align: center;
border: 0;
overflow: visible;
}
.post-content hr::before {
content: '...';
display: inline-block;
color: rgba(0, 0, 0, 0.9);
font-size: 32px;
letter-spacing: 20px;
transform: translate(10px, -32px);
} }
.post-content iframe { .post-content iframe {
max-width: 100%; max-width: 100%;
} }
.post-view .post-tags { .post-footer {
margin-bottom: 30px; margin-top: 48px;
} }
.post-tags li { .post-footer .post-tags li {
display: inline-block; display: inline-block;
} }
.post-tags a { .post-footer .post-tags li + li {
display: block;
padding: 6px 16px;
color: rgba(0, 0, 0, .6);
font-size: 16px;
background: #f5f5f5;
border-radius: 3px;
}
.post-tags li + li {
margin-left: 3px; margin-left: 3px;
} }
.post-tags a:hover { .post-footer .post-tags a {
background: #eee;
}
@media (max-width: 767px) {
.post-content blockquote {
margin: 0 0 0 -30px;
padding: 0 0 0 27px;
}
}
/* List footer
------------------------------ */
.pagination {
display: flex;
overflow: hidden;
}
.pagination a {
display: block; display: block;
line-height: 30px; padding-left: 12px;
padding-right: 12px;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 32px;
background: #f5f5f5;
border-radius: 2px;
} }
.pagination-next { .post-footer .post-tags a:hover {
margin-left: auto; background: #f2f2f2;
}
/* 404
------------------------------ */
.not-found {
text-align: center;
font-size: 180px;
font-weight: 700;
line-height: calc(100vh - 300px);
} }
/* Footer /* Footer
======================================================================= */ -------------------------------------------------- */
.footer { .footer {
padding: 20px; padding-left: 24px;
font-size: 15px; padding-right: 24px;
line-height: 25px; color: rgba(0, 0, 0, 0.6);
font-size: 13px;
text-align: center; text-align: center;
line-height: 60px;
} }
.footer span { .footer span {
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
} }
.footer a:hover { .footer a {
text-decoration: underline; color: inherit;
} }
@media (max-width: 767px) { /* 404
.footer span:last-child { -------------------------------------------------- */
display: block; .not-found {
} position: absolute;
.footer span:nth-child(4) { left: 0;
display: none; right: 0;
} display: flex;
align-items: center;
justify-content: center;
height: 100%;
} }
.not-found::before {
/* Highlight content: '404';
------------------------------ */ color: transparent;
.post-content pre code { background: linear-gradient(120deg, #7492e6, #8f72c3, #9c66b3, #ba4d95, #ba4d95, #dc3c75);
display: block; -webkit-background-clip: text;
position: relative;
display: inline-block;
font-size: 200px;
font-weight: 700;
letter-spacing: 10px;
transform: translate(5px, -80px);
} }
.post-content table code { /* InstantClick
padding-top: 0; -------------------------------------------------- */
padding-bottom: 0; #instantclick-bar {
background: linear-gradient(120deg, #7492e6, #8f72c3, #9c66b3, #ba4d95, #ba4d95, #dc3c75);
} }
.post-content pre {
margin: 30px 0px;
border-radius: 6px;
}
.post-content table pre {
margin: 20px 0px;
}
.highlight table {
margin: 30px 0 !important;
}
.highlight div {
border-radius: 6px;
}
.post-content table code {
white-space: pre;
}
.highlight td:nth-child(2) {
width: 100%;
}
/* Unflavored code fences
------------------------------ */
code {
padding: 20px;
}
pre {
border-radius: 6px;
background-color: #272822;
color: white;
}

File diff suppressed because one or more lines are too long