🎨 format HTML files let look nice & suit.

This commit is contained in:
凡梦星尘 2022-05-10 17:11:04 +08:00
parent f46e6045fd
commit 637914f208
5 changed files with 162 additions and 171 deletions

View File

@ -3,28 +3,24 @@
{{- .Scratch.Set "langCode" $langCode -}} {{- .Scratch.Set "langCode" $langCode -}}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ $langCode }}"> <html lang="{{ $langCode }}">
<head>
<head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<meta name="generator" content="Hugo v{{ hugo.Version }}"> <meta name="generator" content="Hugo v{{ hugo.Version }}">
{{- partial "partials/head.html" . }} {{- partial "partials/head.html" . }}
<title>{{ .Site.Title }}</title> <title>{{ .Site.Title }}</title>
</head> </head>
<body itemscope itemtype="http://schema.org/WebPage" {{/*class="use-motion"*/}}> <body itemscope itemtype="http://schema.org/WebPage" {{/*class="use-motion"*/}}>
<div class="headband"></div> <div class="headband"></div>
<main class="main"> <main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader"> <header class="header" itemscope itemtype="http://schema.org/WPHeader">
{{ partial "partials/header.html" . }} {{ partial "partials/header.html" . }}
</header> </header>
<div class="main-inner index posts-expand"> <div class="main-inner index posts-expand">
<div class="post-block"> <div class="post-block">
{{- block "main" . -}} {{- block "main" . -}}
{{- end -}} {{- end -}}
</div> </div>
<nav class="pagination"> <nav class="pagination">
@ -32,7 +28,6 @@
</nav> </nav>
</div> </div>
</main> </main>
<footer class="footer"> <footer class="footer">
<div class="footer-inner"> <div class="footer-inner">
{{ partial "partials/footer.html" . }} {{ partial "partials/footer.html" . }}

View File

@ -1,5 +1,4 @@
{{ define "main" }} {{ define "main" }}
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang=""> <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="http://example.com/2022/05/02/hello-world2/"> <link itemprop="mainEntityOfPage" href="http://example.com/2022/05/02/hello-world2/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"> <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
@ -49,5 +48,4 @@
<div class="post-eof"></div> <div class="post-eof"></div>
</footer> </footer>
</article> </article>
{{ end }} {{ end }}

View File

@ -6,10 +6,8 @@
<li class="sidebar-nav-overview">{{ T "SiteInfo" }}</li> <li class="sidebar-nav-overview">{{ T "SiteInfo" }}</li>
</ul> </ul>
<div class="sidebar-panel-container"> <div class="sidebar-panel-container">
<div class="post-toc-wrap sidebar-panel"> <div class="post-toc-wrap sidebar-panel">
</div> </div>
<div class="site-overview-wrap sidebar-panel"> <div class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person"> <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="John Doe" src="{{ .Site.Params.avatar.url }}"> <img class="site-author-image" itemprop="image" alt="John Doe" src="{{ .Site.Params.avatar.url }}">
@ -54,8 +52,8 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
</div> </div>
{{ $cc := $SP.creativeCommons }} {{- $cc := $SP.creativeCommons }}
{{ if and $cc $cc.sidebar }} {{- if and $cc $cc.sidebar }}
<div class="cc-license animated" itemprop="license"> <div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr .Site.Language 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}"> <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr .Site.Language 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}"> <img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">