slider for blog details
This commit is contained in:
parent
2f2454ee54
commit
6c3f985d1f
@ -44,7 +44,7 @@ func cleanUpMapValue(v interface{}) interface{} {
|
||||
return cleanUpInterfaceArray(v)
|
||||
case map[interface{}]interface{}:
|
||||
return cleanUpInterfaceMap(v)
|
||||
case string:
|
||||
case string, bool, int, int8, int16, int32, int64, float32, float64:
|
||||
return v
|
||||
default:
|
||||
return fmt.Sprintf("%v", v)
|
||||
|
@ -1,6 +1,6 @@
|
||||
GET https://mark2web.basiscms.de/api/collections/get/mark2webBlog
|
||||
?sort[date]=-1
|
||||
&limit=1
|
||||
&limit=101
|
||||
&token=89ff216524093123bf7a0a10f7b273
|
||||
|
||||
###
|
||||
|
@ -11,6 +11,6 @@ Markdown:
|
||||
ChromaStyle: monokai
|
||||
|
||||
Data:
|
||||
debug: True
|
||||
debug: False
|
||||
matomoSiteId: 89
|
||||
token: 89ff216524093123bf7a0a10f7b273 # cockpit api token
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
Data:
|
||||
background: /img/folder.jpg
|
||||
|
||||
slider:
|
||||
- img: /img/folder.jpg
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
Data:
|
||||
background: /img/wire.jpg
|
||||
|
||||
slider:
|
||||
- img: /img/wire.jpg
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
Data:
|
||||
background: /img/write.jpg
|
||||
|
||||
slider:
|
||||
- img: /img/write.jpg
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
Data:
|
||||
background: /img/design.jpg
|
||||
|
||||
slider:
|
||||
- img: /img/design.jpg
|
||||
|
@ -31,11 +31,11 @@
|
||||
|
||||
<header id="header">
|
||||
<div class="container">
|
||||
<div class="logo" {% if not Data.slider %}style="max-width: 400px;"{% endif %}>
|
||||
<div class="logo" {% if not Data.slider and not Data.details.slider %}style="max-width: 400px;"{% endif %}>
|
||||
<a href="{{ "/"|relative_path }}">
|
||||
<picture>
|
||||
<source media="(max-width: 768px)" srcset="project-files/img/logo_text.png">
|
||||
<img src="project-files/img/logo{% if not Data.slider %}_text{% endif %}.png" alt="mark2web Logo">
|
||||
<img src="project-files/img/logo{% if not Data.slider and not Data.details.slider %}_text{% endif %}.png" alt="mark2web Logo">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
@ -52,6 +52,7 @@
|
||||
|
||||
<!-- ========== Slider ========== -->
|
||||
<section class="slider white_arrows" data-dots="true" data-arrows="true">
|
||||
{% block slider %}
|
||||
{% for sl in Data.slider %}
|
||||
<div class="slide">
|
||||
<img
|
||||
@ -62,6 +63,7 @@
|
||||
alt="{{ sl.alt }}" style="opacity:{{ sl.opacity|default:1 }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock slider %}
|
||||
</section>
|
||||
|
||||
<!-- ========== Navigation ========== -->
|
||||
@ -124,7 +126,7 @@
|
||||
<pre>{{ Data|json:"pretty" }}</pre>
|
||||
|
||||
<h3>NavMap</h3>
|
||||
<pre>{{ NavMap|json: "pretty" }}</pre>
|
||||
<pre>{{ NavMap|json:"pretty" }}</pre>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -6,6 +6,21 @@
|
||||
<meta name="keywords" content="{{ Meta.Keywords }}" />
|
||||
{% endblock meta %}
|
||||
|
||||
{% if Data.details.slider %}
|
||||
{% block slider %}
|
||||
{% for sl in Data.details.slider %}
|
||||
<div class="slide">
|
||||
<img
|
||||
src="{{ "https://mark2web.basiscms.de"|add:sl.path|image_process:"p=fill,w=1440,h=600,q=60" }}"
|
||||
srcset="{{ "https://mark2web.basiscms.de"|add:sl.path|image_process:"p=fill,w=768,h=384,q=60" }} 768w,
|
||||
{{ "https://mark2web.basiscms.de"|add:sl.path|image_process:"p=fill,w=1440,h=600,q=60" }} 1440w,
|
||||
{{ "https://mark2web.basiscms.de"|add:sl.path|image_process:"p=fill,w=1920,h=800,q=60" }} 1920w"
|
||||
alt="{{ sl.meta.title }}">
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock slider %}
|
||||
{% endif %}
|
||||
|
||||
{% block part0 %}
|
||||
<h1>
|
||||
{{ Data.details.title }}
|
||||
|
Loading…
Reference in New Issue
Block a user