General improvements

master
Marc Riera Irigoyen 2020-06-30 23:09:07 +02:00
parent 2af206caf9
commit e17269bc14
5 changed files with 74 additions and 84 deletions

View File

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

View File

@ -1,61 +1,48 @@
<!DOCTYPE html>
<html>
<html lang="{{ .Language }}">
<head>
<meta charset="UTF-8">
<title>{{ .Title }} - {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/kozmo-dark.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}{{ .Site.Params.custom_css }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0">
{{ hugo.Generator }}
{{ hugo.Generator -}}
{{ if isset .Site.Params "mathjax"}}
<script type="text/javascript" src="{{ .Site.Params.mathjax }}">
</script>
{{ end }}
</head>
<body>
<div id="container">
<div id="header-left">
{{ if isset .Site.Params "logoimage" }}
{{ 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 }}
{{ 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 }}
{{- if .IsTranslated }}
<ul class="language-selector">
<li>
<a class="selected">{{ .Language.LanguageName }}</a>
</li>
{{ range .Translations }}
{{- range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end}}
{{- end }}
</ul>
{{ end }}
{{- end }}
</div>
{{ partial "menu.html" . }}
{{ if isset .Params "image"}}
{{ partial "menu.html" . -}}
{{- if isset .Params "image" }}
<div id="featured-image">
<img alt="Featured image" src="{{ .Params.image }}">
</div>
{{end}}
{{- end }}
<div id="page-title">
<h1>{{ .Title }}</h1>
</div>

View File

@ -3,30 +3,34 @@
<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>
{{- $currentPage := . }}
{{- range .Site.Menus.main }}
{{- if false }}
<li>
<a class="selected">{{ .Name }}</a>
{{ else }}
<li><a href="{{.URL}}">{{ .Name }}</a>
{{ end }}
{{ if .HasChildren }}
<li>
<a href="{{.URL}}">{{ .Name }}</a>
{{- end }}
{{- if .HasChildren }}
<ul class="second">
{{ range .Children }}
<li><a href="{{.URL}}">{{ .Name }}</a>
{{ if .HasChildren }}
{{- range .Children }}
<li>
<a href="{{.URL}}">{{ .Name }}</a>
{{- if .HasChildren }}
<ul class="third">
{{ range .Children }}
<li><a href="{{.URL}}">{{ .Name }}</a></li>
{{ end }}
{{- range .Children }}
<li>
<a href="{{.URL}}">{{ .Name }}</a></li>
{{- end }}
</ul>
{{ end }}
{{- end }}
</li>
{{ end }}
{{- end }}
</ul>
{{ end }}
{{- end }}
</li>
{{ end }}
{{- end }}
</ul>
</div>
</nav>

View File

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

View File

@ -257,6 +257,11 @@ nav ul li a {
padding: 10px 20px 10px 20px;
margin-bottom: 20px;
text-align: justify;
overflow-wrap: break-word;
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
.timestamp,