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