From c94187570c12e97f5936e29fba00180584cc9421 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 26 Jan 2017 01:33:00 +0000 Subject: [PATCH] Improve readability on large screens + minor style improvements * Limit paragraph width to optimize readability on large screens (#97) * Markdownify publication authors (#101) * Improve padding of first homepage widget (#98) --- layouts/_default/list.html | 2 +- layouts/_default/single.html | 23 ++- layouts/partials/publication_li_detailed.html | 2 +- layouts/project/single.html | 17 +- layouts/publication/single.html | 179 ++++++++--------- layouts/section/post.html | 2 +- layouts/talk/single.html | 186 +++++++++--------- static/css/hugo-academic.css | 34 +++- 8 files changed, 242 insertions(+), 203 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index eaec7009..67fcf3b9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,6 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
+
{{ $paginator := .Paginate .Data.Pages }} {{ range $paginator.Pages }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4e117d36..b8e2b7b1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,26 +1,29 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
-
+
- {{ if .Params.image }} - - {{end}} + {{ if .Params.image }} + + {{end}} +

{{ .Title }}

- {{ partial "article_metadata" (dict "content" . "is_list" 0) }} -
{{ .Content }}
+
-
+
+
{{ partial "section_pager.html" . }} - {{ partial "comments.html" . }} -
+ +
+ {{ partial "comments.html" . }} +
+ {{ partial "footer_container.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/partials/publication_li_detailed.html b/layouts/partials/publication_li_detailed.html index a9c3b9f1..942086b5 100644 --- a/layouts/partials/publication_li_detailed.html +++ b/layouts/partials/publication_li_detailed.html @@ -40,7 +40,7 @@ diff --git a/layouts/project/single.html b/layouts/project/single.html index 2d355399..2ac6978e 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -1,13 +1,19 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
+
{{ if .Params.image }} {{end}} -

{{ .Title }}

+
+

{{ .Title }}

+ + + {{ partial "share.html" . }} + +
{{ with .Params.external_link }} {{ i18n "open_project_site" }} @@ -18,8 +24,11 @@
- {{ partial "section_pager.html" . }} -
+ +
+ {{ partial "section_pager.html" . }} +
+ {{ partial "footer_container.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/publication/single.html b/layouts/publication/single.html index 57fc3744..3b912d97 100644 --- a/layouts/publication/single.html +++ b/layouts/publication/single.html @@ -1,97 +1,100 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
- -
-
-

{{ .Title }}

- - - {{ partial "share.html" . }} - -
- - {{ if .Params.image }} - - {{end}} - -

{{ i18n "abstract" }}

-

{{ .Params.abstract }}

- - {{ if (.Params.publication_types) and (ne (index .Params.publication_types 0) "0") }} -
-
-
-
-
{{ i18n "publication_type" }}
-
- {{ range $index, $pubtype := .Params.publication_types }} - - {{ index $.Site.Params.publication_types (int .) }} - - {{ end }} -
-
-
-
-
-
- {{ end }} - -
-
-
-
-
{{ i18n "publication" }}
-
{{ .Params.publication | markdownify }}
-
-
-
-
-
- -
-
-
-
-
{{ i18n "date" }}
- -
-
-
-
-
- -
-
-
-
-
{{ i18n "links" }}
-
- - {{ partial "publication_links" (dict "content" . "is_list" 0) }} - -
-
-
-
-
-
- -
- -
{{ .Content }}
+
+
+

{{ .Title }}

+ + + {{ partial "share.html" . }} +
- {{ partial "section_pager.html" . }} +
+
+ + {{ if .Params.image }} + + {{end}} + +

{{ i18n "abstract" }}

+

{{ .Params.abstract }}

+ + {{ if (.Params.publication_types) and (ne (index .Params.publication_types 0) "0") }} +
+
+
+
+
{{ i18n "publication_type" }}
+
+ {{ range $index, $pubtype := .Params.publication_types }} + + {{ index $.Site.Params.publication_types (int .) }} + + {{ end }} +
+
+
+
+
+
+ {{ end }} + +
+
+
+
+
{{ i18n "publication" }}
+
{{ .Params.publication | markdownify }}
+
+
+
+
+
+ +
+
+
+
+
{{ i18n "date" }}
+ +
+
+
+
+
+ +
+
+
+
+
{{ i18n "links" }}
+
+ + {{ partial "publication_links" (dict "content" . "is_list" 0) }} + +
+
+
+
+
+
+ +
+ +
{{ .Content }}
+ +
+ {{ partial "section_pager.html" . }} +
+ {{ partial "footer_container.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/section/post.html b/layouts/section/post.html index 538f6f77..1106f3cc 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -1,6 +1,6 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
+

{{ .Title | default "Posts" }}

diff --git a/layouts/talk/single.html b/layouts/talk/single.html index e20a9e59..22249127 100644 --- a/layouts/talk/single.html +++ b/layouts/talk/single.html @@ -1,101 +1,103 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
- -
-
-

{{ .Title }}

- - - {{ partial "share.html" . }} - -
- - {{ if .Params.image }} - - {{end}} - - {{ if .Params.abstract }} -

{{ i18n "abstract" }}

-

{{ .Params.abstract }}

- {{ else }} -
- {{ end }} - -
-
-
-
-
{{ i18n "date" }}
- -
-
-
-
-
- -
-
-
-
-
{{ i18n "event" }}
- -
-
-
-
-
- - {{ with .Params.location }} -
-
-
-
-
{{ i18n "location" }}
-
{{ . | markdownify }}
-
-
-
-
-
- {{ end }} - - {{ if .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_custom }} -
-
-
-
-
{{ i18n "links" }}
-
- - {{ partial "talk_links" (dict "content" . "is_list" 0) }} - -
-
-
-
-
-
- {{ end }} - -
- -
{{ .Content }}
+
+
+

{{ .Title }}

+ + + {{ partial "share.html" . }} +
- {{ partial "section_pager.html" . }} + {{ if .Params.image }} + + {{end}} + + {{ if .Params.abstract }} +

{{ i18n "abstract" }}

+

{{ .Params.abstract }}

+ {{ else }} +
+ {{ end }} + +
+
+
+
+
{{ i18n "date" }}
+ +
+
+
+
+
+ +
+
+
+
+
{{ i18n "event" }}
+ +
+
+
+
+
+ + {{ with .Params.location }} +
+
+
+
+
{{ i18n "location" }}
+
{{ . | markdownify }}
+
+
+
+
+
+ {{ end }} + + {{ if .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_custom }} +
+
+
+
+
{{ i18n "links" }}
+
+ + {{ partial "talk_links" (dict "content" . "is_list" 0) }} + +
+
+
+
+
+
+ {{ end }} + +
+ +
+ {{ .Content }} +
+ +
+ {{ partial "section_pager.html" . }} +
+ {{ partial "footer_container.html" . }} {{ partial "footer.html" . }} diff --git a/static/css/hugo-academic.css b/static/css/hugo-academic.css index 96f2fbf3..b009f874 100644 --- a/static/css/hugo-academic.css +++ b/static/css/hugo-academic.css @@ -177,6 +177,18 @@ blockquote p:last-child { } } +.universal-wrapper { + margin: 0 auto; + padding-right: 15px; + padding-left: 15px; + width: 100%; +} +@media only screen and (min-width: 1001px) { + .universal-wrapper { + width: 1000px; + } +} + /************************************************* * Home Sections **************************************************/ @@ -196,20 +208,24 @@ blockquote p:last-child { animation: intro 0.3s both; animation-delay: 0.15s; } -@media screen and (max-width: 768px) { - .home-section { - padding: 60px 0 60px 0; - } -} .home-section:first-of-type { - padding-top: 0; + padding-top: 50px; } .home-section:nth-of-type(even) { background-color: rgb(247, 247, 247); } +@media screen and (max-width: 768px) { + .home-section { + padding: 60px 0 60px 0; + } + .home-section:first-of-type { + padding-top: 40px; + } +} + .section-heading h1 { margin: 0 0 10px 0; } @@ -365,6 +381,12 @@ article { animation-delay: 0.15s; } +.article-container { + max-width: 760px; + padding: 1rem 20px 0 20px; + margin: 0 auto 0 auto; +} + .article-title { font-size: 1.75rem; }