foldsite/docs/content/how-template-written.md

24 lines
596 B
Markdown
Raw Normal View History

2025-03-15 15:55:40 -04:00
# How a Template is Written
Templates are written in HTML and use Jinja2 syntax for dynamic content. Below is an example template (`base.html`):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
{% for style in styles %}
<link rel="stylesheet" href="{{ style }}">
{% endfor %}
</head>
<body>
<div class="content">
{{ content }}
</div>
</body>
</html>
```