clemsbot/templates/commands.html

48 lines
1.1 KiB
HTML

{% extends "_base.html" %}
{% block title %}Commands{% endblock %}
{% block head %}
<style>
body {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.command {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-top: 1em;
}
</style>
{% endblock %}
{% block body %}
<div>
<a href="/commands/add">Add</a>
</div>
{% for command in commands %}
<div class="command">
<strong>{{ command.name }}</strong>
{% if !command.aliases.is_empty() %}
<em>{{ command.aliases.join(", ") }}</em>
{% endif %}
<pre><code>
{%- match command.executor -%}
{%- when CommandExecutor::Text with (t) -%}
{{ t }}
{%- when CommandExecutor::Rhai with (t) -%}
{{ t }}
{%- endmatch -%}
</code></pre>
<form action="/commands/delete" method="post">
<input type="hidden" name="name" value="{{ command.name }}"/>
<button type="submit">Delete</button>
</form>
</div>
{% endfor %}
{% endblock %}