forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
e56801c564
commit
539640320a
|
@ -7,19 +7,44 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<div id="articledata">
|
||||
{{- if ne .Section .Site.Params.hiddenfolder -}}
|
||||
{{- if .Resources.ByType "image" -}}
|
||||
<div id="articleimage">
|
||||
{{- $pic := index (.Resources.ByType "image") 0 -}}
|
||||
|
||||
<article>
|
||||
<div id="articlecontent">
|
||||
{{ partial "structure/article_meta" (dict "context" . "visible" "all") }}
|
||||
{{ $small := "solo" }}
|
||||
{{ $big := "solo" }}
|
||||
{{ $placeholder := "/images/placeholder_article.jpg" }}
|
||||
{{ $img := resources.Get $placeholder }}
|
||||
{{- if or (.Resources.ByType "image") (.Content) ($img) -}}
|
||||
{{ $small = "multiple_small" }}
|
||||
{{ $big = "multiple_big" }}
|
||||
{{ else }}
|
||||
{{ $small = "multiple_big"}}
|
||||
{{ end }}
|
||||
<div id="articleinner">
|
||||
{{- if .Resources.ByType "image" -}}
|
||||
{{- $pic := index (.Resources.ByType "image") 0 -}}
|
||||
{{- $thumb := $pic.Resize "1024x" }}
|
||||
<a href="{{ index (.Resources.ByType "image") 0 }}"><img src="{{- $thumb.Permalink -}}"/></a>
|
||||
</div>
|
||||
{{- end }}
|
||||
<div id="articletext">
|
||||
{{ partial "contact.html" }}
|
||||
{{ .Content }}
|
||||
{{- $thumb := $pic.Resize "2048x" }}
|
||||
{{ if ne .Content "" }}
|
||||
{{- $thumb = $pic.Resize "1024x" }}
|
||||
{{ end }}
|
||||
<div id="articlepicture" class="{{ $small }} borderrad25">
|
||||
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
|
||||
</div>
|
||||
{{ else if $img }}
|
||||
{{- $img = $img.Resize "1024x" }}
|
||||
<div id="articlepicture" class="{{ $small }} borderrad25">
|
||||
<img src="{{- $img.Permalink -}}" class="borderrad25" />
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- if .Content -}}
|
||||
<div id="articletext" class="{{ $big }}">
|
||||
{{ partial "contact.html" }}
|
||||
{{- .Content -}}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</article>
|
||||
{{ end }}
|
|
@ -1,3 +1,6 @@
|
|||
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
{{ if eq .Description "nottranslated" }}
|
||||
{{ partial "orga/nottranslated.html" . }}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{{ define "css" }}
|
||||
<link rel="stylesheet" href="/css/visibleIf.css" type="text/css" />
|
||||
{{ end }}
|
||||
<h1>Artikelgenerator</h1>
|
||||
<article class="minmax">
|
||||
<div style="flex-direction: row;">
|
||||
{{ .Content }}
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
<article>
|
||||
{{ $l1 := slice }}
|
||||
{{ $l2 := slice }}
|
||||
{{ range $.Site.Home.Translations }}
|
||||
{{ $l1 = $l1 | append .Language }}
|
||||
{{ end }}
|
||||
|
||||
{{ $all_lang := $.Site.Home.Translations }}
|
||||
{{ range site.RegularPages }}
|
||||
<a href="{{ .Permalink}}">{{ .Name }}:</a>
|
||||
{{ if .Translations }}
|
||||
{{ range .Translations }}
|
||||
{{ $t1 := .Language }}
|
||||
{{ range $all_lang }}
|
||||
{{- $a := .Language -}}
|
||||
{{- $b := $.Site.Language.Lang -}}
|
||||
{{ if ne $t1 .Language }}
|
||||
missing: {{ .Language }}<br>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
missing: all<br>
|
||||
{{ end }}
|
||||
{{ range site.RegularPages }}
|
||||
{{ $missing := slice}}
|
||||
{{ if .Translations }}
|
||||
{{ range .Translations }}
|
||||
{{ $l2 = $l2 | append .Language }}
|
||||
{{ end }}
|
||||
{{ $final := $l1 | complement $l2 }}
|
||||
{{ range $final }}
|
||||
{{ $missing = $missing | append . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $missing = $missing | append "all translations" }}
|
||||
{{ end }}
|
||||
{{ if $missing }}
|
||||
<a href="{{ .Permalink}}" style="margin-top: 1rem;">{{ .Name }}:</a>
|
||||
<div>missing: {{ index $missing 0 }}</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
|
@ -1,6 +1,11 @@
|
|||
<div id="articletitle">
|
||||
<h1>{{- .Title -}}</h1>
|
||||
</div>
|
||||
{{ define "title" }}
|
||||
{{ $name := .Title }}
|
||||
{{ if lower $name | i18n }}
|
||||
{{ $name = lower $name | i18n }}
|
||||
{{ end }}
|
||||
<h1>{{ $name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{- $pic := index (.Resources.ByType "image") 0 -}}
|
||||
|
||||
<article>
|
||||
|
@ -8,9 +13,7 @@
|
|||
{{ partial "structure/article_meta" (dict "context" . "visible" "all") }}
|
||||
{{ $small := "solo" }}
|
||||
{{ $big := "solo" }}
|
||||
{{ $placeholder := "/images/placeholder_article.jpg" }}
|
||||
{{ $img := resources.Get $placeholder }}
|
||||
{{- if or (.Resources.ByType "image") (.Content) ($img) -}}
|
||||
{{- if or (.Resources.ByType "image") (.Content) -}}
|
||||
{{ $small = "multiple_small" }}
|
||||
{{ $big = "multiple_big" }}
|
||||
{{ else }}
|
||||
|
@ -26,11 +29,6 @@
|
|||
<div id="articlepicture" class="{{ $small }} borderrad25">
|
||||
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
|
||||
</div>
|
||||
{{ else if $img }}
|
||||
{{- $img = $img.Resize "1024x" }}
|
||||
<div id="articlepicture" class="{{ $small }} borderrad25">
|
||||
<img src="{{- $img.Permalink -}}" class="borderrad25" />
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- if .Content -}}
|
||||
<div id="articletext" class="{{ $big }}">
|
||||
|
|
Loading…
Reference in New Issue
Block a user