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] [older]
other = "Més antic" other = "Més antic"
[latestUpdates]
other = "Últimes actualitzacions"

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ .Content }} {{ partial "content.html" . }}
{{ partial "recentnews.html" . }}
{{ partial "footer.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"> <div id="footer">
{{ now.Year }} - {{ $.Site.Params.copyright }} {{ now.Year }} - {{ $.Site.Params.copyright }}
</div> </div>

View File

@ -58,5 +58,3 @@
<div id="page-title"> <div id="page-title">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
</div> </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 */ /* Basic theme elements */
@ -49,12 +49,13 @@ h6 {
a { a {
text-decoration: none; text-decoration: none;
font-weight: 600;
} }
a:link, a:link,
a:active, a:active,
a:visited { a:visited {
color: #BBBBBB; color: #CCCCCC;
} }
a:hover, a:hover,
@ -62,13 +63,6 @@ a.selected {
color: #208DCC; color: #208DCC;
} }
p a:link,
p a:active,
p a:visited,
p a:hover {
color: #208DCC;
}
/* Images */ /* Images */
@ -167,17 +161,6 @@ nav ul li a {
font-size: 90%; font-size: 90%;
} }
nav a:link,
nav a:active,
nav a:visited {
color: #BBBBBB;
}
nav a:hover,
nav a.selected {
color: #208DCC;
}
/* Language selector */ /* Language selector */
@ -262,8 +245,8 @@ nav a.selected {
text-align: justify; text-align: justify;
} }
#content .timestamp, .timestamp,
#content .tags { .tags {
color: #777; 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) { @media (min-width: 780px) {