forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
5203638def
commit
c7095d9e50
|
@ -15,6 +15,34 @@ forms:
|
|||
name: "Titel"
|
||||
required: true
|
||||
placeholder: "Untitled Band \"Rocken in Häusern\"-Tour"
|
||||
- title: headline
|
||||
input_type: buttons
|
||||
name: "Überschrift"
|
||||
target: "content"
|
||||
- title: url
|
||||
input_type: buttons
|
||||
name: "URL"
|
||||
target: "content"
|
||||
- title: pic
|
||||
input_type: buttons
|
||||
name: "Bild"
|
||||
target: "content"
|
||||
- title: bold
|
||||
input_type: buttons
|
||||
name: "Fett"
|
||||
target: "content"
|
||||
- title: paragraph
|
||||
input_type: buttons
|
||||
name: "Absatz"
|
||||
target: "content"
|
||||
- title: newline
|
||||
input_type: buttons
|
||||
name: "Neue Zeile"
|
||||
target: "content"
|
||||
- title: more
|
||||
input_type: buttons
|
||||
name: "More"
|
||||
target: "content"
|
||||
- title: content
|
||||
input_type: textarea
|
||||
name: "Inhalt"
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
h1 {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,6 +77,7 @@
|
|||
margin-top: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
padding-right: 1.1rem;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
section, article, .article_footer, .sidebar {
|
||||
|
@ -88,7 +90,7 @@ section, article, .article_footer, .sidebar {
|
|||
}
|
||||
|
||||
.two-lists {
|
||||
display: flex; flex-wrap: wrap-reverse; justify-content: space-around;
|
||||
display: flex; flex-wrap: wrap; justify-content: space-around;
|
||||
}
|
||||
|
||||
article {
|
||||
|
@ -103,12 +105,6 @@ article {
|
|||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
.articlemeta {
|
||||
margin-bottom: .5rem;
|
||||
&:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
a {
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
|
@ -117,6 +113,16 @@ article {
|
|||
h3 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.article_content {
|
||||
background: var(--background-alt); padding-left: 2rem; padding-right: 2rem; padding-bottom: 1rem; filter: alpha(opacity=987); -moz-opacity: 0.987; -khtml-opacity: 0.987; opacity: 0.987;
|
||||
}
|
||||
}
|
||||
|
||||
.articlemeta {
|
||||
margin-bottom: .5rem;
|
||||
&:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
#pagination {
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
{{ end }}
|
||||
|
||||
<div class="two-lists">
|
||||
{{ if gt (len $posts) 1 }}
|
||||
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "3" "title" $news "type" "index") }}
|
||||
{{ end }}
|
||||
{{ if gt (len $featured) 1 }}
|
||||
{{ partial "layout/article_list" (dict "context" . "pages" $featured "amount" "1" "title" $feat "type" "index") }}
|
||||
{{ end }}
|
||||
{{ if gt (len $posts) 1 }}
|
||||
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "3" "title" $news "type" "index") }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -1,102 +1,89 @@
|
|||
{{ if and .amount .pages }}
|
||||
{{ $amount := .amount }}
|
||||
{{ $type := .type }}
|
||||
{{ $title := .title }}
|
||||
{{ $pages := .pages.ByLastmod.Reverse }}
|
||||
{{ $p := .pages.ByLastmod.Reverse }}
|
||||
{{ if and .amount .pages }}
|
||||
{{ $amount := .amount }}
|
||||
{{ $type := .type }}
|
||||
{{ $title := .title }}
|
||||
{{ $pages := .pages.ByLastmod.Reverse }}
|
||||
{{ $p := .pages.ByLastmod.Reverse }}
|
||||
{{- $paginator := .context.Paginate $pages -}}
|
||||
|
||||
{{- $paginator := .context.Paginate $pages -}}
|
||||
{{ if .paginate }}
|
||||
{{ $p = $paginator.Pages }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .paginate }}
|
||||
{{ $p = $paginator.Pages }}
|
||||
|
||||
{{ if eq $paginator.PageNumber 1 }}
|
||||
{{ if .content }}
|
||||
{{ partial "snippets/content" (dict "content" .content) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $paginator.PageNumber 1 }}
|
||||
{{ if .content }}
|
||||
{{ partial "snippets/content" (dict "content" .content) }}
|
||||
{{ end }}
|
||||
{{- if gt (len $pages) 0 -}}
|
||||
<section class="list">
|
||||
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
|
||||
{{- $home := .context.Kind }}
|
||||
{{- range first $amount $p -}}
|
||||
{{ $px := string "400" }}
|
||||
{{ $fill := string (printf "1280x%s smart" $px) }}
|
||||
{{ $banner := slice }}
|
||||
{{ $image := slice }}
|
||||
{{ $thumb := "" }}
|
||||
{{ if .Resources.GetMatch "banner*" }}
|
||||
{{ $banner = slice (.Resources.GetMatch "banner*") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- if gt (len $pages) 0 -}}
|
||||
<section class="list">
|
||||
<!-- {{ if .title }}<h2>{{ .title }}</h2>{{ end }}-->
|
||||
{{- $home := .context.Kind }}
|
||||
{{- range first $amount $p -}}
|
||||
<article class="article_list_section">
|
||||
<!-- <a href="{{- .Permalink -}}">
|
||||
<div class="articletitle">
|
||||
{{ $cat := "" }}
|
||||
{{ if .Page.Params.events }}
|
||||
{{ $cat = index .Page.Params.events 0 }}
|
||||
{{ $cat = printf "%s: " $cat }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $type "index" }}
|
||||
<h3>{{ $cat -}}{{- .Title -}}</h3>
|
||||
{{ else }}
|
||||
<h2>{{ $cat -}}{{- .Title -}}</h2>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>-->
|
||||
<a href="{{- .Permalink -}}" class="no_underline">
|
||||
<div class="articlecontent">
|
||||
{{ $px := string "400" }}
|
||||
{{ $fill := string (printf "1280x%s smart" $px) }}
|
||||
{{ $metas := dict "when" .Params.when "price" .Params.price }}
|
||||
{{ $banner := slice }}
|
||||
{{ $image := slice }}
|
||||
{{ $thumb := "" }}
|
||||
{{ if .Resources.GetMatch "banner*" }}
|
||||
{{ $banner = slice (.Resources.GetMatch "banner*") }}
|
||||
{{ end }}
|
||||
{{ if .Resources.ByType "image" }}
|
||||
{{ $image = .Resources.ByType "image" }}
|
||||
{{ end }}
|
||||
{{ $image = (index (complement $banner $image) 0) }}
|
||||
{{ if $banner }}
|
||||
{{ $image = (index $banner 0) }}
|
||||
{{ end }}
|
||||
{{ $image = .Resources.GetMatch (string $image) }}
|
||||
{{ if ne $image nil }}
|
||||
{{ $thumb = $image}}
|
||||
{{ $thumb = $image.Fill $fill }}
|
||||
{{ end }}
|
||||
{{ if .Resources.ByType "image" }}
|
||||
{{ $image = .Resources.ByType "image" }}
|
||||
{{ end }}
|
||||
{{ $image = (index (complement $banner $image) 0) }}
|
||||
{{ $banner = (index $banner 0) }}
|
||||
|
||||
<!-- {{ partial "snippets/article_metadata" $metas }}-->
|
||||
{{ if $thumb }}
|
||||
<!-- <img src="{{ $thumb.Permalink }}" width="100%"/>-->
|
||||
<div style="background: url({{ $image.Permalink }}); background-attachment: fixed; background-size: cover; height: 50vh; box-shadow: inset 0px 11px 8px -10px #222, inset 0px -11px 8px -10px #222; border: 4px solid var(--background); margin-bottom: 4rem;">
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<div style="background: var(--background-alt); margin-top: 5rem; padding-left: 2rem; padding-right: 2rem; padding-bottom: 1rem;" class="articletitle">
|
||||
{{ $cat := "" }}
|
||||
{{ if .Page.Params.events }}
|
||||
{{ $cat = index .Page.Params.events 0 }}
|
||||
{{ $cat = printf "%s: " $cat }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $type "index" }}
|
||||
<h3>{{ $cat -}}{{- .Title -}}</h3>
|
||||
{{ else }}
|
||||
<h2>{{ $cat -}}{{- .Title -}}</h2>
|
||||
{{ $thumb = $banner.Fill $fill }}
|
||||
{{ $bg_pic := "" }}
|
||||
<article class="article_list_section">
|
||||
|
||||
<a href="{{- .Permalink -}}" class="no_underline">
|
||||
<div class="articlecontent">
|
||||
{{ $metas := dict "when" .Params.when "price" .Params.price }}
|
||||
{{ $thumb := "" }}
|
||||
{{ $banner := slice }}
|
||||
{{ if (.Resources.GetMatch "banner*") }}
|
||||
{{ if $banner = slice (.Resources.GetMatch "banner*") }}
|
||||
{{ $banner = (index $banner 0) }}
|
||||
{{ $thumb = $banner}}
|
||||
{{ $thumb = $banner.Fill $fill }}
|
||||
{{ $bg_pic = safeCSS (printf "background: url(%s)" $thumb.Permalink) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div style="background-color: var(--background-alt); {{ $bg_pic }}; background-position: top; background-repeat: no-repeat; {{ safeCSS (printf "min-height: %spx" (string $px)) }}; box-shadow: inset 0px 11px 8px -10px #222, inset 0px -11px 8px -10px #222; margin-bottom: 4rem;">
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<div style="margin-top: 5rem;" class="article_content article_content articletitle">
|
||||
{{ $cat := "" }}
|
||||
{{ if .Page.Params.events }}
|
||||
{{ $cat = index .Page.Params.events 0 }}
|
||||
{{ $cat = printf "%s: " $cat }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $type "index" }}
|
||||
<h3>{{ $cat -}}{{- .Title -}}</h3>
|
||||
{{ else }}
|
||||
<h2>{{ $cat -}}{{- .Title -}}</h2>
|
||||
{{ end }}
|
||||
{{ partial "snippets/article_metadata" $metas }}
|
||||
<div style="display: flex;">
|
||||
{{- if .Content -}}
|
||||
<div>
|
||||
{{- .Summary -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- if .Content -}}
|
||||
<div style="background: var(--background-alt); padding-left: 2rem; padding-right: 2rem; padding-bottom: 1rem;" class="article_content"><p>{{- .Summary -}}<p></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- {{- if .Content -}}
|
||||
|
||||
<div class="article_content"><p>{{- .Summary -}}<p></div>
|
||||
|
||||
{{ end }}-->
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ if .paginate }}
|
||||
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ if .paginate }}
|
||||
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
{{ $group = $group | append .group }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .input_type "title" }}
|
||||
{{ if eq .input_type "buttons" }}
|
||||
<button onclick="button({{ .title }})" type="button" value="{{ .title }}">{{ .name }}</button>
|
||||
|
||||
{{ else if eq .input_type "title" }}
|
||||
<h3 {{ if .group }}class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</h3>
|
||||
{{ else if eq .input_type "textarea" }}
|
||||
<div class="w100 {{ if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true' {{ end }}">
|
||||
|
@ -38,7 +41,7 @@
|
|||
<div id='result' class="w100"></div>
|
||||
{{ else if eq .input_type "submit" }}
|
||||
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
|
||||
<input type="{{ .input_type }}" value="{{- $name -}}" onclick="showInput(event);" />
|
||||
<input type="{{ .input_type }}" value="{{- $name -}}" onsubmit="return false" onclick="showInput(event);" />
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
{{ end }}
|
||||
{{ $px := string "400" }}
|
||||
{{ $fill := string (printf "1280x%s smart" $px) }}
|
||||
{{ $all := "" }}
|
||||
|
||||
{{ $what := "none" }}
|
||||
{{ $img := "none" }}
|
||||
|
@ -28,7 +29,7 @@
|
|||
{{ $img = (.Resources.GetMatch "banner*").Fill $fill }}
|
||||
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
|
||||
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}}); {{ $height }}" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
|
||||
{{ else if and (.Resources.ByType "image") (ne .Params.banner false) }}
|
||||
{{ else if and (.Resources.ByType "image") (ne .Params.banner false) $all }}
|
||||
{{ $img = (index (.Resources.ByType "image") 0).Fill $fill }}
|
||||
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
|
||||
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}}); {{ $height }}" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
|
||||
|
|
|
@ -11,6 +11,43 @@ function check_checkboxes(name) {
|
|||
}
|
||||
}
|
||||
|
||||
function button(x) {
|
||||
const textarea = document.getElementById('content');
|
||||
if (x == "url") {
|
||||
let url = prompt("Please enter URL", "https://wikipedia.org");
|
||||
let desc = prompt("Description", "The free Encyclopedia");
|
||||
var out = "[" + desc + "](" + url + ")";
|
||||
} else
|
||||
if (x == "headline") {
|
||||
let headline = prompt("Headline", "Act One");
|
||||
var out = "##" + headline + "\n\n";
|
||||
}
|
||||
if (x == "pic") {
|
||||
let desc = prompt("Description", "Wikipedia logo");
|
||||
let pic = prompt("Please enter URL or Number", "https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png");
|
||||
var out = "![" + desc + "](" + pic + ")";
|
||||
}
|
||||
if (x == "bold") {
|
||||
let bold = prompt("Bold", "");
|
||||
var out = "**" + bold + "**";
|
||||
}
|
||||
if (x == "paragraph") {
|
||||
var out = "\n\n";
|
||||
}
|
||||
if (x == "newline") {
|
||||
var out = " ";
|
||||
}
|
||||
if (x == "more") {
|
||||
var out = "\n\n<!--more-->\n\n";
|
||||
}
|
||||
if (out != null) {
|
||||
textarea.innerHTML += out;
|
||||
var end = textarea.value.length;
|
||||
}
|
||||
textarea.setSelectionRange(end, end);
|
||||
textarea.focus();
|
||||
}
|
||||
|
||||
function testor(input) {
|
||||
let v1 = [];
|
||||
input.forEach((input) => {
|
||||
|
@ -182,6 +219,9 @@ function showInput(e) {
|
|||
display.innerHTML += content;
|
||||
}
|
||||
}
|
||||
const textarea = document.getElementById('result');
|
||||
var end = textarea.value.length;
|
||||
textarea.focus();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user