change link to css to relative (#3)

* change link to css to relative

* change further site navigation links to relative links and site variables
This commit is contained in:
Alexander O 2020-10-14 21:24:44 +02:00 committed by GitHub
parent 5ef28a4864
commit 65d2bef432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,7 @@
<div class="links"> <div class="links">
<a href="/">Home</a> <a href="{{.Site.BaseURL}}">Home</a>
{{ range first 1 (where .Site.Pages "Type" "post") }} {{ range first 1 (where .Site.Pages "Type" "post") }}
<a href="/post/">Archive</a> <a href="{{"/post/" | relURL}}">Archive</a>
{{ end }} {{ end }}
{{ range where .Site.Pages "Section" "pages" }} {{ range where .Site.Pages "Section" "pages" }}
{{ if .IsPage }} {{ if .IsPage }}

View file

@ -5,16 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{{ .Title }} &middot; {{ .Site.Title }}</title> <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
<link rel="stylesheet" type="text/css" href="/css/main.css" /> <link rel="stylesheet" type="text/css" href="{{ "css/main.css" | relURL}}">
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
{{ 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 -}}
{{ partial "head.html" . }} {{ partial "head.html" . }}
</head> </head>
<body> <body>
<a id="title" href="/" title="{{ .Site.Title }}"> <a id="title" href="{{.Site.BaseURL}}" title="{{ .Site.Title }}">
{{ if .Site.Params.logo }} {{ if .Site.Params.logo }}
<img id="logo" alt="Logo" src="{{ .Site.Params.logo }}" /> <img id="logo" alt="Logo" src="{{ .Site.Params.logo | relURL}}" />
{{ end }} {{ end }}
{{ if .Site.Title }} {{ if .Site.Title }}
<h1>{{ .Site.Title }}</h1> <h1>{{ .Site.Title }}</h1>
@ -27,39 +27,39 @@
{{ $icon_size := "64px" }} {{ $icon_size := "64px" }}
{{ if .Site.Params.email }} {{ if .Site.Params.email }}
<a href="mailto:{{ .Site.Params.email }}" title="Email"> <a href="mailto:{{ .Site.Params.email }}" title="Email">
<img alt="Email" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/email.svg" /> <img alt="Email" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ "/images/email.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
{{ if .Site.Params.github }} {{ if .Site.Params.github }}
<a href="https://github.com/{{ .Site.Params.github }}" title="Github"> <a href="https://github.com/{{ .Site.Params.github }}" title="Github">
<img alt="GitHub" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/github.svg" /> <img alt="GitHub" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{ "/images/github.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
{{ if .Site.Params.facebook }} {{ if .Site.Params.facebook }}
<a href="https://facebook.com/{{ .Site.Params.facebook }}" title="Facebook"> <a href="https://facebook.com/{{ .Site.Params.facebook }}" title="Facebook">
<img alt="Facebook" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/facebook.svg" /> <img alt="Facebook" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{"/images/facebook.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
{{ if .Site.Params.twitter }} {{ if .Site.Params.twitter }}
<a href="https://twitter.com/{{ .Site.Params.twitter }}" title="Twitter"> <a href="https://twitter.com/{{ .Site.Params.twitter }}" title="Twitter">
<img alt="Twitter" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/twitter.svg" /> <img alt="Twitter" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{"/images/twitter.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
{{ if .Site.Params.linkedin }} {{ if .Site.Params.linkedin }}
<a href="https://linkedin.com/in/{{ .Site.Params.linkedin }}" title="LinkedIn"> <a href="https://linkedin.com/in/{{ .Site.Params.linkedin }}" title="LinkedIn">
<img alt="LinkedIn" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/linkedin.svg" /> <img alt="LinkedIn" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{"/images/linkedin.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
{{ if .Site.Params.youtube }} {{ if .Site.Params.youtube }}
<a href="https://youtube.com/user/{{ .Site.Params.youtube }}" title="Youtube"> <a href="https://youtube.com/user/{{ .Site.Params.youtube }}" title="Youtube">
<img alt="Youtube" height="{{ $icon_size }}" width="{{ $icon_size }}" src="/images/youtube.svg" /> <img alt="Youtube" height="{{ $icon_size }}" width="{{ $icon_size }}" src="{{"/images/youtube.svg" | relURL}}" />
</a> </a>
{{ end }} {{ end }}
</div> </div>
<div class="links"> <div class="links">
<a href="/">Home</a> <a href="{{.Site.BaseURL}}">Home</a>
{{ range first 1 (where .Site.Pages "Type" "post") }} {{ range first 1 (where .Site.Pages "Type" "post") }}
<a href="/post/">Archive</a> <a href="{{"/post/" | relURL}}">Archive</a>
{{ end }} {{ end }}
{{ range (where .Site.Pages "Section" "pages") }} {{ range (where .Site.Pages "Section" "pages") }}
{{ if .IsPage }} {{ if .IsPage }}