Merge pull request #307 from halogenica/revert-225-archives

Revert "[Feature] Archives"
This commit is contained in:
Michael Romero 2019-09-21 00:48:03 -07:00 committed by GitHub
commit 8e69671d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 81 deletions

View File

@ -1,62 +0,0 @@
{{ define "header" }}
<header class="header-section ">
<div class="intro-header no-img">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="page-heading">
<h1>archives</h1>
<hr class="small">
</div>
</div>
</div>
</div>
</div>
</header>
{{ end }}
{{ define "main" }}
{{- $paginator := .Paginate .Pages.ByDate.Reverse}}
<div class="container" role="main">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="posts-list">
<section id="archive" class="archive">
{{- range $index, $element := $paginator.Pages -}}
{{- $thisYear := $element.Date.Format "2006" }}
{{- $lastElement := $index | add -1 | index $paginator.Pages }}
{{ if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }}
<div class="collection-title">
<h2 class="archive-year">{{ $thisYear }}</h2>
</div>
{{- end }}
<div class="archive-post">
<span class="archive-post-time">
{{ $element.Date.Format "01-02" }}
</span>
<span class="archive-post-title">
<a href="{{ $element.RelPermalink }}" class="archive-post-link">
{{ .Title }}
</a>
</span>
</div>
{{- end -}}
</section>
</div>
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<ul class="pager main-pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .RelPermalink }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .RelPermalink }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
</div>
{{ end }}

View File

@ -764,7 +764,7 @@ div.splitbox div.right {
padding: 15px 25px;
}
}
.disqus-comments button:hover,
.disqus-comments button:hover,
.disqus-comments button:focus {
color: #FFF;
background: #0085a1;
@ -812,21 +812,3 @@ h4.see-also {
ul.share li:hover .fab {
transform: scale(1.4)
}
/* --- Archives --- */
.archive .archive-post {
padding: 3px 20px;
padding-top: 3px;
padding-right: 20px;
padding-bottom: 3px;
padding-left: 20px;
border-left: 1px solid #cacaca;
border-left-width: 1px;
border-left-style: solid;
border-left-color: rgb(202, 202, 202);
}
.archive .archive-post .archive-post-time {
margin-right: 10px;
}