on page wtyling [wip]
This commit is contained in:
parent
568ccb7539
commit
d098f46b07
|
@ -1,43 +1,19 @@
|
||||||
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
|
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $currentPageUrl := .URL }}
|
<article class="center cf pv5 mw7">
|
||||||
|
|
||||||
<article class="center cf pv5 measure-wide-l">
|
|
||||||
|
|
||||||
<p class="f6 fw8">
|
<p class="f6 fw8">
|
||||||
{{ humanize .Section | upper }}
|
{{ humanize .Section | upper }}
|
||||||
</p>
|
</p>
|
||||||
<h1>
|
<h1 class="f1">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="nested-copy-line-height nested-links nested-img mid-gray measure-wide-l">
|
{{/* TODO: Add Hugo author */}}
|
||||||
|
<time class="f6 mv4 dib tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{ .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 }}
|
{{ .Content | markdownify }}
|
||||||
</div>
|
</section>
|
||||||
|
{{ partial "tags.html" . }}
|
||||||
{{ if .Params.tags }}
|
|
||||||
<div class="mt5 f6 gray nested-lh-copy bg-light-gray ph3 pv2 measure-wide-l">
|
|
||||||
{{ $name := index .Params.tags 0 }}
|
|
||||||
{{ $name := $name | urlize }}
|
|
||||||
{{ $tags := index .Site.Taxonomies.tags $name }}
|
|
||||||
|
|
||||||
<ul class="list dib nested-links ml0 pl0">
|
|
||||||
<li class="dib mb2 mr2">Related:</li>
|
|
||||||
{{ range $tags.Pages }}
|
|
||||||
{{ if ne .URL $currentPageUrl }}
|
|
||||||
<li class="mb2 mr3">
|
|
||||||
<a href="{{ .URL }}" class="link">
|
|
||||||
{{ .LinkTitle }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="gray f6 mv6">
|
|
||||||
Last Update: {{ .Lastmod.Format "January 2, 2006" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
<div class="bg-black-60">
|
<div class="bg-black-60">
|
||||||
{{ partial "site-navigation.html" .}}
|
{{ partial "site-navigation.html" .}}
|
||||||
<div class="tc-l pv6 ph3 ph4-ns">
|
<div class="tc-l pv6 ph3 ph4-ns">
|
||||||
<h1 class="f2 f1-l fw2 white-90 mb0 lh-title">{{ .Title | default .Site.Title }}</h1>
|
<h1 class="f2 f-subheadline-l fw2 white-90 mb0 lh-title">
|
||||||
|
{{ .Title | default .Site.Title }}
|
||||||
|
</h1>
|
||||||
{{ if .Params.description }}
|
{{ if .Params.description }}
|
||||||
<h2 class="fw1 f3 white-80 mt3">
|
<h2 class="fw1 f3 white-80 mt3">
|
||||||
{{ .Params.description }}
|
{{ .Params.description }}
|
||||||
|
@ -17,7 +19,9 @@
|
||||||
<div class="pb3-m pb6-l bg-near-black">
|
<div class="pb3-m pb6-l bg-near-black">
|
||||||
{{ partial "site-navigation.html" . }}
|
{{ partial "site-navigation.html" . }}
|
||||||
<div class="tc-l pv3 ph3 ph4-ns">
|
<div class="tc-l pv3 ph3 ph4-ns">
|
||||||
<h1 class="f2 f1-l fw2 light-silver mb0 lh-title">{{ .Title | default .Site.Title }}</h1>
|
<h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
|
||||||
|
{{ .Title | default .Site.Title }}
|
||||||
|
</h1>
|
||||||
{{ if .Params.description }}
|
{{ if .Params.description }}
|
||||||
<h2 class="fw1 f3 white-80 measure-wide-l center lh-copy mt3 mb4">
|
<h2 class="fw1 f3 white-80 measure-wide-l center lh-copy mt3 mb4">
|
||||||
{{ .Params.description }}
|
{{ .Params.description }}
|
||||||
|
|
22
layouts/partials/tags.html
Normal file
22
layouts/partials/tags.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{{ $currentPageUrl := .URL }}
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<div class="mt5 f6 gray nested-lh-copy bg-light-gray ph3 pv2 measure-wide-l">
|
||||||
|
{{ $name := index .Params.tags 0 }}
|
||||||
|
{{ $name := $name | urlize }}
|
||||||
|
{{ $tags := index .Site.Taxonomies.tags $name }}
|
||||||
|
<ul class="list dib ml0 pl0">
|
||||||
|
<li class="black dib mb2 mr2">
|
||||||
|
Related:
|
||||||
|
</li>
|
||||||
|
{{ range $tags.Pages }}
|
||||||
|
{{ if ne .URL $currentPageUrl }}
|
||||||
|
<li class="mb2 mr3">
|
||||||
|
<a href="{{ .URL }}" class="link mid-gray dim">
|
||||||
|
{{ .LinkTitle }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{end}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
|
@ -1,17 +1,16 @@
|
||||||
{{ 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) 5 }}
|
{{ $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 sort $section.Pages "Date" "desc" }}
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
{{ template "_internal/pagination.html" . }}
|
{{ template "_internal/pagination.html" . }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue