From beaec35dcc9daee0811107af66e4af18c615699f Mon Sep 17 00:00:00 2001 From: Marc Riera Irigoyen Date: Mon, 6 May 2019 00:28:03 +0200 Subject: [PATCH] Theme improvements --- config.toml | 8 +-- content/_index.en.md | 2 +- content/localitzacio/_index.md | 9 +++ content/localitzacio/programari/_index.md | 10 +++ content/localitzacio/videojocs/_index.md | 10 +++ content/localitzacio/web/_index.md | 10 +++ .../{contacta.md => marcriera/_index.ca.md} | 6 +- content/projectes.md | 9 --- content/serveis.md | 10 --- content/traduccio/_index.ca.md | 10 +++ content/traduccio/editorial/_index.md | 10 +++ content/traduccio/general/_index.md | 10 +++ themes/marcriera/layouts/_default/single.html | 18 ++--- themes/marcriera/layouts/index.html | 6 +- themes/marcriera/layouts/partials/footer.html | 7 +- themes/marcriera/layouts/partials/header.html | 44 ++++++------- themes/marcriera/layouts/partials/menu.html | 56 ++++++++-------- themes/marcriera/static/css/theme.css | 65 ++++++++++--------- 18 files changed, 176 insertions(+), 124 deletions(-) create mode 100644 content/localitzacio/_index.md create mode 100644 content/localitzacio/programari/_index.md create mode 100644 content/localitzacio/videojocs/_index.md create mode 100644 content/localitzacio/web/_index.md rename content/{contacta.md => marcriera/_index.ca.md} (93%) delete mode 100644 content/projectes.md delete mode 100644 content/serveis.md create mode 100644 content/traduccio/_index.ca.md create mode 100644 content/traduccio/editorial/_index.md create mode 100644 content/traduccio/general/_index.md diff --git a/config.toml b/config.toml index 626f26b..9b0941b 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ baseURL = "https://mrtraduccions.cat/" -title = "Marc Riera Irigoyen" +title = "MRTraduccions" theme = "marcriera" DefaultContentLanguage = "ca" removePathAccents = true @@ -16,14 +16,14 @@ removePathAccents = true [languages.ca] languageName = "Català" weight = 1 -description = "Traductor i localitzador" +description = "Traducció i localització" [languages.es] languageName = "Castellano" weight = 2 -description = "Traductor y localizador" +description = "Traducción y localización" [languages.en] languageName = "English" weight = 3 -description = "Translator and localiser" +description = "Translation and localisation" diff --git a/content/_index.en.md b/content/_index.en.md index 30b92bf..e1bc6ae 100644 --- a/content/_index.en.md +++ b/content/_index.en.md @@ -1,7 +1,7 @@ --- menu: main: - name: "Start" + name: "Home" weight: 1 url: "/" --- diff --git a/content/localitzacio/_index.md b/content/localitzacio/_index.md new file mode 100644 index 0000000..c65c8cd --- /dev/null +++ b/content/localitzacio/_index.md @@ -0,0 +1,9 @@ +--- +title: "Localització" +menu: + main: + name: "Localització" + weight: 3 + url: "/localitzacio/" +--- + diff --git a/content/localitzacio/programari/_index.md b/content/localitzacio/programari/_index.md new file mode 100644 index 0000000..8ec3366 --- /dev/null +++ b/content/localitzacio/programari/_index.md @@ -0,0 +1,10 @@ +--- +title: "Localització de programari" +menu: + main: + name: "Programari" + weight: 2 + url: "/localitzacio/programari/" + parent: "Localització" +--- + diff --git a/content/localitzacio/videojocs/_index.md b/content/localitzacio/videojocs/_index.md new file mode 100644 index 0000000..10107d9 --- /dev/null +++ b/content/localitzacio/videojocs/_index.md @@ -0,0 +1,10 @@ +--- +title: "Localització de videojocs" +menu: + main: + name: "Videojocs" + weight: 3 + url: "/localitzacio/videojocs/" + parent: "Localització" +--- + diff --git a/content/localitzacio/web/_index.md b/content/localitzacio/web/_index.md new file mode 100644 index 0000000..9629268 --- /dev/null +++ b/content/localitzacio/web/_index.md @@ -0,0 +1,10 @@ +--- +title: "Localització de pàgines web" +menu: + main: + name: "Pàgines web" + weight: 1 + url: "/localitzacio/web/" + parent: "Localització" +--- + diff --git a/content/contacta.md b/content/marcriera/_index.ca.md similarity index 93% rename from content/contacta.md rename to content/marcriera/_index.ca.md index 6e77afa..25a51bc 100644 --- a/content/contacta.md +++ b/content/marcriera/_index.ca.md @@ -1,10 +1,10 @@ --- -title: "Contacta" +title: "Marc Riera" menu: main: - name: "Contacta" + name: "Marc Riera" weight: 6 - url: "/contacta/" + url: "/marcriera/" ---
diff --git a/content/projectes.md b/content/projectes.md deleted file mode 100644 index 2459a67..0000000 --- a/content/projectes.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Projectes" -menu: - main: - name: "Projectes" - weight: 5 - url: "/projectes/" ---- - diff --git a/content/serveis.md b/content/serveis.md deleted file mode 100644 index 282af51..0000000 --- a/content/serveis.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Serveis" -menu: - main: - name: "Serveis" - weight: 2 - url: "/serveis/" ---- - -Sóc traductor diff --git a/content/traduccio/_index.ca.md b/content/traduccio/_index.ca.md new file mode 100644 index 0000000..3b41492 --- /dev/null +++ b/content/traduccio/_index.ca.md @@ -0,0 +1,10 @@ +--- +title: "Traducció" +menu: + main: + name: "Traducció" + weight: 2 + url: "/traduccio/" +--- + +Aquesta és la pàgina sobre traducció diff --git a/content/traduccio/editorial/_index.md b/content/traduccio/editorial/_index.md new file mode 100644 index 0000000..da5ac96 --- /dev/null +++ b/content/traduccio/editorial/_index.md @@ -0,0 +1,10 @@ +--- +title: "Traducció de textos editorials" +menu: + main: + name: "Textos editorials" + weight: 2 + url: "/traduccio/editorial/" + parent: "Traducció" +--- + diff --git a/content/traduccio/general/_index.md b/content/traduccio/general/_index.md new file mode 100644 index 0000000..4cc7dc6 --- /dev/null +++ b/content/traduccio/general/_index.md @@ -0,0 +1,10 @@ +--- +title: "Traducció de textos generals" +menu: + main: + name: "Textos generals" + weight: 1 + url: "/traduccio/general/" + parent: "Traducció" +--- + diff --git a/themes/marcriera/layouts/_default/single.html b/themes/marcriera/layouts/_default/single.html index df20cc8..49fd212 100644 --- a/themes/marcriera/layouts/_default/single.html +++ b/themes/marcriera/layouts/_default/single.html @@ -1,11 +1,11 @@ {{ partial "header.html" . }} -
- {{ if not .Date.IsZero }} -

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

- {{ end }} - {{ .Content }} - {{ if .Params.tags }} - {{ partial "tags" .Params.tags }} - {{ end }} -
+
+ {{- if not .Date.IsZero }} +

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

+ {{- end }} + {{ .Content }} + {{- if .Params.tags }} + {{ partial "tags" .Params.tags }} + {{- end }} +
{{ partial "footer.html" . }} diff --git a/themes/marcriera/layouts/index.html b/themes/marcriera/layouts/index.html index c11f0c2..c830700 100644 --- a/themes/marcriera/layouts/index.html +++ b/themes/marcriera/layouts/index.html @@ -1,5 +1,5 @@ {{ partial "header.html" . }} -
- {{ .Content }} -
+
+ {{ .Content }} +
{{ partial "footer.html" . }} diff --git a/themes/marcriera/layouts/partials/footer.html b/themes/marcriera/layouts/partials/footer.html index d9ed425..bff5067 100644 --- a/themes/marcriera/layouts/partials/footer.html +++ b/themes/marcriera/layouts/partials/footer.html @@ -1,9 +1,6 @@ - - - + - diff --git a/themes/marcriera/layouts/partials/header.html b/themes/marcriera/layouts/partials/header.html index cd198be..f630b93 100644 --- a/themes/marcriera/layouts/partials/header.html +++ b/themes/marcriera/layouts/partials/header.html @@ -1,42 +1,42 @@ - {{ .Site.Title }} + {{ .Title }} - {{ .Site.Title }} - {{ .Hugo.Generator }} + {{ hugo.Generator }}
-
- {{ if isset .Site.Params "logoimage" }} +
+ {{- if isset .Site.Params "logoimage" }} - {{ end }} + {{- end }}
{{ .Site.Params.Description }}
-
-
- {{ if .IsTranslated }} + +
+ {{- if .IsTranslated }} - {{ end }} -
+ {{- end }} + {{ partial "menu.html" . }} - {{ if isset .Params "image"}} - - {{end}} -
-

{{ .Title }}

-
+ {{- if isset .Params "image"}} + + {{- end }} +
+

{{ .Title }}

+
diff --git a/themes/marcriera/layouts/partials/menu.html b/themes/marcriera/layouts/partials/menu.html index 7c67cb2..9578c6d 100644 --- a/themes/marcriera/layouts/partials/menu.html +++ b/themes/marcriera/layouts/partials/menu.html @@ -2,31 +2,35 @@ diff --git a/themes/marcriera/static/css/theme.css b/themes/marcriera/static/css/theme.css index 6813995..dce0565 100644 --- a/themes/marcriera/static/css/theme.css +++ b/themes/marcriera/static/css/theme.css @@ -72,7 +72,7 @@ a:visited { a:hover, a.selected { - color: #BBBBBB; + color: #4C454F; } @@ -118,6 +118,7 @@ nav ul { list-style-type: none; padding: 0; margin-bottom: 0px; + left: 0; } nav ul.first > li { @@ -130,6 +131,18 @@ nav ul li a { font-size: 90%; } +nav ul.first > li a, +nav ul.second > li a { + padding: 10px 10px 10px 10px; + background: #7C454F; +} + +nav ul.first > li a:hover, +nav ul.second > li a:hover { + color: #DDDDDD; + background: #8C454F; +} + /* Language selector */ @@ -187,7 +200,7 @@ nav ul li a { /* Footer */ -#footer { +footer { text-align: center; padding: 10px 20px 10px 20px; clear: both; @@ -210,7 +223,7 @@ nav ul li a { /* Page content */ -#content { +main { padding: 10px 20px 10px 20px; margin-bottom: 20px; margin-top: 20px; @@ -222,18 +235,18 @@ nav ul li a { color: #777; } -#content .timestamp { +main .timestamp { padding-bottom: 1em; } -#content a:link, -#content a:active, -#content a:visited { +main a:link, +main a:active, +main a:visited { color: #EEEEEE; } -#content a:hover, -#content a.selected { +main a:hover, +main a.selected { color: #CCCCCC; } @@ -251,20 +264,22 @@ nav { padding-right: 1.25em; } +nav ul li a { + width: 140px; + +} + nav ul.first > li { display: inline-block; position: relative; - background: #7C454F; - padding: 10px 10px 10px 10px; } nav ul.second, nav ul.third { + top: 40px; display: none; position: absolute; - background: #000000; - width: 160px; - box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25); + background: #5C353F; } nav ul.first li:hover ul.second, @@ -272,11 +287,6 @@ nav ul.second li:hover ul.third { display: block; } -nav ul.second li a, -nav ul.third li a { - padding: 0.75em 1em; -} - nav ul.second { z-index: 2; } @@ -366,19 +376,6 @@ nav { margin-bottom: 20px; } -nav ul.first > li a, -nav ul.second > li a { - display: block; - padding: 5px 20px 5px 20px; - background: #7C454F; -} - -nav ul.first > li a:hover, -nav ul.second > li a:hover { - color: #DDDDDD; - background: #9E4B5A; -} - nav ul.first { margin-top: 0px; } @@ -387,6 +384,10 @@ nav ul.second > li a { padding-left: 40px; } +nav ul a { + text-align: left; +} + /* Language selector */