Varius HTML and CSS improvements

This commit is contained in:
Sivert V. Sæther 2022-08-18 13:41:11 +00:00
parent 753ac6ca40
commit 8d44db0550
8 changed files with 68 additions and 51 deletions

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,6 +1,3 @@
h1,h2,h3,h4,h5,h6 {
@extend %headings !optional;
}
body { body {
background-color: rgb(18, 20, 21); background-color: rgb(18, 20, 21);
@ -32,32 +29,44 @@ figure {
max-width: 90%; max-width: 90%;
} }
} }
a:hover %headings { a:hover .heading {
text-decoration: underline; text-decoration: underline;
color: cyan; color: cyan;
} }
a { a {
min-height: 48px;
min-width: 48px;
text-decoration: none; text-decoration: none;
color: cyan; color: cyan;
} }
a li { a article {
color: lime; color: lime;
} }
} }
ul.contents {
.heading {
font-size: 2rem;
margin: 0;
}
list-style-image: url(data:0);
list-style-type: none;
padding: 0;
}
#navbar { #navbar {
background-color: #222; background-color: #222;
li a:hover {
background-color: #333;
}
.link-group li {
float: right;
}
li {
display: inline;
float: left;
}
ul { ul {
li#right {
float: right;
}
li {
a:hover {
background-color: #333;
}
display: inline;
float: left;
}
list-style-type: none; list-style-type: none;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;

View File

@ -1,13 +1,27 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang='en'> <html lang='{{ .Language.Lang }}'>
<head> <head>
<meta charset='UTF-8'> <meta charset='UTF-8'>
<meta name='robots' content='index,follow'> <meta name='robots' content='index,follow'>
{{ with resources.Get "favicon.ico" | resources.Fingerprint }} {{ if isset .Params "title" }}
<link rel='icon' href='{{ .RelPermalink }}' integrity='{{ .Data.Integrity }}' /> <title>{{ site.Title }} - {{ .Title }}</title>
{{ else }}
<title>{{ site.Title }}</title>
{{ end }} {{ end }}
{{ if .Description }}
<meta name='description' content='{{ .Description }}'>
{{ end }}
{{ with resources.Get "favicon.png" }}
{{ with . | fingerprint }}
<link rel='icon' href='{{ .RelPermalink }}' integrity='{{ .Data.Integrity }}' />
{{ end }}
{{ with .Resize "192x192 png" | fingerprint }}
<link rel="apple-touch-icon" href="{{ .RelPermalink }}" integrity='{{ .Data.Integrity }}' />
{{ end }}
{{ end }}
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
<meta name="theme-color" content="#00FF00" />
{{ block "meta" . }} {{ block "meta" . }}
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
{{ end }} {{ end }}
<meta name='twitter:card' content='summary'> <meta name='twitter:card' content='summary'>
<meta property='og:title' content='{{ site.Title }}' /> <meta property='og:title' content='{{ site.Title }}' />
@ -19,14 +33,6 @@
{{ printf `<link rel='%s' type='%s' href='%s' title='%s' />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel='%s' type='%s' href='%s' title='%s' />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}} {{ end -}}
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css' crossorigin='anonymous'> <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css' crossorigin='anonymous'>
{{ if isset .Params "title" }}
<title>{{ site.Title }} - {{ .Title }}</title>
{{ else }}
<title>{{ site.Title }}</title>
{{ end }}
{{ if .Description }}
<meta name='description' content='{{ .Description }}'>
{{ end }}
{{ block "head" . }}{{ end }} {{ block "head" . }}{{ end }}
{{ if .Param "chroma" }} {{ if .Param "chroma" }}
{{ with resources.Get "chroma.scss" | toCSS | minify | fingerprint | resources.PostProcess }} {{ with resources.Get "chroma.scss" | toCSS | minify | fingerprint | resources.PostProcess }}

View File

@ -9,8 +9,9 @@
<h3>Posts</h3> <h3>Posts</h3>
<ul class='contents'> <ul class='contents'>
{{ range .Pages }} {{ range .Pages }}
<br /> <li><a href='{{ .RelPermalink }}'>
<a href='{{ .RelPermalink }}'><li>{{ partial "summary.html" . }}</li></a> {{ partial "summary.html" . }}
</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}

View File

@ -6,10 +6,9 @@
{{ .Content }} {{ .Content }}
<ul class='contents'> <ul class='contents'>
{{ range .Pages }} {{ range .Pages }}
<br /> <li><a href='{{ .RelPermalink }}'>
<a href='{{ .RelPermalink }}'> {{ partial "summary.html" . }}
<li>{{ partial "summary.html" . }}</li> </a></li>
</a>
{{ end }} {{ end }}
</ul> </ul>
</article> </article>

View File

@ -3,13 +3,15 @@
<li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'> <li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'>
<a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a> <a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a>
</li> </li>
<ul class='sub-menu'> <li>
{{ range .Children }} <ul class='sub-menu'>
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'> {{ range .Children }}
<a href='{{ .URL }}'>{{ .Name }}</a> <li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
</li> <a href='{{ .URL }}'>{{ .Name }}</a>
{{ end }} </li>
</ul> {{ end }}
</ul>
</li>
{{ else }} {{ else }}
<li> <li>
<a href='{{ .URL }}'> <a href='{{ .URL }}'>

View File

@ -8,7 +8,8 @@
{{ range .Site.Menus.left }} {{ range .Site.Menus.left }}
{{ partial "menu" . }} {{ partial "menu" . }}
{{ end }} {{ end }}
<div class='link-group'> <li id='right'>
<ul>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ partial "menu" . }} {{ partial "menu" . }}
{{ end }} {{ end }}
@ -16,6 +17,7 @@
<img class='icons' src='/search-icon.svg'> <img class='icons' src='/search-icon.svg'>
</a> </a>
</li> --> </li> -->
</div> </ul>
</li>
</ul> </ul>
</nav> </nav>

View File

@ -1,13 +1,11 @@
{{- $pubdate := .PublishDate.Format "02/01/2006" }} {{- $pubdate := .PublishDate.Format "02/01/2006" }}
{{- $lastmod := .Lastmod.Format "02/01/2006" }} {{- $lastmod := .Lastmod.Format "02/01/2006" }}
<article> <article>
<div> <p class="heading">{{ .Title }}</p>
<h3>{{ .Title }}</h3> {{ i18n "published" }} {{ $pubdate }}
{{ i18n "published" }} {{ $pubdate }} {{ if ne $pubdate $lastmod }}
{{ if ne $pubdate $lastmod }} {{ i18n "modified" }} {{ $lastmod }}
{{ i18n "modified" }} {{ $lastmod }} {{ end }}<br />
{{ end }}<br /> {{ .Summary }}
{{ .Summary }} {{ if .Truncated }}{{ i18n "readMore" }}...{{ end }}
{{ if .Truncated }}{{ i18n "readMore" }}...{{ end }}
</div>
</article> </article>