update html format
This commit is contained in:
parent
47ee6db428
commit
ae2b0c9d96
3 changed files with 34 additions and 34 deletions
|
@ -1,3 +1,3 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{- partial "header.html" . }}
|
||||
<div class="not-found">404</div>
|
||||
{{ partial "footer.html" . }}
|
||||
{{- partial "footer.html" . }}
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{- partial "header.html" . }}
|
||||
|
||||
<article class="post-single">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<div class="post-meta">
|
||||
{{- if or .Params.author .Site.Params.author -}}
|
||||
{{ .Params.author | default .Site.Params.author }} · {{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }}
|
||||
{{- .Params.author | default .Site.Params.author }} · {{ end }}
|
||||
{{- .Date.Format "January 2, 2006" -}}
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-content">{{ .Content }}</div>
|
||||
{{ if .Params.tags }}
|
||||
{{- if .Params.tags }}
|
||||
<footer class="post-footer">
|
||||
<ul class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
{{ $href := print (absURL "tags/") (urlize .) }}
|
||||
{{- range .Params.tags }}
|
||||
{{- $href := print (absURL "tags/") (urlize .) }}
|
||||
<li><a href="{{ $href }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
<!-- Comments area start -->
|
||||
{{ if not (eq .Params.comments false) }}
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{- if not (eq .Params.comments false) }}
|
||||
{{- if .Site.DisqusShortname }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
|
@ -38,8 +38,8 @@
|
|||
<a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
<!-- Comments area end -->
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</article>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
{{- partial "footer.html" . }}
|
||||
|
|
|
@ -7,20 +7,20 @@
|
|||
<!-- Title -->
|
||||
<title>
|
||||
{{- if not .IsHome }}
|
||||
{{- if eq .Kind "page" }}{{ .Title }}
|
||||
{{- else if eq .Data.Singular "tag" }}{{ .Data.Term }}
|
||||
{{- else }}Posts
|
||||
{{- end }} - {{ end }}
|
||||
{{- if eq .Kind "page" }}{{ .Title }}{{ else if .Data.Term }}{{ .Data.Term }}{{ else }}Tags{{ end }}
|
||||
{{- print " - " }}
|
||||
{{- end }}
|
||||
|
||||
{{- .Site.Title -}}
|
||||
</title>
|
||||
<!-- Meta -->
|
||||
{{- if eq .Kind "page" }}
|
||||
<meta name="description" content="{{ .Summary }}">
|
||||
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<meta name="description" content="{{ .Site.Params.description }}">
|
||||
<meta name="author" content="{{ .Site.Params.author }}">
|
||||
{{ end -}}
|
||||
{{- end }}
|
||||
<!-- Styles -->
|
||||
<link href="{{ "an-old-hope.min.css" | absURL }}" rel="stylesheet">
|
||||
<link href="{{ "style.css" | absURL }}" rel="stylesheet">
|
||||
|
@ -28,14 +28,14 @@
|
|||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
<link rel="icon" href="{{ "favicon.ico" | absURL }}">
|
||||
<!-- Generator -->
|
||||
{{ hugo.Generator }}
|
||||
{{- hugo.Generator }}
|
||||
<!-- RSS -->
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }}">
|
||||
<!-- Misc -->
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ end }}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||
{{- template "_internal/google_analytics_async.html" . }}
|
||||
{{- template "_internal/opengraph.html" . }}
|
||||
{{- end }}
|
||||
<!-- Script -->
|
||||
<script>
|
||||
function setTheme() {
|
||||
|
@ -80,26 +80,26 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
|
||||
<body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
|
||||
<script>
|
||||
setTheme();
|
||||
</script>
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
{{ if .IsHome }}
|
||||
{{- if .IsHome }}
|
||||
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
|
||||
{{ end }}
|
||||
{{ if .Site.Menus.main }}
|
||||
{{- end }}
|
||||
{{- if .Site.Menus.main }}
|
||||
<ul class="menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{- range .Site.Menus.main }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</nav>
|
||||
</header>
|
||||
<main class="main">
|
||||
|
|
Loading…
Reference in a new issue