jinja2 base template

Solutions on MaxInterview for jinja2 base template by the best coders in the world

showing results for - "jinja2 base template"
Nico
03 Sep 2019
1{% extends "layout.html" %}
2{% block title %}Index{% endblock %}
3{% block head %}
4  {{ super() }}
5  <style type="text/css">
6    .important { color: #336699; }
7  </style>
8{% endblock %}
9{% block content %}
10  <h1>Index</h1>
11  <p class="important">
12    Welcome on my awesome homepage.
13{% endblock %}
14
Lana
15 Apr 2019
1<!doctype html>
2<html>
3  <head>
4    {% block head %}
5    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
6    <title>{% block title %}{% endblock %} - My Webpage</title>
7    {% endblock %}
8  </head>
9  <body>
10    <div id="content">{% block content %}{% endblock %}</div>
11    <div id="footer">
12      {% block footer %}
13      © Copyright 2010 by <a href="http://domain.invalid/">you</a>.
14      {% endblock %}
15    </div>
16  </body>
17</html>
18