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