diff --git a/content/robotics/2014.md b/content/robotics/2014.md index a844112..0ce6aff 100644 --- a/content/robotics/2014.md +++ b/content/robotics/2014.md @@ -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. diff --git a/content/robotics/2015/index.md b/content/robotics/2015/index.md index ed2cdd7..c7ccc94 100644 --- a/content/robotics/2015/index.md +++ b/content/robotics/2015/index.md @@ -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. diff --git a/content/robotics/_index.md b/content/robotics/_index.md new file mode 100644 index 0000000..c99ce84 --- /dev/null +++ b/content/robotics/_index.md @@ -0,0 +1,6 @@ +--- +title: Robotics +show_images: true +--- + +Content diff --git a/layouts/_default/list.html b/layouts/_default/list.html index f4b2134..6a2227a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,8 +10,13 @@ {{ end }}
+ {{ $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 }}
diff --git a/layouts/partials/box_image.html b/layouts/partials/box_image.html new file mode 100644 index 0000000..e548a91 --- /dev/null +++ b/layouts/partials/box_image.html @@ -0,0 +1,14 @@ +
+
+ {{ if .Params.image }} + {{ .Title }} featured image + {{ end }} + +

{{ title .LinkTitle }}

+
+

{{ .Summary | truncate .Site.Params.summary_length "..." }}

+ +
+
diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index 06fa60e..927b3e7 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -9,7 +9,9 @@ $fa-font-path: "../fonts"; .box { - padding: 2em; + &:not(.image) { + padding: 2em; + } .box { border-radius: 0;