mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
Update CSS to dynamically color alternate home sections
This commit is contained in:
parent
44c0e1ec18
commit
6a91758b80
2 changed files with 8 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
|||
<!-- Biography Section -->
|
||||
{{ range $index, $page := where .Site.Pages "Section" "=" "home" }}
|
||||
{{ if eq .Title "about" }}
|
||||
<section id="bio" class="home-section-wrapper full_width home alt" style="padding-top: 0;">
|
||||
<section id="bio" class="home-section-wrapper full_width home" style="padding-top: 0;">
|
||||
{{ partial "home_biography" . }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
|
||||
<!-- Blog Posts Section -->
|
||||
<section id="posts" class="home-section-wrapper full_width home alt">
|
||||
<section id="posts" class="home-section-wrapper full_width home">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<h2>Posts</h2>
|
||||
|
@ -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 " " }}
|
||||
<section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section-wrapper full_width home alt">
|
||||
<section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section-wrapper full_width home">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<h2>{{ title $page.Title }}</h2>
|
||||
|
|
|
@ -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
|
||||
**************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue