modified icon function

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-09 12:20:57 +01:00
parent 8959f4405b
commit 14ccedf1c1
4 changed files with 109 additions and 56 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
app/static/logos/* app/static/cache/*

View File

@ -66,6 +66,9 @@ FLASK_ENV = os.getenv("FLASK_ENV", "production")
@app.before_request @app.before_request
def reload_config_in_dev(): def reload_config_in_dev():
if FLASK_ENV == "development":
load_config(app)
# Cachen der Icons # Cachen der Icons
for card in app.config["cards"]: for card in app.config["cards"]:
card["icon"]["cache"] = cache_file(card["icon"]["source"]) card["icon"]["cache"] = cache_file(card["icon"]["source"])

View File

@ -120,249 +120,299 @@ navigation:
header: header:
- name: Microblog - name: Microblog
description: Read my microblogs description: Read my microblogs
icon_class: fa-brands fa-mastodon icon:
class: fa-brands fa-mastodon
href: https://microblog.veen.world/@kevinveenbirkenbach href: https://microblog.veen.world/@kevinveenbirkenbach
subitems: [] subitems: []
- name: Pictures - name: Pictures
description: View my photo gallery description: View my photo gallery
icon_class: fa-solid fa-camera icon:
class: fa-solid fa-camera
href: https://picture.veen.world/kevinveenbirkenbach href: https://picture.veen.world/kevinveenbirkenbach
subitems: [] subitems: []
- name: Videos - name: Videos
description: Watch my videos description: Watch my videos
icon_class: fa-solid fa-video icon:
class: fa-solid fa-video
href: https://video.veen.world/a/kevinveenbirkenbach href: https://video.veen.world/a/kevinveenbirkenbach
subitems: [] subitems: []
- name: Blog - name: Blog
description: Read my blog description: Read my blog
icon_class: fa-solid fa-blog icon:
class: fa-solid fa-blog
href: https://blog.veen.world href: https://blog.veen.world
subitems: [] subitems: []
- name: Code - name: Code
icon_class: fa-solid fa-laptop-code icon:
class: fa-solid fa-laptop-code
description: Check out my Code description: Check out my Code
subitems: subitems:
- name: Github - name: Github
description: View my GitHub profile description: View my GitHub profile
icon_class: bi bi-github icon:
class: bi bi-github
href: https://github.com/kevinveenbirkenbach href: https://github.com/kevinveenbirkenbach
subitems: [] subitems: []
- name: Gitea - name: Gitea
description: Explore my code repositories description: Explore my code repositories
icon_class: fa-solid fa-code icon:
class: fa-solid fa-code
href: https://git.veen.world/kevinveenbirkenbach href: https://git.veen.world/kevinveenbirkenbach
subitems: [] subitems: []
- name: Contact - name: Contact
description: Get in touch description: Get in touch
icon_class: fa-solid fa-envelope icon:
class: fa-solid fa-envelope
href: href:
subitems: subitems:
- name: Email - name: Email
description: Send me an email description: Send me an email
icon_class: fa-solid fa-envelope icon:
class: fa-solid fa-envelope
href: kevin@veen.world href: kevin@veen.world
href_praefix: mailto href_praefix: mailto
subitems: [] subitems: []
- name: Matrix - name: Matrix
description: Chat with me on Matrix description: Chat with me on Matrix
icon_class: fa-solid fa-cubes icon:
class: fa-solid fa-cubes
popup: true popup: true
address: "@kevinveenbirkenbach:veen.world" address: "@kevinveenbirkenbach:veen.world"
- name: Mobile - name: Mobile
description: Call me description: Call me
icon_class: fa-solid fa-phone icon:
class: fa-solid fa-phone
href: "+491781798023" href: "+491781798023"
href_praefix: tel href_praefix: tel
subitems: [] subitems: []
- name: PGP - name: PGP
description: Access my PGP key description: Access my PGP key
icon_class: fa-solid fa-key icon:
class: fa-solid fa-key
href: https://s.veen.world/pgp href: https://s.veen.world/pgp
subitems: [] subitems: []
- name: Signal - name: Signal
description: Message me on Signal description: Message me on Signal
icon_class: fa-brands fa-signal-messenger icon:
class: fa-brands fa-signal-messenger
popup: true popup: true
href: "+491781798023" href: "+491781798023"
subitems: [] subitems: []
- name: Telegram - name: Telegram
description: Message me on Telegram description: Message me on Telegram
icon_class: fa-brands fa-telegram icon:
class: fa-brands fa-telegram
target: _blank target: _blank
href: https://t.me/kevinveenbirkenbach href: https://t.me/kevinveenbirkenbach
subitems: [] subitems: []
- name: WhatsApp - name: WhatsApp
description: Chat with me on WhatsApp description: Chat with me on WhatsApp
icon_class: fa-brands fa-whatsapp icon:
class: fa-brands fa-whatsapp
href: https://wa.me/491781798023 href: https://wa.me/491781798023
subitems: [] subitems: []
footer: footer:
- name: External Accounts - name: External Accounts
description: Me on other plattforms description: Me on other plattforms
icon_class: fa-solid fa-external-link-alt icon:
class: fa-solid fa-external-link-alt
subitems: subitems:
- name: Meta - name: Meta
description: Social and developer networks description: Social and developer networks
icon_class: fa-brands fa-meta icon:
class: fa-brands fa-meta
href: href:
subitems: subitems:
- name: Instagram - name: Instagram
description: Follow me on Instagram description: Follow me on Instagram
icon_class: fa-brands fa-instagram icon:
class: fa-brands fa-instagram
href: https://www.instagram.com/kevinveenbirkenbach/ href: https://www.instagram.com/kevinveenbirkenbach/
subitems: [] subitems: []
- name: Facebook - name: Facebook
description: Like my Facebook page description: Like my Facebook page
icon_class: fa-brands fa-facebook icon:
class: fa-brands fa-facebook
href: https://www.facebook.com/kevinveenbirkenbach href: https://www.facebook.com/kevinveenbirkenbach
subitems: [] subitems: []
- name: Carreer Profiles - name: Carreer Profiles
icon_class: fa-solid fa-user-tie icon:
class: fa-solid fa-user-tie
subitems: subitems:
- name: XING - name: XING
description: Visit my XING profile description: Visit my XING profile
icon_class: bi bi-building icon:
class: bi bi-building
href: https://www.xing.com/profile/Kevin_VeenBirkenbach href: https://www.xing.com/profile/Kevin_VeenBirkenbach
subitems: [] subitems: []
- name: LinkedIn - name: LinkedIn
description: Connect on LinkedIn description: Connect on LinkedIn
icon_class: bi bi-linkedin icon:
class: bi bi-linkedin
href: https://www.linkedin.com/in/kevinveenbirkenbach href: https://www.linkedin.com/in/kevinveenbirkenbach
subitems: [] subitems: []
- name: Sports - name: Sports
description: My sport activities description: My sport activities
icon_class: fa-solid fa-running icon:
class: fa-solid fa-running
href: href:
subitems: subitems:
- name: Garmin - name: Garmin
description: My Garmin activities description: My Garmin activities
icon_class: fa-solid fa-person-running icon:
class: fa-solid fa-person-running
href: https://s.veen.world/garmin href: https://s.veen.world/garmin
subitems: [] subitems: []
- name: Eversports - name: Eversports
description: My Eversports sessions description: My Eversports sessions
icon_class: fa-solid fa-dumbbell icon:
class: fa-solid fa-dumbbell
href: https://s.veen.world/eversports href: https://s.veen.world/eversports
subitems: [] subitems: []
- name: Duolingo - name: Duolingo
description: Learn with me on Duolingo description: Learn with me on Duolingo
icon_class: fa-solid fa-language icon:
class: fa-solid fa-language
href: https://www.duolingo.com/profile/kevinbirkenbach href: https://www.duolingo.com/profile/kevinbirkenbach
subitems: [] subitems: []
- name: Spotify - name: Spotify
description: Listen to my playlists description: Listen to my playlists
icon_class: fa-brands fa-spotify icon:
class: fa-brands fa-spotify
href: https://open.spotify.com/user/31vebfzbjf3p7oualis76qfpr5ty href: https://open.spotify.com/user/31vebfzbjf3p7oualis76qfpr5ty
subitems: [] subitems: []
- name: Patreon - name: Patreon
description: Support me on Patreon description: Support me on Patreon
icon_class: fa-brands fa-patreon icon:
class: fa-brands fa-patreon
href: https://patreon.com/kevinveenbirkenbach href: https://patreon.com/kevinveenbirkenbach
subitems: [] subitems: []
- name: Community - name: Community
description: My presence in the Fediverse description: My presence in the Fediverse
icon_class: fa-solid fa-users icon:
class: fa-solid fa-users
subitems: subitems:
- name: Forum - name: Forum
description: Join the discussion description: Join the discussion
icon_class: fa-brands fa-discourse icon:
class: fa-brands fa-discourse
href: https://forum.veen.world/u/kevinveenbirkenbach href: https://forum.veen.world/u/kevinveenbirkenbach
subitems: [] subitems: []
- name: Newsletter - name: Newsletter
description: Subscribe to my newsletter description: Subscribe to my newsletter
icon_class: fa-solid fa-envelope-open-text icon:
class: fa-solid fa-envelope-open-text
href: https://newsletter.veen.world/subscription/form href: https://newsletter.veen.world/subscription/form
subitems: [] subitems: []
- name: Work Hub - name: Work Hub
description: Curated collection of self hosted tools for work, organization, and description: Curated collection of self hosted tools for work, organization, and
learning. learning.
icon_class: fa-solid fa-toolbox icon:
class: fa-solid fa-toolbox
href: href:
subitems: subitems:
- name: Open Project - name: Open Project
description: Explore my projects description: Explore my projects
icon_class: fa-solid fa-chart-line icon:
class: fa-solid fa-chart-line
href: https://project.veen.world/ href: https://project.veen.world/
subitems: [] subitems: []
- name: Taiga - name: Taiga
description: View my Kanban board description: View my Kanban board
icon_class: bi bi-clipboard2-check-fill icon:
class: bi bi-clipboard2-check-fill
href: https://kanban.veen.world/ href: https://kanban.veen.world/
subitems: [] subitems: []
- name: Matomo - name: Matomo
description: Analyze with Matomo description: Analyze with Matomo
icon_class: fa-solid fa-chart-simple icon:
class: fa-solid fa-chart-simple
href: https://matomo.veen.world/ href: https://matomo.veen.world/
subitems: [] subitems: []
- name: Baserow - name: Baserow
description: Organize with Baserow description: Organize with Baserow
icon_class: fa-solid fa-table icon:
class: fa-solid fa-table
href: https://baserow.veen.world/ href: https://baserow.veen.world/
subitems: [] subitems: []
- name: Elements - name: Elements
description: Chat with me description: Chat with me
icon_class: fa-solid fa-comment icon:
class: fa-solid fa-comment
href: https://element.veen.world/ href: https://element.veen.world/
subitems: [] subitems: []
- name: Big Blue Button - name: Big Blue Button
description: Join live events description: Join live events
icon_class: fa-solid fa-video icon:
class: fa-solid fa-video
href: https://meet.veen.world/ href: https://meet.veen.world/
subitems: [] subitems: []
- name: Mailu - name: Mailu
description: Send me a mail description: Send me a mail
icon_class: fa-solid fa-envelope icon:
class: fa-solid fa-envelope
href: https://mail.veen.world/ href: https://mail.veen.world/
subitems: [] subitems: []
- name: Moodel - name: Moodel
description: Learn with my academy description: Learn with my academy
icon_class: fa-solid fa-graduation-cap icon:
class: fa-solid fa-graduation-cap
href: https://academy.veen.world/ href: https://academy.veen.world/
subitems: [] subitems: []
- name: Yourls - name: Yourls
description: Find my curated links description: Find my curated links
icon_class: bi bi-link icon:
class: bi bi-link
href: https://s.veen.world/admin/ href: https://s.veen.world/admin/
subitems: [] subitems: []
- name: Nextcloud - name: Nextcloud
description: Access my cloud storage description: Access my cloud storage
icon_class: fa-solid fa-cloud icon:
class: fa-solid fa-cloud
href: https://cloud.veen.world/ href: https://cloud.veen.world/
subitems: [] subitems: []
- name: Logbooks - name: Logbooks
description: My activity logs description: My activity logs
icon_class: fa-solid fa-book icon:
class: fa-solid fa-book
href: href:
subitems: subitems:
- name: Skydiver - name: Skydiver
description: View my skydiving logs description: View my skydiving logs
icon_class: fa-solid fa-parachute-box icon:
class: fa-solid fa-parachute-box
href: https://s.veen.world/skydiverlog href: https://s.veen.world/skydiverlog
subitems: [] subitems: []
- name: Skipper - name: Skipper
description: See my sailing records description: See my sailing records
icon_class: fa-solid fa-sailboat icon:
class: fa-solid fa-sailboat
href: https://s.veen.world/meilenbuch href: https://s.veen.world/meilenbuch
subitems: [] subitems: []
- name: Diver - name: Diver
description: Check my diving logs description: Check my diving logs
icon_class: fa-solid fa-fish icon:
class: fa-solid fa-fish
href: https://s.veen.world/diverlog href: https://s.veen.world/diverlog
subitems: [] subitems: []
- name: Pilot - name: Pilot
description: Review my flight logs description: Review my flight logs
icon_class: fa-solid fa-plane icon:
class: fa-solid fa-plane
href: https://s.veen.world/pilotlog href: https://s.veen.world/pilotlog
subitems: [] subitems: []
- name: Nature - name: Nature
description: Explore my nature logs description: Explore my nature logs
icon_class: fa-solid fa-tree icon:
class: fa-solid fa-tree
href: https://s.veen.world/naturejournal href: https://s.veen.world/naturejournal
- name: Vita - name: Vita
description: View my CV and professional background description: View my CV and professional background
icon_class: fa-solid fa-file-lines icon:
class: fa-solid fa-file-lines
href: https://s.veen.world/lebenslauf href: https://s.veen.world/lebenslauf
subitems: [] subitems: []
- name: Imprint - name: Imprint
icon_class: fa-solid fa-scale-balanced icon:
class: fa-solid fa-scale-balanced
href: https://s.veen.world/imprint href: https://s.veen.world/imprint

View File

@ -4,7 +4,7 @@
{% if subitem.subitems %} {% if subitem.subitems %}
<li class="dropdown-submenu"> <li class="dropdown-submenu">
<a class="dropdown-item" title="{{ subitem.description }}"> <a class="dropdown-item" title="{{ subitem.description }}">
<i class="{{ subitem.icon_class }}"></i> {{ subitem.name }} <i class="{{ subitem.icon.class }}"></i> {{ subitem.name }}
</a> </a>
<ul class="dropdown-submenu"> <ul class="dropdown-submenu">
{{ render_subitems(subitem.subitems) }} {{ render_subitems(subitem.subitems) }}
@ -13,13 +13,13 @@
{% elif subitem.popup %} {% elif subitem.popup %}
<li> <li>
<a class="dropdown-item" onclick='openDynamicPopup({{subitem|tojson|safe}})' data-bs-toggle="tooltip" title="{{ subitem.description }}"> <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 }}" target="{{ subitem.target|default('_blank') }}" data-bs-toggle="tooltip" title="{{ subitem.description }}"> <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>
{% endif %} {% endif %}
@ -42,14 +42,14 @@
<!-- Single Item --> <!-- Single Item -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ item.href }}" target="{{ item.target|default('_blank') }}" data-bs-toggle="tooltip" title="{{ item.description }}"> <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" data-bs-display="dynamic" data-popper-placement="top" title="{{ item.description }}" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown{{ loop.index }}" role="button" data-bs-toggle="dropdown" data-bs-display="dynamic" data-popper-placement="top" title="{{ item.description }}" aria-expanded="false">
<i class="{{ item.icon_class }}" data-bs-toggle="tooltip"></i> {{ item.name }} <i class="{{ item.icon.class }}" data-bs-toggle="tooltip"></i> {{ item.name }}
</a> </a>
<ul class="dropdown-menu dropdown-menu-{{menu_type}}" aria-labelledby="navbarDropdown{{ loop.index }}"> <ul class="dropdown-menu dropdown-menu-{{menu_type}}" aria-labelledby="navbarDropdown{{ loop.index }}">
{{ render_subitems(item.subitems) }} {{ render_subitems(item.subitems) }}