Browse Source

clean up layouts

tags/v1.1
Bud Parr 8 years ago
parent
commit
6331805b90
No account linked to committer's email address

+ 3
- 3
layouts/_default/baseof.html View File

<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" }}
<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" . -}}

+ 10
- 11
layouts/_default/list.html View File

{{ define "main" }} {{ 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 }} {{ .Content }}
</div> </div>
</article> </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" . }} {{ template "_internal/pagination.html" . }}
</div>
{{ end }} {{ end }}

+ 14
- 41
layouts/_default/single.html View File

{{ define "header" }}{{ partial "page-header.html" . }}{{ end }} {{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }} {{ 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 }} {{ .Content }}
</div>
</article>
</div>

357edd
<style media="screen">
p a {
color: #2F6FC4;

/*#357edd*/
}
</style>

</div>
</article>
{{ partial "menu-contextual.html" . }}
</div>
{{ end }} {{ end }}

+ 0
- 5
layouts/article/summary.html View File

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

+ 12
- 6
layouts/index.html View File

<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" }}
{{ end }}
<h1>{{ .Title }}</h1>
{{ 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 }}

+ 15
- 0
layouts/partials/menu-contextual.html View File

{{ $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>

+ 0
- 2
layouts/partials/site-navigation.html View File

<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>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}

</div> </div>
</nav> </nav>

+ 0
- 6
layouts/partials/summary.html View File

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

+ 0
- 1
layouts/robots.txt View File

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: /

+ 1
- 3
layouts/section/article.html View File

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

Loading…
Cancel
Save