clean up layouts

This commit is contained in:
Bud Parr 2017-04-13 23:01:23 -04:00
parent 1d810d7237
commit 6331805b90
No known key found for this signature in database
GPG key ID: ACA375160539D2B3
10 changed files with 55 additions and 78 deletions

View file

@ -7,8 +7,8 @@
<title>{{ block "title" . }}{{ .Site.Title }} {{ with .Title }} | {{ . }}{{ end }}{{ end }}</title> <title>{{ block "title" . }}{{ .Site.Title }} {{ with .Title }} | {{ . }}{{ end }}{{ end }}</title>
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320"> <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 }} {{ .Hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}} {{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" }} {{ if eq (getenv "HUGO_ENV") "production" }}
@ -17,7 +17,7 @@
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }} {{ 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 */}} {{/* 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" . -}} {{- template "_internal/opengraph.html" . -}}

View file

@ -1,17 +1,16 @@
{{ define "main" }} {{ define "main" }}
<article class="cf pa3 pa4-m pa4-l">
<article class="cf pa3 pa4-m pa4-l nested-copy-line-height center measure-wide-l nested-img"> <div class="measure-wide-l center nested-copy-line-height nested-links nested-img mid-gray ">
<div class="nested-copy-line-height nested-links nested-img mid-gray ">
{{ .Content }} {{ .Content }}
</div> </div>
</article> </article>
<div class="measure-wide-l center">
{{ $section := .Paginate (where .Data.Pages "Section" .Section) }} {{ $section := where .Data.Pages "Section" .Section }}
<section class="flex-ns flex-wrap justify-around mt5"> <section class="flex-ns flex-wrap justify-around mt5">
{{ range sort $section.Pages "Date" "desc" }} {{ range $section }}
{{ partial "summary.html" . }} {{ partial "summary.html" . }}
{{ end }} {{ end }}
</section> </section>
{{ template "_internal/pagination.html" . }} {{ template "_internal/pagination.html" . }}
</div>
{{ end }} {{ end }}

View file

@ -1,45 +1,18 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }} {{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }} {{ define "main" }}
{{ $currentPageUrl := .URL }} {{ $currentPageUrl := .URL }}
{{ $currentSection := (where .Site.Pages "Section" .Section) }} <div class="flex">
<article class="pv5">
<div class="flex flex-wrap"> <h4 class="f6">
<aside class="w-2f0 bg-light-gray"> {{ humanize .Section | upper }}
<ul> </h4>
<li class="list b mb3"> <h1>
More {{ .Section }} {{ .Title }}
</li> </h1>
{{ range $currentSection }} <div class="nested-copy-line-height f4 nested-linkfs nested-img mid-gray measure-wide-l">
<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">
{{ .Content }} {{ .Content }}
</div> </div>
</article> </article>
</div> {{ partial "menu-contextual.html" . }}
</div>
357edd
<style media="screen">
p a {
color: #2F6FC4;
/*#357edd*/
}
</style>
{{ end }} {{ end }}

View file

@ -1,24 +1,19 @@
<div class="relative w-100 w-30-l mb4 bg-white nested-copy-line-height"> <div class="relative w-100 w-30-l mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden"> <div class="bg-white mb3 pa4 gray overflow-hidden">
{{ if .Date }} {{ if .Date }}
<date class="f6"> <date class="f6">
{{ .Date.Format "January 2, 2006" }} {{ .Date.Format "January 2, 2006" }}
</date> </date>
{{ end }} {{ end }}
<h1 class="f3 near-black"> <h1 class="f3 near-black">
<a href="{{ .URL }}" class="link black dim"> <a href="{{ .URL }}" class="link black dim">
{{ .Title }} {{ .Title }}
</a> </a>
</h1> </h1>
<div class="nested-links f5 nested-copy-line-height"> <div class="nested-links f5 nested-copy-line-height">
<p> <p>
{{ .Summary }} {{ .Summary }}
</p> </p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -3,21 +3,27 @@
<main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray"> <main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray">
{{ .Content }} {{ .Content }}
</main> </main>
<div class="pa3 pa4-ns">
<div class="flex pa3 pa4-ns w-70 center">
{{ $section := where .Data.Pages "Section" "article" }} {{ $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" }} {{ range sort (first 1 $section) "Date" "desc" }}
{{ .Render "summary" }} <h1>{{ .Title }}</h1>
{{ end }} {{ end }}
</section> </section>
<section class="flex-ns flex-wrap justify-around"> <section class="w-30 ph4">
{{ range sort (first 2 (after 1 $section)) "Date" "desc" }} {{ range sort (first 2 (after 1 $section)) "Date" "desc" }}
{{ .Render "summary" }} <h2 class="f4">{{ .Title }}</h2>
{{ end }} {{ end }}
</section> </section>
</div> </div>
{{ end }} {{ end }}

View 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>

View file

@ -1,6 +1,5 @@
<nav class="pv3 ph3 ph4-ns" role="navigation"> <nav class="pv3 ph3 ph4-ns" role="navigation">
<div class="flex-ns justify-between items-center"> <div class="flex-ns justify-between items-center">
<a href="/" class="f3 fw2 hover-white no-underline white-90 dib"> <a href="/" class="f3 fw2 hover-white no-underline white-90 dib">
{{ .Site.Title }} {{ .Site.Title }}
</a> </a>
@ -15,6 +14,5 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>
</nav> </nav>

View file

@ -1,20 +1,14 @@
<div class="relative w-100 mb4 bg-white nested-copy-line-height"> <div class="relative w-100 mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden"> <div class="bg-white mb3 pa4 gray overflow-hidden">
<h1 class="f3 near-black"> <h1 class="f3 near-black">
<a href="{{ .URL }}" class="link black dim"> <a href="{{ .URL }}" class="link black dim">
{{ .Title }} {{ .Title }}
</a> </a>
</h1> </h1>
<div class="nested-links f5 nested-copy-line-height"> <div class="nested-links f5 nested-copy-line-height">
<p> <p>
{{ .Summary }} {{ .Summary }}
</p> </p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,7 +1,6 @@
User-agent: * User-agent: *
# robotstxt.org - if ENV production variable is false robots will be disallowed. # robotstxt.org - if ENV production variable is false robots will be disallowed.
{{ if eq (getenv "HUGO_ENV") "production" }} {{ if eq (getenv "HUGO_ENV") "production" }}
Disallow: admin/
Disallow: Disallow:
{{ else }} {{ else }}
Disallow: / Disallow: /

View file

@ -1,13 +1,11 @@
{{ define "main" }} {{ define "main" }}
<article class="pa3 pa4-ns nested-copy-line-height nested-img"> <article class="pa3 pa4-ns nested-copy-line-height nested-img">
<div class="{{ .Site.Params.copyClass }}"> <div class="{{ .Site.Params.copyClass }}">
{{ .Content }} {{ .Content }}
</div> </div>
{{ $section := .Paginate (where .Data.Pages "Section" .Section) }} {{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
<section class="flex-ns flex-wrap justify-around mt5"> <section class="flex-ns flex-wrap justify-around mt5">
{{ range sort $section.Pages "Date" "desc" }} {{ range $section.Pages }}
{{ .Render "summary" }} {{ .Render "summary" }}
{{ end }} {{ end }}
</section> </section>