This commit is contained in:
lubiana 2025-05-31 21:43:13 +02:00
parent e958163a4a
commit b8a5a1ff58
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
79 changed files with 15113 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{% if flash %}
<div class="flash-messages">
{% for type, messages in flash %}
{% for message in messages %}
<div class="flash-message flash-{{ type }}">
{% if type == 'success' %}
🎉🎊 SUCCESS! 🎊🎉 {{ message }} 🥳🙌 WOOHOO! 🌟✨
{% elseif type == 'error' %}
❌😱 ERROR! 😱❌ {{ message }} 💥😭 OH NO! 💔🔥
{% elseif type == 'warning' %}
⚠️😬 WARNING! 😬⚠️ {{ message }} 🚨🚧 BE CAREFUL! 🚧🚨
{% elseif type == 'info' %}
ℹ️🧐 INFO! 🧐ℹ️ {{ message }} 📝💡 GOOD TO KNOW! 💭📊
{% else %}
💌✨ {{ message }} ✨💌
{% endif %}
</div>
{% endfor %}
{% endfor %}
</div>
{% endif %}

View file

@ -0,0 +1,73 @@
{# 🌈✨ Super Amazing Form Components 🎨🎉 #}
{# 📝 Input Field 📝 #}
{% macro input(name, label, value, type = 'text', required = false, placeholder = '', class = '') %}
<div class="form-group">
<label for="{{ name }}">✨ {{ label }}{% if required %} <span class="required">⭐ REQUIRED ⭐</span>{% endif %}</label>
<input type="{{ type }}" id="{{ name }}" name="{{ name }}" value="{{ value|default('') }}"
{% if required %}required{% endif %}
{% if placeholder %}placeholder="{{ placeholder }} 💫"{% endif %}
class="form-control {{ class }}">
</div>
{% endmacro %}
{# 📄 Textarea Field 📄 #}
{% macro textarea(name, label, value, required = false, rows = 3, placeholder = '', class = '') %}
<div class="form-group">
<label for="{{ name }}">📝 {{ label }} 📝{% if required %} <span class="required">⭐ MUST FILL ⭐</span>{% endif %}</label>
<textarea id="{{ name }}" name="{{ name }}" rows="{{ rows }}"
{% if required %}required{% endif %}
{% if placeholder %}placeholder="{{ placeholder }} ✏️"{% endif %}
class="form-control {{ class }}">{{ value|default('') }}</textarea>
</div>
{% endmacro %}
{# 📋 Select Field 📋 #}
{% macro select(name, label, options, selected, required = false, class = '') %}
<div class="form-group">
<label for="{{ name }}">🔽 {{ label }} 🔽{% if required %} <span class="required">⭐ PICK ONE ⭐</span>{% endif %}</label>
<select id="{{ name }}" name="{{ name }}" class="form-control {{ class }}" {% if required %}required{% endif %}>
<option value="">-- 🔍 Select {{ label }} 🔎 --</option>
{% for value, text in options %}
<option value="{{ value }}" {% if selected == value %}selected{% endif %}>✅ {{ text }}</option>
{% endfor %}
</select>
</div>
{% endmacro %}
{# ✅ Checkbox Field ✅ #}
{% macro checkbox(name, label, checked = false, value = '1', class = '') %}
<div class="form-check">
<input type="checkbox" id="{{ name }}" name="{{ name }}" value="{{ value }}"
{% if checked %}checked{% endif %} class="form-check-input {{ class }}">
<label class="form-check-label" for="{{ name }}">✅ {{ label }} ✅</label>
</div>
{% endmacro %}
{# 🔘 Radio Button 🔘 #}
{% macro radio(name, label, value, checked = false, class = '') %}
<div class="form-check">
<input type="radio" id="{{ name }}_{{ value }}" name="{{ name }}" value="{{ value }}"
{% if checked %}checked{% endif %} class="form-check-input {{ class }}">
<label class="form-check-label" for="{{ name }}_{{ value }}">🔘 {{ label }} 🔘</label>
</div>
{% endmacro %}
{# 🚀 Submit Button 🚀 #}
{% macro submit(label = 'Submit', class = 'btn-primary') %}
<button type="submit" class="btn {{ class }}">🚀 {{ label }} 🚀</button>
{% endmacro %}
{# 🔳 Button 🔳 #}
{% macro button(label, type = 'button', class = 'btn-secondary', attributes = '') %}
<button type="{{ type }}" class="btn {{ class }}" {{ attributes|raw }}>🔳 {{ label }} 🔳</button>
{% endmacro %}
{# ⚠️ Form Error Display ⚠️ #}
{% macro errors(error) %}
{% if error %}
<div class="alert alert-danger">
⚠️😱 ERROR ALERT! 😱⚠️ {{ error }} 💥💔
</div>
{% endif %}
{% endmacro %}

View file

@ -0,0 +1,9 @@
<nav>
<ul>
<li><a href="/">🏠 Dashboard 📊</a></li>
<li><a href="/drink-types">🍹 Drink Types 🍸🥤</a></li>
<li><a href="/inventory">📦 Inventory 🗃️🧮</a></li>
<li><a href="/orders">🛒 Orders 📝🚚</a></li>
<li><a href="/settings">⚙️ Settings 🔧🛠️</a></li>
</ul>
</nav>