Skip to content

Commit feca147

Browse files
committed
Limit API docs page to 'gdext'
1 parent d72d94b commit feca147

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

website/templates/docs.html

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,52 @@
2525
{% set pages = term.pages %}
2626
{% endif %}
2727

28+
{# The below code is violating all frontend best practices and doesn't work well on mobile, but not too many users
29+
check out the docs page anyway. If someone has a better idea which is still maintainable, please open a PR! #}
30+
31+
{# Remove any 'gdnative' entries #}
32+
{% set pages = pages | filter(attribute='extra.repo', value="gdext") %}
33+
2834
{# Sort so that "master" always comes first #}
2935
{% set pages = pages | sort(attribute='extra.sort_key') | reverse() %}
30-
{% for col_repo in ["gdnative","gdext",] %}
36+
{# debug print { pages | json_encode(pretty=true) }#}
37+
38+
39+
{% set col_repo = "gdext" %}
40+
{% for col in ["col_left","col_right"] %}
3141
<div class="flex flex-col flex-1 gap-y-6">
3242

3343
{# margin = SVG width + gap width #}
44+
{# Title is now disabled, since we no longer have gdnative/gdext differentiation.
3445
<h2 class="text-center mb-0 pb-0
3546
{% if col_repo == 'gdext' %}
3647
mr-8
3748
{% else %}
3849
ml-8
3950
{% endif %}
4051
">{{ col_repo }}</h2>
52+
#}
4153

4254
{% for page in pages %}
55+
{# debug print { loop.index0 }#}
56+
57+
{% if col == 'col_left' %}
58+
{% if loop.index0 is odd %}
59+
{% continue %}
60+
{% endif %}
61+
{% elif col == 'col_right' %}
62+
{% if loop.index0 is even %}
63+
{% continue %}
64+
{% endif %}
65+
{% endif %}
66+
67+
68+
4369
{% if page.extra.repo == col_repo %}
4470

4571
{# reverse: PR icon on the right in right column #}
4672
<div class="flex gap-x-2
47-
{% if col_repo == 'gdext' %}
73+
{% if col == 'col_right' %}
4874
flex-row-reverse
4975
{% endif %}
5076
">

0 commit comments

Comments
 (0)