Skip to content

Commit 169a5f0

Browse files
committed
Format
1 parent b662b19 commit 169a5f0

File tree

15 files changed

+1625
-202
lines changed

15 files changed

+1625
-202
lines changed

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": ["*.html"],
5+
"options": {
6+
"parser": "go-template",
7+
"htmlWhitespaceSensitivity": "css"
8+
}
9+
}
10+
]
11+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[html]": {
3+
"editor.bracketPairColorization.enabled": false
4+
},
5+
"css.validate": false
6+
}

layouts/_default/baseof.html

Lines changed: 63 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,66 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
3+
<head>
4+
<meta charset="utf-8" />
5+
<script async src="https://cdn.ampproject.org/v0.js"></script>
6+
<title>{{ .Site.Title }}</title>
7+
<meta
8+
name="description"
9+
content="{{ .Site.Params.description | safeHTML }}"
10+
/>
11+
<link rel="canonical" href="{{ .Permalink }}" />
12+
<meta
13+
name="viewport"
14+
content="width=device-width, minimum-scale=1, initial-scale=1"
15+
/>
16+
<link
17+
rel="dns-prefetch preconnect"
18+
href="https://cdn.ampproject.org"
19+
crossorigin
20+
/>
21+
<link
22+
rel="dns-prefetch preconnect"
23+
href="https://amp-error-reporting.appspot.com"
24+
crossorigin
25+
/>
26+
<link
27+
rel="dns-prefetch preconnect"
28+
href="https://www.google-analytics.com"
29+
crossorigin
30+
/>
31+
<link
32+
rel="dns-prefetch preconnect"
33+
href="https://fonts.gstatic.com"
34+
crossorigin
35+
/>
36+
<meta name="pinterest" content="nopin" />
37+
<meta name="theme-color" content="#5cad5c" />
38+
<link
39+
rel="icon"
40+
href="{{ (.Site.Params.favicon | default "/favicon.ico") }}"
41+
/>
42+
<link
43+
rel="apple-touch-icon"
44+
sizes="180x180"
45+
href="{{ "/apple-touch-icon.png" }}"
46+
/>
47+
<script
48+
async
49+
custom-element="amp-story"
50+
src="https://cdn.ampproject.org/v0/amp-story-1.0.js"
51+
></script>
52+
<link
53+
rel="stylesheet"
54+
href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:400;700&display=swap"
55+
/>
56+
{{ hugo.Generator }}
57+
{{ template "_internal/opengraph.html" . }}
58+
{{ template "_internal/twitter_cards.html" . }}
59+
{{ partial "style.html" . }}
60+
{{ partial "json_ld.html" . }}
61+
</head>
362

4-
<head>
5-
<meta charset="utf-8">
6-
<script async src="https://cdn.ampproject.org/v0.js"></script>
7-
<title>{{ .Site.Title }}</title>
8-
<meta name="description" content="{{ .Site.Params.description | safeHTML }}">
9-
<link rel="canonical" href="{{ .Permalink }}">
10-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1">
11-
<link rel="dns-prefetch preconnect" href="https://cdn.ampproject.org" crossorigin>
12-
<link rel="dns-prefetch preconnect" href="https://amp-error-reporting.appspot.com" crossorigin>
13-
<link rel="dns-prefetch preconnect" href="https://www.google-analytics.com" crossorigin>
14-
<link rel="dns-prefetch preconnect" href="https://fonts.gstatic.com" crossorigin>
15-
<meta name="pinterest" content="nopin">
16-
<meta name="theme-color" content="#5cad5c">
17-
<link rel="icon" href="{{ (.Site.Params.favicon | default "/favicon.ico") }}">
18-
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" }}">
19-
<script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
20-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:400;700&display=swap">
21-
{{ hugo.Generator }}
22-
{{ template "_internal/opengraph.html" . }}
23-
{{ template "_internal/twitter_cards.html" . }}
24-
{{ partial "style.html" . }}
25-
{{ partial "json_ld.html" . }}
26-
</head>
27-
28-
<body>
29-
{{ block "main" . }}{{ end }}
30-
</body>
31-
63+
<body>
64+
{{ block "main" . }}{{ end }}
65+
</body>
3266
</html>

layouts/index.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
{{ define "main" }}
2-
<amp-story standalone supports-landscape
2+
<amp-story
3+
standalone
4+
supports-landscape
35
title="{{ .Site.Title }}"
46
publisher="{{ .Site.Params.author.name }}"
57
publisher-logo-src="{{ index .Site.Params.images 0 }}"
6-
poster-portrait-src="{{ "/assets/cover.webp" }}">
8+
poster-portrait-src="{{ "/assets/cover.webp" }}"
9+
>
10+
{{ partial "pages/cover.html" . }}
11+
{{ partial "pages/profile.html" . }}
12+
{{ partial "pages/private.html" . }}
13+
{{ partial "pages/skills.html" . }}
14+
{{ partial "pages/projects.html" . }}
15+
{{ partial "pages/contact.html" . }}
716

8-
{{ partial "pages/cover.html" . }}
9-
{{ partial "pages/profile.html" . }}
10-
{{ partial "pages/private.html" . }}
11-
{{ partial "pages/skills.html" . }}
12-
{{ partial "pages/projects.html" . }}
13-
{{ partial "pages/contact.html" . }}
14-
15-
<amp-story-social-share layout="nodisplay">
16-
<script type="application/json">
17-
{
18-
"bookendVersion":"v1.0",
19-
"shareProviders": [ "email", "twitter", "line" ],
20-
}
21-
</script>
22-
</amp-story-social-share>
23-
</amp-story>
17+
<amp-story-social-share layout="nodisplay">
18+
<script type="application/json">
19+
{
20+
"bookendVersion": "v1.0",
21+
"shareProviders": ["email", "twitter", "line"]
22+
}
23+
</script>
24+
</amp-story-social-share>
25+
</amp-story>
2426
{{ end }}

layouts/partials/json_ld.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<script type="application/ld+json">
2-
{
3-
"@context": "http://schema.org",
4-
"@type": "WebSite",
5-
"name": "{{ .Site.Title | safeJS }}",
6-
"headline": "{{ .Site.Title | safeJS }}",
7-
"description": "{{ .Site.Params.description | safeJS }}",
8-
"datePublished": "{{ dateFormat "2006-01-02T15:04JST" .Site.Params.datePublished }}",
9-
"dateModified": "{{ now.Format "2006-01-02T15:04JST" }}",
10-
"mainEntityOfPage": {
11-
"@type": "WebPage",
12-
"@id": "{{ .Permalink }}"
13-
},
14-
"image": {
15-
"@type": "ImageObject",
16-
"name": "{{ .Site.Title | safeJS }}",
17-
"url": "{{ index .Site.Params.images 0 | absURL }}",
18-
"width": 1280,
19-
"height": 720
20-
},
21-
{{ with .Site.Params.author }}
22-
"author": {
23-
"@type": "Person",
24-
"name": "{{ .name | safeJS }}"
2+
{
3+
"@context": "http://schema.org",
4+
"@type": "WebSite",
5+
"name": {{ .Site.Title }},
6+
"headline": {{ .Site.Title }},
7+
"description": {{ .Site.Params.description }},
8+
"datePublished": {{ dateFormat "2006-01-02T15:04JST" }},
9+
"dateModified": {{ now.Format "2006-01-02T15:04JST" }},
10+
"mainEntityOfPage": {
11+
"@type": "WebPage",
12+
"@id": {{ .Permalink }}
13+
},
14+
"image": {
15+
"@type": "ImageObject",
16+
"name": {{ .Site.Title }},
17+
"url": {{ index .Site.Params.images 0 | absURL }},
18+
"width": 1280,
19+
"height": 720
20+
},
21+
{{ with .Site.Params.author }}
22+
"author": {
23+
"@type": "Person",
24+
"name": {{ .name }}
25+
}
26+
{{ end }}
2527
}
26-
{{ end }}
27-
}
2828
</script>

layouts/partials/pages/contact.html

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,65 @@
11
<amp-story-page id="contact">
22
<amp-story-grid-layer template="fill">
33
<amp-img
4+
class="overlay"
5+
src="{{ "/assets/contact.webp" }}"
6+
alt=""
7+
width="1280"
8+
height="853"
9+
layout="responsive"
10+
>
11+
<amp-img
12+
fallback
413
class="overlay"
5-
src="{{ "/assets/contact.webp" }}"
14+
src="{{ "/assets/contact.jpg" }}"
615
alt=""
7-
width="1280" height="853"
8-
layout="responsive">
9-
<amp-img
10-
fallback
11-
class="overlay"
12-
src="{{ "/assets/contact.jpg" }}"
13-
alt=""
14-
width="1280" height="853"
15-
layout="responsive">
16-
</amp-img>
16+
width="1280"
17+
height="853"
18+
layout="responsive"
19+
></amp-img>
1720
</amp-img>
1821
</amp-story-grid-layer>
22+
1923
<amp-story-grid-layer template="vertical">
2024
<h1 class="title">Contact</h1>
2125
<p>お気軽にお問い合わせください。</p>
2226
</amp-story-grid-layer>
27+
2328
<amp-story-grid-layer template="vertical" class="center">
2429
<ul class="contactList wrapper">
2530
{{ with .Site.Params.author.email }}
26-
<li>
27-
<a href="{{ . }}" title="Googleフォームでお問い合わせ" target="_blank" rel="noopenner noreferrer">
28-
{{ with resources.Get "svg/email.svg" }}
29-
{{ .Content | safeHTML }}
30-
{{ end }}
31-
<span></span>
32-
</a>
33-
</li>
31+
<li>
32+
<a
33+
href="{{ . }}"
34+
title="Googleフォームでお問い合わせ"
35+
target="_blank"
36+
rel="noopenner noreferrer"
37+
>
38+
{{ with resources.Get "svg/email.svg" }}
39+
{{ .Content | safeHTML }}
40+
{{ end }}
41+
<span>Email</span>
42+
</a>
43+
</li>
3444
{{ end }}
3545

3646
{{ range .Site.Params.contact }}
37-
{{ $name := .name }}
38-
{{ $url := .url }}
39-
{{ $svgPath := ($name | lower) | printf "svg/%s.svg" }}
40-
{{ with resources.Get $svgPath }}
41-
<li>
42-
<a href="{{ $url }}" title="{{ $.Site.Params.author.name }}の{{ $name }}" target="_blank" rel="noopenner noreferrer">
43-
{{ .Content | safeHTML }}
44-
<span>{{ $name }}</span>
45-
</a>
46-
</li>
47-
{{ end }}
47+
{{ $name := .name }}
48+
{{ $url := .url }}
49+
{{ $svgPath := ($name | lower) | printf "svg/%s.svg" }}
50+
{{ with resources.Get $svgPath }}
51+
<li>
52+
<a
53+
href="{{ $url }}"
54+
title="{{ $.Site.Params.author.name }} の {{ $name }}"
55+
target="_blank"
56+
rel="noopenner noreferrer"
57+
>
58+
{{ .Content | safeHTML }}
59+
<span>{{ $name }}</span>
60+
</a>
61+
</li>
62+
{{ end }}
4863
{{ end }}
4964
</ul>
5065
</amp-story-grid-layer>

layouts/partials/pages/cover.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
<amp-story-page id="cover">
22
<amp-story-grid-layer template="fill">
33
<amp-img
4+
class="overlay"
5+
src="{{ "/assets/cover.webp" }}"
6+
alt=""
7+
width="1280"
8+
height="1780"
9+
layout="responsive"
10+
>
11+
<amp-img
12+
fallback
413
class="overlay"
5-
src="{{ "/assets/cover.webp" }}"
14+
src="{{ "/assets/cover.jpg" }}"
615
alt=""
7-
width="1280" height="1780"
8-
layout="responsive">
9-
<amp-img
10-
fallback
11-
class="overlay"
12-
src="{{ "/assets/cover.jpg" }}"
13-
alt=""
14-
width="1280" height="1780"
15-
layout="responsive">
16+
width="1280"
17+
height="1780"
18+
layout="responsive"
19+
>
1620
</amp-img>
1721
</amp-img>
1822
</amp-story-grid-layer>
23+
1924
<amp-story-grid-layer template="vertical" class="center">
2025
<h1 class="title" animate-in="fly-in-left" animate-in-delay="0.2s">
2126
{{ .Site.Title }}

layouts/partials/pages/private.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
<amp-story-page id="private">
22
<amp-story-grid-layer template="fill">
33
<amp-img
4+
class="overlay"
5+
src="{{ "/assets/private.webp" }}"
6+
alt=""
7+
width="1280"
8+
height="1805"
9+
layout="responsive"
10+
animate-in="pan-right"
11+
animate-in-duration="10s"
12+
>
13+
<amp-img
14+
fallback
415
class="overlay"
5-
src="{{ "/assets/private.webp" }}"
16+
src="{{ "/assets/private.jpg" }}"
617
alt=""
7-
width="1280" height="1805"
18+
width="1280"
19+
height="1805"
820
layout="responsive"
9-
animate-in="pan-right"
10-
animate-in-duration="10s">
11-
<amp-img
12-
fallback
13-
class="overlay"
14-
src="{{ "/assets/private.jpg" }}"
15-
alt=""
16-
width="1280" height="1805"
17-
layout="responsive">
21+
>
1822
</amp-img>
1923
</amp-img>
2024
</amp-story-grid-layer>
25+
2126
<amp-story-grid-layer template="vertical">
2227
<h1 class="title">Private</h1>
2328
<p>趣味はWebプログラミング、野鳥観察、麻雀です。</p>
24-
<p>最近は自作PCに興味があります。HDD・メモリ・電源の交換なら経験があるので、いつの日か…!</p>
29+
<p>
30+
最近は自作PCに興味があります。HDD・メモリ・電源の交換なら経験があるので、いつの日か…!
31+
</p>
2532
</amp-story-grid-layer>
2633
</amp-story-page>

0 commit comments

Comments
 (0)