andersdamsgaard.com

my photography webpage
git clone git://src.adamsgaard.dk/andersdamsgaard.com # fast
git clone https://src.adamsgaard.dk/andersdamsgaard.com.git # slow
Log | Files | Refs | Submodules | README | LICENSE Back to index

single.da.html (2525B)


      1 {{- partial "header.html" . }}
      2 
      3 <main>
      4     <div class="post">
      5         <div class="post-info">
      6             {{- if .Params.Author }}
      7                 {{ .Params.Author }}
      8             {{/*- else */}}
      9                 {{/* .Site.Params.Author */}}
     10             {{- end }}
     11         </div>
     12 
     13         <h1 class="post-title">{{ .Title }}</h1>
     14         <div class="post-line"></div>
     15 
     16         {{ .Content }}
     17 
     18         {{/* Loop over images, insert them with a width of 700 px, and name them incrementally */}}
     19         {{- if .Params.gallery }}
     20             {{ $scratch := newScratch }}
     21             {{ $scratch.Set "basename" .Title }}
     22             {{ with .Resources.ByType "image" }}
     23                 {{ $scratch.Set "counter" 0 }}
     24                 {{ range . }}
     25 
     26                 {{ $scratch.Set "image" (.Fit "1000x1000") }}
     27                 {{ $image := $scratch.Get "image" }}
     28                 {{/* $image.Sharpen 0.5 */}}
     29                 <figure style="padding: 0.0rem; margin: 2rem 0;
     30                     background-color: #ffffff">
     31                     <img src='{{ $image.RelPermalink }}'
     32                          title='{{ $scratch.Get "basename" }} {{ printf "%02d" ( $scratch.Get "counter" ) }}'
     33                          >
     34                          <!-- width="{{ $image.Width }}" height="{{ $image.Height }}"> -->
     35                     <!-- <figcaption> -->
     36                     <!--     <small> -->
     37                     <!--         <center> -->
     38                     <!--             {{ $scratch.Get "basename" }} {{ printf "%02d" ( $scratch.Get "counter" ) }} -->
     39                     <!--         </center> -->
     40                     <!--     </small> -->
     41                     <!-- </figcaption> -->
     42                 </figure>
     43                 <br>
     44                     {{ $scratch.Add "counter" 1 }}
     45                 {{ end }}
     46             {{ end }}
     47         {{- end }}
     48     </div>
     49 
     50     <div class="pagination">
     51         {{- if .PrevPage }}
     52         <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">&#8592; Previous</a> -->
     53         <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Næste serie &#8594;</a>
     54         {{- end }}
     55         {{- if .NextPage }}
     56         <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next &#8594;</a> -->
     57         <a href="{{ .NextPage.RelPermalink }}" class="left arrow">&#8592; Forrige serie</a>
     58         {{- end }}
     59 
     60         <a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a>
     61 
     62         <!-- <a href="#" class="top">Top</a> -->
     63     </div>
     64 </main>
     65 
     66 {{- partial "footer.html" . }}