Compare commits

..

3 Commits

Author SHA1 Message Date
Marc Riera Irigoyen beaec35dcc Theme improvements 2019-05-06 00:28:03 +02:00
Marc Riera 0fb743dcb9 Create sections and improve menu appearance 2019-03-24 21:01:46 +01:00
Marc Riera Irigoyen 920d0ef3ac Begin overhaul 2019-03-21 00:00:20 +01:00
36 changed files with 636 additions and 136 deletions

View File

@ -1,36 +0,0 @@
name: publish
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
env:
SSH_PRIVATE_KEY: ${{ secrets.PUBLISHER_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.PUBLISHER_HOST }}
SSH_PORT: ${{ secrets.PUBLISHER_PORT }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # all history for all branches and tags\
- name: Install Hugo
run: |
apt update && apt install -y hugo
- name: Build
run: |
hugo --minify
- name: Deploy
run: |
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | ssh-add -
apt update && apt install -y rsync
mkdir ~/.ssh
ssh-keyscan -p $SSH_PORT $SSH_HOST > ~/.ssh/known_hosts
rsync -atv --progress --delete -e "ssh -p $SSH_PORT" ./public/ publisher@$SSH_HOST:/usr/share/nginx/html/

1
.gitignore vendored
View File

@ -1 +0,0 @@
public

View File

@ -1,19 +1,29 @@
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
enableRobotsTXT = true
disableKinds = ["taxonomy", "taxonomyTerm"] [blackfriday]
fractions = false
[params] [params]
name = "Marc Riera Irigoyen" name = "Marc Riera Irigoyen"
copyright = "Marc Riera Irigoyen" copyright = "Marc Riera Irigoyen"
logoimage = "images/logo.png" logoimage = "images/logo.png"
description = "Translator and localizer"
description2 = "EN,RO > CA,ES"
[markup] [languages]
[markup.goldmark] [languages.ca]
[markup.goldmark.renderer] languageName = "Català"
unsafe = true weight = 1
description = "Traducció i localització"
[languages.es]
languageName = "Castellano"
weight = 2
description = "Traducción y localización"
[languages.en]
languageName = "English"
weight = 3
description = "Translation and localisation"

9
content/_index.ca.md Normal file
View File

@ -0,0 +1,9 @@
---
menu:
main:
name: "Inici"
weight: 1
url: "/"
---
Hola, em dic Marc i sóc traductor professional.

7
content/_index.en.md Normal file
View File

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

7
content/_index.es.md Normal file
View File

@ -0,0 +1,7 @@
---
menu:
main:
name: "Inicio"
weight: 1
url: "/"
---

View File

@ -1,14 +0,0 @@
---
---
**Contact:**
![E-mail](/images/icon-mail.png) [contacte@mrtraduccions.cat](mailto:contacte@mrtraduccions.cat)
![Phone:](/images/icon-phone.png) (+34) 652 492 008
 
![Twitter:](/images/icon-twitter.png) [@marcrierai](https://www.twitter.com/marcrierai)
![LinkedIn:](/images/icon-linkedin.png) [Marc Riera Irigoyen](https://www.linkedin.com/in/marc-riera-irigoyen/)

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

@ -0,0 +1,28 @@
---
title: "Marc Riera"
menu:
main:
name: "Marc Riera"
weight: 6
url: "/marcriera/"
---
<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,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 +0,0 @@
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" height="32" width="32" style="vertical-align:middle">

View File

@ -1 +0,0 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>

View File

@ -1,2 +0,0 @@
User-agent: *
Disallow: /files

Binary file not shown.

Binary file not shown.

Binary file not shown.

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" . }}
<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,44 +1,5 @@
<!DOCTYPE html> {{ partial "header.html" . }}
<html> <main>
<head> {{ .Content }}
<meta charset="UTF-8"> </main>
<title>{{ .Site.Title }} - {{ .Site.Params.Description }}</title> {{ partial "footer.html" . }}
<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>
<div id="content">
<center>
{{ .Content }}
</center>
</div>
<div id="footer">
{{ now.Year }} - {{ $.Site.Params.copyright }}
</div>
</div>
</body>
</html>

View File

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

View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<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 }}
</head>
<body>
<div id="container">
<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>
</div>
{{- end }}
<div id="site-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
<div id="site-slogan">{{ .Site.Params.Description }}</div>
</header>
<header 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 }}
</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>

View File

@ -0,0 +1,36 @@
<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

@ -72,7 +72,7 @@ a:visited {
a:hover, a:hover,
a.selected { a.selected {
color: #BBBBBB; color: #4C454F;
} }
@ -107,6 +107,60 @@ hr {
/* Main menu */
nav {
clear: both;
text-align: right;
}
nav ul {
list-style-type: none;
padding: 0;
margin-bottom: 0px;
left: 0;
}
nav ul.first > li {
display: block;
text-align: center;
}
nav ul li a {
display: block;
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 {
list-style-type: none;
font-size: 90%;
text-align: center;
}
.language-selector li {
display: inline;
margin: .5em;
text-align: center;
}
/* Main container */ /* Main container */
#container { #container {
@ -118,42 +172,35 @@ hr {
} }
/* Header */ /* Header */
#header { #header-left,
#header-right {
padding-top: 15px; padding-top: 15px;
display: block;
float: none;
width: 100%;
text-align: center;
} }
#site-logo { #site-logo {
max-width:100%; height: 100px;
max-height:100%; width: 100px;
display: block; padding: 0 20px 15px 20px;
margin-left: 20px;
margin-right: 20px;
} }
#site-title { #site-title {
padding: 10px 20px 0 20px; padding: 10px 20px 0 20px;
font-weight: 600; font-weight: 600;
font-size: 220%; font-size: 220%;
display: block;
float: none;
margin: auto;
} }
#site-slogan { #site-slogan {
padding: 0px 5px; padding: 0 20px 10px 20px;
} }
/* Footer */ /* Footer */
#footer { footer {
text-align: center; text-align: center;
padding: 10px 20px 10px 20px; padding: 10px 20px 10px 20px;
clear: both; clear: both;
@ -165,9 +212,7 @@ hr {
#page-title { #page-title {
padding: 10px 20px 10px 20px; padding: 10px 20px 10px 20px;
background: #3E3E3E; background: #9E4B5A;
border-top: 1px solid #444444;
border-bottom: 1px solid #444444;
} }
#page-title h1 { #page-title h1 {
@ -178,7 +223,7 @@ hr {
/* 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;
@ -190,18 +235,189 @@ hr {
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;
} }
@media (min-width: 780px) {
/* Main menu */
.burger-button {
display: none;
}
nav {
padding-right: 1.25em;
}
nav ul li a {
width: 140px;
}
nav ul.first > li {
display: inline-block;
position: relative;
}
nav ul.second,
nav ul.third {
top: 40px;
display: none;
position: absolute;
background: #5C353F;
}
nav ul.first li:hover ul.second,
nav ul.second li:hover ul.third {
display: block;
}
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: #7C454F;
font-size: 100%;
padding: 5px 20px 5px 20px;
margin-top: 20px;
cursor: pointer;
}
.burger-button:hover {
color: #DDDDDD;
background: #9E4B5A;
}
#menu-entries {
display: none;
}
.burger-toggle:checked ~ #menu-entries {
display: block;
}
.burger-toggle:checked ~ .burger-button {
color: #DDDDDD;
background: #9E4B5A;
}
nav {
text-align: center;
margin-bottom: 20px;
}
nav ul.first {
margin-top: 0px;
}
nav ul.second > li a {
padding-left: 40px;
}
nav ul a {
text-align: left;
}
/* 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" name = "Marc Riera"
license = "GPL" license = "GPLv3"
min_version = 0.18 min_version = 0.50