page layout [wip]

This commit is contained in:
Bud Parr 2017-04-11 22:22:06 -04:00
parent d098f46b07
commit 426676fd3c
No known key found for this signature in database
GPG key ID: ACA375160539D2B3
8 changed files with 55 additions and 14 deletions

View file

@ -29,7 +29,7 @@
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
</head> </head>
<body class="ma0 sans-serif bg-near-white"> <body class="ma0 sans-serifTK avenir bg-near-white">
{{ block "header" . }}{{ partial "site-header.html" .}}{{ end }} {{ block "header" . }}{{ partial "site-header.html" .}}{{ end }}
<main class="pb7" role="main"> <main class="pb7" role="main">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}

View file

@ -1,9 +1,17 @@
{{ define "main" }} {{ define "main" }}
<article class="cf pa3 pa4-m pa4-l nested-copy-line-height center measure-wide-l nested-img"> <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 "> <div class="nested-copy-line-height nested-links nested-img mid-gray ">
{{ .Content }} {{ .Content }}
</div> </div>
</article> </article>
<!-- w-100 w-40-ns -->
{{ $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>
{{ template "_internal/pagination.html" . }}
{{ end }} {{ end }}

View file

@ -1,14 +1,17 @@
{{ 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 }} {{ $currentSection := (where .Site.Pages "Section" .Section) }}
<div class="flex flex-wrap"> <div class="flex flex-wrap">
<aside class="w-20 pa4 bg-light-silver"> <aside class="w-2f0 bg-light-gray">
<ul> <ul>
<li class="list b mb3">
More {{ .Section }}
</li>
{{ range $currentSection }} {{ range $currentSection }}
<li> <li class="list f5 w-100 hover-bg-white nl1">
<a href="{{ .URL }}" class="link"> <a href="{{ .URL }}" class="link black ph2 pv2 db">
{{ .Title }} {{ .Title }}
</a> </a>
</li> </li>
@ -22,11 +25,21 @@
{{ humanize .Section | upper }} {{ humanize .Section | upper }}
</h4> </h4>
<h1> <h1>
{{ .Title }} {{ .Title }}
</h1> </h1>
<div class="nested-copy-line-height nested-links nested-img mid-gray measure-wide-l"> <div class="nested-copy-line-height f4 nested-linkfs nested-img mid-gray measure-wide-l">
{{ .Content | markdownify }} {{ .Content }}
</div> </div>
</article> </article>
</div> </div>
357edd
<style media="screen">
p a {
color: #2F6FC4;
/*#357edd*/
}
</style>
{{ end }} {{ end }}

View file

@ -1,4 +1,4 @@
<div class="relative w-100 w-40-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 }}

View file

@ -14,7 +14,7 @@
</header> </header>
{{ else }} {{ else }}
<header> <header>
<div class="bg-near-blackTK bg-near-black"> <div class="bg-near-blackTK bg-black">
{{ partial "site-navigation.html" . }} {{ partial "site-navigation.html" . }}
</div> </div>
</header> </header>

View file

@ -16,7 +16,7 @@
</header> </header>
{{ else }} {{ else }}
<header> <header>
<div class="pb3-m pb6-l bg-near-black"> <div class="pb3-m pb6-l bg-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 f-subheadline-l fw2 light-silver mb0 lh-title"> <h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">

View file

@ -1,7 +1,7 @@
<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 fw8 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>
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}

View file

@ -0,0 +1,20 @@
<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>