updated tailwind, added menu & button shortcodes
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
{% set admonition = parsed_first_line | first %}
|
||||
{% set style = "" %}
|
||||
|
||||
|
||||
{% set content = body | split(pat="\n") | slice(start=2) | join(sep="\n") %}
|
||||
|
||||
<!-- hides content if doesn't adhere to admonition formatting -->
|
||||
<!-- sets admonition type depending on qualifiers and modifiers
|
||||
hides content if doesn't adhere to admonition formatting -->
|
||||
{% if admonition == "!!!" %}
|
||||
{% set classes = "admonition" %}
|
||||
{% elif admonition == "???" %}
|
||||
|
3
templates/shortcodes/button.html
Normal file
3
templates/shortcodes/button.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<button class="border-transparent flex flex-col border-2 w-80 items-start rounded h-24 transition hover:first:text-gray-500 hover:border-stone-200 hover:bg-stone-100 p-2">
|
||||
{{ body | trim_start_matches(pat="<p></p>") | safe}}
|
||||
</button>
|
@@ -27,19 +27,28 @@ Parameters:
|
||||
|
||||
<div class="{{classes}}" style="{{styles}}">
|
||||
{% for column in columns%}
|
||||
|
||||
<!-- Hides empty columns if displayed vertically in small screen -->
|
||||
{% if column | as_str | length < 10 %}
|
||||
<div class="hidden md:block flex-1 md:mb-0 md:mx-8 sm:flex-1">
|
||||
{{ column | safe }}
|
||||
{{column | split(pat="{% button() %}") | slice(end=1)}}
|
||||
{% for button in column | split(pat="{% button() %}") | slice(start=1) | join(sep="") | split(pat="{%% end %%}") | slice(end=-1) %}
|
||||
{% set body = button %}
|
||||
{% include "shortcodes/button.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div class="{{column_classes}}">
|
||||
{{column | split(pat="{% button() %}") | slice(end=1) | first | safe}}
|
||||
<hr>
|
||||
<br/>
|
||||
|
||||
<!-- handles mermaid markdown content display -->
|
||||
{{ column | safe }}
|
||||
{% for button in column | split(pat="{% button() %}") | slice(start=1) | join(sep="") | split(pat="{%% end %%}") | slice(end=-1) %}
|
||||
{% set body = button %}
|
||||
{% include "shortcodes/button.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
Reference in New Issue
Block a user