cleaned shortcodes, automized header creation
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
{%- set respSizes = [600, 900, 1200, 1500] -%}
|
||||
{%- set initSrc = resize_image(path=path, width=600, op='fit_width') -%}
|
||||
<div class="img bg-black dark:bg-blue-800">
|
||||
<img
|
||||
class="lazy"
|
||||
aspect-ratio="{{ width }} / {{ height }}"
|
||||
sizes="(min-width: 1024px) 100vw, 50vw"
|
||||
src="{{ initSrc.url }}"
|
||||
srcset="
|
||||
{% for size in respSizes -%}
|
||||
{%- if size <= width -%}
|
||||
{%- set imgSrcset = resize_image(path=path, width=size, op='fit_width') -%}
|
||||
{{ imgSrcset.url }} {{ size }}w
|
||||
{%- if not loop.last -%}, {% endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
"
|
||||
alt="{{ alt }}"
|
||||
width="{{ width }}"
|
||||
height="{{ height }}"
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
14
templates/shortcodes/row.html
Normal file
14
templates/shortcodes/row.html
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
{% set columns = body | split(pat="|||") %}
|
||||
{% set classes = "relative mt-12 lg:mt-24 flex flex-col lg:flex-row m-8 sm:m-12 md:m-16 lg:m-20 items-center" %}
|
||||
{% if isLean %}
|
||||
{% set classes = "relative flex flex-col lg:flex-row items-baseline" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="{{classes}}">
|
||||
{% for column in columns%}
|
||||
<div class="flex-1 lg:mx-8">
|
||||
{{ column }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user