Skip to content

Commit 9272595

Browse files
committed
It did, but this is for the LOLs
1 parent 30f712a commit 9272595

1 file changed

Lines changed: 8 additions & 39 deletions

File tree

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,8 @@
1-
{# copied from https://github.com/hexdoc-dev/hexdoc/blob/34aff08b9e6facab74be4425adbb95f71cd1fa53/src/hexdoc/_templates/pages/patchouli/page.html.jinja to allow hiding pages based on flag #}
2-
3-
{% if page.flag != "!has_any_map" %}
4-
{# FIXME: hack #}
5-
{% if page.anchor %}
6-
{# set variable to allow children to use this value too #}
7-
{% set page_anchor_id = entry.id.path ~ "@" ~ page.anchor %}
8-
9-
{#- page content (not required because EmptyPage uses this template directly) #}
10-
<div id="{{ page_anchor_id }}" class="{{ 'spoilered' if page.is_spoiler }}">
11-
{% block body scoped %}{% endblock %}
12-
</div>
13-
{% elif page.is_spoiler %}
14-
<div class="spoilered">
15-
{{ self.body() }}
16-
</div>
17-
{% else %}
18-
{{ self.body() }}
19-
{% endif %}
20-
<br />
21-
{% endif %}
22-
23-
{%- macro redirect_title() -%}
24-
{%- block redirect_title -%}
25-
{{ page.anchor }}
26-
{%- endblock redirect_title -%}
27-
{%- endmacro -%}
28-
29-
{%- macro redirect_description() -%}
30-
{%- block redirect_description %}{% endblock -%}
31-
{%- endmacro -%}
32-
33-
{%- macro redirect_image() -%}
34-
{%- block redirect_image %}{% endblock -%}
35-
{%- endmacro -%}
36-
37-
{%- macro redirect_extra_opengraph() %}
38-
{% block redirect_extra_opengraph %}{% endblock %}
39-
{% endmacro -%}
1+
{%- if page.flag != "!has_any_map" -%}
2+
{%- extends "hexdoc:pages/patchouli/page.html.jinja" -%}
3+
{%- else -%}
4+
{%- macro redirect_title() %}{% endmacro -%}
5+
{%- macro redirect_description() %}{% endmacro -%}
6+
{%- macro redirect_image() %}{% endmacro -%}
7+
{%- macro redirect_extra_opengraph() %}{% endmacro -%}
8+
{%- endif -%}

0 commit comments

Comments
 (0)