~dricottone/blog

fcdb09284bd2956bae8e754b6b64907412b9835e — Dominic Ricottone 2 years ago 6ffce4f
Small structural changes to home page and navigation
2 files changed, 17 insertions(+), 20 deletions(-)

M layouts/index.html
M layouts/partials/navi.html
M layouts/index.html => layouts/index.html +7 -14
@@ 1,31 1,24 @@

{{ define "main" }}

<div>
  <!-- pulls in content/_index.md -->
  {{.Content}}
</div>

<!-- pulls in content/posts/*.md -->
<hr />
<h2>Blog</h2>
<p>These are my three most recent blog posts. More posts can be found on the 'Blog' tab.<p>

<ul id="list-posts">
  {{ with .Site.GetPage "/posts" }}
    {{ range .Pages }}

    {{ range first 3 .Pages }}
    <li>
      <!-- see https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference -->
      <h2><a href="{{.Permalink}}">{{.Title}}</a></h2>
      <div class="post">
        <p><i>posted on {{.Date.Format "2006-01-02"}}</i></p>
        <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 }}
        {{ if .Truncated }} <p class="read-more"><a href="{{.Permalink}}">Read More...</a></p> {{ end }}
      </div>
    </li>

    {{ end }}
  {{ end }}
</ul>

{{ end }}


M layouts/partials/navi.html => layouts/partials/navi.html +10 -6
@@ 1,9 1,13 @@
<select id="menu-navi" onchange="window.open(this.value, '_self')">
  <option value="#" selected="selected">Navigate to...</option>
<!-- Navigation
      + Either `#menu-navi` or `#list-navi` will be visible
      + 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="/">Home</option>
  <option value="https://www.dominic-ricottone.com/about">About</option>
  <option value="/about">About</option>
  <option value="/posts">Blog</option>
  <option value="https://www.dominic-ricottone.com/cv">CV</option>
  <option value="/cv">CV</option>
  <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>


@@ 14,10 18,10 @@
  <li class="shown"><a href="/about">About</a></li>
  <li class="shown"><a href="/posts">Blog</a></li>
  <li class="shown"><a href="/cv">CV</a></li>
  <li class="trigger shown target-code">Code</li>
  <li class="trigger shown target-code" tabindex="0">Code</li>
  <li class="code"><a href="https://git.dominic-ricottone.com">Personal</a></li>
  <li class="code"><a href="https://www.github.com/dricottone">GitHub</a></li>
  <li class="shown"><a href="https://wiki.dominic-ricottone.com/DominicRicottone">Wiki</a></li>
  <li class="shown"><a href="/chat">Live Chat</a></li>
  <li class="shown"><a href="/sitemap.xml">Site Map</a></li>
</ul>