瀏覽代碼

page layout [wip]

tags/v1.1
Bud Parr 7 年之前
父節點
當前提交
426676fd3c
No account linked to committer's email address

+ 1
- 1
layouts/_default/baseof.html 查看文件

@@ -29,7 +29,7 @@
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</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 }}
<main class="pb7" role="main">
{{ block "main" . }}{{ end }}

+ 10
- 2
layouts/_default/list.html 查看文件

@@ -1,9 +1,17 @@
{{ 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 ">
{{ .Content }}
</div>
</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 }}

+ 20
- 7
layouts/_default/single.html 查看文件

@@ -1,14 +1,17 @@
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
{{ $currentPageUrl := .URL }}
{{ $currentSection := where .Site.Pages "Section" .Section }}
{{ $currentSection := (where .Site.Pages "Section" .Section) }}

<div class="flex flex-wrap">
<aside class="w-20 pa4 bg-light-silver">
<aside class="w-2f0 bg-light-gray">
<ul>
<li class="list b mb3">
More {{ .Section }}
</li>
{{ range $currentSection }}
<li>
<a href="{{ .URL }}" class="link">
<li class="list f5 w-100 hover-bg-white nl1">
<a href="{{ .URL }}" class="link black ph2 pv2 db">
{{ .Title }}
</a>
</li>
@@ -22,11 +25,21 @@
{{ humanize .Section | upper }}
</h4>
<h1>
{{ .Title }}
{{ .Title }}
</h1>
<div class="nested-copy-line-height nested-links nested-img mid-gray measure-wide-l">
{{ .Content | markdownify }}
<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>

{{ end }}

+ 1
- 1
layouts/article/summary.html 查看文件

@@ -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">
{{ if .Date }}

+ 1
- 1
layouts/partials/page-header.html 查看文件

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

+ 1
- 1
layouts/partials/site-header.html 查看文件

@@ -16,7 +16,7 @@
</header>
{{ else }}
<header>
<div class="pb3-m pb6-l bg-near-black">
<div class="pb3-m pb6-l bg-black">
{{ partial "site-navigation.html" . }}
<div class="tc-l pv3 ph3 ph4-ns">
<h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">

+ 1
- 1
layouts/partials/site-navigation.html 查看文件

@@ -1,7 +1,7 @@
<nav class="pv3 ph3 ph4-ns" role="navigation">
<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 }}
</a>
{{ if .Site.Menus.main }}

+ 20
- 0
layouts/partials/summary.html 查看文件

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

Loading…
取消
儲存