add latest media to index
This commit is contained in:
parent
5afd718619
commit
55c6e96835
2 changed files with 23 additions and 1 deletions
|
@ -99,6 +99,23 @@
|
|||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
/* latest media */
|
||||
|
||||
.media-list {
|
||||
display: grid;
|
||||
grid-gap: 1em;
|
||||
grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
|
||||
}
|
||||
.media-item {
|
||||
padding: 1em;
|
||||
background: #ddd;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
&:hover {opacity: 0.6}
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
/* contact section */
|
||||
#contact {background: #eee;}
|
||||
#contact .container {display: flex; flex-flow: column; align-items: center;}
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
{{ with .Params.latest }}
|
||||
<h2 class="section-header">{{.}}</h2>
|
||||
{{ end }}
|
||||
<ul class="media-list">
|
||||
{{- range ( where site.RegularPages "Section" "media" | first 6 ) }}
|
||||
<a href="{{.Permalink}}" class="media-item"><li>{{.Title}}</li></a>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section" id="contact">
|
||||
|
@ -53,4 +58,4 @@
|
|||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in a new issue