Split template to blocks

master
Emil Miler 2 years ago
parent 9c89607c4f
commit 5fbb142a03

@ -1,5 +1,6 @@
# The URL the site will be built for # The URL the site will be built for
base_url = "https://microlab.space" base_url = "https://microlab.space"
title = "microlab"
# Whether to automatically compile all Sass files in the sass directory # Whether to automatically compile all Sass files in the sass directory
compile_sass = true compile_sass = true

@ -0,0 +1,3 @@
+++
title = "Kontakty"
+++

@ -0,0 +1,3 @@
+++
title = "Projekty"
+++

@ -1,7 +1,20 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="cs"> <html lang="cs">
<head> <head>
<title>microlab</title> <title>
{% block title %}
{% if current_path != "/" %}
{{ config.title }} &ndash;
{% if section.title %}
{{ section.title }}
{% elif page.title %}
{{ page.title }}
{% endif %}
{% else %}
{{ config.title }}
{% endif %}
{% endblock title %}
</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/style.css" rel="stylesheet"> <link href="/style.css" rel="stylesheet">
@ -17,6 +30,12 @@
</nav> </nav>
</body> </body>
<main> <main>
<p>Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.</p> {% block content %}
{% if section %}
{{ section.content | safe }}
{% elif page %}
{{ page.content | safe }}
{% endif %}
{% endblock content %}
</main> </main>
</html> </html>

@ -0,0 +1 @@
{% extends "base.html" %}

@ -0,0 +1 @@
{% extends "base.html" %}
Loading…
Cancel
Save