From 2732deaa79b0617fe9a5e17a166cda7f5f1fa26e Mon Sep 17 00:00:00 2001 From: Marc Riera Irigoyen Date: Sat, 7 Apr 2018 14:37:10 +0200 Subject: [PATCH] Improve readability, add recent news to home page --- i18n/ca.toml | 3 +++ i18n/en.toml | 3 +++ i18n/es.toml | 3 +++ layouts/_default/list.html | 6 +++++- layouts/_default/single.html | 8 +------- layouts/index.html | 3 ++- layouts/partials/content.html | 15 ++++++++++++++ layouts/partials/footer.html | 2 -- layouts/partials/header.html | 2 -- layouts/partials/recentnews.html | 15 ++++++++++++++ static/css/kozmo-dark.css | 35 ++++++++++++-------------------- 11 files changed, 60 insertions(+), 35 deletions(-) create mode 100644 layouts/partials/content.html create mode 100644 layouts/partials/recentnews.html diff --git a/i18n/ca.toml b/i18n/ca.toml index a6f114f..98b28f2 100644 --- a/i18n/ca.toml +++ b/i18n/ca.toml @@ -9,3 +9,6 @@ other = "Més recent" [older] other = "Més antic" + +[latestUpdates] +other = "Últimes actualitzacions" diff --git a/i18n/en.toml b/i18n/en.toml index 5b35ba9..5fbde5a 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -9,3 +9,6 @@ other = "Newer" [older] other = "Older" + +[latestUpdates] +other = "Latest updates" diff --git a/i18n/es.toml b/i18n/es.toml index b8edb79..0a07be7 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -9,3 +9,6 @@ other = "Más reciente" [older] other = "Más antiguo" + +[latestUpdates] +other = "Últimas actualizaciones" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6b6b0a3..fda8482 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,7 @@ {{ partial "header.html" . }} +
+ {{ range sort .Paginator.Pages }}

{{ .Title }}

@@ -8,7 +10,7 @@ ... - diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a8baef4..eb5b2ff 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -58,5 +58,3 @@

{{ .Title }}

- -
diff --git a/layouts/partials/recentnews.html b/layouts/partials/recentnews.html new file mode 100644 index 0000000..3cc3387 --- /dev/null +++ b/layouts/partials/recentnews.html @@ -0,0 +1,15 @@ +{{ $recentupdatessection := .Site.Params.recentupdates | default "blog"}} + +{{ with .Site.GetPage "section" $recentupdatessection }} + +
+ +

{{ i18n "latestUpdates" }}

+ + {{ range (first 3 (where .Pages "Section" $recentupdatessection)) }} +

{{ .Date.Format "2006-01-02" }} {{ .Title }}

+ {{ end }} + +
+ +{{ end }} diff --git a/static/css/kozmo-dark.css b/static/css/kozmo-dark.css index d20e8e8..c9e9dad 100644 --- a/static/css/kozmo-dark.css +++ b/static/css/kozmo-dark.css @@ -1,4 +1,4 @@ -@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,500,500i,600,600i,700,700i'); +@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,600i,700,700i'); /* Basic theme elements */ @@ -49,12 +49,13 @@ h6 { a { text-decoration: none; + font-weight: 600; } a:link, a:active, a:visited { - color: #BBBBBB; + color: #CCCCCC; } a:hover, @@ -62,13 +63,6 @@ a.selected { color: #208DCC; } -p a:link, -p a:active, -p a:visited, -p a:hover { - color: #208DCC; -} - /* Images */ @@ -167,17 +161,6 @@ nav ul li a { font-size: 90%; } -nav a:link, -nav a:active, -nav a:visited { - color: #BBBBBB; -} - -nav a:hover, -nav a.selected { - color: #208DCC; -} - /* Language selector */ @@ -262,8 +245,8 @@ nav a.selected { text-align: justify; } -#content .timestamp, -#content .tags { +.timestamp, +.tags { color: #777; } @@ -331,6 +314,14 @@ nav a.selected { } +/* Home page: latest updates */ + +#recent-updates { + padding: 0px 20px 10px 20px; + text-align: justify; +} + + @media (min-width: 780px) {