Spaces:
Sleeping
Sleeping
Download templates/base.html from Bubaa001/web: direct link, hf CLI and curl.
- Browser
- Download file 17.9 kB
-
https://huggingface.co/spaces/Bubaa001/web/resolve/main/templates/base.html
- Command line
-
hf download hf://spaces/Bubaa001/web/templates/base.html
-
curl -L -o base.html https://huggingface.co/spaces/Bubaa001/web/resolve/main/templates/base.html
17.9 kB
| <html lang="{{ g.current_lang }}" dir="ltr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>{% block title %}{{ school_name }} | {% block subtitle %}Excellence in Education{% endblock %}{% endblock %}</title> | |
| <meta name="description" content="{% block meta_description %}{{ school_name }} - Excellence in Education since 1975. Join our community of learners and achievers.{% endblock %}"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet"> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#1e40af', | |
| secondary: '#0ea5e9', | |
| accent: '#f59e0b', | |
| dark: '#0f172a', | |
| light: '#f8fafc' | |
| }, | |
| fontFamily: { | |
| heading: ['Poppins', 'sans-serif'], | |
| body: ['Open Sans', 'sans-serif'] | |
| }, | |
| boxShadow: { | |
| 'glass': '0 8px 32px 0 rgba(31, 38, 135, 0.15)', | |
| 'btn': '0 4px 14px 0 rgba(14, 165, 233, 0.4)' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style type="text/tailwindcss"> | |
| @layer base { | |
| html { | |
| scroll-behavior: smooth; | |
| } | |
| body { | |
| @apply bg-gradient-to-br from-blue-50 to-indigo-100 font-body text-dark; | |
| background-attachment: fixed; | |
| } | |
| h1, h2, h3, h4, h5 { | |
| @apply font-heading font-bold; | |
| } | |
| .glass-card { | |
| @apply bg-white/20 backdrop-blur-lg border border-white/30 rounded-xl shadow-glass; | |
| } | |
| .btn-primary { | |
| @apply bg-gradient-to-r from-primary to-secondary text-white px-6 py-3 rounded-full font-medium transition-all duration-300 hover:shadow-btn hover:scale-105; | |
| } | |
| .btn-secondary { | |
| @apply bg-white/30 backdrop-blur-sm text-primary border border-primary/30 px-6 py-3 rounded-full font-medium transition-all duration-300 hover:bg-white/50 hover:shadow-glass; | |
| } | |
| .section-title { | |
| @apply text-3xl md:text-4xl font-bold text-center mb-4 relative pb-4; | |
| } | |
| .section-title::after { | |
| @apply content-[''] absolute bottom-0 left-1/2 transform -translate-x-1/2 w-24 h-1 bg-gradient-to-r from-primary to-secondary rounded-full; | |
| } | |
| .nav-link { | |
| @apply text-dark hover:text-primary transition-colors duration-300 relative; | |
| } | |
| .nav-link::after { | |
| @apply content-[''] absolute left-0 -bottom-1 w-0 h-0.5 bg-primary transition-all duration-300; | |
| } | |
| .nav-link:hover::after { | |
| @apply w-full; | |
| } | |
| .animate-float { | |
| animation: float 6s ease-in-out infinite; | |
| } | |
| @keyframes float { | |
| 0% { transform: translateY(0px); } | |
| 50% { transform: translateY(-20px); } | |
| 100% { transform: translateY(0px); } | |
| } | |
| .animate-pulse-slow { | |
| animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite; | |
| } | |
| @keyframes pulse-slow { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.8; } | |
| } | |
| .fade-in { | |
| animation: fadeIn 1s ease-in; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .animate-fade-in { | |
| animation: fadeIn 0.3s ease-out forwards; | |
| } | |
| .slide-down { | |
| animation: slideDown 0.3s ease-out forwards; | |
| } | |
| @keyframes slideDown { | |
| from { transform: translateY(-100%); opacity: 0; } | |
| to { transform: translateY(0); opacity: 1; } | |
| } | |
| .slide-up { | |
| animation: slideUp 0.3s ease-out forwards; | |
| } | |
| @keyframes slideUp { | |
| from { transform: translateY(0); opacity: 1; } | |
| to { transform: translateY(-100%); opacity: 0; } | |
| } | |
| } | |
| </style> | |
| {% block extra_css %}{% endblock %} | |
| </head> | |
| <body class="min-h-screen"> | |
| <!-- Language Toggle --> | |
| <div class="bg-primary text-white py-2 px-4 text-right text-sm"> | |
| <div class="container mx-auto"> | |
| <a href="{{ url_for('set_lang', lang='en') }}" class="mr-2 {% if g.current_lang == 'en' %}font-bold{% endif %}">EN</a> | |
| <a href="{{ url_for('set_lang', lang='sw') }}" class="{% if g.current_lang == 'sw' %}font-bold{% endif %}">SW</a> | |
| </div> | |
| </div> | |
| <!-- Sticky Navigation --> | |
| <header class="sticky top-0 z-50 bg-white/80 backdrop-blur-md border-b border-white/30 shadow-sm"> | |
| <div class="container mx-auto px-4"> | |
| <nav class="flex items-center justify-between py-4"> | |
| <!-- Logo --> | |
| <a href="{{ url_for('home') }}" class="flex items-center space-x-2"> | |
| <div class="w-10 h-10 rounded-full bg-gradient-to-r from-primary to-secondary flex items-center justify-center"> | |
| <span class="text-white font-bold text-xl">M</span> | |
| </div> | |
| <div class="text-xl font-bold font-heading text-primary">{{ school_name }}</div> | |
| </a> | |
| <!-- Desktop Navigation --> | |
| <div class="hidden md:flex items-center space-x-8"> | |
| <a href="{{ url_for('home') }}" class="nav-link font-medium">{{ _('Home') }}</a> | |
| <a href="{{ url_for('about') }}" class="nav-link font-medium">{{ _('About') }}</a> | |
| <a href="{{ url_for('admissions') }}" class="nav-link font-medium">{{ _('Admissions') }}</a> | |
| <a href="{{ url_for('academics') }}" class="nav-link font-medium">{{ _('Academics') }}</a> | |
| <a href="{{ url_for('student_life') }}" class="nav-link font-medium">{{ _('Student Life') }}</a> | |
| <a href="{{ url_for('admissions') }}" class="btn-primary">{{ _('Apply Now') }}</a> | |
| </div> | |
| <!-- Mobile Menu Button --> | |
| <button id="mobileMenuBtn" class="md:hidden text-primary text-2xl"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </nav> | |
| </div> | |
| <!-- Mobile Navigation --> | |
| <div id="mobileMenu" class="hidden md:hidden bg-white/90 backdrop-blur-md py-4 px-4"> | |
| <div class="flex flex-col space-y-4"> | |
| <a href="{{ url_for('home') }}" class="nav-link font-medium">{{ _('Home') }}</a> | |
| <a href="{{ url_for('about') }}" class="nav-link font-medium">{{ _('About') }}</a> | |
| <a href="{{ url_for('admissions') }}" class="nav-link font-medium">{{ _('Admissions') }}</a> | |
| <a href="{{ url_for('academics') }}" class="nav-link font-medium">{{ _('Academics') }}</a> | |
| <a href="{{ url_for('student_life') }}" class="nav-link font-medium">{{ _('Student Life') }}</a> | |
| <a href="{{ url_for('admissions') }}" class="btn-primary text-center">{{ _('Apply Now') }}</a> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main> | |
| {% with messages = get_flashed_messages(with_categories=true) %} | |
| {% if messages %} | |
| <div class="container mx-auto px-4 py-4"> | |
| {% for category, message in messages %} | |
| <div class="bg-{% if category == 'error' %}red-500{% else %}green-500{% endif %} text-white p-4 rounded-lg mb-4 animate-fade-in flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-{% if category == 'error' %}exclamation-circle{% else %}check-circle{% endif %} mr-3"></i> | |
| {{ message }} | |
| </div> | |
| <button onclick="this.parentElement.remove()" class="text-white hover:text-white/80 transition-colors"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| {% endfor %} | |
| </div> | |
| {% endif %} | |
| {% endwith %} | |
| {% block content %}{% endblock %} | |
| </main> | |
| <!-- Footer --> | |
| <footer class="bg-dark text-white py-12"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
| <div> | |
| <div class="flex items-center space-x-2 mb-6"> | |
| <div class="w-10 h-10 rounded-full bg-gradient-to-r from-primary to-secondary flex items-center justify-center"> | |
| <span class="text-white font-bold text-xl">M</span> | |
| </div> | |
| <div class="text-xl font-bold font-heading text-white">{{ school_name }}</div> | |
| </div> | |
| <p class="text-white/70 mb-6"> | |
| {{ _('Excellence in Education since 1975. Empowering future leaders through quality education.') }} | |
| </p> | |
| <div class="flex space-x-4"> | |
| <a href="{{ social_media.facebook }}" class="text-white/70 hover:text-white transition-colors" target="_blank"> | |
| <i class="fab fa-facebook-f"></i> | |
| </a> | |
| <a href="{{ social_media.twitter }}" class="text-white/70 hover:text-white transition-colors" target="_blank"> | |
| <i class="fab fa-twitter"></i> | |
| </a> | |
| <a href="{{ social_media.instagram }}" class="text-white/70 hover:text-white transition-colors" target="_blank"> | |
| <i class="fab fa-instagram"></i> | |
| </a> | |
| <a href="{{ social_media.youtube }}" class="text-white/70 hover:text-white transition-colors" target="_blank"> | |
| <i class="fab fa-youtube"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-6 border-b border-white/20 pb-2">{{ _('Quick Links') }}</h3> | |
| <ul class="space-y-3"> | |
| <li><a href="{{ url_for('home') }}" class="text-white/70 hover:text-white transition-colors">{{ _('Home') }}</a></li> | |
| <li><a href="{{ url_for('about') }}" class="text-white/70 hover:text-white transition-colors">{{ _('About Us') }}</a></li> | |
| <li><a href="{{ url_for('admissions') }}" class="text-white/70 hover:text-white transition-colors">{{ _('Admissions') }}</a></li> | |
| <li><a href="{{ url_for('academics') }}" class="text-white/70 hover:text-white transition-colors">{{ _('Academics') }}</a></li> | |
| <li><a href="{{ url_for('student_life') }}" class="text-white/70 hover:text-white transition-colors">{{ _('Student Life') }}</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-6 border-b border-white/20 pb-2">{{ _('Resources') }}</h3> | |
| <ul class="space-y-3"> | |
| <li><a href="{{ url_for('news') }}" class="text-white/70 hover:text-white transition-colors">{{ _('News & Events') }}</a></li> | |
| <li><a href="{{ url_for('admissions') }}#downloads" class="text-white/70 hover:text-white transition-colors">{{ _('Download Centre') }}</a></li> | |
| <li><a href="{{ url_for('alumni') }}" class="text-white/70 hover:text-white transition-colors">{{ _('Alumni Portal') }}</a></li> | |
| <li><a href="#" class="text-white/70 hover:text-white transition-colors">{{ _('Parent Portal') }}</a></li> | |
| <li><a href="#" class="text-white/70 hover:text-white transition-colors">{{ _('Careers') }}</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-6 border-b border-white/20 pb-2">{{ _('Contact Us') }}</h3> | |
| <ul class="space-y-3"> | |
| <li class="flex items-start"> | |
| <i class="fas fa-map-marker-alt mt-1 mr-3 text-secondary"></i> | |
| <span>{{ address }}</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <i class="fas fa-phone-alt mt-1 mr-3 text-secondary"></i> | |
| <span>{{ contact_phone }}</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <i class="fas fa-envelope mt-1 mr-3 text-secondary"></i> | |
| <span>{{ contact_email }}</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <i class="fas fa-clock mt-1 mr-3 text-secondary"></i> | |
| <span>{{ _('Mon-Fri: 7:30 AM - 4:30 PM') }}</span> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="border-t border-white/10 mt-12 pt-8 text-center text-white/50 text-sm"> | |
| <p>© {{ now.year }} {{ school_name }}. {{ _('All Rights Reserved.') }}</p> | |
| <div class="mt-4"> | |
| <a href="{{ url_for('safeguarding') }}" class="text-white/50 hover:text-white transition-colors mx-2">{{ _('Privacy Policy') }}</a> | |
| <a href="#" class="text-white/50 hover:text-white transition-colors mx-2">{{ _('Terms of Use') }}</a> | |
| <a href="{{ url_for('safeguarding') }}" class="text-white/50 hover:text-white transition-colors mx-2">{{ _('Safeguarding Policy') }}</a> | |
| <a href="#" class="text-white/50 hover:text-white transition-colors mx-2">{{ _('Accessibility') }}</a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- WhatsApp Button --> | |
| <a href="https://wa.me/{{ contact_phone | replace(' ', '') | replace('+', '') }}" | |
| class="fixed bottom-6 right-6 w-14 h-14 rounded-full bg-green-500 flex items-center justify-center text-white text-2xl shadow-lg animate-bounce" | |
| aria-label="{{ _('Contact us on WhatsApp') }}"> | |
| <i class="fab fa-whatsapp"></i> | |
| </a> | |
| <script> | |
| // Mobile menu toggle with animation | |
| const mobileMenuBtn = document.getElementById('mobileMenuBtn'); | |
| const mobileMenu = document.getElementById('mobileMenu'); | |
| let isMenuOpen = false; | |
| if (mobileMenuBtn && mobileMenu) { | |
| mobileMenuBtn.addEventListener('click', () => { | |
| if (!isMenuOpen) { | |
| mobileMenu.classList.remove('hidden'); | |
| mobileMenu.classList.add('slide-down'); | |
| mobileMenu.classList.remove('slide-up'); | |
| mobileMenuBtn.innerHTML = '<i class="fas fa-times"></i>'; | |
| } else { | |
| mobileMenu.classList.add('slide-up'); | |
| mobileMenu.classList.remove('slide-down'); | |
| mobileMenuBtn.innerHTML = '<i class="fas fa-bars"></i>'; | |
| setTimeout(() => { | |
| mobileMenu.classList.add('hidden'); | |
| }, 300); | |
| } | |
| isMenuOpen = !isMenuOpen; | |
| }); | |
| } | |
| // Handle flash message dismissal | |
| document.addEventListener('click', (e) => { | |
| if (e.target.matches('.flash-dismiss') || e.target.closest('.flash-dismiss')) { | |
| const flashMessage = e.target.closest('.flash-message'); | |
| if (flashMessage) { | |
| flashMessage.style.opacity = '0'; | |
| setTimeout(() => { | |
| flashMessage.remove(); | |
| }, 300); | |
| } | |
| } | |
| }); | |
| // Animation on scroll | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const animatedItems = document.querySelectorAll('.fade-in'); | |
| animatedItems.forEach(item => { | |
| item.style.opacity = '0'; | |
| }); | |
| setTimeout(() => { | |
| animatedItems.forEach(item => { | |
| item.style.opacity = '1'; | |
| }); | |
| }, 100); | |
| }); | |
| </script> | |
| {% block extra_js %}{% endblock %} | |
| </body> | |
| </html> |