From 6331805b90cf2214dfde541473cb6fecabfbd577 Mon Sep 17 00:00:00 2001
From: Bud Parr <budparr@gmail.com>
Date: Fri, 14 Apr 2017 03:01:23 +0000
Subject: [PATCH] clean up layouts
---
layouts/_default/baseof.html | 6 +-
layouts/_default/list.html | 21 +++---
layouts/_default/single.html | 55 ++++-------------
layouts/section/article.html | 4 -
layouts/partials/menu-contextual.html | 15 +++++
layouts/partials/site-navigation.html | 2
layouts/index.html | 18 ++++--
layouts/robots.txt | 1
layouts/partials/summary.html | 6 --
layouts/article/summary.html | 5 -
10 files changed, 55 insertions(+), 78 deletions(-)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index ec9c4b5..285e3b3 100755
--- a/layouts/_default/baseof.html
+++ b/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" . -}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 8594049..6ca0963 100755
--- a/layouts/_default/list.html
+++ b/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 }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 9439017..d43dfec 100755
--- a/layouts/_default/single.html
+++ b/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 }}
diff --git a/layouts/article/summary.html b/layouts/article/summary.html
index 02cd366..b57becd 100644
--- a/layouts/article/summary.html
+++ b/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>
diff --git a/layouts/index.html b/layouts/index.html
index 8ba9f56..26c605f 100755
--- a/layouts/index.html
+++ b/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 }}
diff --git a/layouts/partials/menu-contextual.html b/layouts/partials/menu-contextual.html
new file mode 100644
index 0000000..be127ec
--- /dev/null
+++ b/layouts/partials/menu-contextual.html
@@ -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>
diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html
index ea51f38..723982a 100644
--- a/layouts/partials/site-navigation.html
+++ b/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>
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html
index 69e75e5..9c808aa 100644
--- a/layouts/partials/summary.html
+++ b/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>
diff --git a/layouts/robots.txt b/layouts/robots.txt
index 25b9e9a..6bbb8e2 100644
--- a/layouts/robots.txt
+++ b/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: /
diff --git a/layouts/section/article.html b/layouts/section/article.html
index eb651f2..09446ee 100644
--- a/layouts/section/article.html
+++ b/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>
--
Gitblit v1.10.0