Capitalizado el MENU :-) con Filtro

This commit is contained in:
fenix 2024-02-13 16:55:08 +01:00
parent aea2e19453
commit 9b54135efe
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,7 @@
{# templates/_navigation.html #}
<nav>
{% for menu_item in ["home", "results"] %}
<a href="{{ url_for(menu_item)}}">{{ menu_item|upper }}</a>
{% endfor %}
</nav>

View File

@ -2,13 +2,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}{{ title }}{% endblock title %}</title>
</head>
<body>
<header>
{% include "_navigation.html" %}
</header>
{% block content %}
<h1>Welcome to {{ title }}!</h1>
{% endblock content %}