receptty.org/templates/page.html

42 lines
1.2 KiB
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 %}
2023-11-09 10:20:04 +01:00
{% block head_extra %}
<meta property="og:title" content="{{ page.title }}">
<meta property="og:url" content="{{ config.base_url }}">
<meta property="og:image" content="{{ macro::recipe_preview_image(recipe=page) }}">
<meta property="og:type" content="article">
{% endblock head_extra %}
2019-10-30 11:58:46 +01:00
{% 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 %}