🎨 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 -}}
<!DOCTYPE html>
<html lang="{{ $langCode }}">
<head>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="generator" content="Hugo v{{ hugo.Version }}">
{{- partial "partials/head.html" . }}
<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>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
{{ partial "partials/header.html" . }}
</header>
<div class="main-inner index posts-expand">
<div class="post-block">
{{- block "main" . -}}
{{- end -}}
</div>
<nav class="pagination">
@ -32,7 +28,6 @@
</nav>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
{{ partial "partials/footer.html" . }}

View File

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

View File

@ -6,10 +6,8 @@
<li class="sidebar-nav-overview">{{ T "SiteInfo" }}</li>
</ul>
<div class="sidebar-panel-container">
<div class="post-toc-wrap sidebar-panel">
</div>
<div class="site-overview-wrap sidebar-panel">
<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 }}">
@ -54,8 +52,8 @@
{{- end }}
{{- end }}
</div>
{{ $cc := $SP.creativeCommons }}
{{ if and $cc $cc.sidebar }}
{{- $cc := $SP.creativeCommons }}
{{- if and $cc $cc.sidebar }}
<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" }}">
<img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">