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", {"name": "Code",
"icon_class": "fa-solid fa-laptop-code", "icon_class": "fa-solid fa-laptop-code",
"description": "Check out my Code",
"subitems": [ "subitems": [
{ {
"name": "Github", "name": "Github",

View File

@ -7,7 +7,11 @@
<hr /> <hr />
<h3 class="card-title">{{ card.title }}</h3> <h3 class="card-title">{{ card.title }}</h3>
<p class="card-text">{{ card.text }}</p> <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> </div>
</div> </div>

View File

@ -3,7 +3,7 @@
{% for subitem in subitems %} {% for subitem in subitems %}
{% if subitems.subitems %} {% if subitems.subitems %}
<li class="dropdown-submenu"> <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 }} <i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
@ -12,13 +12,13 @@
</li> </li>
{% elif subitem.popup %} {% elif subitem.popup %}
<li> <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 }} <i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a> </a>
</li> </li>
{% else %} {% else %}
<li> <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 }} <i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
</a> </a>
</li> </li>
@ -41,14 +41,14 @@
{% if item.href %} {% if item.href %}
<!-- Single Item --> <!-- Single Item -->
<li class="nav-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 }} <i class="{{ item.icon_class }}"></i> {{ item.name }}
</a> </a>
</li> </li>
{% else %} {% else %}
<!-- Dropdown Menu --> <!-- Dropdown Menu -->
<li class="nav-item dropdown"> <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 }} <i class="{{ item.icon_class }}"></i> {{ item.name }}
</a> </a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ loop.index }}"> <ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ loop.index }}">