~dricottone/blog

86970a383edf4058ef5f229a1fc263b53d674ad2 — Dominic Ricottone 2 years ago 302ef60
Slight refactoring of whitespace
M layouts/_default/list.html => layouts/_default/list.html +5 -5
@@ 1,18 1,18 @@
{{ define "main" }}
<!-- content/<collection>/_index.md -->
<article>
  {{.Content}}
  {{ .Content }}
</article>

<ul id="list-posts">
  <!-- content/<collection>/*.md -->
  {{ range .Pages }}
  <li>
    <h2><a href="{{.Permalink}}">{{.Title}}</a></h2>
    <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
    <div class="post">
      <p><i>posted on {{.Date.Format "2006-01-02"}}</i></p> <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
      <p>{{.Summary}}</p>
      {{ if .Truncated }} <p><a href="{{.Permalink}}">Read More…</a></p> {{ end }}
      <p><i>posted on {{ .Date.Format "2006-01-02" }}</i></p> <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
      <p>{{ .Summary }}</p>
      {{ if .Truncated }} <p><a href="{{ .Permalink }}">Read More…</a></p> {{ end }}
    </div>
  </li>
  {{ end }}

M layouts/_default/single.html => layouts/_default/single.html +2 -2
@@ 2,12 2,12 @@
{{ if (.Params.toc) }}
<div id="toc">
  <h2>Table of Contents</h2>
  {{.TableOfContents}}
  {{ .TableOfContents }}
</div>
{{ end }}

<article>
  <!-- content/<collection>/*.md -->
  {{.Content}}
  {{ .Content }}
</article>
{{ end }}

M layouts/index.html => layouts/index.html +5 -5
@@ 1,6 1,6 @@
{{ define "main" }}
<div>
  {{.Content}}
  {{ .Content }}
</div>

<hr />


@@ 11,11 11,11 @@
  {{ with .Site.GetPage "/posts" }}
    {{ range first 3 .Pages }}
    <li>
      <h2><a href="{{.Permalink}}">{{.Title}}</a></h2>
      <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
      <div class="post">
        <p><i>posted on {{.Date.Format "2006-01-02"}}</i></p> <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
        <p>{{.Summary}}</p>
        {{ if .Truncated }} <p class="read-more"><a href="{{.Permalink}}">Read More...</a></p> {{ end }}
        <p><i>posted on {{ .Date.Format "2006-01-02" }}</i></p> <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
        <p>{{ .Summary }}</p>
        {{ if .Truncated }} <p class="read-more"><a href="{{ .Permalink }}">Read More...</a></p> {{ end }}
      </div>
    </li>
    {{ end }}

M layouts/partials/navi.html => layouts/partials/navi.html +2 -1
@@ 3,7 3,7 @@
      + Default is to show `#menu-navi` but a media query overrides this
  -->
<select id="menu-navi" required onchange="window.open(this.value, '_self')">
  <option value="#" selected>Nagivate to...</option>
  <option value="#" selected>Navigate to...</option>
  <option value="/">Home</option>
  <option value="/about">About</option>
  <option value="/posts">Blog</option>


@@ 11,6 11,7 @@
  <option value="https://git.dominic-ricottone.com">Personal Repository</option>
  <option value="https://www.github.com/dricottone">GitHub</option>
  <option value="https://wiki.dominic-ricottone.com/DominicRicottone">Wiki</option>
  <option value="/chat">Live Chat</option>
  <option value="/sitemap.xml">Site Map</option>
</select>
<ul id="list-navi">

M layouts/posts/single.html => layouts/posts/single.html +6 -14
@@ 1,30 1,22 @@

{{ define "main" }}

<article>
  <h1>{{ .Title }}</h1>
  <p><b>Date:</b> {{ .Date.Format "Mon 2006-01-02" }}</p>
  <p><b>Permalink:</b> <a href="{{ .Permalink }}">{{ .Permalink }}</a></p>

  <h1>{{.Title}}</h1>

  <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
  <p><b>Date:</b> {{.Date.Format "Mon 2006-01-02"}}</p>
  <p><b>Permalink:</b> <a href="{{.Permalink}}">{{.Permalink}}</a></p>
  <br />

  <!-- pulls in content/posts/*.md -->
  <div class="post">
    {{.Content}}
    {{ .Content }}
  </div>

</article>

<br />

<div>
  {{ with .PrevInSection }}
    <p><b>Previous article:</b> <a href="{{.Permalink}}">{{.Title}}</a></p>
    <p><b>Previous article:</b> <a href="{{ .Permalink }}">{{ .Title }}</a></p>
  {{ end }}
  {{ with .NextInSection }}
    <p><b>Next article:</b> <a href="{{.Permalink}}">{{.Title}}</a></p>
    <p><b>Next article:</b> <a href="{{ .Permalink }}">{{ .Title }}</a></p>
  {{ end }}
</div>