mirror of
				https://github.com/kevinveenbirkenbach/homepage.veen.world.git
				synced 2025-11-03 17:08:00 +00:00 
			
		
		
		
	Implemented draft for contacts
This commit is contained in:
		@@ -20,7 +20,9 @@
 | 
			
		||||
              <img src="{{company.logo}}" alt="logo"/>
 | 
			
		||||
              <h1>{{company.titel}}</h1>
 | 
			
		||||
              <h2>{{company.subtitel}}</h2>
 | 
			
		||||
              {% include "navigation.html.j2" %}
 | 
			
		||||
            </header>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            {% block content %}{% endblock %}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,16 @@
 | 
			
		||||
<html>
 | 
			
		||||
 | 
			
		||||
  <head>
 | 
			
		||||
    <title>Kevin Veen-Birkenbach - Consulting and Coaching Solutions</title>
 | 
			
		||||
    <meta charset="utf-8" >
 | 
			
		||||
    <link rel="icon" type="image/x-icon" href="favicon.ico">
 | 
			
		||||
    <!-- Bootstrap CSS only -->
 | 
			
		||||
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
 | 
			
		||||
    <!-- Bootstrap JavaScript Bundle with Popper -->
 | 
			
		||||
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
 | 
			
		||||
    <!-- Bootstrap Icons -->
 | 
			
		||||
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css">
 | 
			
		||||
    <!-- Fontawesome -->
 | 
			
		||||
    <script src="https://kit.fontawesome.com/56f96da298.js" crossorigin="anonymous"></script>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <div class="container">
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										106
									
								
								app/templates/navigation.html.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								app/templates/navigation.html.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,106 @@
 | 
			
		||||
    <!-- Template for Subitems -->
 | 
			
		||||
    {% macro render_subitems(subitems) %}
 | 
			
		||||
        {% for subitem in subitems %}
 | 
			
		||||
            {% if subitems.subitems %}
 | 
			
		||||
                <li class="dropdown-submenu">
 | 
			
		||||
                    <a class="dropdown-item dropdown-toggle" href="#">
 | 
			
		||||
                        <i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
 | 
			
		||||
                    </a>
 | 
			
		||||
                    <ul class="dropdown-menu">
 | 
			
		||||
                        {{ render_subitems(subitem.subitems) }}
 | 
			
		||||
                    </ul>
 | 
			
		||||
                </li>
 | 
			
		||||
            {% elif subitem.popup %}
 | 
			
		||||
                <li>
 | 
			
		||||
                    <a class="dropdown-item" onclick='openDynamicPopup({{subitem|tojson|safe}})''>
 | 
			
		||||
                        <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 %}>
 | 
			
		||||
                        <i class="{{ subitem.icon_class }}"></i> {{ subitem.name }}
 | 
			
		||||
                    </a>
 | 
			
		||||
                </li>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
    {% endmacro %}
 | 
			
		||||
 | 
			
		||||
 <!-- Navigation Bar -->
 | 
			
		||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
 | 
			
		||||
    <div class="container-fluid">
 | 
			
		||||
    <!--
 | 
			
		||||
        <a class="navbar-brand" href="#">Navbar</a>
 | 
			
		||||
    -->    
 | 
			
		||||
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
 | 
			
		||||
            <span class="navbar-toggler-icon"></span>
 | 
			
		||||
        </button>
 | 
			
		||||
        <div class="collapse navbar-collapse" id="navbarNav">
 | 
			
		||||
            <ul class="navbar-nav ms-auto">
 | 
			
		||||
                {% for item in navigation %}
 | 
			
		||||
                    {% if item.href %}
 | 
			
		||||
                        <!-- Single Item -->
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link" href="{{ item.href }}">
 | 
			
		||||
                                <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">
 | 
			
		||||
                                <i class="{{ item.icon_class }}"></i> {{ item.name }}
 | 
			
		||||
                            </a>
 | 
			
		||||
                            <ul class="dropdown-menu" aria-labelledby="navbarDropdown{{ loop.index }}">
 | 
			
		||||
                                {{ render_subitems(item.subitems) }}
 | 
			
		||||
                            </ul>
 | 
			
		||||
                        </li>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</nav>
 | 
			
		||||
 | 
			
		||||
    <!-- Universal Modal Structure -->
 | 
			
		||||
<div class="modal fade" id="dynamicModal" tabindex="-1" aria-labelledby="dynamicModalLabel" aria-hidden="true">
 | 
			
		||||
  <div class="modal-dialog">
 | 
			
		||||
    <div class="modal-content">
 | 
			
		||||
      <div class="modal-header">
 | 
			
		||||
        <h5 class="modal-title" id="dynamicModalLabel"></h5>
 | 
			
		||||
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="modal-body">
 | 
			
		||||
        <div class="input-group">
 | 
			
		||||
          <input type="text" id="dynamicModalContent" class="form-control" readonly>
 | 
			
		||||
          <button class="btn btn-outline-secondary" type="button" id="dynamicCopyButton">Copy</button>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="modal-footer">
 | 
			
		||||
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<!-- Script for Dynamic Modal -->
 | 
			
		||||
<script>
 | 
			
		||||
  function openDynamicPopup(subitem) {
 | 
			
		||||
    // Set modal title and content
 | 
			
		||||
    document.getElementById('dynamicModalLabel').innerText = subitem.description;
 | 
			
		||||
    const modalContent = document.getElementById('dynamicModalContent');
 | 
			
		||||
    modalContent.value = subitem.address;
 | 
			
		||||
 | 
			
		||||
    // Add copy functionality
 | 
			
		||||
    document.getElementById('dynamicCopyButton').addEventListener('click', function () {
 | 
			
		||||
      modalContent.select();
 | 
			
		||||
      navigator.clipboard.writeText(modalContent.value)
 | 
			
		||||
        .then(() => alert('Content copied to clipboard!'))
 | 
			
		||||
        .catch(() => alert('Failed to copy content.'));
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // Show the modal
 | 
			
		||||
    const modal = new bootstrap.Modal(document.getElementById('dynamicModal'));
 | 
			
		||||
    modal.show();
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
		Reference in New Issue
	
	Block a user