[matrix] Create settings modal

* Create settings modal

* Fix issue with spacing after settings button

* Fix issue with modal background on mobile devices

* Add close button to modal

* Add tooltip to close button

* Support closing modal with escape key

* Add missing semicolon to keydown event listener
This commit is contained in:
Josh
2020-05-27 16:22:21 +10:00
committed by Rapptz
parent 70c73084b3
commit 8be9ef38db
3 changed files with 84 additions and 7 deletions

View File

@ -10,6 +10,13 @@
{%- block relbar2 %}{% endblock %}
{%- block rootrellink %}
{# Perhaps override the relbar() macro to place this on the right side of the link list? #}
<li class="right"{% if not rellinks %} style="margin-right: 10px"{% endif %}>
<a href="javascript:;" title="settings" accesskey="S" onclick="openModal(settings);">settings</a>{{ reldelim2 }}</li>
{{ super() }}
{% endblock %}
{% block header %}
{{ super() }}
{% if pagename == 'index' %}
@ -17,6 +24,17 @@
{% endif %}
{% endblock %}
{%- block content %}
<div id="settings" class="modal" style="display: none;" onclick="if (event.target == this){ closeModal(settings); }">
<div class="modal-content">
<span class="close" onclick="closeModal(settings);" title="Close">&times;</span>
<h1>Settings</h1>
<!-- TODO: ADD OPTIONS HERE -->
</div>
</div>
{{ super() }}
{% endblock %}
{%- block footer %}
<div class="footer">
@ -37,4 +55,4 @@
}
</script>
{%- endif %}
{%- endblock %}
{%- endblock %}