github.com/rabbouni145/gg@v0.47.1/docs/themes/gohugoioTheme/layouts/news/single.html (about)

     1  {{ define "main" }}
     2    {{ $currentPageUrl := .URL }}
     3  
     4    <article class="cf ph4 pv3 pv5-ns">
     5        <!-- header spans the full width -->
     6      <header class="flex-none w-100 pb3">
     7        {{ if .Params.categories }}
     8          {{ range .Params.categories }}
     9            <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3">
    10              {{ humanize  . | upper }}
    11            </a>
    12          {{ end }}
    13        {{end}}
    14  
    15        <h1 class="lh-title fw9 mb7 mv0 pt3">
    16          <a href="{{ .URL }}" class="link primary-color dim">
    17            {{ .Title }}
    18          </a>
    19        </h1>
    20      </header>
    21  
    22      <div class="flex-l">
    23        <aside class="mid-gray fn w-100 w-25-l">
    24          {{ with .Params.description }}
    25            <h2 class="f3 lh-title">
    26              {{ . | markdownify }}
    27            </h2>
    28          {{ end }}
    29          <time class="f6 mt2 db ttu tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
    30            {{ .Date.Format "January 2, 2006" }}
    31          </time>
    32          {{ if in .Params.categories "Releases" }}
    33          <p>
    34          Go to <a href="https://github.com/gohugoio/hugo/releases" class="link primary-color dim">Hugo Releases</a> for the release downloads.
    35          </p>
    36          {{ end }}
    37          <!--
    38          NOTE: Removed to test builds without it.
    39          partial "components/author-github-data" (dict "context" . "size" "110") -->
    40  
    41          <div class="nested-links mt4">
    42            {{- partial "previous-next-links-in-section.html" . -}}
    43          </div>
    44  
    45        </aside>
    46  
    47        <div class="fn pl5-l pt3 mid-gray w-100 w-two-third-l sans-serif nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote measure-wide-l"><!-- TODO: Can the content top and the description top line up more precisely, or is just winging it with padding the best we've got? -->
    48          {{ with .Params.featured_image_path }}
    49            <img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
    50          {{ else }}
    51            {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
    52            {{ with $featured }}
    53            {{ $featured := .Resize "480x" }}
    54            <img src="{{ $featured.RelPermalink }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
    55            {{ end }}
    56            {{ end }}
    57          {{ .Content }}
    58        </div>
    59      </div>
    60      {{ if and .Params.tags .Site.Taxonomies.tags }}
    61        <div class="mt5 f6 gray nested-lh-copy bg-light-gray ph3 pv2 measure-wide-l">
    62            {{ $name := index .Params.tags 0 }}
    63            {{ $name := $name | urlize }}
    64            {{ $tags := index .Site.Taxonomies.tags $name }}
    65  
    66              <ul class="list dib nested-links ml0 pl0">
    67                <li class="dib mb2 mr2">Related:</li>
    68                {{ range $tags.Pages }}
    69                  {{ if ne .URL $currentPageUrl }}
    70                    <li class="mb2 mr3">
    71                       <a href="{{ .URL }}" class="link">
    72                         {{ .LinkTitle }}
    73                       </a>
    74                     </li>
    75                  {{ end }}
    76                {{end}}
    77              </ul>
    78            </div>
    79          {{end}}
    80  
    81        <div class="gray f6 mv6">
    82          Last Update: {{ .Lastmod.Format "January 2, 2006" }} <br>
    83          {{ partial "page-edit.html" . }}
    84        </div>
    85  
    86    </article>
    87  
    88  {{ end }}