Added tooltipps

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-08 20:17:32 +01:00
parent 4b2c251e79
commit f9af3e33b8
3 changed files with 11 additions and 6 deletions

View File

@ -130,6 +130,7 @@
},
{"name": "Code",
"icon_class": "fa-solid fa-laptop-code",
"description": "Check out my Code",
"subitems": [
{
"name": "Github",

View File

@ -7,7 +7,11 @@
<hr />
<h3 class="card-title">{{ card.title }}</h3>
<p class="card-text">{{ card.text }}</p>
<a href="{{ card.link }}" class="mt-auto btn btn-light stretched-link" ><i class="fa-solid fa-globe"></i> {{ card.link_text }}</a>
{% if card.link %}
<a href="{{ card.link }}" class="mt-auto btn btn-light stretched-link" ><i class="fa-solid fa-globe"></i> {{ card.link_text }}</a>
{% else %}
<i class="fa-solid fa-hourglass"></i> {{ card.link_text }}
{% endif %}
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
{% for subitem in subitems %}
{% if subitems.subitems %}
<li class="dropdown-submenu">
<a class="dropdown-item dropdown-toggle" href="#">
<a class="dropdown-item dropdown-toggle" href="#" data-bs-toggle="tooltip" title="{{ subitem.description }}">
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a>
<ul class="dropdown-menu">
@ -12,13 +12,13 @@
</li>
{% elif subitem.popup %}
<li>
<a class="dropdown-item" onclick='openDynamicPopup({{subitem|tojson|safe}})''>
<a class="dropdown-item" onclick='openDynamicPopup({{subitem|tojson|safe}})' data-bs-toggle="tooltip" title="{{ subitem.description }}">
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a>
</li>
{% else %}
<li>
<a class="dropdown-item" href="{{ subitem.href }}" {% if subitem.target %} target="{{subitem.target}}" {% endif %}>
<a class="dropdown-item" href="{{ subitem.href }}" target="{{ subitem.target|default('_blank') }}" data-bs-toggle="tooltip" title="{{ subitem.description }}">
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a>
</li>
@ -41,14 +41,14 @@
{% if item.href %}
<!-- Single Item -->
<li class="nav-item">
<a class="nav-link" href="{{ item.href }}">
<a class="nav-link" href="{{ item.href }}" target="{{ item.target|default('_blank') }}" data-bs-toggle="tooltip" title="{{ item.description }}">
<i class="{{ item.icon_class }}"></i> {{ item.name }}
</a>
</li>
{% else %}
<!-- Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown{{ loop.index }}" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown{{ loop.index }}" role="button" data-bs-toggle="dropdown" data-bs-toggle="tooltip" title="{{ item.description }}" aria-expanded="false">
<i class="{{ item.icon_class }}"></i> {{ item.name }}
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ loop.index }}">