receptty.org/templates/page.html

36 lines
986 B
HTML
Raw Permalink Normal View History

{% extends "base.html" %}
2019-10-30 11:58:46 +01:00
{% block title %}{{ config.title }} — {{ page.title }}{% endblock title %}
{% block content %}
<main class="recipe">
<h2>{{ page.title | upper }}</h2>
<hr>
2021-02-09 14:44:13 +01:00
{{ macro::recipe_image() }}
2019-10-30 11:58:46 +01:00
<div class="meta">
2021-02-09 14:44:13 +01:00
{{ macro::recipe_meta() }}
2019-10-30 11:58:46 +01:00
</div>
{{ page.content | safe }}
<hr>
2021-02-09 14:44:13 +01:00
{{ macro::recipe_taxonomies() }}
2019-10-30 11:58:46 +01:00
</main>
{% endblock content %}
2021-01-23 15:32:22 +01:00
{% block script %}
<script>
let list_items = document.querySelectorAll('ol li');
for(let i=0; i<list_items.length; i++){
list_items[i].addEventListener('click', function(){ this.classList.toggle("completed"); }, false);
}
2023-11-08 11:00:57 +01:00
let preview_image = document.getElementById('preview-image');
let fullsize_image = document.getElementById('fullsize-image');
preview_image.addEventListener('click', function(){ fullsize_image.classList.add("visible"); }, false);
fullsize_image.addEventListener('click', function(){ fullsize_image.classList.remove("visible"); }, false);
2021-01-23 15:32:22 +01:00
</script>
{% endblock script %}