Improve readability, add recent news to home page

master
Marc Riera Irigoyen 2018-04-07 14:37:10 +02:00
parent 9559d86d48
commit 2732deaa79
11 changed files with 60 additions and 35 deletions

View File

@ -9,3 +9,6 @@ other = "Més recent"
[older]
other = "Més antic"
[latestUpdates]
other = "Últimes actualitzacions"

View File

@ -9,3 +9,6 @@ other = "Newer"
[older]
other = "Older"
[latestUpdates]
other = "Latest updates"

View File

@ -9,3 +9,6 @@ other = "Más reciente"
[older]
other = "Más antiguo"
[latestUpdates]
other = "Últimas actualizaciones"

View File

@ -1,5 +1,7 @@
{{ partial "header.html" . }}
<div id="content">
{{ range sort .Paginator.Pages }}
<div id="paginator-page">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
@ -8,7 +10,7 @@
...
<div id="paginator-page-footer">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
<p class="timestamp">{{ .Date.Format "2006-01-02" }}</p>
{{ end }}
<div id="paginator-page-button">
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
@ -22,4 +24,6 @@
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ partial "footer.html" . }}

View File

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

View File

@ -1,3 +1,4 @@
{{ partial "header.html" . }}
{{ .Content }}
{{ partial "content.html" . }}
{{ partial "recentnews.html" . }}
{{ partial "footer.html" . }}

View File

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

View File

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

View File

@ -58,5 +58,3 @@
<div id="page-title">
<h1>{{ .Title }}</h1>
</div>
<div id="content">

View File

@ -0,0 +1,15 @@
{{ $recentupdatessection := .Site.Params.recentupdates | default "blog"}}
{{ with .Site.GetPage "section" $recentupdatessection }}
<div id="recent-updates">
<h2>{{ i18n "latestUpdates" }}</h2>
{{ range (first 3 (where .Pages "Section" $recentupdatessection)) }}
<p class="timestamp">{{ .Date.Format "2006-01-02" }} <a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
</div>
{{ end }}

View File

@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,500,500i,600,600i,700,700i');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,600i,700,700i');
/* Basic theme elements */
@ -49,12 +49,13 @@ h6 {
a {
text-decoration: none;
font-weight: 600;
}
a:link,
a:active,
a:visited {
color: #BBBBBB;
color: #CCCCCC;
}
a:hover,
@ -62,13 +63,6 @@ a.selected {
color: #208DCC;
}
p a:link,
p a:active,
p a:visited,
p a:hover {
color: #208DCC;
}
/* Images */
@ -167,17 +161,6 @@ nav ul li a {
font-size: 90%;
}
nav a:link,
nav a:active,
nav a:visited {
color: #BBBBBB;
}
nav a:hover,
nav a.selected {
color: #208DCC;
}
/* Language selector */
@ -262,8 +245,8 @@ nav a.selected {
text-align: justify;
}
#content .timestamp,
#content .tags {
.timestamp,
.tags {
color: #777;
}
@ -331,6 +314,14 @@ nav a.selected {
}
/* Home page: latest updates */
#recent-updates {
padding: 0px 20px 10px 20px;
text-align: justify;
}
@media (min-width: 780px) {