From 2cc67a4542cf998932c662163cf677b9fe18de9c Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Fri, 11 Feb 2022 16:07:45 +0100 Subject: [PATCH] change to relative links Signed-off-by: Toshaan Bharvani --- .../layouts/_default/list.html | 11 +---- .../layouts/_default/rss.xml | 6 +-- .../layouts/_default/single.html | 49 +++++++++---------- .../layouts/_default/single.json | 2 +- .../layouts/blog/list.html | 2 +- .../openpowerfoundation/layouts/blog/rss.xml | 8 +-- .../layouts/boardofdirectors/list.html | 2 +- .../layouts/compliance/list.html | 2 +- .../layouts/compliance/list.json | 2 +- .../layouts/compliance/single.html | 4 +- .../layouts/events/list.html | 2 +- .../layouts/groups/list.html | 2 +- .../openpowerfoundation/layouts/hub/list.html | 2 +- .../layouts/hub/single.html | 2 +- .../layouts/members/list.json | 2 +- .../layouts/members/list.xml | 8 +-- .../layouts/members/single.json | 2 +- .../layouts/partials/contactform.html | 2 +- .../layouts/partials/discourse.html | 2 +- .../layouts/partials/intro.html | 2 +- .../layouts/partials/navbar.html | 6 +-- .../layouts/ready/list.html | 2 +- .../layouts/ready/list.json | 2 +- .../layouts/resources/list.html | 2 +- .../layouts/resources/list.json | 2 +- .../layouts/specifications/list.html | 2 +- .../layouts/specifications/list.json | 2 +- .../layouts/specifications/single.html | 4 +- .../layouts/steeringcommittee/list.html | 4 +- 29 files changed, 64 insertions(+), 76 deletions(-) diff --git a/themes/openpowerfoundation/layouts/_default/list.html b/themes/openpowerfoundation/layouts/_default/list.html index 2a39e4a..0066b3f 100644 --- a/themes/openpowerfoundation/layouts/_default/list.html +++ b/themes/openpowerfoundation/layouts/_default/list.html @@ -1,18 +1,13 @@ {{ partial "header.html" . }} - {{ partial "navbar.html" . }} -
-
-

{{ .Title }}

- {{ if .Content }}
 
@@ -22,7 +17,6 @@
 
{{ end }} -
 
@@ -40,7 +34,7 @@ {{ end }} {{ end }} {{ range .Data.Pages }} -
  • {{ .Title }}
  • +
  • {{ .Title }}
  • {{ end }}
    @@ -48,11 +42,8 @@
    -
    - {{ if .Param "calltoaction" }} {{ partial "calltoaction.html" . }} {{ end }} - {{ partial "footer.html" . }} diff --git a/themes/openpowerfoundation/layouts/_default/rss.xml b/themes/openpowerfoundation/layouts/_default/rss.xml index e49c966..7196a6e 100644 --- a/themes/openpowerfoundation/layouts/_default/rss.xml +++ b/themes/openpowerfoundation/layouts/_default/rss.xml @@ -14,7 +14,7 @@ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} + {{ .RelPermalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} @@ -28,10 +28,10 @@ {{ range $pages }} {{ .Title }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Content | html }} {{ end }} diff --git a/themes/openpowerfoundation/layouts/_default/single.html b/themes/openpowerfoundation/layouts/_default/single.html index cfcfce6..d10f1a8 100644 --- a/themes/openpowerfoundation/layouts/_default/single.html +++ b/themes/openpowerfoundation/layouts/_default/single.html @@ -1,30 +1,27 @@ {{ partial "header.html" . }} - {{ partial "navbar.html" . }} - -
    -
    -
    -
    -

    {{ .Title }}

    - {{ .Content }} -
    - {{ if .Param "image" }} -
    - {{ $imagefilename := .Param "image.file" }} - {{ $imagesize := .Param "image.size" }} - {{ $imagelocation := printf "%s/%s" "images" $imagefilename }} - {{ $imageresource := resources.Get $imagelocation }} - {{ if $imageresource }} - {{ $imagefile := $imageresource.Fit "600x600" }} -
    - -
    - {{ end }} -
    - {{ end }} -
    +
    +
    +
    +
    +

    {{ .Title }}

    + {{ .Content }}
    -
    - + {{ if .Param "image" }} +
    + {{ $imagefilename := .Param "image.file" }} + {{ $imagesize := .Param "image.size" }} + {{ $imagelocation := printf "%s/%s" "images" $imagefilename }} + {{ $imageresource := resources.Get $imagelocation }} + {{ if $imageresource }} + {{ $imagefile := $imageresource.Fit "600x600" }} +
    + +
    + {{ end }} +
    + {{ end }} +
    + +
    {{ partial "footer.html" . }} diff --git a/themes/openpowerfoundation/layouts/_default/single.json b/themes/openpowerfoundation/layouts/_default/single.json index 0bcd530..0658436 100644 --- a/themes/openpowerfoundation/layouts/_default/single.json +++ b/themes/openpowerfoundation/layouts/_default/single.json @@ -1,5 +1,5 @@ { "title": "{{ .Title }}", -"permalink": "{{ .Permalink }}", +"permalink": "{{ .RelPermalink }}", "content": "{{ .PlainWords }}" } diff --git a/themes/openpowerfoundation/layouts/blog/list.html b/themes/openpowerfoundation/layouts/blog/list.html index 606e428..644bba1 100644 --- a/themes/openpowerfoundation/layouts/blog/list.html +++ b/themes/openpowerfoundation/layouts/blog/list.html @@ -27,7 +27,7 @@ {{ .Title }} {{ end }} - + {{ .Title }}
    Published on {{ .Date.Format "Monday 2 January 2006" }} diff --git a/themes/openpowerfoundation/layouts/blog/rss.xml b/themes/openpowerfoundation/layouts/blog/rss.xml index cc8c7a5..d3439bf 100644 --- a/themes/openpowerfoundation/layouts/blog/rss.xml +++ b/themes/openpowerfoundation/layouts/blog/rss.xml @@ -14,7 +14,7 @@ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} + {{ .RelPermalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} @@ -23,15 +23,15 @@ {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} - {{ printf "" .Permalink .MediaType | safeHTML }} + {{ printf "" .RelPermalink .MediaType | safeHTML }} {{- end -}} {{ range $pages }} {{ .Title }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Content | safeHTML }} {{ end }} diff --git a/themes/openpowerfoundation/layouts/boardofdirectors/list.html b/themes/openpowerfoundation/layouts/boardofdirectors/list.html index 2084ed1..08238d6 100644 --- a/themes/openpowerfoundation/layouts/boardofdirectors/list.html +++ b/themes/openpowerfoundation/layouts/boardofdirectors/list.html @@ -26,7 +26,7 @@ {{ with $.Site.GetPage $personfile }} {{ $memberfile := printf "%s/%s" "members" (.Param "member") }} {{ with $.Site.GetPage $memberfile }} -

    {{ .Title }}

    +

    {{ .Title }}

    {{ end }}

    {{ .Content }}

    {{ end }} diff --git a/themes/openpowerfoundation/layouts/compliance/list.html b/themes/openpowerfoundation/layouts/compliance/list.html index c6605fe..2cd1d75 100644 --- a/themes/openpowerfoundation/layouts/compliance/list.html +++ b/themes/openpowerfoundation/layouts/compliance/list.html @@ -45,7 +45,7 @@
    {{ range (.Paginate .Data.Pages.ByTitle 30).Pages }} {{ end }}
    diff --git a/themes/openpowerfoundation/layouts/compliance/list.json b/themes/openpowerfoundation/layouts/compliance/list.json index c4c2fcc..15339aa 100644 --- a/themes/openpowerfoundation/layouts/compliance/list.json +++ b/themes/openpowerfoundation/layouts/compliance/list.json @@ -1,5 +1,5 @@ {{- $.Scratch.Add "index" slice -}} {{- range .Data.Pages -}} - {{- $.Scratch.Add "index" (dict "title" .Title "permalink" .Permalink "contents" .Plain "tags" .Params.tags) }} + {{- $.Scratch.Add "index" (dict "title" .Title "permalink" .RelPermalink "contents" .Plain "tags" .Params.tags) }} {{- end -}} {{- $.Scratch.Get "index" | jsonify -}} diff --git a/themes/openpowerfoundation/layouts/compliance/single.html b/themes/openpowerfoundation/layouts/compliance/single.html index ef0dbc9..cdcb8c3 100644 --- a/themes/openpowerfoundation/layouts/compliance/single.html +++ b/themes/openpowerfoundation/layouts/compliance/single.html @@ -43,11 +43,11 @@ {{ if .Param "group" }} {{ $group := printf "%s/%s" "groups" (.Param "group") }} {{ with $.Site.GetPage $group }} - Owned by : {{ .Title }}
    + Owned by : {{ .Title }}
    {{ end }} {{ end }} {{ with $.Site.GetPage $specificationfile }} - Specification File : {{ $filename }}
    + Specification File : {{ $filename }}
    {{ end }} {{ if $datafile.versions }}