Merge pull request 'Photosセクションを作成する' (#8) from create-photo-section into master

Reviewed-on: #8
This commit is contained in:
Kazuhiro MUSASHI 2022-11-27 03:29:41 +00:00
commit 5fbc5486ab
7 changed files with 147 additions and 24 deletions

View File

@ -221,6 +221,17 @@ theme = "LoveIt"
# title will be shown when you hover on this menu link
title = ""
weight = 1
[[menu.main]]
identifier = "photos"
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Photos"
url = "/photos/"
# title will be shown when you hover on this menu link
title = ""
weight = 2
[[menu.main]]
identifier = "tags"
pre = ""
@ -228,7 +239,7 @@ theme = "LoveIt"
name = "Tags"
url = "/tags/"
title = ""
weight = 2
weight = 3
[[menu.main]]
identifier = "categories"
pre = ""
@ -236,7 +247,7 @@ theme = "LoveIt"
name = "Categories"
url = "/categories/"
title = ""
weight = 3
weight = 4
[markup]
# Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)

View File

@ -221,6 +221,17 @@ theme = "LoveIt"
# title will be shown when you hover on this menu link
title = ""
weight = 1
[[menu.main]]
identifier = "photos"
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Photos"
url = "/photos/"
# title will be shown when you hover on this menu link
title = ""
weight = 2
[[menu.main]]
identifier = "tags"
pre = ""
@ -228,7 +239,7 @@ theme = "LoveIt"
name = "Tags"
url = "/tags/"
title = ""
weight = 2
weight = 3
[[menu.main]]
identifier = "categories"
pre = ""
@ -236,7 +247,7 @@ theme = "LoveIt"
name = "Categories"
url = "/categories/"
title = ""
weight = 3
weight = 4
[markup]
# Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)

View File

@ -0,0 +1,15 @@
+++
title = "秋の上野公園"
date = 2022-11-19T17:21:00+09:00
lastmod = 2022-11-20T18:21:00+09:00
description = "秋の上野公園を訪ねてきました"
tags = ["上野"]
author = "kazu634"
camera = "Sony a6400"
lens = "E 35mm F1.8 OSS"
location = "上野公園"
images = ["https://live.staticflickr.com/65535/52510534640_3ba9395a29_b.jpg"]
+++
<img src="https://live.staticflickr.com/65535/52510321594_edcbd751c4_z.jpg" width="640" height="427" alt="DSC00726.JPG">

View File

@ -0,0 +1,14 @@
+++
title = "ウィスキー"
date = 2022-11-23T21:21:00+09:00
lastmod = 2022-11-23T21:21:00+09:00
description = "竹鶴だよ"
tags = ["蒲田"]
author = "kazu634"
camera = "Sony a6400"
lens = "E 35mm F1.8 OSS"
location = "蒲田 バーボンロード"
images = ["ogp/2022-11-23-kamata-barbon-road.webp"]
+++
<a data-flickr-embed="true" href="https://www.flickr.com/photos/42332031@N02/52519225539/in/dateposted/" title="DSC00826.JPG"><img src="https://live.staticflickr.com/65535/52519225539_bc5a39ab80_z.jpg" width="640" height="427" alt="DSC00826.JPG"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

View File

@ -0,0 +1,14 @@
+++
title = "手水舎"
date = 2022-11-26T21:21:00+09:00
lastmod = 2022-11-26T21:21:00+09:00
description = "神社の手を洗うところを「手水舎」と呼びます"
tags = ["武蔵新田"]
author = "kazu634"
camera = "Sony a6400"
lens = "E 35mm F1.8 OSS"
location = "新田神社"
images = ["ogp/2022-11-27-temizuya.webp"]
+++
<a data-flickr-embed="true" href="https://www.flickr.com/photos/42332031@N02/52524592196/in/dateposted/" title="DSC00852.JPG"><img src="https://live.staticflickr.com/65535/52524592196_8f3f47763a_z.jpg" width="640" height="427" alt="DSC00852.JPG"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

View File

@ -1,20 +0,0 @@
+++
title = "秋の上野公園"
date = 2022-11-19T17:21:00+09:00
lastmod = 2022-11-20T18:21:00+09:00
description = "秋の上野公園を訪ねてきました"
tags = ["上野"]
categories = ["写真"]
author = "kazu634"
images = ["https://live.staticflickr.com/65535/52510534640_3ba9395a29_b.jpg"]
+++
秋の上野公園を訪ねてきました。
<img src="https://live.staticflickr.com/65535/52510524830_03612e2d64_z.jpg" width="640" height="427" alt="DSC00717.JPG">
<img src="https://live.staticflickr.com/65535/52510043061_a78243c06e_z.jpg" width="640" height="427" alt="DSC00719.JPG">
<img src="https://live.staticflickr.com/65535/52510321594_edcbd751c4_z.jpg" width="640" height="427" alt="DSC00726.JPG">
<img src="https://live.staticflickr.com/65535/52510534640_3ba9395a29_z.jpg" width="640" height="427" alt="DSC00738.JPG">

View File

@ -0,0 +1,78 @@
{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}}
{{- define "content" -}}
{{- $params := .Scratch.Get "params" -}}
{{- $toc := $params.toc -}}
{{- if eq $toc true -}}
{{- $toc = .Site.Params.page.toc | default dict -}}
{{- else if eq $toc false -}}
{{- $toc = dict "enable" false -}}
{{- end -}}
{{- /* Auto TOC */ -}}
{{- if ne $toc.enable false -}}
<div class="toc" id="toc-auto">
<h2 class="toc-title">{{ T "contents" }}</h2>
<div class="toc-content{{ if eq $toc.auto false }} always-active{{ end }}" id="toc-content-auto"></div>
</div>
{{- end -}}
<article class="page single">
{{- /* Title */ -}}
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
{{- /* Subtitle */ -}}
{{- with $params.subtitle -}}
<h2 class="single-subtitle">{{ . }}</h2>
{{- end -}}
{{- /* Meta */ -}}
<div class="post-meta">
<div class="post-meta-line">
{{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
<span class="post-author">
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
{{- partial "plugin/link.html" $options -}}
</span>
</div>
<div class="post-meta-line">
{{- with .Site.Params.dateformat | default "2006-01-02" | .PublishDate.Format -}}
<i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="{{ . }}">{{ . }}</time>&nbsp;&nbsp;
{{- end -}}
{{- with $params.camera -}}
<i class="fas fa-camera"></i>&nbsp;{{ . }}&nbsp;
{{- end -}}
{{- with $params.lens -}}
&nbsp;({{ . }})&nbsp;&nbsp;
{{- end -}}
{{- with $params.location -}}
<i class="fas fa-globe"></i>&nbsp;{{ . }}&nbsp;&nbsp;
{{- end -}}
</div>
</div>
{{- /* Featured image */ -}}
{{- $image := $params.featuredimage -}}
{{- with .Resources.GetMatch "featured-image" -}}
{{- $image = .RelPermalink -}}
{{- end -}}
{{- with $image -}}
<div class="featured-image">
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
</div>
{{- end -}}
{{- /* Content */ -}}
<div class="content" id="content">
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
{{- /* Footer */ -}}
{{- partial "single/footer.html" . -}}
{{- /* Comment */ -}}
{{- partial "comment.html" . -}}
</article>
{{- end -}}