Layout change #6

This commit is contained in:
koirand 2019-03-23 16:18:03 +09:00
parent a821794a91
commit 1f9e6368c9
10 changed files with 210 additions and 182 deletions

View file

@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
<div class="main">
<div>
<h1>404 page not found.</h1>
<p><a href="/">Go Home</a></p>
</div>
</div>
{{ partial "footer.html" . }}
</body>
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
<div class="main">
<div>
<h1>404 page not found.</h1>
<p><a href="/">Go Home</a></p>
</div>
</div>
{{ partial "footer.html" . }}
</body>
</html>

View file

@ -1,12 +1,7 @@
<!DOCTYPE html>
<html>
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
<div class="main">
{{ block "main" . }}{{ end }}
</div>
{{ partial "footer.html" . }}
</body>
{{ partial "head.html" . }}
<body>
{{ block "main" . }}{{ end }}
</body>
</html>

View file

@ -1,22 +1,27 @@
{{ define "main"}}
<div>
<div class="searchBoxContainer">
<input type="text" id="searchBox" class="searchBox" placeholder="Search..." />
<img id="searchBoxIcon" class="searchBoxIcon" src="/img/search.png" />
</div>
<div id="searchResults" class="searchResults"></div>
{{ range $index, $value := .Pages.GroupByDate .Site.Params.listPageDateFormat }}
{{ if (ne $index 0) }}
<hr class="separator">
{{ end }}
<p class="date">{{ .Key }}</p>
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ end }}
</div>
<script src="/js/jquery-3.3.1.min.js"></script>
<script src="/js/jquery.mark.es6.min.js"></script>
<script src="/js/fuse.min.js"></script>
<script src="/js/search.js"></script>
{{ partial "header.html" . }}
<!-- search box -->
<div id="searchBox">
<input type="text" id="searchBoxInput" placeholder="Search..." />
<img id="searchBoxIcon" src="/img/search.png" />
</div>
<!-- search results -->
<div id="searchResults"></div>
<!-- contents -->
<div id="contentsList">
{{ range $index, $value := .Pages.GroupByDate .Site.Params.listPageDateFormat }}
{{ if (ne $index 0) }}
<hr class="separator">
{{ end }}
<p class="date">{{ .Key }}</p>
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ end }}
</div>
{{ partial "footer.html" . }}
<script src="/js/jquery-3.3.1.min.js"></script>
<script src="/js/jquery.mark.es6.min.js"></script>
<script src="/js/fuse.min.js"></script>
<script src="/js/search.js"></script>
{{ end }}

View file

@ -1,10 +1,11 @@
{{ define "main"}}
<div>
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format .Site.Params.singlePageDateFormat }}</p>
<div class="markdown-body">
{{ .Content }}
</div>
</div>
<h1>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- date -->
<p class="date">{{ .Date.Format .Site.Params.singlePageDateFormat }}</p>
<!-- content -->
<div class="markdown-body">
{{ .Content }}
</div>
{{ partial "footer.html" . }}
{{ end }}

View file

@ -1,26 +1,32 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
<div class="profile">
<div class="profile-body">
<div class="avatar">
<img class="avatar-mask" src="/img/{{ .Site.Params.avatar }}">
<img src="/img/avatar-border.svg">
</div>
<h1 class="author">{{ .Site.Params.Author }}</h1>
<p>
{{ .Site.Params.discription }}
</p>
<nav>
<ul>
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</div>
</div>
{{- partial "footer.html" . -}}
</body>
{{- partial "head.html" . -}}
<body>
<div id="profileContainer">
<div id="profile">
<header>
<!-- avator -->
<div class="avatar">
<img class="avatarMask" src="/img/{{ .Site.Params.avatar }}" alt="avatar">
<img src="/img/avatar-border.svg" alt="avatar-border">
</div>
<!-- author -->
<h1 class="author">{{ .Site.Params.Author }}</h1>
</header>
<!-- discription -->
<p>
{{ .Site.Params.discription }}
</p>
<!-- navigation -->
<nav>
<ul>
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</div>
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -1,9 +1,9 @@
<footer>
<p>
&copy; {{ .Site.Params.publicationYear }} {{ .Site.Params.Author }}.
Powered by <a href="https://gohugo.io/">Hugo</a>
using the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
</p>
<p>
&copy; {{ .Site.Params.publicationYear }} {{ .Site.Params.Author }}.
Powered by <a href="https://gohugo.io/">Hugo</a>
using the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
</p>
</footer>
{{- range .Site.Params.custom_js -}}
<script src="{{ . }}"></script>

View file

@ -1,45 +1,45 @@
<head>
<title>
{{ if eq .Title .Site.Title }}
{{ .Site.Title }}
{{ else }}
{{ .Title }} - {{ .Site.Title }}
{{ end }}
</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Author }}" />
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
<title>
{{ if eq .Title .Site.Title }}
{{ .Site.Title }}
{{ else }}
{{ .Title }} - {{ .Site.Title }}
{{ end }}
</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Author }}" />
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
<!-- css -->
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/markdown.css">
<link rel="stylesheet" href="/css/syntax-highlight.css">
<!-- css -->
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/markdown.css">
<link rel="stylesheet" href="/css/syntax-highlight.css">
<!-- custom css -->
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . }}">
{{ end }}
<!-- custom css -->
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . }}">
{{ end }}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
<!-- Polyfill for old browsers -->
{{ `<!--[if lte IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->` | safeHTML }}
<!-- Polyfill for old browsers -->
{{ `<!--[if lte IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->` | safeHTML }}
{{ `<!--[if lt IE 9]>
<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->` | safeHTML }}
{{ `<!--[if lt IE 9]>
<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->` | safeHTML }}
<!-- Analytics -->
{{- if and (not .Site.IsServer) .Site.GoogleAnalytics -}}
{{ template "_internal/google_analytics_async.html" . }}
{{- end -}}
<!-- Analytics -->
{{- if and (not .Site.IsServer) .Site.GoogleAnalytics -}}
{{ template "_internal/google_analytics_async.html" . }}
{{- end -}}
</head>

View file

@ -1,6 +1,9 @@
<header>
<div class="avatar">
<img class="avatar-mask" src="/img/{{ .Site.Params.avatar }}">
<a href="/"><img src="/img/avatar-border.svg"></a>
</div>
</header>
<!-- avator -->
<div class="avatar">
<img class="avatarMask" src="/img/{{ .Site.Params.avatar }}">
<a href="/"><img src="/img/avatar-border.svg"></a>
</div>
<!-- author -->
<h2><a class="author" href="/">{{ .Site.Params.Author }}</a></h2>
</header>