Browse Source

clean up

tags/v1.1
Bud Parr 7 years ago
parent
commit
2dfd957296
No account linked to committer's email address

+ 5
- 3
layouts/_default/list.html View File

@@ -1,14 +1,16 @@
{{ define "main" }}
<article class="cf pa3 pa4-m pa4-l">
<div class="measure-wide-l center nested-copy-line-height nested-links nested-img mid-gray ">
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray">
{{ .Content }}
</div>
</article>
<div class="measure-wide-l center">
<div class="mw8 center">
{{ $section := where .Data.Pages "Section" .Section }}
<section class="flex-ns flex-wrap justify-around mt5">
{{ range $section }}
{{ partial "summary.html" . }}
<div class="relative w-100 mb4 bg-white">
{{ partial "summary.html" . }}
</div>
{{ end }}
</section>
{{ template "_internal/pagination.html" . }}

+ 9
- 10
layouts/_default/single.html View File

@@ -1,19 +1,18 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
{{ $currentPageUrl := .URL }}
<div class="flex mt5 mw8 center">
<article class="pv5">
<h4 class="f6">
<div class="flex-l mt2 mw8 center">
<article class="center cf pv5 ph3 ph4-ns mw7">
<p class="f6 b helvetica tracked">
{{ humanize .Section | upper }}
</h4>
<h1>
</p>
<h1 class="f1">
{{ .Title }}
</h1>
<div class="nested-copy-line-height f4 nested-linkfs nested-img mid-gray measure-wide-l">
{{ .Content }}
</div>
<section class="nested-copy-line-height lh-copy f4 nested-links nested-img mid-gray">
{{ .Content | markdownify }}
</section>
</article>
<div class="ph4 mt6">
<div class="ph3 mt2 mt6-ns">
{{ partial "menu-contextual.html" . }}
</div>
</div>

+ 7
- 7
layouts/article/single.html View File

@@ -1,8 +1,8 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
<div class="flex-l mt5 mw8 center">
<article class="center cf pv5 ph3 mw7">
<p class="f6 fw8">
<div class="flex-l mt2 mw8 center">
<article class="center cf pv5 ph3 ph4-ns mw7">
<p class="f6 b helvetica tracked">
{{ humanize .Section | upper }}
</p>
<h1 class="f1 athelas">
@@ -10,14 +10,14 @@
</h1>
{{/* TODO: Add Hugo author */}}
<time class="f6 mv4 dib tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
{{ .Date.Format "January 2, 2006" }}
</time>
<section class="nested-copy-line-height lh-copy serif f4 measure-wide-l nested-links nested-img mid-gray">
{{ .Content | markdownify }}
<section class="nested-copy-line-height lh-copy serif f4 nested-links nested-img mid-gray">
{{ .Content | markdownify }}
</section>
{{ partial "tags.html" . }}
</article>
<div class="ph4 mt6">
<div class="ph3 mt2 mt6-ns">
{{ partial "menu-contextual.html" . }}
</div>
</div>

+ 19
- 0
layouts/article/summary-with-image.html View File

@@ -0,0 +1,19 @@
<article class="bb b--black-10">
<a class="db pv4 ph3 ph0-l no-underline dark-gray dim" href="{{ .URL }}">
<div class="flex flex-column flex-row-ns">
{{ if .Params.featured_image }}
<div class="pr3-ns mb4 mb0-ns w-100 w-40-ns">
<img src="{{ .Params.featured_image }}" class="db" alt="image from {{ .Title }}">
</div>
{{ end }}
<div class="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }}">
<h1 class="f3 fw1 athelas mt0 lh-title">{{ .Title }}</h1>
<p class="f6 f5-l lh-copy">
{{ .Summary }}
</p>
{{/* TODO: add author
<p class="f6 lh-copy mv0">By {{ .Author }}</p> */}}
</div>
</div>
</a>
</article>

+ 2
- 3
layouts/article/summary.html View File

@@ -1,5 +1,5 @@
<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="mb3 pa4 gray overflow-hidden">
{{ if .Date }}
<date class="f6">
{{ .Date.Format "January 2, 2006" }}
@@ -16,4 +16,3 @@
</p>
</div>
</div>
</div>

+ 29
- 46
layouts/index.html View File

@@ -1,53 +1,36 @@
{{ define "main" }}

<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-l center measure-wide lh-copy mid-gray">
{{ .Content }}

</main>

<div class="pa3 pa4-ns w-100 w-70-ns center">
<h1 class="flex-none">
Recent Articles
</h1>


{{/* Create a variable to use the same section twice. Note that we've included the date here. */}}
{{ $section := where .Data.Pages.ByDate.Reverse "Section" "article" }}
<section class="w-100 mw8">
{{ range (first 3 $section) }}
<div class="relative w-100 mb4">
{{ .Render "summary-with-image" }}
</div>
{{ end }}
</section>

<section class="w-100">
<h1 class="f3">More posts</h1>
{{/* Nest the requirements, "after" then "first" on the outside */}}
{{ range (first 4 (after 1 $section)) }}
<h2 class="f5 fw4 mb4 dib mr3">
<a href="{{ .URL }}" class="link black dim">
{{ .Title }}
</a>
</h2>
{{ end }}
<a href="/article/" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">All Posts</a>
</section>

<div class="pa3 pa4-ns w-70 center">

<h1 class="flex-none db">Recent Articles</h1>

<div class="flex">
{{ $section := where .Data.Pages "Section" "article" }}

<section class="w-60 pa4 bg-white">
{{ range sort (first 1 $section) "Date" "desc" }}
{{ if .Date }}
<date class="f6">
{{ .Date.Format "January 2, 2006" }}
</date>
{{ end }}
<h2 class="f3 near-black">
<a href="{{ .URL }}" class="link black dim">
{{ .Title }}
</a>
</h2>
<div class="nested-links f5 nested-copy-line-height">
<p>
{{ .Summary }}
</p>
</div>
{{ end }}
</section>

<section class="w-30 ph4">
{{ range sort (first 4 (after 1 $section)) "Date" "desc" }}
<h2 class="f5 fw4 mb4">
<a href="{{ .URL }}" class="link black dim">
{{ .Title }}
</a>
</h2>
{{ end }}
</section>


</div>
</div>




{{ end }}

+ 6
- 4
layouts/section/article.html View File

@@ -1,12 +1,14 @@
{{ define "main" }}
<article class="pa3 pa4-ns nested-copy-line-height nested-img">
<div class="{{ .Site.Params.copyClass }}">
{{ .Content }}
</div>
<main class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray">
{{ .Content }}
</main>
{{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
<section class="flex-ns flex-wrap justify-around mt5">
{{ range $section.Pages }}
{{ .Render "summary" }}
<div class="relative w-100 w-30-l mb4 bg-white">
{{ .Render "summary" }}
</div>
{{ end }}
</section>
{{ template "_internal/pagination.html" . }}

+ 43
- 0
layouts/shortcodes/form-contact.html View File

@@ -0,0 +1,43 @@
{{/* <form class="black-80" accept-charset="UTF-8" action="{{ .Get "action" }}" method="POST">
<div class="measure">
<label for="name" class="f6 b db mb2">Name <span class="normal black-60">(optional)</span></label>
<input id="name" class="input-reset ba b--black-20 pa2 mb2 db w-100" type="text" aria-describedby="name-desc">
<small id="name-desc" class="f6 black-60 db mb2">Helper text for the form control.</small>

<label for="email" class="f6 b db mb2">Email Address</label>
<input id="email" class="input-reset ba b--black-20 pa2 mb2 db w-100" type="text" aria-describedby="email-desc">
<small id="email-desc" class="f6 black-60 db mb2">Helper text for the form control.</small>

<label for="email" class="f6 b db mb2">Name <span class="normal black-60">(optional)</span></label>
<input id="name" class="input-reset ba b--black-20 pa2 mb2 db w-100" type="text" aria-describedby="name-desc">
<small id="name-desc" class="f6 black-60 db mb2">Helper text for the form control.</small>
</div>
</form> */}}
{{ $.Scratch.Add "labelClasses" "f6 b db mb1 mt3 sans-serif mid-gray" }}
{{ $.Scratch.Add "inputClasses" "w-100 f5 pv3 ph3 bg-light-gray bn" }}

<form class="black-80 sans-serif" accept-charset="UTF-8" action="{{ .Get "action" }}" method="POST">

<label class="{{ $.Scratch.Get "labelClasses" }}" for="first_name">Your Name</label>
<input type="text" id="first_name" name="first_name" class="{{ $.Scratch.Get "inputClasses" }}" required placeholder=" " />



<label class="{{ $.Scratch.Get "labelClasses" }}" for="last_name">Organization Name</label>
<input type="text" id="last_name" name="last_name" class="{{ $.Scratch.Get "inputClasses" }}" required placeholder=" " />



<label class="{{ $.Scratch.Get "labelClasses" }}" for="email">Email Address</label>
<input type="email" id="email" name="email" class="{{ $.Scratch.Get "inputClasses" }}" required placeholder=" " />
<div class="requirements f6 gray glow i ph3 overflow-hidden TK">
Must be a valid email address.
</div>


<label class="{{ $.Scratch.Get "labelClasses" }}" for="message">Message</label>
<textarea id="message" name="message" class="{{ $.Scratch.Get "inputClasses" }} h4" aria-describedby="comment-desc"></textarea>

<input class="db w-100 mv2 white pa3 bn hover-shadow hover-bg-blck bg-animate bg-black" type="submit" value="Send" />

</form>

Loading…
Cancel
Save