diff options
author | Chip Senkbeil <chip.senkbeil@gmail.com> | 2015-09-26 00:49:58 +0300 |
---|---|---|
committer | Chip Senkbeil <chip.senkbeil@gmail.com> | 2015-09-26 00:49:58 +0300 |
commit | 73026b951c5a308f3890c3646c88b6c9a72804b8 (patch) | |
tree | 296a43593ce4e7204b0d8aa056dadd6276789e68 | |
parent | c8ed21981541df8584ca44aaf382949e61e44a8f (diff) |
Refactored non-partials to use single partial for all content
-rw-r--r-- | layouts/404.html | 35 | ||||
-rw-r--r-- | layouts/_default/list.html | 22 | ||||
-rw-r--r-- | layouts/_default/single.html | 46 | ||||
-rw-r--r-- | layouts/_default/terms.html | 41 | ||||
-rw-r--r-- | layouts/gallery/single.html | 15 | ||||
-rw-r--r-- | layouts/index.html | 51 | ||||
-rw-r--r-- | layouts/page/single.html | 15 | ||||
-rw-r--r-- | layouts/partials/404/single.html | 35 | ||||
-rw-r--r-- | layouts/partials/_default/list.html | 24 | ||||
-rw-r--r-- | layouts/partials/_default/single.html | 46 | ||||
-rw-r--r-- | layouts/partials/_default/terms.html | 41 | ||||
-rw-r--r-- | layouts/partials/extra/pagination.html | 42 | ||||
-rw-r--r-- | layouts/partials/gallery/list.html | 16 | ||||
-rw-r--r-- | layouts/partials/gallery/single.html | 15 | ||||
-rw-r--r-- | layouts/partials/homepage/single.html | 51 | ||||
-rw-r--r-- | layouts/partials/page/single.html | 15 | ||||
-rw-r--r-- | layouts/section/gallery.html | 16 |
17 files changed, 273 insertions, 253 deletions
diff --git a/layouts/404.html b/layouts/404.html index d6201d1..79caadc 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,35 +1,2 @@ -{{ partial "core/html-start.html" . }} - -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <div class="main-content"> - <div class="center-space"> - <div class="article-colors"> - <article> - <header> - <h1 class="blue-grey white-text center-items">404</h1> - </header> - - <section class="center-items"> - <p style="font-size: 1.5em;"> - The requested page was not found! Try searching the site for - another page! - </p> - </section> - - <section class="center-items large-form"> - {{ partial "core/search.html" . }} - </section> - </article> - </div> - </div> - </div> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "404/single.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ffd64cd..a6cb2a8 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,22 +1,2 @@ -{{ partial "core/html-start.html" . }} -{{ partial "core/head.html" . }} - -<body> - {{ partial "core/main-menu.html" . }} - - <section class="main-content"> - <div class="masonry-flex-container"> - {{ range .Paginator.Pages }} - <div class="flex-item"> - {{ partial "post/page-item.html" . }} - </div> - {{ end }} - </div> - {{ partial "extra/pagination.html" . }} - </section> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "_default/list.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c94f328..a6cb2a8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,46 +1,2 @@ -{{ partial "core/html-start.html" . }} - -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <div class="main-content"> - <div class="center-space"> - <div class="article-colors"> - {{ with .Params.image }} - <img src="{{ . }}" class="fill-container-width"></img> - {{ end }} - <article> - <header> - <h1 class="article-title">{{ .Title }}</h1> - <time class="date-color">{{ .Date.Format "Mon Jan 2, 2006" }}</time> - <span class="separator">|</span> - {{ partial "post/categories.html" . }} - <span class="separator">|</span> - {{ partial "post/tags.html" . }} - </header> - - <hr> - - <section> - {{ with .Params.redirect }} - <p>If you are not redirected automatically, follow the <a href="{{ . }}">link</a>.</p> - {{ else }} - {{ .Content }} - {{ end }} - </section> - - <footer class="right-align"> - <p><small>{{ .Site.Copyright | markdownify }}</small></p> - </footer> - </article> - </div> - </div> - </div> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "_default/list.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 0af8669..5e0cf1f 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,41 +1,2 @@ - -{{ partial "core/html-start.html" . }} - -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <div class="main-content"> - <div class="center-space"> - <div class="article-colors article-shadow"> - <article> - <header> - <h2 class="article-title">{{ .Title }}</h2> - </header> - - <hr> - - <section> - <h5> - <ul class="columns columns-responsive"> - {{ $baseUrl := .Site.BaseURL }} - {{ $data := .Data }} - {{ range $key, $value := .Data.Terms.Alphabetical }} - <li> - <a href="{{ $baseUrl}}{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }} - </li> - {{ end }} - </ul> - </h5> - </section> - </article> - </div> - </div> - </div> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "_default/terms.html" . }} diff --git a/layouts/gallery/single.html b/layouts/gallery/single.html index eff71bf..3a080fe 100644 --- a/layouts/gallery/single.html +++ b/layouts/gallery/single.html @@ -1,15 +1,2 @@ -{{ partial "core/html-start.html" . }} -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <section class="main-content"> - {{ partial "gallery/item" . }} - </section> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "gallery/single.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 01567b0..1677aee 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,51 +1,2 @@ -{{ partial "core/html-start.html" . }} - -{{ partial "core/head.html" . }} - -<body class="page-colors"> - <div class="parallax"> - {{ with .Site.Params.Header }} - {{ partial "homepage/header-scrolling.html" . }} - {{ end }} - - <div class="parallax__group parallax__group--auto-height"> - <div class="parallax__layer parallax__layer--base"> - <div class="row-colors center-align"> - <h2 class="no-margin"> - <ul class="horizontal no-bullets no-margin"> - <li>{{ partial "homepage/svg-face.html" . }}</li> - <li>About Me</li> - </ul> - </h2> - </div> - - <div class="flex-container"> - {{ range .Site.Params.Cells.List }} - {{ partial "homepage/cell.html" . }} - {{ end }} - </div> - - {{ with .Site.Params.Footer }} - <div class="row-colors right-align"> - <ul class="main-page-footer horizontal no-bullets no-margin"> - {{ range .List }} - <li> - <a href="{{ .icon_link }}"> - <i class="fa fa-{{ .icon_class }}"></i> - </a> - </li> - <li>|</li> - {{ end }} - <li>{{ $.Site.Copyright | markdownify }}</li> - </ul> - </div> - {{ end }} - </div> - </div> - </div> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "homepage/single.html" . }} diff --git a/layouts/page/single.html b/layouts/page/single.html index 5d933bc..e9f1c9c 100644 --- a/layouts/page/single.html +++ b/layouts/page/single.html @@ -1,15 +1,2 @@ -{{ partial "core/html-start.html" . }} -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <section class="main-content"> - {{ .Content }} - </section> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "page/single.html" . }} diff --git a/layouts/partials/404/single.html b/layouts/partials/404/single.html new file mode 100644 index 0000000..d6201d1 --- /dev/null +++ b/layouts/partials/404/single.html @@ -0,0 +1,35 @@ +{{ partial "core/html-start.html" . }} + +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <div class="main-content"> + <div class="center-space"> + <div class="article-colors"> + <article> + <header> + <h1 class="blue-grey white-text center-items">404</h1> + </header> + + <section class="center-items"> + <p style="font-size: 1.5em;"> + The requested page was not found! Try searching the site for + another page! + </p> + </section> + + <section class="center-items large-form"> + {{ partial "core/search.html" . }} + </section> + </article> + </div> + </div> + </div> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/_default/list.html b/layouts/partials/_default/list.html new file mode 100644 index 0000000..f65df9a --- /dev/null +++ b/layouts/partials/_default/list.html @@ -0,0 +1,24 @@ +{{ partial "core/html-start.html" . }} +{{ partial "core/head.html" . }} + +<body> + {{ partial "core/main-menu.html" . }} + + <section class="main-content"> + <div class="masonry-flex-container"> + {{ if .IsNode }} + {{ range .Paginator.Pages }} + <div class="flex-item"> + {{ partial "post/page-item.html" . }} + </div> + {{ end }} + {{ end }} + </div> + {{ partial "extra/pagination.html" . }} + </section> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/_default/single.html b/layouts/partials/_default/single.html new file mode 100644 index 0000000..c94f328 --- /dev/null +++ b/layouts/partials/_default/single.html @@ -0,0 +1,46 @@ +{{ partial "core/html-start.html" . }} + +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <div class="main-content"> + <div class="center-space"> + <div class="article-colors"> + {{ with .Params.image }} + <img src="{{ . }}" class="fill-container-width"></img> + {{ end }} + <article> + <header> + <h1 class="article-title">{{ .Title }}</h1> + <time class="date-color">{{ .Date.Format "Mon Jan 2, 2006" }}</time> + <span class="separator">|</span> + {{ partial "post/categories.html" . }} + <span class="separator">|</span> + {{ partial "post/tags.html" . }} + </header> + + <hr> + + <section> + {{ with .Params.redirect }} + <p>If you are not redirected automatically, follow the <a href="{{ . }}">link</a>.</p> + {{ else }} + {{ .Content }} + {{ end }} + </section> + + <footer class="right-align"> + <p><small>{{ .Site.Copyright | markdownify }}</small></p> + </footer> + </article> + </div> + </div> + </div> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/_default/terms.html b/layouts/partials/_default/terms.html new file mode 100644 index 0000000..0af8669 --- /dev/null +++ b/layouts/partials/_default/terms.html @@ -0,0 +1,41 @@ + +{{ partial "core/html-start.html" . }} + +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <div class="main-content"> + <div class="center-space"> + <div class="article-colors article-shadow"> + <article> + <header> + <h2 class="article-title">{{ .Title }}</h2> + </header> + + <hr> + + <section> + <h5> + <ul class="columns columns-responsive"> + {{ $baseUrl := .Site.BaseURL }} + {{ $data := .Data }} + {{ range $key, $value := .Data.Terms.Alphabetical }} + <li> + <a href="{{ $baseUrl}}{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a> {{ $value.Count }} + </li> + {{ end }} + </ul> + </h5> + </section> + </article> + </div> + </div> + </div> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/extra/pagination.html b/layouts/partials/extra/pagination.html index b49849c..2fa4a82 100644 --- a/layouts/partials/extra/pagination.html +++ b/layouts/partials/extra/pagination.html @@ -1,21 +1,23 @@ -<ul class="pagination"> - {{ with .Paginator }} - <li class="{{ if .HasPrev }}waves-effect{{ else }}disabled{{ end }}"> - <a href="{{ if .HasPrev }}{{ .Prev.URL }}{{ else }}#!{{ end }}"> - <i class="fa fa-angle-left"></i> - </a> - </li> - {{ $currentPageNumber := .PageNumber }} - {{ range .Pagers }} - <li class="{{ if eq $currentPageNumber .PageNumber }}active{{ else }}waves-effect{{ end }}"> - <a href="{{ .URL }}">{{ .PageNumber }}</a> - </li> - {{ end }} - <li class="{{ if .HasNext }}waves-effect{{ else }}disabled{{ end }}"> - <a href="{{ if .HasNext }}{{ .Next.URL }}{{ else }}#!{{ end }}"> - <i class="fa fa-angle-right"></i> - </a> - </li> - {{ end }} -</ul> +{{ if .IsNode }} + <ul class="pagination"> + {{ with .Paginator }} + <li class="{{ if .HasPrev }}waves-effect{{ else }}disabled{{ end }}"> + <a href="{{ if .HasPrev }}{{ .Prev.URL }}{{ else }}#!{{ end }}"> + <i class="fa fa-angle-left"></i> + </a> + </li> + {{ $currentPageNumber := .PageNumber }} + {{ range .Pagers }} + <li class="{{ if eq $currentPageNumber .PageNumber }}active{{ else }}waves-effect{{ end }}"> + <a href="{{ .URL }}">{{ .PageNumber }}</a> + </li> + {{ end }} + <li class="{{ if .HasNext }}waves-effect{{ else }}disabled{{ end }}"> + <a href="{{ if .HasNext }}{{ .Next.URL }}{{ else }}#!{{ end }}"> + <i class="fa fa-angle-right"></i> + </a> + </li> + {{ end }} + </ul> +{{ end }} diff --git a/layouts/partials/gallery/list.html b/layouts/partials/gallery/list.html new file mode 100644 index 0000000..461ddba --- /dev/null +++ b/layouts/partials/gallery/list.html @@ -0,0 +1,16 @@ +{{ partial "core/html-start.html" . }} +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <section class="main-content"> + {{ partial "gallery/collection.html" . }} + {{ partial "extra/pagination.html" . }} + </section> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/gallery/single.html b/layouts/partials/gallery/single.html new file mode 100644 index 0000000..eff71bf --- /dev/null +++ b/layouts/partials/gallery/single.html @@ -0,0 +1,15 @@ +{{ partial "core/html-start.html" . }} +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <section class="main-content"> + {{ partial "gallery/item" . }} + </section> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/homepage/single.html b/layouts/partials/homepage/single.html new file mode 100644 index 0000000..01567b0 --- /dev/null +++ b/layouts/partials/homepage/single.html @@ -0,0 +1,51 @@ +{{ partial "core/html-start.html" . }} + +{{ partial "core/head.html" . }} + +<body class="page-colors"> + <div class="parallax"> + {{ with .Site.Params.Header }} + {{ partial "homepage/header-scrolling.html" . }} + {{ end }} + + <div class="parallax__group parallax__group--auto-height"> + <div class="parallax__layer parallax__layer--base"> + <div class="row-colors center-align"> + <h2 class="no-margin"> + <ul class="horizontal no-bullets no-margin"> + <li>{{ partial "homepage/svg-face.html" . }}</li> + <li>About Me</li> + </ul> + </h2> + </div> + + <div class="flex-container"> + {{ range .Site.Params.Cells.List }} + {{ partial "homepage/cell.html" . }} + {{ end }} + </div> + + {{ with .Site.Params.Footer }} + <div class="row-colors right-align"> + <ul class="main-page-footer horizontal no-bullets no-margin"> + {{ range .List }} + <li> + <a href="{{ .icon_link }}"> + <i class="fa fa-{{ .icon_class }}"></i> + </a> + </li> + <li>|</li> + {{ end }} + <li>{{ $.Site.Copyright | markdownify }}</li> + </ul> + </div> + {{ end }} + </div> + </div> + </div> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/partials/page/single.html b/layouts/partials/page/single.html new file mode 100644 index 0000000..5d933bc --- /dev/null +++ b/layouts/partials/page/single.html @@ -0,0 +1,15 @@ +{{ partial "core/html-start.html" . }} +{{ partial "core/head.html" . }} + +<body class="page-colors minimum-viewport-height"> + {{ partial "core/main-menu.html" . }} + + <section class="main-content"> + {{ .Content }} + </section> + + {{ partial "core/js.html" . }} +</body> + +{{ partial "core/html-end.html" . }} + diff --git a/layouts/section/gallery.html b/layouts/section/gallery.html index 461ddba..03f86a3 100644 --- a/layouts/section/gallery.html +++ b/layouts/section/gallery.html @@ -1,16 +1,2 @@ -{{ partial "core/html-start.html" . }} -{{ partial "core/head.html" . }} - -<body class="page-colors minimum-viewport-height"> - {{ partial "core/main-menu.html" . }} - - <section class="main-content"> - {{ partial "gallery/collection.html" . }} - {{ partial "extra/pagination.html" . }} - </section> - - {{ partial "core/js.html" . }} -</body> - -{{ partial "core/html-end.html" . }} +{{ partial "gallery/list.html" . }} |