diff --git a/templates/_default/base.html b/templates/_default/base.html index 8c05b07..ea22c08 100644 --- a/templates/_default/base.html +++ b/templates/_default/base.html @@ -6,7 +6,7 @@ -
+
{% block content %}{% endblock %}
diff --git a/templates/shortcodes/row.html b/templates/shortcodes/row.html index 48747e8..0284874 100644 --- a/templates/shortcodes/row.html +++ b/templates/shortcodes/row.html @@ -12,54 +12,60 @@ Parameters: {% set columns = body | safe | markdown | split(pat="|||") %} {% set classes = "relative pt-12 flex flex-col sm:grid sm:grid-cols-2 sm:gap-10 xl:flex xl:flex-row md:py-12 lg:py-16"%} + {% if 2 < columns | length %} {% set classes = classes ~ " lg:items-start" %} {% else %} {% set classes = classes ~ " lg:items-center" %} {% endif %} -{% set column_classes = "flex-1 md:mx-8" %} +{% set column_classes = "flex-1 mb-8 md:mb-0 md:mx-8" %} + {% if style %} -{% if "lean" in style %} - {% set classes = "relative flex flex-col lg:flex-row items-baseline -mx-8 sm:-mx-12 md:-mx-16 lg:-mx-20" %} - {% set column_classes = "flex-1 m-4 lg:m-0" %} -{% endif %} + + {% if "lean" in style %} + {% set classes = "relative flex flex-col lg:flex-row items-baseline -mx-8 sm:-mx-12 md:-mx-16 lg:-mx-20" %} + {% set column_classes = "flex-1 m-4 lg:m-0" %} + {% endif %} -{% if "center" in style %} - {% set classes = classes ~ " text-center" %} -{% endif %} + {% if "center" in style %} + {% set classes = classes ~ " text-center" %} + {% endif %} {% endif %} + {% set styles = "" %} - {% if bgPath %} {% set styles = "background: url('" ~ bgPath ~ "'); background-size: cover" %} {% set classes = classes ~ "w-screen -mx-8 sm:-mx-12 md:-mx-16 lg:-mx-20 lg:py-40 p-8 sm:p-12 md:p-16 lg:p-20" %} {% endif %} -
-{% for column in columns%} + {% for column in columns%} -
- {% if "{% mermaid() %}" in column %} + + {% if column | as_str | length < 10 %} + - {% set mermaid_section = column | safe | markdown | split(pat="{% mermaid() %}") %} - {% set mermaid_content = mermaid_section[1] | striptags | replace(from="–", to="--")%} - -
- {{mermaid_content | safe }} yo -
- - {% else %} - - {{ column | safe }} - - {% endif %} - -
-{% endfor %} + {% else %} +
+ + {% if "{% mermaid() %}" in column %} + {% set mermaid_section = column | safe | markdown | split(pat="{% mermaid() %}") %} + {% set mermaid_content = mermaid_section[1] | striptags | replace(from="–", to="--")%} +
+ {{mermaid_content | safe }} +
+ {% else %} + {{ column | safe }} + {% endif %} +
+ + {% endif %} + {% endfor %}
\ No newline at end of file