diff options
author | Patrick Collins <thepatrickcollins@gmail.com> | 2017-10-12 15:30:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-12 15:30:59 +0300 |
commit | 530b873d83b20af7dee3b82504c2fb829d7b58ad (patch) | |
tree | d0868eefa9ac159a90e7afece29afb0bdd83d593 | |
parent | 80752d9e91f502ab2e1a8eff41fd0e7ddf6869bb (diff) |
Clean HTML (#54)
* Clean HTML Formatting, single tab instead of double.
31 files changed, 535 insertions, 522 deletions
diff --git a/layouts/_default/header.html b/layouts/_default/header.html index f7184e7..92b0dc1 100644 --- a/layouts/_default/header.html +++ b/layouts/_default/header.html @@ -1,13 +1,13 @@ <header> - <div class="title"> - {{ if $.Scratch.Get "h1" }} - <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ $.Scratch.Set "h1" false }} - {{ else }} - <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - {{ end }} - {{ with .Description }} - <p>{{ . }}</p> - {{ end }} - </div> + <div class="title"> + {{ if $.Scratch.Get "h1" }} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{ $.Scratch.Set "h1" false }} + {{ else }} + <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ end }} + </div> </header> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9eaffcc..9a8d157 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,15 +1,15 @@ {{ partial "general-title" . }} {{ partial "header" . }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - {{ $paginator := .Paginate .Data.Pages }} - {{ range .Paginator.Pages }} - {{ .Render "content-list" }} - {{ end }} +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + {{ $paginator := .Paginate .Data.Pages }} + {{ range .Paginator.Pages }} + {{ .Render "content-list" }} + {{ end }} - {{ partial "pagination" . }} - </div> - {{ partial "sidebar" . }} + {{ partial "pagination" . }} +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d0160bc..d94cf5a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,16 +1,16 @@ {{ partial "general-title" . }} {{ partial "header" . }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - <article class="post"> - {{ $.Scratch.Set "h1" true }} - {{ .Render "header" }} - <div id="content"> - {{ .Content }} - </div> - </article> +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + <article class="post"> + {{ $.Scratch.Set "h1" true }} + {{ .Render "header" }} + <div id="content"> + {{ .Content }} </div> - {{ partial "sidebar" . }} + </article> +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/about/list.html b/layouts/about/list.html index e821afd..d490e3d 100644 --- a/layouts/about/list.html +++ b/layouts/about/list.html @@ -6,17 +6,17 @@ <div id="main"> <article class="post"> <header> - <div class="title"> - {{ if $.Scratch.Get "h1" }} - <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ $.Scratch.Set "h1" false }} - {{ else }} - <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - {{ end }} - {{ with .Description }} - <p>{{ . }}</p> - {{ end }} - </div> + <div class="title"> + {{ if $.Scratch.Get "h1" }} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{ $.Scratch.Set "h1" false }} + {{ else }} + <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ end }} + </div> </header> <div id="content"> {{ .Content }} diff --git a/layouts/contact/list.html b/layouts/contact/list.html index cc2f35b..a585a4b 100644 --- a/layouts/contact/list.html +++ b/layouts/contact/list.html @@ -1,48 +1,48 @@ {{ partial "general-title" . }} {{ partial "header" . }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - <article class="post"> - <header> - <div class="title"> - {{ if $.Scratch.Get "h1" }} - <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ $.Scratch.Set "h1" false }} - {{ else }} - <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - {{ end }} - {{ with .Description }} - <p>{{ . }}</p> - {{ end }} - </div> - </header> - <div id="content"> - {{ .Content }} - <div class="contact-container"> - {{ if .Params.netlify }} - <form name="contact" action="thank-you" netlify center width="300px"> - {{ else }} - <form id="contact" action="//{{ .Params.emailservice }}" method="post" center width="300px"> - {{ end }} - <h4>Replies Typically Within 24 Hours.</h4> - <fieldset> - <input placeholder="{{ .Params.contactname }}" type="text" name="name" tabindex="1" required autofocus> - </fieldset> - <fieldset> - <input placeholder="{{ .Params.contactemail}}" type="email" name="email" tabindex="2" required> - </fieldset> - <fieldset> - <textarea placeholder="{{ .Params.contactmessage}}" name="message" tabindex="3" required></textarea> - </fieldset> - <fieldset> - <button name="submit" class="button" type="submit" id="contact-submit" tabindex="4">Submit</button> - </fieldset> - </form> - </div> - </div> - </article> +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + <article class="post"> + <header> + <div class="title"> + {{ if $.Scratch.Get "h1" }} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{ $.Scratch.Set "h1" false }} + {{ else }} + <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ end }} + </div> + </header> + <div id="content"> + {{ .Content }} + <div class="contact-container"> + {{ if .Params.netlify }} + <form name="contact" action="thank-you" netlify center width="300px"> + {{ else }} + <form id="contact" action="//{{ .Params.emailservice }}" method="post" center width="300px"> + {{ end }} + <h4>Replies Typically Within 24 Hours.</h4> + <fieldset> + <input placeholder="{{ .Params.contactname }}" type="text" name="name" tabindex="1" required autofocus> + </fieldset> + <fieldset> + <input placeholder="{{ .Params.contactemail}}" type="email" name="email" tabindex="2" required> + </fieldset> + <fieldset> + <textarea placeholder="{{ .Params.contactmessage}}" name="message" tabindex="3" required></textarea> + </fieldset> + <fieldset> + <button name="submit" class="button" type="submit" id="contact-submit" tabindex="4">Submit</button> + </fieldset> + </form> + </div> </div> - {{ partial "sidebar" . }} + </article> +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/index.html b/layouts/index.html index be5f8da..d5bc1a6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,13 +1,13 @@ {{ partial "header" . }} - {{ $.Scratch.Set "shareNav" true }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - {{ range first 1 (where .Site.Pages "Type" "post") }} - {{ .Render "content-single" }} +{{ $.Scratch.Set "shareNav" true }} +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + {{ range first 4 (where .Site.Pages "Type" "post") }} + {{ .Render "content-list" }} - {{ partial "share-menu" . }} - {{ end }} - </div> - {{ partial "sidebar" . }} + {{ partial "share-menu" . }} + {{ end }} +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/itemized/content-list.html b/layouts/itemized/content-list.html index ae5be37..703baa9 100644 --- a/layouts/itemized/content-list.html +++ b/layouts/itemized/content-list.html @@ -1,3 +1,3 @@ <article class="itemized"> - {{ .Render "header" }} + {{ .Render "header" }} </article> diff --git a/layouts/itemized/footer-category.html b/layouts/itemized/footer-category.html index 35d85a9..47a4308 100644 --- a/layouts/itemized/footer-category.html +++ b/layouts/itemized/footer-category.html @@ -1,44 +1,44 @@ <ul class="stats"> - {{ if isset .Params "categories" }} - {{ $categoryCount := (len .Params.categories) }} + {{ if isset .Params "categories" }} + {{ $categoryCount := (len .Params.categories) }} - <!-- - Set the title before displaying the categories associated with this post. - The title will use the variables from the Categories menu set in the Config. - If the Categories menu was not set then use the default values instead. - --> - {{ if ge $categoryCount 1 }} - <li> - {{ $categoryMenu := (where .Site.Menus.main "Name" "Categories") }} - {{ if ne (len $categoryMenu) 0 }} - {{ $categoryMenu := index $categoryMenu 0 }} + <!-- + Set the title before displaying the categories associated with this post. + The title will use the variables from the Categories menu set in the Config. + If the Categories menu was not set then use the default values instead. + --> + {{ if ge $categoryCount 1 }} + <li> + {{ $categoryMenu := (where .Site.Menus.main "Name" "Categories") }} + {{ if ne (len $categoryMenu) 0 }} + {{ $categoryMenu := index $categoryMenu 0 }} - {{ $.Scratch.Set "categoryUrl" $categoryMenu.URL }} + {{ $.Scratch.Set "categoryUrl" $categoryMenu.URL }} - {{ with $categoryMenu.Identifier }} - <i class="{{ . }}"> </i> - {{ end }} + {{ with $categoryMenu.Identifier }} + <i class="{{ . }}"> </i> + {{ end }} - {{ if gt $categoryCount 1 }} - {{ $categoryMenu.Name }} - {{ else }} - {{ $categoryMenu.Name | singularize }} - {{ end }} - {{ else }} - {{ $.Scratch.Set "categoryUrl" "/categories/" }} + {{ if gt $categoryCount 1 }} + {{ $categoryMenu.Name }} + {{ else }} + {{ $categoryMenu.Name | singularize }} + {{ end }} + {{ else }} + {{ $.Scratch.Set "categoryUrl" "/categories/" }} - {{ if gt $categoryCount 1 }} - Categories - {{ else }} - Category - {{ end }} - {{ end }} - </li> - {{ end }} + {{ if gt $categoryCount 1 }} + Categories + {{ else }} + Category + {{ end }} + {{ end }} + </li> {{ end }} + {{ end }} - <!-- Display the categories associated with this post --> - {{ range .Params.categories }} - <li><a href='{{ add ($.Scratch.Get "categoryUrl") . | urlize }}'>{{ . }}</a></li> - {{ end }} + <!-- Display the categories associated with this post --> + {{ range .Params.categories }} + <li><a href='{{ add ($.Scratch.Get "categoryUrl") . | urlize }}'>{{ . }}</a></li> + {{ end }} </ul> diff --git a/layouts/itemized/header.html b/layouts/itemized/header.html index 9193947..52f5fc1 100644 --- a/layouts/itemized/header.html +++ b/layouts/itemized/header.html @@ -1,22 +1,22 @@ <header> - <div class="title"> - {{ if $.Scratch.Get "h1" }} - <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ $.Scratch.Set "h1" false }} - {{ else }} - <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - {{ end }} - {{ with .Description }} - <p>{{ . }}</p> - {{ end }} - </div> - <div class="meta"> + <div class="title"> + {{ if $.Scratch.Get "h1" }} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{ $.Scratch.Set "h1" false }} + {{ else }} + <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ end }} + </div> + <div class="meta"> - <span class="author">{{ .Params.author }}</span> - <span class="author">{{ .Params.format }}</span> - {{ if isset .Params "link" }} - <a href="{{ .Params.link }}">Link</a> - {{ end }} - <!--<a href="#" class="author"><span class="name">Jane Doe</span><img src="images/avatar.jpg" alt="" /></a>--> - </div> + <span class="author">{{ .Params.author }}</span> + <span class="format">{{ .Params.format }}</span> + {{ if isset .Params "link" }} + <a href="{{ .Params.link }}">Link</a> + {{ end }} + <!--<a href="#" class="author"><span class="name">Jane Doe</span><img src="images/avatar.jpg" alt="" /></a>--> + </div> </header> diff --git a/layouts/itemized/single.html b/layouts/itemized/single.html index 20f53ad..a9f19af 100644 --- a/layouts/itemized/single.html +++ b/layouts/itemized/single.html @@ -1,12 +1,12 @@ {{ partial "header" . }} - {{ $.Scratch.Set "shareNav" true }} - {{ partial "navbar" . }} - {{ partial "share-menu" . }} - <!-- Main --> - <div id="main"> - <!-- Post --> - {{ $.Scratch.Set "h1" true }} - {{ .Render "content-single" }} - </div> - {{ partial "sidebar" . }} +{{ $.Scratch.Set "shareNav" true }} +{{ partial "navbar" . }} +{{ partial "share-menu" . }} +<!-- Main --> +<div id="main"> + <!-- Post --> + {{ $.Scratch.Set "h1" true }} + {{ .Render "content-single" }} +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html index 47ddd20..194762c 100644 --- a/layouts/partials/favicon.html +++ b/layouts/partials/favicon.html @@ -1,18 +1,16 @@ {{ if .Site.Params.loadFavicon }} - {{ with .Site.Params.faviconVersion }} - {{ $.Scratch.Set "favVer" "-" }} - {{ $.Scratch.Add "favVer" . }} - {{ else }} - {{ $.Scratch.Set "favVer" "" }} - {{ end }} + {{ with .Site.Params.faviconVersion }} + {{ $.Scratch.Set "favVer" "-" }} + {{ $.Scratch.Add "favVer" . }} + {{ else }} + {{ $.Scratch.Set "favVer" "" }} + {{ end }} - {{ $favVer := $.Scratch.Get "favVer" }} + {{ $favVer := $.Scratch.Get "favVer" }} - <link rel="apple-touch-icon-precomposed" - href='/favicon/apple-touch-icon-precomposed{{ $favVer }}.png'> - <link rel="icon" href='/favicon/favicon{{ $favVer }}.png'> - <!--[if IE]><link rel="shortcut icon" href='/favicon{{ $favVer }}.ico'><![endif]--> - <meta name="msapplication-TileColor" content="#da532c"> - <meta name="msapplication-TileImage" - content='/favicon/mstile{{ $favVer }}.png'> + <link rel="apple-touch-icon-precomposed" href='/favicon/apple-touch-icon-precomposed{{ $favVer }}.png'> + <link rel="icon" href='/favicon/favicon{{ $favVer }}.png'> + <!--[if IE]><link rel="shortcut icon" href='/favicon{{ $favVer }}.ico'><![endif]--> + <meta name="msapplication-TileColor" content="#da532c"> + <meta name="msapplication-TileImage" content='/favicon/mstile{{ $favVer }}.png'> {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 2bc8f0b..957db5c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -21,10 +21,10 @@ {{ end }} {{ if ne ($.Scratch.Get "jsFiles") false }} -{{ range $.Scratch.Get "jsFiles" }} - {{ if ne . "default" }} - <script src="{{ "{{ . }}" | absURL }}"></script> - {{ end }} + {{ range $.Scratch.Get "jsFiles" }} + {{ if ne . "default" }} + <script src="{{ "{{ . }}" | absURL }}"></script> + {{ end }} {{ end }} {{ end }} diff --git a/layouts/partials/general-title.html b/layouts/partials/general-title.html index f21be7e..aac7af8 100644 --- a/layouts/partials/general-title.html +++ b/layouts/partials/general-title.html @@ -1,14 +1,14 @@ {{ $.Scratch.Set "generalTitle" .Title }} {{ if eq ($.Scratch.Get "generalTitle") "Blogs" }} - {{ $.Scratch.Set "generalTitle" "Blog" }} + {{ $.Scratch.Set "generalTitle" "Blog" }} {{ end }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} - {{ if ne .Data.Plural (lower .Title) }} - {{ $.Scratch.Add "generalTitle" " Posts - " }} - {{ else }} - {{ $.Scratch.Add "generalTitle" " - " }} - {{ end }} -{{ else }} + {{ if ne .Data.Plural (lower .Title) }} + {{ $.Scratch.Add "generalTitle" " Posts - " }} + {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} + {{ end }} +{{ else }} + {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 54953d9..05e7ed3 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,68 +5,68 @@ Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) --> <html> - <head> - {{ with $.Scratch.Get "generalTitle" }} - <title>{{ . }}</title> - {{ else }} - {{ with .Title }} - <title>{{ . }}</title> - {{ else }} - <title>{{ .Site.Title }}</title> - {{ end }} - {{ end }} + <head> + {{ with $.Scratch.Get "generalTitle" }} + <title>{{ . }}</title> + {{ else }} + {{ with .Title }} + <title>{{ . }}</title> + {{ else }} + <title>{{ .Site.Title }}</title> + {{ end }} + {{ end }} - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - {{ .Hugo.Generator }} - {{ partial "favicon" . }} + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + {{ .Hugo.Generator }} + {{ partial "favicon" . }} - {{ with .Params.author }} - <meta name="author" content="{{ . }}"> - {{ end }} - {{ with .Description }} - <meta name="description" content="{{ . }}"> - {{ else }} - {{ with .Site.Params.description }} - <meta name="description" content="{{ . }}"> - {{ end }} - {{ end }} + {{ with .Params.author }} + <meta name="author" content="{{ . }}"> + {{ end }} + {{ with .Description }} + <meta name="description" content="{{ . }}"> + {{ else }} + {{ with .Site.Params.description }} + <meta name="description" content="{{ . }}"> + {{ end }} + {{ end }} - {{ template "_internal/twitter_cards.html" . }} - {{ template "_internal/opengraph.html" . }} - {{ template "_internal/schema.html" . }} - {{ template "_internal/google_news.html" . }} + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/opengraph.html" . }} + {{ template "_internal/schema.html" . }} + {{ template "_internal/google_news.html" . }} - {{ if isset .Site.Params "customcss" }} - {{ $.Scratch.Set "cssFiles" .Site.Params.customCSS }} - {{ else }} - {{ $.Scratch.Set "cssFiles" false }} - {{ end }} + {{ if isset .Site.Params "customcss" }} + {{ $.Scratch.Set "cssFiles" .Site.Params.customCSS }} + {{ else }} + {{ $.Scratch.Set "cssFiles" false }} + {{ end }} - <!-- If the value "default" is passed into the param then we will first - load the standard css files associated with the theme --> - {{ if or (in ($.Scratch.Get "cssFiles") "default") (eq ($.Scratch.Get "cssFiles") false) }} - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-light.min.css"> - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:400,800,900|Source+Sans+Pro:400,700"> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css" /> - <link rel="stylesheet" href="{{ "css/main.css" | absURL }}"> - <link rel="stylesheet" href="{{ "css/add-on.css" | absURL }}"> - {{ end }} + <!-- If the value "default" is passed into the param then we will first + load the standard css files associated with the theme --> + {{ if or (in ($.Scratch.Get "cssFiles") "default") (eq ($.Scratch.Get "cssFiles") false) }} + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-light.min.css"> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:400,800,900|Source+Sans+Pro:400,700"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css" /> + <link rel="stylesheet" href="{{ "css/main.css" | absURL }}"> + <link rel="stylesheet" href="{{ "css/add-on.css" | absURL }}"> + {{ end }} - {{ if ne ($.Scratch.Get "cssFiles") false }} - {{ range $.Scratch.Get "cssFiles" }} - {{ if ne . "default" }} - <link rel="stylesheet" href="{{ . | absURL }}"> - {{ end }} - {{ end }} + {{ if ne ($.Scratch.Get "cssFiles") false }} + {{ range $.Scratch.Get "cssFiles" }} + {{ if ne . "default" }} + <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }} + {{ end }} + {{ end }} - {{ if not (in (printf "%#v" .Site.BaseURL) "localhost") }} - {{ template "_internal/google_analytics.html" . }} - {{ end }} - </head> - <body> + {{ if not (in (printf "%#v" .Site.BaseURL) "localhost") }} + {{ template "_internal/google_analytics.html" . }} + {{ end }} + </head> + <body> - <!-- Wrapper --> - <div id="wrapper"> + <!-- Wrapper --> + <div id="wrapper"> diff --git a/layouts/partials/img-path.html b/layouts/partials/img-path.html index dabfa61..c2eccd5 100644 --- a/layouts/partials/img-path.html +++ b/layouts/partials/img-path.html @@ -1,5 +1,5 @@ <!-- This partial is used by the img shortcodes and the template, - featured in the post type +featured in the post type Set the path depending on the value passed through @@ -13,19 +13,19 @@ {{ $structType := $.Scratch.Get "structType" }} {{ if eq $path "title" }} - {{ $.Scratch.Set "path" "/img/" }} - {{ if eq $structType "shortcode" }} - {{ $.Scratch.Add "path" (lower (replace .Page.LinkTitle " " "-")) }} - {{ else }} - {{ $.Scratch.Add "path" (lower (replace .LinkTitle " " "-")) }} - {{ end }} + {{ $.Scratch.Set "path" "/img/" }} + {{ if eq $structType "shortcode" }} + {{ $.Scratch.Add "path" (lower (replace .Page.LinkTitle " " "-")) }} + {{ else }} + {{ $.Scratch.Add "path" (lower (replace .LinkTitle " " "-")) }} + {{ end }} {{ else if eq $path "date" }} - {{ $.Scratch.Set "path" "/img/" }} - {{ if eq $structType "shortcode" }} - {{ $.Scratch.Add "path" (.Page.Date.Format "2006/01") }} - {{ else }} - {{ $.Scratch.Add "path" (.Date.Format "2006/01") }} - {{ end }} + {{ $.Scratch.Set "path" "/img/" }} + {{ if eq $structType "shortcode" }} + {{ $.Scratch.Add "path" (.Page.Date.Format "2006/01") }} + {{ else }} + {{ $.Scratch.Add "path" (.Date.Format "2006/01") }} + {{ end }} {{ else }} - {{ $.Scratch.Set "path" $path }} + {{ $.Scratch.Set "path" $path }} {{ end }} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 63fe851..10129aa 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,41 +1,44 @@ <!-- Header --> <header id="header"> - {{ if .IsHome }} - <h1><a href="/">{{ .Site.Params.navbarTitle }}</a></h1> - {{ else }} - <h1><a href="/">{{ .Section }}</a></h1> - {{ end }} - <nav class="links"> - <ul> - {{ range .Site.Menus.main }} - <li> - <a href="{{ .URL }}"> - <i class="{{ .Identifier }}"> </i>{{ .Name }} - </a> - </li> - {{ end }} - </ul> - </nav> - <nav class="main"> - <ul> - {{ if $.Scratch.Get "shareNav" }} - <li id="share-nav" class="share-menu" style="display:none;"> - <a class="fa-share-alt" href="#share-menu">Share</a> - </li> - {{ end }} - <li class="search"> - <a class="fa-search" href="#search">Search</a> - <form id="search" method="get" action="//google.com/search"> - <input type="text" name="q" placeholder="Search" /> - <input type="hidden" name="as_sitesearch" value="{{ .Site.BaseURL }}"> - </form> - </li> - <li class="menu"> - <a class="fa-bars" href="#menu">Menu</a> - </li> - </ul> - </nav> + {{ if .IsHome }} + <h1><a href="/">{{ .Site.Params.navbarTitle }}</a></h1> + {{ else if ne .Section "" }} + <h1><a href="/">{{ .Section }}</a></h1> + {{ else }} + <h1><a href="/">{{ .Title }}</a></h1> + {{ end }} + + <nav class="links"> + <ul> + {{ range .Site.Menus.main }} + <li> + <a href="{{ .URL }}"> + <i class="{{ .Identifier }}"> </i>{{ .Name }} + </a> + </li> + {{ end }} + </ul> + </nav> + <nav class="main"> + <ul> + {{ if $.Scratch.Get "shareNav" }} + <li id="share-nav" class="share-menu" style="display:none;"> + <a class="fa-share-alt" href="#share-menu">Share</a> + </li> + {{ end }} + <li class="search"> + <a class="fa-search" href="#search">Search</a> + <form id="search" method="get" action="//google.com/search"> + <input type="text" name="q" placeholder="Search" /> + <input type="hidden" name="as_sitesearch" value="{{ .Site.BaseURL }}"> + </form> + </li> + <li class="menu"> + <a class="fa-bars" href="#menu">Menu</a> + </li> + </ul> + </nav> </header> <!-- Menu --> diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index a47ff0a..fd1b902 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -1,16 +1,22 @@ <!-- Pagination --> <ul class="actions pagination"> - {{ if .Paginator.HasPrev }} - <li><a href="{{ .Paginator.Prev.URL }}" - class="button big previous">Previous Page</a></li> - {{ else }} - <li><a href="#" class="disabled button big previous">Previous Page</a></li> - {{ end }} + {{ if .Paginator.HasPrev }} + <li> + <a href="{{ .Paginator.Prev.URL }}" class="button big previous">Previous Page</a> + </li> + {{ else }} + <li> + <a href="#" class="disabled button big previous">Previous Page</a> + </li> + {{ end }} - {{ if .Paginator.HasNext }} - <li><a href="{{ .Paginator.Next.URL }}" - class="button big next">Next Page</a></li> - {{ else }} - <li><a href="#" class="disabled button big next">Next Page</a></li> - {{ end }} + {{ if .Paginator.HasNext }} + <li> + <a href="{{ .Paginator.Next.URL }}" class="button big next">Next Page</a> + </li> + {{ else }} + <li> + <a href="#" class="disabled button big next">Next Page</a> + </li> + {{ end }} </ul> diff --git a/layouts/partials/share-menu.html b/layouts/partials/share-menu.html index 9ecfb08..88c09aa 100644 --- a/layouts/partials/share-menu.html +++ b/layouts/partials/share-menu.html @@ -1,10 +1,10 @@ <section id="share-menu"> - <section id="social-share-nav"> - <ul class="links"> - <header> - <h3>Share this post <i class="fa fa-smile-o"></i></h3> - </header> - {{ partial "share-links" . }} - </ul> - </section> + <section id="social-share-nav"> + <ul class="links"> + <header> + <h3>Share this post <i class="fa fa-smile-o"></i></h3> + </header> + {{ partial "share-links" . }} + </ul> + </section> </section> diff --git a/layouts/post/comments.html b/layouts/post/comments.html index bdea945..9b993d7 100644 --- a/layouts/post/comments.html +++ b/layouts/post/comments.html @@ -1,11 +1,11 @@ {{ if ne .Site.DisqusShortname "" }} - {{ if not (in (printf "%#v" .Site.BaseURL) "localhost") }} - <article class="post"> - {{ template "_internal/disqus.html" . }} - </article> - {{ end }} -{{ else if .Site.Params.staticman.staticman }} + {{ if not (in (printf "%#v" .Site.BaseURL) "localhost") }} <article class="post"> - {{ .Render "staticman" }} + {{ template "_internal/disqus.html" . }} </article> + {{ end }} +{{ else if .Site.Params.staticman.staticman }} + <article class="post"> + {{ .Render "staticman" }} + </article> {{ end }} diff --git a/layouts/post/content-list.html b/layouts/post/content-list.html index 32c4bcf..b051f4a 100644 --- a/layouts/post/content-list.html +++ b/layouts/post/content-list.html @@ -1,12 +1,12 @@ <article class="post"> - {{ .Render "header" }} - {{ .Render "featured" }} - <p>{{ printf "%s" .Summary | markdownify }}</p> + {{ .Render "header" }} + {{ .Render "featured" }} + <p>{{ printf "%s" .Summary | markdownify }}</p> - <footer> - <ul class="actions"> - <li><a href="{{ .Permalink }}" class="button big">Continue Reading</a></li> - </ul> - {{ .Render "footer-category" }} - </footer> + <footer> + <ul class="actions"> + <li><a href="{{ .Permalink }}" class="button big">Continue Reading</a></li> + </ul> + {{ .Render "footer-category" }} + </footer> </article> diff --git a/layouts/post/featured.html b/layouts/post/featured.html index 7b7aa42..861bfe9 100644 --- a/layouts/post/featured.html +++ b/layouts/post/featured.html @@ -1,13 +1,13 @@ {{ if and (isset .Params "featuredpath") (ne .Params.featuredpath "") }} - {{ $.Scratch.Set "path" .Params.featuredpath }} + {{ $.Scratch.Set "path" .Params.featuredpath }} - {{ if and (isset .Params "featured") (ne .Params.featuredpath "") }} - {{ $.Scratch.Set "structType" "page" }} - {{ partial "img-path" . }} - {{ $path := $.Scratch.Get "path" }} + {{ if and (isset .Params "featured") (ne .Params.featuredpath "") }} + {{ $.Scratch.Set "structType" "page" }} + {{ partial "img-path" . }} + {{ $path := $.Scratch.Get "path" }} - <a href="{{ .Permalink }}" class="image featured"> - <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ .Params.featuredalt }}" /> - </a> - {{ end }} + <a href="{{ .Permalink }}" class="image featured"> + <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ .Params.featuredalt }}" /> + </a> + {{ end }} {{ end }} diff --git a/layouts/post/footer-category.html b/layouts/post/footer-category.html index 35d85a9..9888746 100644 --- a/layouts/post/footer-category.html +++ b/layouts/post/footer-category.html @@ -1,44 +1,46 @@ <ul class="stats"> - {{ if isset .Params "categories" }} - {{ $categoryCount := (len .Params.categories) }} + {{ if isset .Params "categories" }} + {{ $categoryCount := (len .Params.categories) }} - <!-- - Set the title before displaying the categories associated with this post. - The title will use the variables from the Categories menu set in the Config. - If the Categories menu was not set then use the default values instead. - --> - {{ if ge $categoryCount 1 }} - <li> - {{ $categoryMenu := (where .Site.Menus.main "Name" "Categories") }} - {{ if ne (len $categoryMenu) 0 }} - {{ $categoryMenu := index $categoryMenu 0 }} + <!-- + Set the title before displaying the categories associated with this post. + The title will use the variables from the Categories menu set in the Config. + If the Categories menu was not set then use the default values instead. + --> + {{ if ge $categoryCount 1 }} + <li> + {{ $categoryMenu := (where .Site.Menus.main "Name" "Categories") }} + {{ if ne (len $categoryMenu) 0 }} + {{ $categoryMenu := index $categoryMenu 0 }} - {{ $.Scratch.Set "categoryUrl" $categoryMenu.URL }} + {{ $.Scratch.Set "categoryUrl" $categoryMenu.URL }} - {{ with $categoryMenu.Identifier }} - <i class="{{ . }}"> </i> - {{ end }} + {{ with $categoryMenu.Identifier }} + <i class="{{ . }}"> </i> + {{ end }} - {{ if gt $categoryCount 1 }} - {{ $categoryMenu.Name }} - {{ else }} - {{ $categoryMenu.Name | singularize }} - {{ end }} - {{ else }} - {{ $.Scratch.Set "categoryUrl" "/categories/" }} + {{ if gt $categoryCount 1 }} + {{ $categoryMenu.Name }} + {{ else }} + {{ $categoryMenu.Name | singularize }} + {{ end }} + {{ else }} + {{ $.Scratch.Set "categoryUrl" "/categories/" }} - {{ if gt $categoryCount 1 }} - Categories - {{ else }} - Category - {{ end }} - {{ end }} - </li> + {{ if gt $categoryCount 1 }} + Categories + {{ else }} + Category + {{ end }} {{ end }} + </li> {{ end }} + {{ end }} - <!-- Display the categories associated with this post --> - {{ range .Params.categories }} - <li><a href='{{ add ($.Scratch.Get "categoryUrl") . | urlize }}'>{{ . }}</a></li> - {{ end }} + <!-- Display the categories associated with this post --> + {{ range .Params.categories }} + <li> + <a href='{{ add ($.Scratch.Get "categoryUrl") . | urlize }}'>{{ . }}</a> + </li> + {{ end }} </ul> diff --git a/layouts/post/header.html b/layouts/post/header.html index e500a35..2e44285 100644 --- a/layouts/post/header.html +++ b/layouts/post/header.html @@ -1,25 +1,25 @@ <header> - <div class="title"> - {{ if $.Scratch.Get "h1" }} - <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - {{ $.Scratch.Set "h1" false }} - {{ else }} - <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> - {{ end }} - {{ with .Description }} - <p>{{ . }}</p> - {{ end }} - </div> - <div class="meta"> - {{ $.Scratch.Set "dateType" .Date }} + <div class="title"> + {{ if $.Scratch.Get "h1" }} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{ $.Scratch.Set "h1" false }} + {{ else }} + <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ end }} + </div> + <div class="meta"> + {{ $.Scratch.Set "dateType" .Date }} - <time class="published" - datetime='{{ ($.Scratch.Get "dateType").Format "2006-01-02" }}'> - {{ ($.Scratch.Get "dateType").Format "January 2, 2006" }}</time> - <span class="author">{{ .Params.author }}</span> - {{ if .Site.Params.includeReadingTime }} - <p>{{ .ReadingTime }} minute read</p> - {{ end }} - <!--<a href="#" class="author"><span class="name">Jane Doe</span><img src="images/avatar.jpg" alt="" /></a>--> - </div> + <time class="published" datetime='{{ ($.Scratch.Get "dateType").Format "2006-01-02" }}'> + {{ ($.Scratch.Get "dateType").Format "January 2, 2006" }} + </time> + <span class="author">{{ .Params.author }}</span> + {{ if .Site.Params.includeReadingTime }} + <p>{{ .ReadingTime }} minute read</p> + {{ end }} + <!--<a href="#" class="author"><span class="name">Jane Doe</span><img src="images/avatar.jpg" alt="" /></a>--> + </div> </header> diff --git a/layouts/post/prev-next.html b/layouts/post/prev-next.html index 64b56de..6279865 100644 --- a/layouts/post/prev-next.html +++ b/layouts/post/prev-next.html @@ -1,11 +1,13 @@ <ul class="actions pagination"> - {{ if .PrevInSection }} - <li><a href="{{ .PrevInSection.Permalink }}" - class="button big previous">{{ .PrevInSection.Title }}</a></li> - {{ end }} + {{ if .PrevInSection }} + <li> + <a href="{{ .PrevInSection.Permalink }}" class="button big previous">{{ .PrevInSection.Title }}</a> + </li> + {{ end }} - {{ if .NextInSection }} - <li><a href="{{ .NextInSection.Permalink }}" - class="button big next">{{ .NextInSection.Title }}</a></li> - {{ end }} + {{ if .NextInSection }} + <li> + <a href="{{ .NextInSection.Permalink }}" class="button big next">{{ .NextInSection.Title }}</a> + </li> + {{ end }} </ul> diff --git a/layouts/post/single.html b/layouts/post/single.html index 20f53ad..a9f19af 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -1,12 +1,12 @@ {{ partial "header" . }} - {{ $.Scratch.Set "shareNav" true }} - {{ partial "navbar" . }} - {{ partial "share-menu" . }} - <!-- Main --> - <div id="main"> - <!-- Post --> - {{ $.Scratch.Set "h1" true }} - {{ .Render "content-single" }} - </div> - {{ partial "sidebar" . }} +{{ $.Scratch.Set "shareNav" true }} +{{ partial "navbar" . }} +{{ partial "share-menu" . }} +<!-- Main --> +<div id="main"> + <!-- Post --> + {{ $.Scratch.Set "h1" true }} + {{ .Render "content-single" }} +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/post/staticman.html b/layouts/post/staticman.html index 955846b..4c5964e 100644 --- a/layouts/post/staticman.html +++ b/layouts/post/staticman.html @@ -40,7 +40,7 @@ </div> </article> {{ end }} -{{ end }} + {{ end }} {{ end }} {{ if eq ($.Scratch.Get "hasComments") 0 }} diff --git a/layouts/shortcodes/img-fit.html b/layouts/shortcodes/img-fit.html index 08e8224..b8603d2 100644 --- a/layouts/shortcodes/img-fit.html +++ b/layouts/shortcodes/img-fit.html @@ -39,37 +39,37 @@ --> {{ $numOfParams := sub (len .Params) 1 }} {{ if and (ge $numOfParams 3) (not (modBool $numOfParams 2)) }} - {{ $.Scratch.Set "path" (.Get $numOfParams) }} + {{ $.Scratch.Set "path" (.Get $numOfParams) }} - {{ $.Scratch.Set "structType" "shortcode" }} - {{ partial "img-path" . }} - {{ $path := $.Scratch.Get "path" }} + {{ $.Scratch.Set "structType" "shortcode" }} + {{ partial "img-path" . }} + {{ $path := $.Scratch.Get "path" }} - <div class="box alt"> - <div class="row uniform"> - {{ $.Scratch.Set "count" 1 }} - {{ $.Scratch.Set "imgFile" "" }} - {{ range first $numOfParams .Params }} - {{ if eq ($.Scratch.Get "count") 1 }} - <div class="{{ . }}"> - {{ else if eq ($.Scratch.Get "count") 2 }} - {{ if eq . "" }} - </div> - {{ $.Scratch.Set "imgFile" "" }} - {{ else }} - {{ $.Scratch.Set "imgFile" . }} - <span class="image fit"> - {{ end }} - {{ else }} - {{ if ne ($.Scratch.Get "imgFile") "" }} - <img src='{{ $path }}/{{ $.Scratch.Get "imgFile" }}' - alt="{{ . }}" /> - </span></div> - {{ end }} - {{ $.Scratch.Set "count" 0 }} - {{ end }} - {{ $.Scratch.Add "count" 1 }} + <div class="box alt"> + <div class="row uniform"> + {{ $.Scratch.Set "count" 1 }} + {{ $.Scratch.Set "imgFile" "" }} + {{ range first $numOfParams .Params }} + {{ if eq ($.Scratch.Get "count") 1 }} + <div class="{{ . }}"> + {{ else if eq ($.Scratch.Get "count") 2 }} + {{ if eq . "" }} + </div> + {{ $.Scratch.Set "imgFile" "" }} + {{ else }} + {{ $.Scratch.Set "imgFile" . }} + <span class="image fit"> {{ end }} - </div> + {{ else }} + {{ if ne ($.Scratch.Get "imgFile") "" }} + <img src='{{ $path }}/{{ $.Scratch.Get "imgFile" }}' alt="{{ . }}" /> + </span> + </div> + {{ end }} + {{ $.Scratch.Set "count" 0 }} + {{ end }} + {{ $.Scratch.Add "count" 1 }} + {{ end }} </div> + </div> {{ end }} diff --git a/layouts/shortcodes/img-post.html b/layouts/shortcodes/img-post.html index 6143696..6749f96 100644 --- a/layouts/shortcodes/img-post.html +++ b/layouts/shortcodes/img-post.html @@ -22,47 +22,49 @@ --> {{ $numOfParams := len .Params }} {{ if and (ge $numOfParams 2) (le $numOfParams 4) }} - <!-- Check if the Parameter is positional or named - which can handle both. --> - {{ if .IsNamedParams }} - {{ $.Scratch.Set "path" (.Get "path") }} - {{ $.Scratch.Set "file" (.Get "file") }} - {{ $.Scratch.Set "alt" (.Get "alt") }} - {{ $.Scratch.Set "type" (.Get "type") }} + <!-- Check if the Parameter is positional or named + which can handle both. --> + {{ if .IsNamedParams }} + {{ $.Scratch.Set "path" (.Get "path") }} + {{ $.Scratch.Set "file" (.Get "file") }} + {{ $.Scratch.Set "alt" (.Get "alt") }} + {{ $.Scratch.Set "type" (.Get "type") }} + {{ else }} + {{ $.Scratch.Set "path" (.Get 0) }} + {{ $.Scratch.Set "file" (.Get 1) }} + {{ if ge $numOfParams 3 }} + {{ $.Scratch.Set "alt" (.Get 2) }} {{ else }} - {{ $.Scratch.Set "path" (.Get 0) }} - {{ $.Scratch.Set "file" (.Get 1) }} - {{ if ge $numOfParams 3 }} - {{ $.Scratch.Set "alt" (.Get 2) }} - {{ else }} - {{ $.Scratch.Set "alt" "" }} - {{ end }} - {{ if ge $numOfParams 4 }} - {{ $.Scratch.Set "type" (.Get 3) }} - {{ else }} - {{ $.Scratch.Set "type" "center" }} - {{ end }} + {{ $.Scratch.Set "alt" "" }} {{ end }} + {{ if ge $numOfParams 4 }} + {{ $.Scratch.Set "type" (.Get 3) }} + {{ else }} + {{ $.Scratch.Set "type" "center" }} + {{ end }} + {{ end }} - {{ $file := $.Scratch.Get "file" }} - {{ $type := $.Scratch.Get "type" }} - {{ $alt := $.Scratch.Get "alt" }} + {{ $file := $.Scratch.Get "file" }} + {{ $type := $.Scratch.Get "type" }} + {{ $alt := $.Scratch.Get "alt" }} - {{ $.Scratch.Set "structType" "shortcode" }} - {{ partial "img-path" . }} - {{ $path := $.Scratch.Get "path" }} + {{ $.Scratch.Set "structType" "shortcode" }} + {{ partial "img-path" . }} + {{ $path := $.Scratch.Get "path" }} - {{ if eq $type "left" }} - <span class="image left"> - <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> - </span> - {{ else if eq $type "right" }} - <span class="image right"> - <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> - </span> - {{ else }} - <p><span class="image center"> - <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> - </span></p> - {{ end }} + {{ if eq $type "left" }} + <span class="image left"> + <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> + </span> + {{ else if eq $type "right" }} + <span class="image right"> + <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> + </span> + {{ else }} + <p> + <span class="image center"> + <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" /> + </span> + </p> + {{ end }} {{ end }} diff --git a/layouts/shortcodes/url-link.html b/layouts/shortcodes/url-link.html index 419c098..c2b5f5e 100644 --- a/layouts/shortcodes/url-link.html +++ b/layouts/shortcodes/url-link.html @@ -1,10 +1,10 @@ {{ $numOfParams := len .Params }} {{ if and (ge $numOfParams 2) (le $numOfParams 3) }} - {{ if eq $numOfParams 3 }} - {{ $.Scratch.Set "target" (.Get 2) }} - {{ else }} - {{ $.Scratch.Set "target" "_blank" }} - {{ end }} + {{ if eq $numOfParams 3 }} + {{ $.Scratch.Set "target" (.Get 2) }} + {{ else }} + {{ $.Scratch.Set "target" "_blank" }} + {{ end }} - <a href="{{ .Get 1 }}" target='{{ $.Scratch.Get "target"}}'>{{ .Get 0 }}</a> + <a href="{{ .Get 1 }}" target='{{ $.Scratch.Get "target"}}'>{{ .Get 0 }}</a> {{ end }} diff --git a/layouts/taxonomy/category.html b/layouts/taxonomy/category.html index 8881b14..0fd749f 100644 --- a/layouts/taxonomy/category.html +++ b/layouts/taxonomy/category.html @@ -1,16 +1,16 @@ {{ partial "general-title" . }} {{ partial "header" . }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - <h1>{{ .Title }}</h1> - {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} - {{ range $paginator.Pages }} - {{ .Render "content-list" }} - {{ end }} +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + <h1>{{ .Title }}</h1> + {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} + {{ range $paginator.Pages }} + {{ .Render "content-list" }} + {{ end }} - {{ partial "pagination" . }} - </div> - {{ partial "sidebar" . }} + {{ partial "pagination" . }} +</div> +{{ partial "sidebar" . }} {{ partial "footer" . }} diff --git a/layouts/taxonomy/category.terms.html b/layouts/taxonomy/category.terms.html index 5e504c0..9affa3a 100644 --- a/layouts/taxonomy/category.terms.html +++ b/layouts/taxonomy/category.terms.html @@ -1,33 +1,33 @@ {{ partial "general-title" . }} {{ partial "header" . }} - {{ partial "navbar" . }} - <!-- Main --> - <div id="main"> - {{ if .Site.Params.categoriesByCount }} - {{ $.Scratch.Set "categories" .Data.Terms.ByCount }} - {{ else }} - {{ $.Scratch.Set "categories" .Data.Terms.Alphabetical }} - {{ end }} +{{ partial "navbar" . }} +<!-- Main --> +<div id="main"> + {{ if .Site.Params.categoriesByCount }} + {{ $.Scratch.Set "categories" .Data.Terms.ByCount }} + {{ else }} + {{ $.Scratch.Set "categories" .Data.Terms.Alphabetical }} + {{ end }} - <ul class="posts"> - <header> - <h1>{{ .Data.Plural }}</h1> - </header> - {{ $data := .Data }} - {{ range $key, $value := $.Scratch.Get "categories" }} - <li> - <article> - <header> - <a href="/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> - <span style="float:right;">{{ $value.Count }}</span> - </header> - </article> - </li> - {{ end }} - </ul> - </div> + <ul class="posts"> + <header> + <h1>{{ .Data.Plural }}</h1> + </header> + {{ $data := .Data }} + {{ range $key, $value := $.Scratch.Get "categories" }} + <li> + <article> + <header> + <a href="/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> + <span style="float:right;">{{ $value.Count }}</span> + </header> + </article> + </li> + {{ end }} + </ul> +</div> - {{ $.Scratch.Set "showCategories" false }} - {{ partial "sidebar" . }} +{{ $.Scratch.Set "showCategories" false }} +{{ partial "sidebar" . }} {{ partial "footer" . }} |