Browse Source

Add photo EXIF info

* Thanks to Hugo v0.130.0 switched EXIF library
Track3 8 tháng trước cách đây
mục cha
commit
1cf3c41250
3 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 1 1
      assets/scss/style.scss
  2. 1 0
      layouts/index.html
  3. 5 6
      layouts/shortcodes/photo.html

+ 1 - 1
assets/scss/style.scss

@@ -378,6 +378,7 @@ h1 {
 
   >object {
     text-align: right;
+
     >a {
       display: block;
     }
@@ -468,7 +469,6 @@ a.section-title:hover {
   figcaption>p {
     margin: 0;
     font-size: 75%;
-    font-weight: bold;
     color: var(--c-txt-alt);
 
     &::before {

+ 1 - 0
layouts/index.html

@@ -2,6 +2,7 @@
 		{{ if .Content -}}
 		<div class="content">
 			{{ .Content }}
+			<hr>
 		</div>
 		{{- end }}
 		<section class="section content">

+ 5 - 6
layouts/shortcodes/photo.html

@@ -16,12 +16,11 @@
 		<p>
 			{{- .Get "caption" | markdownify -}}
 			{{ with $image.Exif -}}
-			<span class="image_meta">
-				{{ with .Tags.Model }}{{.}} {{ end -}}
-				{{ with .Tags.FocalLength }}@ {{.}}mm {{ end -}}
-				{{ with .Tags.FNumber }}&mdash; &fnof;/{{.}}{{ end -}}
-				{{ with .Tags.ExposureTime }}, {{ lang.FormatNumber 2 . }} sec{{ end -}}
-				{{ with .Tags.ISOSpeedRatings }}, ISO {{.}} {{ end }}
+			<span>【
+				{{- with .Tags.FocalLength }}{{.}}mm{{ end -}}
+				{{ with .Tags.ApertureValue }}, &fnof;/{{ lang.FormatNumber 1 . }}{{ end -}}
+				{{ with .Tags.ExposureTime }}, {{.}}s{{ end -}}
+				{{ with .Tags.ISO }}, ISO{{.}}{{ end }}】
 			</span>
 			{{ end -}}
 		</p>