Begin overhaul

overhaul
Marc Riera Irigoyen 2019-03-21 00:00:20 +01:00
parent fe615f0822
commit 920d0ef3ac
18 changed files with 543 additions and 59 deletions

View File

@ -4,9 +4,26 @@ theme = "marcriera"
DefaultContentLanguage = "ca"
removePathAccents = true
[blackfriday]
fractions = false
[params]
name = "Marc Riera Irigoyen"
copyright = "Marc Riera Irigoyen"
logoimage = "images/logo.png"
description = "Translator and localizer"
description2 = "EN,RO > CA,ES"
[languages]
[languages.ca]
languageName = "Català"
weight = 1
description = "Traductor i localitzador"
[languages.es]
languageName = "Castellano"
weight = 2
description = "Traductor y localizador"
[languages.en]
languageName = "English"
weight = 3
description = "Translator and localiser"

View File

@ -1,4 +1,9 @@
---
menu:
main:
name: "Inici"
weight: 1
url: "/"
---
<center>

28
content/contacta.md Normal file
View File

@ -0,0 +1,28 @@
---
title: "Contacta"
menu:
main:
name: "Contacta"
weight: 6
url: "/contacta/"
---
<center>
Puc fer alguna cosa per tu? Contacta amb mi i parlem-ne, sense compromisos.
&nbsp;
<img src="/images/icon-mail.png" alt="E-mail:" height="32" width="32" style="vertical-align:middle"> <a href="mailto:contacte@mrtraduccions.cat"target="_blank">contacte@mrtraduccions.cat</a>
<img src="/images/icon-phone.png" alt="Phone:" height="32" width="32" style="vertical-align:middle"> (+34) 652 492 008
&nbsp;
<a href="/images/rutes/l3/1.png" target="_blank"></a>
<img src="/images/icon-twitter.png" alt="Twitter:" height="32" width="32" style="vertical-align:middle"> <a href="https://www.twitter.com/marcrierai"target="_blank">@marcrierai</a>
<img src="/images/icon-linkedin.png" alt="LinkedIn:" height="32" width="32" style="vertical-align:middle"> <a href="https://www.linkedin.com/in/marc-riera-irigoyen/"target="_blank">Marc Riera Irigoyen</a>
</center>

View File

@ -0,0 +1,14 @@
[menu]
other = "Menú"
[readMore]
other = "Llegeix més"
[newer]
other = "Més recent"
[older]
other = "Més antic"
[latestUpdates]
other = "Últimes actualitzacions"

View File

@ -0,0 +1,14 @@
[menu]
other = "Menu"
[readMore]
other = "Read more"
[newer]
other = "Newer"
[older]
other = "Older"
[latestUpdates]
other = "Latest updates"

View File

@ -0,0 +1,14 @@
[menu]
other = "Menú"
[readMore]
other = "Leer más"
[newer]
other = "Más reciente"
[older]
other = "Más antiguo"
[latestUpdates]
other = "Últimas actualizaciones"

View File

@ -0,0 +1,29 @@
{{ partial "header.html" . }}
<div id="content">
{{ range sort .Paginator.Pages }}
<div id="paginator-page">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="content">
{{ .Summary | plainify | safeHTML }}
...
<div id="paginator-page-footer">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "2006-01-02" }}</p>
{{ end }}
<div id="paginator-page-button">
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div>
</div>
</div>
</div>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,26 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,35 @@
{{ partial "header.html" . }}
{{ if ne (len .Content) 0 }}
<div id="content">
{{ .Content }}
</div>
{{ else }}
<div id="content">
{{ range sort .Paginator.Pages }}
<div id="paginator-page">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="content">
{{ .Summary | plainify | safeHTML }}
...
<div id="paginator-page-footer">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "2006-01-02" }}</p>
{{ end }}
<div id="paginator-page-button">
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div>
</div>
</div>
</div>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}
{{ partial "footer.html" . }}

View File

@ -0,0 +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>
{{ partial "footer.html" . }}

View File

@ -1,41 +1,5 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ .Site.Title }} - {{ .Site.Params.Description }}</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 }}
</head>
<body>
<div id="container">
<div id="header">
{{ if isset .Site.Params "logoimage" }}
<div id="site-logo">
<img alt="Site logo" src="{{ .Site.BaseURL }}{{ .Site.Params.logoimage }}">
</div>
{{ end }}
<div id="site-title">{{ .Site.Title }}</div>
<div id="site-slogan">{{ .Site.Params.Description }}</div>
<div id="site-slogan">{{ .Site.Params.Description2 }}</div>
</div>
{{ partial "header.html" . }}
<div id="content">
{{ .Content }}
</div>
<div id="footer">
{{ now.Year }} - {{ $.Site.Params.copyright }}
</div>
</div>
</body>
</html>
{{ partial "footer.html" . }}

View File

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

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<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 }}
</head>
<body>
<div id="container">
<div 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>
</div>
{{ 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 }}
<ul class="language-selector">
<li>
<a class="selected">{{ .Language.LanguageName }}</a>
</li>
{{ range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end}}
</ul>
{{ end }}
</div>
{{ 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>

View File

@ -0,0 +1,32 @@
<nav>
<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>
</div>
</nav>

View File

@ -0,0 +1,16 @@
{{ $pag := .Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
{{ if .Paginator.HasPrev }}
<li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">&larr; {{ i18n "newer" }}</a></li>
{{ else }}
<li class="previous-disabled">&larr; {{ i18n "newer" }}</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} &rarr;</a></li>
{{ else }}
<li class="next-disabled">{{ i18n "older" }} &rarr;</li>
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1,5 @@
<p class="tags">
Tags: {{ range . }}
<a href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a>
{{ end }}
</p>

View File

@ -107,6 +107,46 @@ hr {
/* Main menu */
nav {
clear: both;
text-align: right;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul.first > li {
display: block;
text-align: center;
}
nav ul li a {
display: block;
font-size: 90%;
}
/* Language selector */
.language-selector {
list-style-type: none;
font-size: 90%;
text-align: center;
}
.language-selector li {
display: inline;
margin: .5em;
text-align: center;
}
/* Main container */
#container {
@ -118,35 +158,28 @@ hr {
}
/* Header */
#header {
#header-left,
#header-right {
padding-top: 15px;
display: block;
float: none;
width: 100%;
text-align: center;
}
#site-logo {
max-width:100%;
max-height:100%;
display: block;
margin-left: 20px;
margin-right: 20px;
height: 100px;
width: 100px;
padding: 0 20px 15px 20px;
}
#site-title {
padding: 10px 20px 0 20px;
font-weight: 600;
font-size: 220%;
display: block;
float: none;
margin: auto;
}
#site-slogan {
padding: 0px 5px;
padding: 0 20px 10px 20px;
}
@ -165,9 +198,7 @@ hr {
#page-title {
padding: 10px 20px 10px 20px;
background: #3E3E3E;
border-top: 1px solid #444444;
border-bottom: 1px solid #444444;
background: #9E4B5A;
}
#page-title h1 {
@ -205,3 +236,186 @@ hr {
color: #CCCCCC;
}
@media (min-width: 780px) {
/* Main menu */
.burger-button {
display: none;
}
nav {
padding-right: 1.25em;
}
nav ul.first > li {
display: inline-block;
position: relative;
background: #9E4B5A;
padding: 10px 10px 10px 10px;
}
nav ul.second,
nav ul.third {
display: none;
position: absolute;
background: #000000;
width: 160px;
box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25);
}
nav ul.first li:hover ul.second,
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;
}
nav ul.third {
z-index: 3;
}
nav ul.second li {
position: relative;
}
nav ul.third {
left: 212px;
top: -1px;
}
/* Language selector */
.language-selector {
float: right;
margin-right: 30px;
}
/* Main container */
#container {
max-width: 1200px;
}
/* Header */
#header-left {
float: left;
width: 65%;
}
#header-right {
float: right;
width: 35%;
}
#site-logo {
float: left;
}
}
@media screen and (max-width: 779px) {
/* Main menu */
.burger-button {
display: block;
background: #3E3E3E;
font-size: 100%;
padding: 5px 20px 5px 20px;
margin-top: 20px;
cursor: pointer;
}
.burger-button:hover {
color: #DDDDDD;
background: #208DCC;
}
#menu-entries {
display: none;
}
.burger-toggle:checked ~ #menu-entries {
display: block;
}
.burger-toggle:checked ~ .burger-button {
color: #DDDDDD;
background: #208DCC;
}
nav {
text-align: center;
margin-bottom: 20px;
}
nav ul.first > li a,
nav ul.second > li a {
display: block;
padding: 5px 20px 5px 20px;
background: #3E3E3E;
}
nav ul.first > li a:hover,
nav ul.second > li a:hover {
color: #DDDDDD;
background: #208DCC;
}
nav ul.first {
margin-top: 0px;
}
nav ul.second > li a {
padding-left: 40px;
}
/* Language selector */
.language-selector {
float: none;
margin: auto;
padding: 0;
}
/* Header */
#header-left,
#header-right {
display: block;
float: none;
width: 100%;
text-align: center;
}
#site-logo,
#site-title {
display: block;
float: none;
margin: auto;
}
#site-title,
#site-slogan {
padding: 0px 5px;
}
}

View File

@ -1,3 +1,3 @@
name = "Marc Riera"
license = "GPL"
min_version = 0.18
license = "GPLv3"
min_version = 0.50