
Jinja 2 templates
The base template acts as the foundation of the entire website using Jinja2’s template inheritance system. Instead of repeating common elements like the navigation bar, footer, fonts, and global styles across every page, they are defined once in base.html. Other pages use extends <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" /> <meta name= "viewport" content= "width=device-width, initial-scale=1.0" /> <title> {% block title %}Local Hub{% endblock %} </title> <link href= "https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Nunito:wght@400;600;700&display=swap" rel= "stylesheet" /> <style> /* GLOBAL VARIABLES — shared across every page */ :root { --g : #2d5a3d ; --gd : #1a3828 ; --gl : #e8f2eb ; --cr : #faf7f2 ; --w : #ffffff ; --t : #1a2e1e ; --tm : #4a6050 ; --tl : #849a89 ; --b : #ddd6c8 ; } *,* ::before ,* ::after { box-sizing : border-box ; margin : 0 ; padding : 0 ; } body { font-family : 'Nunito' , sans-serif ; background : var ( --c
Continue reading on Dev.to Python
Opens in a new tab




