mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
15.33.2020 dcd66864b348fd63f07bc2f3905ba4402de94166
Added Pagination Support ๐Ÿ“–
3 files modified
46 ■■■■■ changed files
README.md 1 ●●●● patch | view | raw | blame | history
layouts/index.html 42 ●●●●● patch | view | raw | blame | history
static/css/style.css 3 ●●●● patch | view | raw | blame | history
README.md
@@ -10,6 +10,7 @@
Features include:
- Profile picture and slogan
- Navigation items
- Pagination
- Google Analytics (optional)
- Comments powered by Disqus (optional)
- Katex support (optional)
layouts/index.html
@@ -1,20 +1,28 @@
{{ define "main" }}
<div class="about animated fadeInDown">
    {{ range first 10 .Site.RegularPages }}
        {{ if eq .Type "post"}}
        <div>
            <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
            {{ .Summary }}
          </div>
          {{ if .Truncated }}
          <!-- This <div> includes a read more link, but only if the summary is truncated... -->
          <div>
            <a href="{{ .RelPermalink }}">Read Moreโ€ฆ</a>
          </div>
          {{ end }}
        {{ end }}
    {{ end }}
  {{ $paginator := .Paginate (where .Pages "Type" "post") }}
  {{ range $paginator.Pages }}
  <div class="post animated fadeInDown">
    <div class="post-title">
      <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a>
      </h3>
    </div>
    <div class="post-content"><div class="p_part"><p>{{ .Summary }}</p></div>
  <div class="p_part"><p></p></div></div>
    <div class="post-footer">
      <div class="meta">
        <div class="info"><i class="fa fa-sun-o"></i><span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
          {{ with .Params.tags }}
          {{- range $index, $el := . -}}
          <a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
          {{- end -}}
          {{ end }}
        </div>
      </div>
    </div>
  </div>
  {{ end }}
<div class="pagination">
  {{ template "_internal/pagination.html" . }}
</div>
{{ end }}
static/css/style.css
@@ -377,7 +377,7 @@
.pagination {
  margin: 30px;
  padding: 0px 0 56px 0;
  border-bottom: 1px solid #f2f2f2;
  text-align: center;
}
.pagination ul {
  list-style: none;
@@ -392,6 +392,7 @@
}
.pagination ul li a {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.5);
}
.pagination .pre {
  float: left;