Add images to some lists
This commit is contained in:
parent
fdbe509cfc
commit
de0ecb1e4b
6 changed files with 31 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Student Robotics 2014
|
title: Student Robotics 2014
|
||||||
linktitle: 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.
|
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.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
title: Student Robotics 2015
|
title: Student Robotics 2015
|
||||||
linktitle: 2015
|
linktitle: 2015
|
||||||
slug: /
|
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.
|
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.
|
||||||
|
|
6
content/robotics/_index.md
Normal file
6
content/robotics/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: Robotics
|
||||||
|
show_images: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Content
|
|
@ -10,9 +10,14 @@
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
{{ $parent := . }}
|
||||||
{{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }}
|
{{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }}
|
||||||
|
{{ if $parent.Params.show_images }}
|
||||||
|
{{ partial "box_image.html" . }}
|
||||||
|
{{ else }}
|
||||||
{{ partial "box.html" . }}
|
{{ partial "box.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
14
layouts/partials/box_image.html
Normal file
14
layouts/partials/box_image.html
Normal 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>
|
|
@ -9,7 +9,9 @@ $fa-font-path: "../fonts";
|
||||||
|
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
|
&:not(.image) {
|
||||||
padding: 2em;
|
padding: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
Loading…
Reference in a new issue