You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nicholas Pringle edited this page May 6, 2013
·
1 revision
What does a base template need?
Set the DOCTYPE to ensure proper rendering.
You may need to import macros...
Open the html tags...
<!DOCTYPE html>
import macros
<html>
Everything in here...
</html>
Inside the <html> tags there are two 'direct descendents': <head> and <body>.
Inside the <head> tags we put links to the css stylesheets and the JavaScript libraries as well as the page title and meta data.
Inside the <title> tags you need to a # block title and a {{ title }} variable as this will change for each page...
<head>
<title>
{% block title %}
{{ title }}
{% endblock title %}
<title>
<meta></meta>
<link></link>
<script></script>
</head>
Inside the <body> tags you can put your <header>, <main>, and <footer> tags.