First draft
This commit is contained in:
12
layouts/_default/about.html
Normal file
12
layouts/_default/about.html
Normal file
@ -0,0 +1,12 @@
|
||||
{{/* 单个帖子的模板 */}}
|
||||
{{ define "main" }}
|
||||
<div class="single-container is-centered">
|
||||
<div class="archive">
|
||||
<h1 class="title is-1">{{ .Title }}</h1>
|
||||
<div class="content about-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
13
layouts/_default/baseof.html
Normal file
13
layouts/_default/baseof.html
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
5
layouts/_default/index.json
Normal file
5
layouts/_default/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range .Site.RegularPages -}}
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "date" .Date "section" .Section) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
16
layouts/_default/list.html
Normal file
16
layouts/_default/list.html
Normal file
@ -0,0 +1,16 @@
|
||||
{{/* 列表类型页面的通用模板.点击blog之后展示出来的页面 */}}
|
||||
{{/* user:为博客文章列表创建一个索引页面。
|
||||
>> hugo new blog/_index.md */}}
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<div class="section">
|
||||
<div class="content">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
15
layouts/_default/single.html
Normal file
15
layouts/_default/single.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
{{- with site.Params.homeInfoParams }}
|
||||
<article class="first-entry home-info">
|
||||
<header class="entry-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
{{ .Content}}
|
||||
</div>
|
||||
<footer class="entry-footer">
|
||||
{{ partial "social_icons.html" site.Params.socialIcons }}
|
||||
</footer>
|
||||
</article>
|
||||
{{- end -}}
|
||||
{{ end }}
|
26
layouts/_default/summary.html
Normal file
26
layouts/_default/summary.html
Normal file
@ -0,0 +1,26 @@
|
||||
<article class="post">
|
||||
<div class="single-container column is-centered">
|
||||
<div class="archive" id="post-container">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title hover-underline-animation"><a class="post-link" href="{{ .RelPermalink }}">{{ .Title
|
||||
}}</a></h1>
|
||||
|
||||
|
||||
</header>
|
||||
<div class="post-content">
|
||||
<div class="excerpt post-summary">
|
||||
{{ if .Params.protected}}
|
||||
<p>Psst! The article you seek is guarded by a mischievous password, hidden within the realms of whimsy and giggles. Unleash your inner unicorn, sprinkle some sparkle, and let the charm of curiosity guide you to unlock its enchanting secrets!</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="post-time-container">
|
||||
<span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
Reference in New Issue
Block a user