From e59e1382e5cced01f1fbded4cef24488768e1667 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 12 May 2016 22:38:09 +0100 Subject: [PATCH] Fix homepage section widths and responsiveness --- layouts/index.html | 94 ++++++++++++++++++++---------------- static/css/hugo-academic.css | 41 ++++------------ 2 files changed, 62 insertions(+), 73 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 11eaa6af..28861851 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,25 +1,27 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
- - + + - - {{ range where .Data.Pages "Type" "home" }} - {{ if eq .Title "about" }} -
+ +{{ range where .Data.Pages "Type" "home" }} +{{ if eq .Title "about" }} +
+
{{ partial "home_biography" . }} -
- {{ end }} - {{ end }} +
+ +{{ end }} +{{ end }} - - {{ $pubs_len := len (where .Data.Pages "Type" "publication") }} - {{ if gt $pubs_len 0 }} -
+ +{{ $pubs_len := len (where .Data.Pages "Type" "publication") }} +{{ if gt $pubs_len 0 }} +
+

Recent Publications

@@ -37,14 +39,16 @@
-
- {{ end }} + +
+{{ end }} - - {{ $posts_len := len (where .Data.Pages "Type" "post") }} - {{ if gt $posts_len 0 }} -
+ +{{ $posts_len := len (where .Data.Pages "Type" "post") }} +{{ if gt $posts_len 0 }} +
+

Posts

@@ -69,14 +73,16 @@ {{ end }}
-
- {{ end }} + +
+{{ end }} - - {{ $projects_len := len (where .Data.Pages "Type" "project") }} - {{ if gt $projects_len 0 }} -
+ +{{ $projects_len := len (where .Data.Pages "Type" "project") }} +{{ if gt $projects_len 0 }} +
+

Projects

@@ -94,15 +100,17 @@
-
- {{ end }} + +
+{{ end }} - - {{ range $index, $page := where .Data.Pages "Type" "home" }} - {{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }} - {{ $title_words := split $page.Title " " }} -
+ +{{ range $index, $page := where .Data.Pages "Type" "home" }} +{{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }} +{{ $title_words := split $page.Title " " }} +
+

{{ title $page.Title }}

@@ -111,13 +119,15 @@ {{ $page.Content }}
-
- {{ end }} - {{ end }} + +
+{{ end }} +{{ end }} - -
+ +
+

Contact

@@ -126,11 +136,13 @@ {{ partial "home_contact.html" . }}
-
+ +
- + +
{{ partial "footer_container.html" . }} -
+ {{ partial "footer.html" . }} diff --git a/static/css/hugo-academic.css b/static/css/hugo-academic.css index 8e00d8f3..a32dfdd0 100644 --- a/static/css/hugo-academic.css +++ b/static/css/hugo-academic.css @@ -104,35 +104,16 @@ footer p.powered-by { * Home Sections **************************************************/ -.home-section-wrapper { - position: relative; - margin-bottom: 45px; - border-style: solid; - border-color: #f7f7f7; - border-width: 0px; - background-repeat: no-repeat; - background-position: center center; - background-attachment: scroll; - background-size: cover; -} - -.home-section-wrapper.full_width { - padding-left: calc(0vw); - padding-right: calc(0vw); - margin-left: calc(0vw); - margin-right: calc(0vw); -} - -.home-section-wrapper.full_width.home { - padding: 110px 371.25px; - margin-top: 0px; - margin-bottom: 0px; - width: 1905px; - margin-left: -382.5px; +.home-section { background-color: rgb(255, 255, 255); + padding: 110px 0 110px 0; } -.home-section-wrapper.full_width.home:nth-of-type(even) { +.home-section:first-of-type { + padding-top: 0; +} + +.home-section:nth-of-type(even) { background-color: rgb(247, 247, 247); } @@ -365,12 +346,8 @@ ul.ul-edu li .description p.institution { } @media (max-width:992px){ - .home-section-wrapper.full_width.home { - padding: 110px 0px; - margin-top: 0px; - margin-bottom: 0px; - margin-left: 0px; - width: 100%; + .home-section { + padding: 60px 0 60px 0; } .space-below {