forked from website/openpower.foundation
change to relative links
Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>jamesk-patch-20
parent
966d86dffa
commit
2cc67a4542
@ -1,30 +1,27 @@
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<main class="main">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h2 section-header my-3 my-md-5 pb-2">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ if .Param "image" }}
|
||||
<div class="col-md-6 pt-5 pl-3 pr-0">
|
||||
{{ $imagefilename := .Param "image.file" }}
|
||||
{{ $imagesize := .Param "image.size" }}
|
||||
{{ $imagelocation := printf "%s/%s" "images" $imagefilename }}
|
||||
{{ $imageresource := resources.Get $imagelocation }}
|
||||
{{ if $imageresource }}
|
||||
{{ $imagefile := $imageresource.Fit "600x600" }}
|
||||
<figure class="figure d-flex pt-3">
|
||||
<img src="{{ $imagefile.RelPermalink }}">
|
||||
</figure>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<main class="main">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h2 section-header my-3 my-md-5 pb-2">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ if .Param "image" }}
|
||||
<div class="col-md-6 pt-5 pl-3 pr-0">
|
||||
{{ $imagefilename := .Param "image.file" }}
|
||||
{{ $imagesize := .Param "image.size" }}
|
||||
{{ $imagelocation := printf "%s/%s" "images" $imagefilename }}
|
||||
{{ $imageresource := resources.Get $imagelocation }}
|
||||
{{ if $imageresource }}
|
||||
{{ $imagefile := $imageresource.Fit "600x600" }}
|
||||
<figure class="figure d-flex pt-3">
|
||||
<img src="{{ $imagefile.RelPermalink }}">
|
||||
</figure>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"title": "{{ .Title }}",
|
||||
"permalink": "{{ .Permalink }}",
|
||||
"permalink": "{{ .RelPermalink }}",
|
||||
"content": "{{ .PlainWords }}"
|
||||
}
|
||||
|
@ -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 -}}
|
||||
|
@ -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 -}}
|
||||
|
@ -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 -}}
|
||||
|
@ -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 -}}
|
||||
|
Loading…
Reference in New Issue