updated tailwind, added menu & button shortcodes
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
<header id="header-container">
|
||||
<div class="z-10 bg-white fixed w-screen">
|
||||
<div class="relative z-50 shadow">
|
||||
<div class="mx-auto flex z-50 shadow justify-between items-center px-6 py-5 sm:px-8 sm:py-6 lg:px-12 lg:justify-start lg:space-x-20">
|
||||
<div class="mx-auto flex z-50 shadow justify-between items-center px-6 py-5 sm:px-8 md:px-12 sm:py-6 lg:px-20 lg:justify-start lg:space-x-20">
|
||||
<div>
|
||||
<a href="/" class="flex">
|
||||
<img class="w-20 h-auto sm:w-32" src="{{section.extra.logoPath}}" alt="Ourworld Logo" />
|
||||
@@ -121,13 +121,13 @@
|
||||
{% if '<a' in header_label %}
|
||||
{% set link_label = header_label | striptags %}
|
||||
{% set link_path = header_label | split(pat="%22") | safe%}
|
||||
<a href="{{link_path[1]}}" class="text-md leading-6 font-medium text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150 mt-0">
|
||||
<a href="{{link_path[1]}}" class="text-lg leading-6 font-medium text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150 mt-0">
|
||||
{{link_label}}
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="relative">
|
||||
{% set button_id = header_label ~ "-menu-btn" | slugify %}
|
||||
<button type="button" id="{{button_id}}" class="font-medium text-gray-900 group inline-flex items-center space-x-2 text-md leading-6 font-normal hover:text-blue-300 focus:outline-none transition ease-in-out duration-150">
|
||||
<button type="button" id="{{button_id}}" class="font-medium text-gray-900 group inline-flex items-center space-x-2 text-lg leading-6 font-normal hover:text-blue-300 focus:outline-none transition ease-in-out duration-150">
|
||||
<span>{{ header_label }}</span>
|
||||
<!--
|
||||
Heroicon name: chevron-down
|
||||
|
@@ -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