diff options
author | Angelo Stavrow <angelo@fogcreek.com> | 2018-10-23 00:12:57 +0300 |
---|---|---|
committer | Angelo Stavrow <angelo@fogcreek.com> | 2018-10-23 00:12:57 +0300 |
commit | 03eeaf97a40e800d360085de2043a62e11013b07 (patch) | |
tree | 29c6ef918300041055ba073045c309bacce2d100 | |
parent | 5ac37add5b943b3f955b14b6309ccb81bb209b3e (diff) |
Fixes broken </div> in 404.html (closes #21)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/404.html | 14 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 68 | ||||
-rw-r--r-- | layouts/partials/footer.html | 3 | ||||
-rw-r--r-- | layouts/partials/header.html | 3 |
7 files changed, 48 insertions, 45 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c984ec7..517601a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - Better instructions for users that prefer a little more YAML in their lives, thanks to [@zwbetz-gh](https://github.com/zwbetz-gh)! +- Fix for broken content div in 404.html ([#21](https://github.com/AngeloStavrow/indigo/issues/21)) ## [1.0.3] ### Added diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4b41519..3d297eb 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -2,7 +2,7 @@ baseURL = "https://example.com/" title = "Indigo Theme" copyright = "Copyright © 2018, Author Name" languageCode = "en-US" -theme = "indigo" +theme = "../.." # Switch back to "indigo" paginate = 3 [params] diff --git a/layouts/404.html b/layouts/404.html index 003c64a..f160774 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -9,10 +9,12 @@ {{ partial "pagenav.html" . }} <h1 class="post-title">404</h1> </header> - <section> - <h2>Whoops.</h2> - <p> - The page you were looking for doesn't exist. Would you like to <a href="{{ .Site.BaseURL }}">go to the home page</a>? - </p> - </section> + <div id="content"> + <section> + <h2>Whoops.</h2> + <p> + The page you were looking for doesn't exist. Would you like to <a href="{{ .Site.BaseURL }}">go to the home page</a>? + </p> + </section> + </div> {{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9125770..0f1abe2 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,10 @@ {{ partial "header.html" . }} <h2>{{ .Title }}</h2> +<div id="content"> {{ range $index, $page := (.Paginate (where .Data.Pages "Type" "post")).Pages }} {{ if ne $index 0 }} {{ end }} {{ .Render "li" }} {{ end }} +</div> {{ partial "footer.html" . }}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e1f47f9..6892d74 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,38 +4,40 @@ {{ if .Params.Author }} {{ $author = .Params.Author }} {{ end }} -<article class="h-entry"> - <header> - <h1 class="post-title p-name">{{ .Title }}</h1> - {{ if not .Params.Menu }} - <p class="post-date">Posted on - <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> - {{ .PublishDate.Format "2 January, 2006 at 15:04 MST" }} - </time> {{ if $author }} by <a href="{{ .Site.BaseURL }}" class="p-author h-card" rel="author">{{ $author }}</a>{{ end }} - </p> - {{ end }} - {{ if .Params.categories }} - <p class="post-tag">Category: - {{ range .Params.categories }} - <a href="{{ $baseurl }}/categories/{{ . | urlize }}" class="post-tag p-category">{{ . }}</a> +<div id="content"> + <article class="h-entry"> + <header> + <h1 class="post-title p-name">{{ .Title }}</h1> + {{ if not .Params.Menu }} + <p class="post-date">Posted on + <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> + {{ .PublishDate.Format "2 January, 2006 at 15:04 MST" }} + </time> {{ if $author }} by <a href="{{ .Site.BaseURL }}" class="p-author h-card" rel="author">{{ $author }}</a>{{ end }} + </p> {{ end }} - </p> - <hr class="post-underline"> - {{ end }} - </header> - <section class="content e-content"> - {{ .Content }} - </section> - <footer> - <a class="permalink u-url" href="{{ .Permalink }}">{{ .Site.Params.PermalinkText }}</a> - {{ if .Params.tags }} - <hr class="post-underline"> - <p class="post-tag">Tags for this post: - {{ range .Params.tags }} - <a href="{{ $baseurl }}/tags/{{ . | urlize }}" class="post-tag p-category">{{ . }}</a> - {{ end }} - </p> - {{ end }} - </footer> -</article> + {{ if .Params.categories }} + <p class="post-tag">Category: + {{ range .Params.categories }} + <a href="{{ $baseurl }}/categories/{{ . | urlize }}" class="post-tag p-category">{{ . }}</a> + {{ end }} + </p> + <hr class="post-underline"> + {{ end }} + </header> + <section class="content e-content"> + {{ .Content }} + </section> + <footer> + <a class="permalink u-url" href="{{ .Permalink }}">{{ .Site.Params.PermalinkText }}</a> + {{ if .Params.tags }} + <hr class="post-underline"> + <p class="post-tag">Tags for this post: + {{ range .Params.tags }} + <a href="{{ $baseurl }}/tags/{{ . | urlize }}" class="post-tag p-category">{{ . }}</a> + {{ end }} + </p> + {{ end }} + </footer> + </article> +</div> {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index ba0cba1..6e227c0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,6 +1,3 @@ -<!-- Close the 'content' div --> - </div> - <!-- Footer content --> {{ if .Site.Params.ShowBio }} <div class="h-card"> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 003f0f6..f6c390c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -17,5 +17,4 @@ {{ end }} </div> {{ end }} - </header> - <div id="content">
\ No newline at end of file + </header>
\ No newline at end of file |