From 6a91758b8054e0f887f462096bfde5f6845f145a Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 9 May 2016 20:45:35 +0100 Subject: [PATCH] Update CSS to dynamically color alternate home sections --- layouts/index.html | 6 +++--- static/css/hugo-academic.css | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index ccca23ff..8a9b8056 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{ range $index, $page := where .Site.Pages "Section" "=" "home" }} {{ if eq .Title "about" }} -
+
{{ partial "home_biography" . }}
{{ end }} @@ -39,7 +39,7 @@ -
+

Posts

@@ -93,7 +93,7 @@ {{ range $index, $page := where .Site.Pages "Section" "=" "home" }} {{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }} {{ $title_words := split $page.Title " " }} -
+

{{ title $page.Title }}

diff --git a/static/css/hugo-academic.css b/static/css/hugo-academic.css index d5b65b9e..78762aa9 100644 --- a/static/css/hugo-academic.css +++ b/static/css/hugo-academic.css @@ -129,13 +129,16 @@ footer p.powered-by { margin-bottom: 0px; width: 1905px; margin-left: -382.5px; - background-color: rgb(247, 247, 247); } -.home-section-wrapper.full_width.home.alt { +.home-section-wrapper.full_width.home:nth-child(even) { background-color: rgb(255, 255, 255); } +.home-section-wrapper.full_width.home:nth-child(odd) { + background-color: rgb(247, 247, 247); +} + /************************************************* * Blog Articles **************************************************/