|
25 | 25 | {% set pages = term.pages %}
|
26 | 26 | {% endif %}
|
27 | 27 |
|
| 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 | + |
28 | 34 | {# Sort so that "master" always comes first #}
|
29 | 35 | {% 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"] %} |
31 | 41 | <div class="flex flex-col flex-1 gap-y-6">
|
32 | 42 |
|
33 | 43 | {# margin = SVG width + gap width #}
|
| 44 | + {# Title is now disabled, since we no longer have gdnative/gdext differentiation. |
34 | 45 | <h2 class="text-center mb-0 pb-0
|
35 | 46 | {% if col_repo == 'gdext' %}
|
36 | 47 | mr-8
|
37 | 48 | {% else %}
|
38 | 49 | ml-8
|
39 | 50 | {% endif %}
|
40 | 51 | ">{{ col_repo }}</h2>
|
| 52 | + #} |
41 | 53 |
|
42 | 54 | {% 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 | + |
43 | 69 | {% if page.extra.repo == col_repo %}
|
44 | 70 |
|
45 | 71 | {# reverse: PR icon on the right in right column #}
|
46 | 72 | <div class="flex gap-x-2
|
47 |
| - {% if col_repo == 'gdext' %} |
| 73 | + {% if col == 'col_right' %} |
48 | 74 | flex-row-reverse
|
49 | 75 | {% endif %}
|
50 | 76 | ">
|
|
0 commit comments