feat: tidy style and layout

This commit is contained in:
Dillon
2019-08-24 19:32:41 +08:00
parent c8bb0770e9
commit 5cc4fdbe46
98 changed files with 751 additions and 500 deletions

View File

@@ -1,26 +1,29 @@
{{ if ne .Site.Params.version "5.x" -}}
{{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
{{ end -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{ partial "head.html" . }}
{{- partial "head.html" . }}
</head>
<body>
<script>
var isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
if (isDark) document.body.classList.add('dark-theme');
window.isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
window.isDark && document.body.classList.add('dark-theme');
</script>
<div class="wrapper">
{{ partial "header.html" . }}
{{ partial "header.html" . -}}
<main class="main">
<div class="container">
{{ block "content" . }}{{ end }}
{{ block "content" . }}{{ end -}}
</div>
</main>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
{{ partial "footer.html" . -}}
{{ partial "scripts.html" . -}}
</div>
<a href="#" id="dynamic-to-top"><span>&nbsp;</span></a>
<a href="#" class="dynamic-to-top" id="dynamic-to-top"><span>&nbsp;</span></a>
</body>
</html>

View File

@@ -1,11 +1,12 @@
{{ define "title" }}{{ T .Section | default (humanize .Section) }} | {{ .Site.Title }}{{ end -}}
{{ define "title" }}{{ T "all" }}{{ T .Section | default (humanize .Section) }} | {{ .Site.Title }}{{ end -}}
{{ define "content" -}}
{{ $data := .Data -}}
<div class="post-warp archive">
<h2 class="post-title">
<h2 class="post-title animated pulse faster">
{{ printf "%s%s" (T "all") (T .Section | default (humanize .Section)) }}
</h2>
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
<h3>{{ .Key }}</h3>
{{- range .Pages -}}

View File

@@ -1,10 +1,8 @@
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
{{ define "content" }}
<div class="post-warp">
<header class="post-header">
<div class="align-right"><h1 class="post-title">{{ .Title }}</h1></div>
</header>
<div class="post-warp single">
<h1 class="post-title animated pulse faster">{{ .Title }}</h1>
<div class="post-content">
{{ .Content }}
</div>

View File

@@ -1 +1,3 @@
# {{ .Title }}
{{ .RawContent }}

View File

@@ -13,11 +13,10 @@
</div>
{{ end }}
<!-- end featured_image-->
<header class="post-header">
<h1 class="post-title post-list-title" itemprop="name headline">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
</header>
<h1 class="post-title post-list-title" itemprop="name headline">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<div class="post-meta">
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i>&nbsp;{{ $author }}&nbsp;</a>
{{ T "publish" }}<span class="post-time">&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;</span>