diff options
Diffstat (limited to 'pydis_site/templates/wiki/plugins/macros')
| -rw-r--r-- | pydis_site/templates/wiki/plugins/macros/article_list.html | 14 | ||||
| -rw-r--r-- | pydis_site/templates/wiki/plugins/macros/sidebar.html | 20 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pydis_site/templates/wiki/plugins/macros/article_list.html b/pydis_site/templates/wiki/plugins/macros/article_list.html new file mode 100644 index 00000000..c9261f1e --- /dev/null +++ b/pydis_site/templates/wiki/plugins/macros/article_list.html @@ -0,0 +1,14 @@ +{% load i18n wiki_macro_tags %} + +{% if article_children %} + <div class="article-list"> + <ul> + <li class="nav-header">{% trans "Article index" %} <i class="fa fa-list"></i></li> + {% for child in article_children %} + {% article_list child depth %} + {% empty %} + <i>{% trans "Nothing below this level" %}</i> + {% endfor %} + </ul> + </div> +{% endif %} diff --git a/pydis_site/templates/wiki/plugins/macros/sidebar.html b/pydis_site/templates/wiki/plugins/macros/sidebar.html new file mode 100644 index 00000000..31b68520 --- /dev/null +++ b/pydis_site/templates/wiki/plugins/macros/sidebar.html @@ -0,0 +1,20 @@ +{% load i18n wiki_macro_tags %} +{% allowed_macros as macros %} + +{% for macro in macros %} +<h4>{{ macro.short_description }}</h4> +{{ macro.help_text|safe|linebreaks }} +{% if macro.example_code %} +<pre>{{ macro.example_code }}</pre> +{% endif %} +{% if macro.args %} +<table class="table table-compact"> +{% for arg,description in macro.args.items %} + <tr> + <th>{{ arg }}</th> + <td>{{ description }}</td> + </tr> +{% endfor %} +</table> +{% endif %} +{% endfor %} |