Skip to content

Commit

Permalink
Revert "jakewies#73 Enable summary for the post in blog"
Browse files Browse the repository at this point in the history
This reverts commit ec69a7c
  • Loading branch information
aldrineeinsteen committed Jul 14, 2020
1 parent 9ada933 commit 3f6c412
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 29 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ Thumbs.db

# Hugo
public/

# Web Storm
/.idea/
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ copyright = "© {year}"
name = "blog"
title = "Blog"
url = "/blog"



15 changes: 3 additions & 12 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,19 @@
{{ end }}

{{ define "main" }}

{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }}

<div class="post-list__container">
<ul class="post-list">
{{ range (.Paginator 5).Pages }}
{{ range .Pages }}
<li class="post">
<div class="post__header">
<time class="post__date" datetime="{{ .Date }}"
>{{ .Date.Format $dateFormat }}</time>
<h2 class="post__title">
<a href="{{.RelPermalink}}">{{ .Title }}</a>
</h2>
{{ .Summary }}
{{ if .Truncated }}
<!-- This <div> includes a read more link, but only if the summary is truncated... -->
<div class="post__title" align="right">
<a href="{{ .RelPermalink }}">Read More</a>
</div>
{{ end }}
{{ partial "tags.html" .}}
</div>
</li>
Expand All @@ -31,6 +24,4 @@ <h2 class="post__title">
{{ partial "browse-by-tag.html" .}}
</div>

{{ partial "pagination.html" . }}

{{ end }}
21 changes: 7 additions & 14 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{{ if gt .Paginator.TotalPages 1}}
<!-- Pagination -->
<nav class="post__title" style="text-align: center; line-height: 2.3em; ">
{{ $paginator := .Paginator }}
{{ range .Paginator.Pagers }}
{{ if eq .PageNumber $paginator.PageNumber }}
<span class="pagination__page pagination__page--current" style="background-color: #d73a49; padding: 8px 15px; color: #ffffff; font-weight: bold;">{{ .PageNumber }}</span>
{{ else }}
<a href="{{ .URL }}" class="pagination__page" style="padding: 8px 15px;">{{ .PageNumber }}</a>
{{ end }}
{{ end }}
</nav>
{{ end }}

<div class="paginator-container">
{{ if .Paginator.HasPrev }}
<a class="paginator paginator--left" href="{{ .Paginator.Prev.URL }}"></a>
{{ end }} {{ if .Paginator.HasNext }}
<a class="paginator paginator--right" href="{{ .Paginator.Next.URL }}"></a>
{{ end }}
</div>

0 comments on commit 3f6c412

Please sign in to comment.