Theme improvements

overhaul
Marc Riera Irigoyen 2019-05-06 00:28:03 +02:00
parent 0fb743dcb9
commit beaec35dcc
18 changed files with 176 additions and 124 deletions

View File

@ -1,5 +1,5 @@
baseURL = "https://mrtraduccions.cat/" baseURL = "https://mrtraduccions.cat/"
title = "Marc Riera Irigoyen" title = "MRTraduccions"
theme = "marcriera" theme = "marcriera"
DefaultContentLanguage = "ca" DefaultContentLanguage = "ca"
removePathAccents = true removePathAccents = true
@ -16,14 +16,14 @@ removePathAccents = true
[languages.ca] [languages.ca]
languageName = "Català" languageName = "Català"
weight = 1 weight = 1
description = "Traductor i localitzador" description = "Traducció i localització"
[languages.es] [languages.es]
languageName = "Castellano" languageName = "Castellano"
weight = 2 weight = 2
description = "Traductor y localizador" description = "Traducción y localización"
[languages.en] [languages.en]
languageName = "English" languageName = "English"
weight = 3 weight = 3
description = "Translator and localiser" description = "Translation and localisation"

View File

@ -1,7 +1,7 @@
--- ---
menu: menu:
main: main:
name: "Start" name: "Home"
weight: 1 weight: 1
url: "/" url: "/"
--- ---

View File

@ -0,0 +1,9 @@
---
title: "Localització"
menu:
main:
name: "Localització"
weight: 3
url: "/localitzacio/"
---

View File

@ -0,0 +1,10 @@
---
title: "Localització de programari"
menu:
main:
name: "Programari"
weight: 2
url: "/localitzacio/programari/"
parent: "Localització"
---

View File

@ -0,0 +1,10 @@
---
title: "Localització de videojocs"
menu:
main:
name: "Videojocs"
weight: 3
url: "/localitzacio/videojocs/"
parent: "Localització"
---

View File

@ -0,0 +1,10 @@
---
title: "Localització de pàgines web"
menu:
main:
name: "Pàgines web"
weight: 1
url: "/localitzacio/web/"
parent: "Localització"
---

View File

@ -1,10 +1,10 @@
--- ---
title: "Contacta" title: "Marc Riera"
menu: menu:
main: main:
name: "Contacta" name: "Marc Riera"
weight: 6 weight: 6
url: "/contacta/" url: "/marcriera/"
--- ---
<center> <center>

View File

@ -1,9 +0,0 @@
---
title: "Projectes"
menu:
main:
name: "Projectes"
weight: 5
url: "/projectes/"
---

View File

@ -1,10 +0,0 @@
---
title: "Serveis"
menu:
main:
name: "Serveis"
weight: 2
url: "/serveis/"
---
Sóc traductor

View File

@ -0,0 +1,10 @@
---
title: "Traducció"
menu:
main:
name: "Traducció"
weight: 2
url: "/traduccio/"
---
Aquesta és la pàgina sobre traducció

View File

@ -0,0 +1,10 @@
---
title: "Traducció de textos editorials"
menu:
main:
name: "Textos editorials"
weight: 2
url: "/traduccio/editorial/"
parent: "Traducció"
---

View File

@ -0,0 +1,10 @@
---
title: "Traducció de textos generals"
menu:
main:
name: "Textos generals"
weight: 1
url: "/traduccio/general/"
parent: "Traducció"
---

View File

@ -1,11 +1,11 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div id="content"> <main>
{{ if not .Date.IsZero }} {{- if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p> <p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
{{ end }} {{- end }}
{{ .Content }} {{ .Content }}
{{ if .Params.tags }} {{- if .Params.tags }}
{{ partial "tags" .Params.tags }} {{ partial "tags" .Params.tags }}
{{ end }} {{- end }}
</div> </main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -1,5 +1,5 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div id="content"> <main>
{{ .Content }} {{ .Content }}
</div> </main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -1,9 +1,6 @@
<footer>
<div id="footer">
{{ now.Year }} - {{ $.Site.Params.copyright }} {{ now.Year }} - {{ $.Site.Params.copyright }}
</footer>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -1,42 +1,42 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>{{ .Site.Title }}</title> <title>{{ .Title }} - {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/theme.css"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/theme.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0">
{{ .Hugo.Generator }} {{ hugo.Generator }}
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div id="header-left"> <header id="header-left">
{{ if isset .Site.Params "logoimage" }} {{- if isset .Site.Params "logoimage" }}
<div id="site-logo"> <div id="site-logo">
<a href="{{ .Site.BaseURL }}"><img alt="Site logo" src="{{ .Site.BaseURL }}{{ .Site.Params.logoimage }}"></a> <a href="{{ .Site.BaseURL }}"><img alt="Site logo" src="{{ .Site.BaseURL }}{{ .Site.Params.logoimage }}"></a>
</div> </div>
{{ end }} {{- end }}
<div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div> <div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
<div id="site-slogan">{{ .Site.Params.Description }}</div> <div id="site-slogan">{{ .Site.Params.Description }}</div>
</div> </header>
<div id="header-right"> <header id="header-right">
{{ if .IsTranslated }} {{- if .IsTranslated }}
<ul class="language-selector"> <ul class="language-selector">
<li> <li>
<a class="selected">{{ .Language.LanguageName }}</a> <a class="selected">{{ .Language.LanguageName }}</a>
</li> </li>
{{ range .Translations }} {{- range .Translations }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li> </li>
{{ end}} {{- end}}
</ul> </ul>
{{ end }} {{- end }}
</div> </header>
{{ partial "menu.html" . }} {{ partial "menu.html" . }}
{{ if isset .Params "image"}} {{- if isset .Params "image"}}
<div id="featured-image"> <div id="featured-image">
<img alt="Featured image" src="{{ .Params.image }}"> <img alt="Featured image" src="{{ .Params.image }}">
</div> </div>
{{end}} {{- end }}
<div id="page-title"> <div id="page-title">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
</div> </div>

View File

@ -3,30 +3,34 @@
<label for="burger-toggle" class="burger-button">&#9776; {{ i18n "menu" }}</label> <label for="burger-toggle" class="burger-button">&#9776; {{ i18n "menu" }}</label>
<div id="menu-entries"> <div id="menu-entries">
<ul class="first"> <ul class="first">
{{ $currentPage := . }} {{- $currentPage := . }}
{{ range .Site.Menus.main }} {{- range .Site.Menus.main }}
{{ if false }} {{- if false }}
<li><a class="selected">{{ .Name }}</a> <li>
{{ else }} <a class="selected">{{ .Name }}</a>
<li><a href="{{.URL}}">{{ .Name }}</a> {{- else }}
{{ end }} <li>
{{ if .HasChildren }} <a href="{{.URL}}">{{ .Name }}</a>
{{- end }}
{{- if .HasChildren }}
<ul class="second"> <ul class="second">
{{ range .Children }} {{- range .Children }}
<li><a href="{{.URL}}">{{ .Name }}</a> <li>
{{ if .HasChildren }} <a href="{{.URL}}">{{ .Name }}</a>
{{- if .HasChildren }}
<ul class="third"> <ul class="third">
{{ range .Children }} {{- range .Children }}
<li><a href="{{.URL}}">{{ .Name }}</a></li> <li>
{{ end }} <a href="{{.URL}}">{{ .Name }}</a></li>
{{- end }}
</ul> </ul>
{{ end }} {{- end }}
</li> </li>
{{ end }} {{- end }}
</ul> </ul>
{{ end }} {{- end }}
</li> </li>
{{ end }} {{- end }}
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -72,7 +72,7 @@ a:visited {
a:hover, a:hover,
a.selected { a.selected {
color: #BBBBBB; color: #4C454F;
} }
@ -118,6 +118,7 @@ nav ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin-bottom: 0px; margin-bottom: 0px;
left: 0;
} }
nav ul.first > li { nav ul.first > li {
@ -130,6 +131,18 @@ nav ul li a {
font-size: 90%; 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 */ /* Language selector */
@ -187,7 +200,7 @@ nav ul li a {
/* Footer */ /* Footer */
#footer { footer {
text-align: center; text-align: center;
padding: 10px 20px 10px 20px; padding: 10px 20px 10px 20px;
clear: both; clear: both;
@ -210,7 +223,7 @@ nav ul li a {
/* Page content */ /* Page content */
#content { main {
padding: 10px 20px 10px 20px; padding: 10px 20px 10px 20px;
margin-bottom: 20px; margin-bottom: 20px;
margin-top: 20px; margin-top: 20px;
@ -222,18 +235,18 @@ nav ul li a {
color: #777; color: #777;
} }
#content .timestamp { main .timestamp {
padding-bottom: 1em; padding-bottom: 1em;
} }
#content a:link, main a:link,
#content a:active, main a:active,
#content a:visited { main a:visited {
color: #EEEEEE; color: #EEEEEE;
} }
#content a:hover, main a:hover,
#content a.selected { main a.selected {
color: #CCCCCC; color: #CCCCCC;
} }
@ -251,20 +264,22 @@ nav {
padding-right: 1.25em; padding-right: 1.25em;
} }
nav ul li a {
width: 140px;
}
nav ul.first > li { nav ul.first > li {
display: inline-block; display: inline-block;
position: relative; position: relative;
background: #7C454F;
padding: 10px 10px 10px 10px;
} }
nav ul.second, nav ul.second,
nav ul.third { nav ul.third {
top: 40px;
display: none; display: none;
position: absolute; position: absolute;
background: #000000; background: #5C353F;
width: 160px;
box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25);
} }
nav ul.first li:hover ul.second, nav ul.first li:hover ul.second,
@ -272,11 +287,6 @@ nav ul.second li:hover ul.third {
display: block; display: block;
} }
nav ul.second li a,
nav ul.third li a {
padding: 0.75em 1em;
}
nav ul.second { nav ul.second {
z-index: 2; z-index: 2;
} }
@ -366,19 +376,6 @@ nav {
margin-bottom: 20px; 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 { nav ul.first {
margin-top: 0px; margin-top: 0px;
} }
@ -387,6 +384,10 @@ nav ul.second > li a {
padding-left: 40px; padding-left: 40px;
} }
nav ul a {
text-align: left;
}
/* Language selector */ /* Language selector */