Základní šablona

master
Emil Miler 5 years ago
commit 8f3c3d1d82

2
.gitignore vendored

@ -0,0 +1,2 @@
public

@ -0,0 +1,19 @@
# The URL the site will be built for
base_url = "https://example.com"
# The site title and description; used in RSS by default.
title = "Title"
description = "Description"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = true
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = false
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false
[extra]
# Put all your custom variables here

@ -0,0 +1,3 @@
+++
title="Section Title"
+++

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

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

@ -0,0 +1,3 @@
+++
title="Page 2"
+++

@ -0,0 +1,3 @@
+++
title="Section 2"
+++

@ -0,0 +1,38 @@
<!DOCTYPE HTML>
<html lang="cs">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<link rel="stylesheet" href="/style.css" type="text/css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div id="header">
<a href="{{ config.base_url }}">{{ config.title }}</a>
<span class="subtitle">{{ section.title }}</span>
</div>
<div id="menu">
<ul>
{% set current_section = get_section(path="_index.md") %}
{% for s in current_section.subsections %}
{% set subsection = get_section(path=s) %}
<li {% if current_path == subsection.path %}class="active"{% endif %}>
<a href="{{ subsection.permalink }}">{{ subsection.title }}</a>
</li>
{% endfor %}
</ul>
</div>
<div id="content">
<div id="nav">
<ul>
{% for post in section.pages %}
<li><a href="{{ post.permalink }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>
<div id="main">content</div>
</div>
</body>
</html>

@ -0,0 +1,6 @@
{% extends "index.html" %}
{% block content %}
<h1>{{ section.title }}</h1>
{{ section.content | safe }}
{% endblock content %}