mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Bud Parr
14.01.2017 6331805b90cf2214dfde541473cb6fecabfbd577
clean up layouts
1 files added
9 files modified
133 ■■■■■ changed files
layouts/_default/baseof.html 6 ●●●● patch | view | raw | blame | history
layouts/_default/list.html 21 ●●●● patch | view | raw | blame | history
layouts/_default/single.html 55 ●●●● patch | view | raw | blame | history
layouts/article/summary.html 5 ●●●●● patch | view | raw | blame | history
layouts/index.html 18 ●●●●● patch | view | raw | blame | history
layouts/partials/menu-contextual.html 15 ●●●●● patch | view | raw | blame | history
layouts/partials/site-navigation.html 2 ●●●●● patch | view | raw | blame | history
layouts/partials/summary.html 6 ●●●●● patch | view | raw | blame | history
layouts/robots.txt 1 ●●●● patch | view | raw | blame | history
layouts/section/article.html 4 ●●● patch | view | raw | blame | history
layouts/_default/baseof.html
@@ -7,8 +7,8 @@
    <title>{{ block "title" . }}{{ .Site.Title }} {{ with .Title }} | {{ . }}{{ end }}{{ end }}</title>
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
    <meta name="viewport" content="width=device-width,minimum-scale=1">
     {{ .Hugo.Generator }}
      {{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
      {{ if eq (getenv "HUGO_ENV") "production" }}
@@ -17,7 +17,7 @@
        <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
      {{ end }}
     <link href='{{ "/dist/main.css" | absURL }}' rel='stylesheet' type="text/css" />
     <link href='{{ "dist/main.css" | absURL }}' rel='stylesheet' type="text/css" />
      {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}}
      {{- template "_internal/opengraph.html" . -}}
layouts/_default/list.html
@@ -1,17 +1,16 @@
{{ define "main" }}
  <article class="cf pa3 pa4-m pa4-l nested-copy-line-height center measure-wide-l nested-img">
    <div class="nested-copy-line-height nested-links nested-img mid-gray ">
  <article class="cf pa3 pa4-m pa4-l">
    <div class="measure-wide-l center nested-copy-line-height nested-links nested-img mid-gray ">
      {{ .Content }}
    </div>
  </article>
  {{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
  <section class="flex-ns flex-wrap justify-around mt5">
    {{ range sort $section.Pages "Date" "desc"  }}
    {{ partial "summary.html" . }}
    {{ end }}
  </section>
  <div class="measure-wide-l center">
    {{ $section := where .Data.Pages "Section" .Section }}
    <section class="flex-ns flex-wrap justify-around mt5">
      {{ range  $section }}
        {{ partial "summary.html" . }}
      {{ end }}
    </section>
  {{ template "_internal/pagination.html" . }}
  </div>
{{ end }}
layouts/_default/single.html
@@ -1,45 +1,18 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
{{ $currentPageUrl := .URL }}
{{ $currentSection := (where .Site.Pages "Section" .Section)  }}
<div class="flex flex-wrap">
  <aside class="w-2f0 bg-light-gray">
    <ul>
      <li class="list b mb3">
        More {{ .Section }}
      </li>
      {{ range  $currentSection }}
      <li class="list f5 w-100 hover-bg-white nl1">
        <a href="{{ .URL }}" class="link black ph2 pv2 db">
            {{ .Title }}
        </a>
      </li>
      {{ end }}
    </ul>
  </aside>
  <article class="center cf pv5 measure-wide-l">
    <h4 class="f6">
      {{ humanize .Section | upper  }}
    </h4>
    <h1>
      {{ .Title }}
    </h1>
    <div class="nested-copy-line-height f4 nested-linkfs nested-img mid-gray measure-wide-l">
  {{ $currentPageUrl := .URL }}
  <div class="flex">
    <article class="pv5">
      <h4 class="f6">
        {{ humanize .Section | upper  }}
      </h4>
      <h1>
        {{ .Title }}
      </h1>
      <div class="nested-copy-line-height f4 nested-linkfs nested-img mid-gray measure-wide-l">
        {{ .Content  }}
    </div>
  </article>
</div>
357edd
<style media="screen">
  p a {
    color: #2F6FC4;
          /*#357edd*/
  }
</style>
      </div>
    </article>
    {{ partial "menu-contextual.html" . }}
  </div>
{{ end }}
layouts/article/summary.html
@@ -1,24 +1,19 @@
<div class="relative w-100 w-30-l mb4 bg-white nested-copy-line-height">
  <div class="bg-white mb3 pa4 gray overflow-hidden">
    {{ if .Date }}
      <date class="f6">
        {{ .Date.Format "January 2, 2006" }}
      </date>
    {{ end }}
    <h1 class="f3 near-black">
      <a href="{{ .URL }}" class="link black dim">
        {{ .Title }}
      </a>
    </h1>
    <div class="nested-links f5 nested-copy-line-height">
      <p>
        {{ .Summary  }}
      </p>
    </div>
  </div>
</div>
layouts/index.html
@@ -3,21 +3,27 @@
  <main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray">
    {{ .Content }}
  </main>
  <div class="pa3 pa4-ns">
  <div class="flex pa3 pa4-ns w-70 center">
    {{ $section := where .Data.Pages "Section" "article" }}
    <section class="flex-ns flex-wrap justify-around">
    <section class="w-60 bg-white">
      {{ range sort (first 1 $section) "Date" "desc"  }}
        {{ .Render "summary" }}
        {{ end }}
        <h1>{{ .Title }}</h1>
      {{ end }}
    </section>
    <section class="flex-ns flex-wrap justify-around">
    <section class="w-30 ph4">
      {{ range sort (first 2 (after 1 $section)) "Date" "desc"  }}
        {{ .Render "summary" }}
        <h2 class="f4">{{ .Title }}</h2>
        {{ end }}
    </section>
    </div>
{{ end }}
layouts/partials/menu-contextual.html
New file
@@ -0,0 +1,15 @@
{{ $currentSection := (where .Site.Pages "Section" .Section)  }}
<aside class="bg-light-gray pr4">
  <ul>
    <li class="list b mb3">
      More {{ .Section }}
    </li>
    {{ range  $currentSection }}
      <li class="list f5 w-100 hover-bg-white nl1">
        <a href="{{ .URL }}" class="link black ph2 pv2 db">
          {{ .Title }}
        </a>
      </li>
    {{ end }}
  </ul>
</aside>
layouts/partials/site-navigation.html
@@ -1,6 +1,5 @@
<nav class="pv3 ph3 ph4-ns" role="navigation">
  <div class="flex-ns justify-between items-center">
    <a href="/" class="f3 fw2 hover-white no-underline white-90 dib">
      {{ .Site.Title }}
    </a>
@@ -15,6 +14,5 @@
        {{ end }}
      </ul>
    {{ end }}
  </div>
</nav>
layouts/partials/summary.html
@@ -1,20 +1,14 @@
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
  <div class="bg-white mb3 pa4 gray overflow-hidden">
    <h1 class="f3 near-black">
      <a href="{{ .URL }}" class="link black dim">
        {{ .Title }}
      </a>
    </h1>
    <div class="nested-links f5 nested-copy-line-height">
      <p>
        {{ .Summary  }}
      </p>
    </div>
  </div>
</div>
layouts/robots.txt
@@ -1,7 +1,6 @@
User-agent: *
# robotstxt.org - if ENV production variable is false robots will be disallowed.
{{ if eq (getenv "HUGO_ENV") "production" }}
  Disallow: admin/
  Disallow:
{{ else }}
  Disallow: /
layouts/section/article.html
@@ -1,13 +1,11 @@
{{ define "main" }}
  <article class="pa3 pa4-ns nested-copy-line-height nested-img">
    <div class="{{ .Site.Params.copyClass }}">
      {{ .Content }}
    </div>
    {{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
    <section class="flex-ns flex-wrap justify-around mt5">
      {{ range sort $section.Pages "Date" "desc"  }}
      {{ range  $section.Pages }}
        {{ .Render "summary" }}
      {{ end }}
    </section>