1
Fork 0

Add images to some lists

This commit is contained in:
Jake Howard 2017-05-09 09:13:41 +01:00
parent fdbe509cfc
commit de0ecb1e4b
6 changed files with 31 additions and 2 deletions

View file

@ -1,6 +1,7 @@
---
title: Student Robotics 2014
linktitle: 2014
image: https://c2.staticflickr.com/8/7670/17115168179_1ef30ac6e9_b.jpg
---
Welcome to the homepage of Collyer's Student Robotics 2014 team. Originally, this page was a part of the competition, but due to 3 different site rewrites, the original content and formatting has been lost.

View file

@ -2,6 +2,7 @@
title: Student Robotics 2015
linktitle: 2015
slug: /
image: https://c2.staticflickr.com/8/7726/17309695331_584e7de16c_b.jpg
---
Welcome to the homepage of Collyer's Student Robotics Team 2015 (The 'A' Team) - Creators of 'A.L.I.C.E'! Here you can see everything that goes on throughout the competition.

View file

@ -0,0 +1,6 @@
---
title: Robotics
show_images: true
---
Content

View file

@ -10,8 +10,13 @@
</div>
{{ end }}
<div class="row">
{{ $parent := . }}
{{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }}
{{ partial "box.html" . }}
{{ if $parent.Params.show_images }}
{{ partial "box_image.html" . }}
{{ else }}
{{ partial "box.html" . }}
{{ end }}
{{ end }}
</div>
</section>

View file

@ -0,0 +1,14 @@
<div class="col-sm-6">
<section class="box special image">
{{ if .Params.image }}
<span class="image featured"><img src="{{ .Params.image }}" alt="{{ .Title }} featured image" /></span>
{{ end }}
<a href="{{ .Permalink }}">
<h3>{{ title .LinkTitle }}</h3>
</a>
<p>{{ .Summary | truncate .Site.Params.summary_length "..." }}</p>
<ul class="actions">
<li><a href="{{ .Permalink }}" class="button alt">Read More</a></li>
</ul>
</section>
</div>

View file

@ -9,7 +9,9 @@ $fa-font-path: "../fonts";
.box {
padding: 2em;
&:not(.image) {
padding: 2em;
}
.box {
border-radius: 0;