02fcbbf7 |
1 | {{ define "blog-list" }} |
2 | <section id="one"> |
3 | <article> |
4 | <div class="inner"> |
5 | {{ .Content }} |
6 | </div> |
7 | </article> |
c2ea6701 |
8 | <article> |
9 | <div class="inner"> |
10 | {{ partial "pagination.html" . }} |
11 | </div> |
12 | </article> |
02fcbbf7 |
13 | </section> |
14 | <section id="two" class="spotlights"> |
e28a215c |
15 | <!-- Ranges through content/posts/*.md --> |
c2ea6701 |
16 | {{ range .Paginator.Pages }} |
02fcbbf7 |
17 | <section> |
18 | <a class="image" href="{{.Permalink}}"> |
c2ea6701 |
19 | <img src="{{ .Params.featured_image | absURL}}" alt=".Title"> |
02fcbbf7 |
20 | </a> |
21 | <div class="content"> |
22 | <div class="inner"> |
23 | <header class="major"> |
24 | <h3> |
25 | {{ if gt (len .Title) 40 }} |
26 | {{ $first50 := ( substr .Title 0 40 ) }} |
27 | {{ $lastChars := ( substr .Title 40 ) }} |
28 | {{ $newLine := "<br>" }} |
29 | {{ $newTitle := ( printf "%s" $lastChars | printf "%s%s" $newLine | printf "%s%s" $first50 ) }} |
30 | {{ $newTitle | safeHTML }} |
31 | {{ else }} |
32 | {{ .Title }} |
33 | {{ end }} |
34 | </h3> |
35 | </header> |
c2ea6701 |
36 | <p>{{ .Params.excerpt }}</p> |
02fcbbf7 |
37 | <ul class="actions"> |
38 | <li><a href="{{.Permalink}}" class="button">Read More</a></li> |
39 | </ul> |
40 | </div> |
d862564b |
41 | </div> |
02fcbbf7 |
42 | </section> |
e28a215c |
43 | {{ end }} |
02fcbbf7 |
44 | </section> |
c2ea6701 |
45 | <section id="three"> |
46 | <div class="inner"> |
47 | {{ partial "pagination.html" . }} |
48 | </div> |
49 | </section> |
e28a215c |
50 | {{ end }} |