Reformat templates
This commit is contained in:
parent
6e8797bba2
commit
e816a4186e
8 changed files with 66 additions and 69 deletions
|
@ -1,19 +1,19 @@
|
||||||
{{ partial "page_start.html" . }}
|
{{ partial "page_start.html" . }}
|
||||||
<section id="main" class="container">
|
<section id="main" class="container">
|
||||||
{{ partial "content.html" . }}
|
{{ partial "content.html" . }}
|
||||||
{{ if ne .Params.hide_pages "true" }}
|
{{ if ne .Params.hide_pages "true" }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ $parent := . }}
|
{{ $parent := . }}
|
||||||
{{ $valid_pages := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
{{ $valid_pages := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
||||||
{{ $valid_pages := where $valid_pages ".Params.hide_in_list" "!=" "true" }}
|
{{ $valid_pages := where $valid_pages ".Params.hide_in_list" "!=" "true" }}
|
||||||
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
|
{{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }}
|
||||||
{{ if $parent.Params.show_images }}
|
{{ if $parent.Params.show_images }}
|
||||||
{{ partial "box_image.html" . }}
|
{{ partial "box_image.html" . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "box.html" . }}
|
{{ partial "box.html" . }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }}
|
</section>
|
||||||
</section>
|
|
||||||
{{ partial "page_end.html" . }}
|
{{ partial "page_end.html" . }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ partial "page_start.html" . }}
|
{{ partial "page_start.html" . }}
|
||||||
<section id="main" class="container">
|
<section id="main" class="container">
|
||||||
{{ partial "content.html" . }}
|
{{ partial "content.html" . }}
|
||||||
</section>
|
</section>
|
||||||
{{ partial "page_end.html" . }}
|
{{ partial "page_end.html" . }}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<link rel="alternate" type="application/rss+xml" href="{{ .Site.RSSLink }}" />
|
<link rel="alternate" type="application/rss+xml" href="{{ .Site.RSSLink }}" />
|
||||||
<meta name="superfish" content="nofish" />
|
<meta name="superfish" content="nofish" />
|
||||||
<meta name="application-name" content="{{ .Site.Title }}" />
|
<meta name="application-name" content="{{ .Site.Title }}" />
|
||||||
<link rel="icon" type="image/png" href="/img/logo-transparent.png" /s>
|
<link rel="icon" type="image/png" href="/img/logo-transparent.png" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="/css/style.css" />
|
<link rel="stylesheet" href="/css/style.css" />
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
<header id="header" {{ if .IsHome }}class="alt"{{ end }}>
|
<header id="header" {{ if .IsHome }}class="alt"{{ end }}>
|
||||||
<h1><a href="/" class="navbar-brand">{{ title .Site.Title }}</a></h1>
|
<h1><a href="/" class="navbar-brand">{{ title .Site.Title }}</a></h1>
|
||||||
<nav id="nav">
|
<nav id="nav">
|
||||||
<ul>
|
<ul>
|
||||||
{{ $home := .Site.GetPage "home" }}
|
{{ $home := .Site.GetPage "home" }}
|
||||||
{{ range where .Site.Pages.ByTitle "Kind" "section" }}
|
{{ range where .Site.Pages.ByTitle "Kind" "section" }}
|
||||||
{{ if eq .Parent $home }}
|
{{ if eq .Parent $home }}
|
||||||
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
||||||
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
||||||
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
|
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
|
||||||
<li class="top-level">
|
<li class="top-level">
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||||
{{ if $children }}
|
{{ if $children }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range first .Site.Params.nav_items $children }}
|
{{ range first .Site.Params.nav_items $children }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if ge (len $children) .Site.Params.nav_items }}
|
{{ if ge (len $children) .Site.Params.nav_items }}
|
||||||
<li><a href="{{ .Permalink }}"><i>See more</i></a></li>
|
<li><a href="{{ .Permalink }}"><i>See more</i></a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ range where .Site.Pages.ByTitle "Kind" "page" }}
|
{{ range where .Site.Pages.ByTitle "Kind" "page" }}
|
||||||
{{ if eq .Section "" }}
|
{{ if eq .Section "" }}
|
||||||
<li class="top-level"><a href="{{ .Permalink }}">{{ title .LinkTitle }}</a></li>
|
<li class="top-level"><a href="{{ .Permalink }}">{{ title .LinkTitle }}</a></li>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<li class="top-level"><a class="show-mobile" href="/">Home</a></li>
|
{{ end }}
|
||||||
</ul>
|
<li class="top-level"><a class="show-mobile" href="/">Home</a></li>
|
||||||
</nav>
|
</ul>
|
||||||
</header>
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "scripts.html" . }}
|
{{ partial "scripts.html" . }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -7,7 +7,5 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<body>
|
<body>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ partial "navbar.html" . }}
|
||||||
{{ partial "navbar.html" . }}
|
<div id="page-wrapper">
|
||||||
|
|
||||||
<div id="page-wrapper">
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{{ if eq .Section "posts" }}
|
{{ if eq .Section "posts" }}
|
||||||
{{ .Summary | truncate .Site.Params.summary_length "..." }}
|
{{ .Summary | truncate .Site.Params.summary_length "..." }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|
||||||
{{ if .Params.subtitle }}
|
{{ if .Params.subtitle }}
|
||||||
{{ .Params.subtitle | markdownify }}
|
{{ .Params.subtitle | markdownify }}
|
||||||
{{ else if .Params.repo }}
|
{{ else if .Params.repo }}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
<div id="light-gallery" class="row">
|
<div id="light-gallery" class="row">
|
||||||
{{ range $index, $element := $photoset_orig.photo }}
|
{{ range $index, $element := $photoset_orig.photo }}
|
||||||
{{ $thumb := (index $photoset_thumb.photo $index).url_sq }}
|
{{ $thumb := (index $photoset_thumb.photo $index).url_sq }}
|
||||||
<a href="{{ $element.url_o }}" title="{{ $element.title }}" class="col-2">
|
<a href="{{ $element.url_o }}" title="{{ $element.title }}" class="col-2">
|
||||||
<img src="{{ $thumb }}" alt="{{ $element.title }}"/>
|
<img src="{{ $thumb }}" alt="{{ $element.title }}"/>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue