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/"
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"

View File

@ -1,7 +1,7 @@
---
menu:
main:
name: "Start"
name: "Home"
weight: 1
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:
main:
name: "Contacta"
name: "Marc Riera"
weight: 6
url: "/contacta/"
url: "/marcriera/"
---
<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" . }}
<div id="content">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
{{ end }}
{{ .Content }}
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
</div>
<main>
{{- if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
{{- end }}
{{ .Content }}
{{- if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{- end }}
</main>
{{ partial "footer.html" . }}

View File

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

View File

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

View File

@ -1,42 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<title>{{ .Title }} - {{ .Site.Title }}</title>
<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">
{{ .Hugo.Generator }}
{{ hugo.Generator }}
</head>
<body>
<div id="container">
<div id="header-left">
{{ if isset .Site.Params "logoimage" }}
<header id="header-left">
{{- if isset .Site.Params "logoimage" }}
<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>
{{ end }}
{{- end }}
<div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
<div id="site-slogan">{{ .Site.Params.Description }}</div>
</div>
<div id="header-right">
{{ if .IsTranslated }}
</header>
<header id="header-right">
{{- if .IsTranslated }}
<ul class="language-selector">
<li>
<li>
<a class="selected">{{ .Language.LanguageName }}</a>
</li>
{{ range .Translations }}
{{- range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end}}
{{- end}}
</ul>
{{ end }}
</div>
{{- end }}
</header>
{{ partial "menu.html" . }}
{{ if isset .Params "image"}}
<div id="featured-image">
<img alt="Featured image" src="{{ .Params.image }}">
</div>
{{end}}
<div id="page-title">
<h1>{{ .Title }}</h1>
</div>
{{- if isset .Params "image"}}
<div id="featured-image">
<img alt="Featured image" src="{{ .Params.image }}">
</div>
{{- end }}
<div id="page-title">
<h1>{{ .Title }}</h1>
</div>

View File

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

View File

@ -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 */