update zola template
52
static/css/dark-mode.css
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Dark mode styles */
|
||||
.dark .prose {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.dark .prose h1,
|
||||
.dark .prose h2,
|
||||
.dark .prose h3,
|
||||
.dark .prose h4,
|
||||
.dark .prose h5,
|
||||
.dark .prose h6 {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dark .prose a {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.dark .prose strong {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dark .prose code {
|
||||
color: white;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.dark .prose blockquote {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
border-left-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.dark .prose hr {
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.dark .prose table th {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dark .prose table td {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
/* Transition effects for theme switching */
|
||||
html.transition,
|
||||
html.transition *,
|
||||
html.transition *:before,
|
||||
html.transition *:after {
|
||||
transition: all 0.3s ease-in-out !important;
|
||||
transition-delay: 0 !important;
|
||||
}
|
43
static/css/dropdown.css
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Dropdown menu styles */
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.dropdown-content a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-content a:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Dark mode styles */
|
||||
html.dark .dropdown-content {
|
||||
background-color: #374151;
|
||||
}
|
||||
|
||||
html.dark .dropdown-content a {
|
||||
color: #f9fafb;
|
||||
}
|
||||
|
||||
html.dark .dropdown-content a:hover {
|
||||
background-color: #4b5563;
|
||||
}
|
107833
static/css/main.css
Normal file
57
static/css/output.css
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Tailwind CSS output file */
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* Custom styles */
|
||||
.container {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.container {
|
||||
max-width: 640px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 768px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.container {
|
||||
max-width: 1024px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1280px) {
|
||||
.container {
|
||||
max-width: 1280px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Transition effects */
|
||||
.transition-all {
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
/* Additional utility classes */
|
||||
.text-shadow {
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.hover-grow {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.hover-grow:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
BIN
static/images/blog/africa_future_summit1.png
Normal file
After Width: | Height: | Size: 262 KiB |
BIN
static/images/blog/dunia_yetu1.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
static/images/blog/tailwind-theme.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
static/images/blog/zola-tailwind.jpg
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
static/images/team/adnan_fatayerji.jpg
Normal file
After Width: | Height: | Size: 219 KiB |
BIN
static/images/team/jan_de_landtsheer.jpeg
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
static/images/team/kristof_de_spiegeleer.jpeg
Normal file
After Width: | Height: | Size: 202 KiB |
139
static/js/main.js
Normal file
@@ -0,0 +1,139 @@
|
||||
// Mobile menu toggle
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log("DOM loaded - initializing dark mode");
|
||||
|
||||
const menuButton = document.querySelector('[aria-controls="mobile-menu"]');
|
||||
const mobileMenu = document.getElementById('mobile-menu');
|
||||
const menuIcons = menuButton.querySelectorAll('svg');
|
||||
|
||||
if (menuButton && mobileMenu) {
|
||||
menuButton.addEventListener('click', function() {
|
||||
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
|
||||
|
||||
// Toggle aria-expanded
|
||||
menuButton.setAttribute('aria-expanded', !expanded);
|
||||
|
||||
// Toggle menu visibility
|
||||
mobileMenu.classList.toggle('hidden');
|
||||
|
||||
// Toggle icons
|
||||
menuIcons.forEach(icon => {
|
||||
icon.classList.toggle('hidden');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Desktop dropdown menu
|
||||
const whyMenuButton = document.getElementById('why-menu-button');
|
||||
const desktopWhyMenu = document.getElementById('desktop-why-menu');
|
||||
|
||||
if (whyMenuButton && desktopWhyMenu) {
|
||||
// Toggle on click
|
||||
whyMenuButton.addEventListener('click', function() {
|
||||
desktopWhyMenu.classList.toggle('hidden');
|
||||
});
|
||||
|
||||
// Close when clicking outside
|
||||
document.addEventListener('click', function(event) {
|
||||
if (!whyMenuButton.contains(event.target) && !desktopWhyMenu.contains(event.target)) {
|
||||
desktopWhyMenu.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// Show on hover
|
||||
whyMenuButton.addEventListener('mouseenter', function() {
|
||||
desktopWhyMenu.classList.remove('hidden');
|
||||
});
|
||||
|
||||
// Container for both button and menu for hover functionality
|
||||
const dropdownContainer = whyMenuButton.parentElement;
|
||||
|
||||
// Hide on mouse leave from container
|
||||
dropdownContainer.addEventListener('mouseleave', function() {
|
||||
desktopWhyMenu.classList.add('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
// Mobile dropdown menu
|
||||
const mobileWhyMenuButton = document.querySelector('[x-data="{ open: false }"] button');
|
||||
const mobileWhyMenu = document.getElementById('mobile-why-menu');
|
||||
|
||||
if (mobileWhyMenuButton && mobileWhyMenu) {
|
||||
mobileWhyMenuButton.addEventListener('click', function() {
|
||||
mobileWhyMenu.classList.toggle('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
// Theme toggle functionality
|
||||
const themeToggleBtn = document.getElementById('theme-toggle');
|
||||
const themeToggleDarkIcon = document.getElementById('theme-toggle-dark-icon');
|
||||
const themeToggleLightIcon = document.getElementById('theme-toggle-light-icon');
|
||||
const mobileThemeToggleBtn = document.getElementById('mobile-theme-toggle');
|
||||
|
||||
// Check if dark mode is already enabled
|
||||
const isDarkMode = localStorage.getItem('color-theme') === 'dark' ||
|
||||
(!localStorage.getItem('color-theme') && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
|
||||
console.log("Initial dark mode state:", isDarkMode);
|
||||
|
||||
// Set initial theme
|
||||
if (isDarkMode) {
|
||||
document.documentElement.classList.add('dark');
|
||||
if (themeToggleLightIcon && themeToggleDarkIcon) {
|
||||
themeToggleLightIcon.classList.remove('hidden');
|
||||
themeToggleDarkIcon.classList.add('hidden');
|
||||
}
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
if (themeToggleLightIcon && themeToggleDarkIcon) {
|
||||
themeToggleLightIcon.classList.add('hidden');
|
||||
themeToggleDarkIcon.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle theme function
|
||||
function toggleTheme() {
|
||||
console.log("Toggle theme clicked");
|
||||
|
||||
// Add transition class
|
||||
document.documentElement.classList.add('transition');
|
||||
|
||||
// Toggle theme
|
||||
const isDark = document.documentElement.classList.contains('dark');
|
||||
console.log("Current dark mode:", isDark);
|
||||
|
||||
if (isDark) {
|
||||
document.documentElement.classList.remove('dark');
|
||||
localStorage.setItem('color-theme', 'light');
|
||||
if (themeToggleLightIcon && themeToggleDarkIcon) {
|
||||
themeToggleLightIcon.classList.add('hidden');
|
||||
themeToggleDarkIcon.classList.remove('hidden');
|
||||
}
|
||||
console.log("Switched to light mode");
|
||||
} else {
|
||||
document.documentElement.classList.add('dark');
|
||||
localStorage.setItem('color-theme', 'dark');
|
||||
if (themeToggleLightIcon && themeToggleDarkIcon) {
|
||||
themeToggleLightIcon.classList.remove('hidden');
|
||||
themeToggleDarkIcon.classList.add('hidden');
|
||||
}
|
||||
console.log("Switched to dark mode");
|
||||
}
|
||||
|
||||
// Remove transition class after transition completes
|
||||
setTimeout(() => {
|
||||
document.documentElement.classList.remove('transition');
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// Add event listeners to toggle buttons
|
||||
if (themeToggleBtn) {
|
||||
console.log("Adding event listener to theme toggle button");
|
||||
themeToggleBtn.addEventListener('click', toggleTheme);
|
||||
}
|
||||
|
||||
if (mobileThemeToggleBtn) {
|
||||
console.log("Adding event listener to mobile theme toggle button");
|
||||
mobileThemeToggleBtn.addEventListener('click', toggleTheme);
|
||||
}
|
||||
});
|