# HG changeset patch # User Goffi # Date 1515154462 -3600 # Node ID 92ca411ee635148ae013e7d0dbc80ecbd751d4f3 # Parent 05b500bd623513223d829eea6446d11b4faf8f8e chat: new chat_select page to select a jid to talk to + improved button style diff -r 05b500bd6235 -r 92ca411ee635 default/chat/select.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/chat/select.html Fri Jan 05 13:14:22 2018 +0100 @@ -0,0 +1,17 @@ +{% if not embedded %}{% extends 'base/base.html' %}{% endif %} +{% import 'input/form.html' as form with context %} +{% import 'input/field.html' as field with context %} + +{% block body %} +

{% trans %}Please select the chat room you want to enter{% endtrans %}

+ +

{% trans %}Or enter a room address{% endtrans %}

+{% call form.form(class="room_jid_form") %} + {{ field.text("jid", _("Room address (JID)"), required=true)}} + {{ field.submit(_("Join")) }} +{% endcall %} +{% endblock body %} diff -r 05b500bd6235 -r 92ca411ee635 default/components/common.html --- a/default/components/common.html Wed Jan 03 01:12:16 2018 +0100 +++ b/default/components/common.html Fri Jan 05 13:14:22 2018 +0100 @@ -13,7 +13,7 @@ diff -r 05b500bd6235 -r 92ca411ee635 default/input/field.html --- a/default/input/field.html Wed Jan 03 01:12:16 2018 +0100 +++ b/default/input/field.html Fri Jan 05 13:14:22 2018 +0100 @@ -8,7 +8,7 @@ {% macro int(name, label="", init=0) %} - + {% endmacro %} @@ -16,7 +16,7 @@ {# single line text field additional kwargs will be passed as attributes #} - + {% endmacro %} @@ -24,7 +24,7 @@ {# password field additional kwargs will be passed as attributes #} - + {% endmacro %} @@ -32,7 +32,7 @@ {# email field additional kwargs will be passed as attributes #} - + {% endmacro %} diff -r 05b500bd6235 -r 92ca411ee635 default/static/chat_select.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/static/chat_select.css Fri Jan 05 13:14:22 2018 +0100 @@ -0,0 +1,65 @@ +#main_area { + overflow: auto; +} + +.instructions { + text-align: center; + font-style: italic; +} + +.rooms_list { + list-style: none; + display: grid; + text-align: center; + padding: 0; +} + +.rooms_list a { + text-decoration: none; + color: inherit; + font-variant: small-caps; + font-weight: bold; +} + +.rooms_list li { + margin-top: 1em; +} + +.rooms_list li:first-child { + margin-top: 0; +} + +.rooms_list li:hover { + background-color: #efefef; +} + +#jid { + margin: 0 1em; + width: 15em; + border-radius: 0.7em; + outline: none; + border: 1px solid black; + padding: 0.4em; + box-shadow: none; +} + +.room_jid_form { + text-align: center; +} + +@media (min-width: 600px) { + .instructions { + padding-top: 3rem; + } + .rooms_list { + grid-template-columns: 1fr 1fr 1fr; + } + + .rooms_list li { + margin-top: 0; + } + + .room_jid_form .form_submit.button { + display: inline; + } +} diff -r 05b500bd6235 -r 92ca411ee635 default/static/styles.css --- a/default/static/styles.css Wed Jan 03 01:12:16 2018 +0100 +++ b/default/static/styles.css Fri Jan 05 13:14:22 2018 +0100 @@ -56,6 +56,16 @@ /*** Generic ***/ +.button { + padding: 0.5em 1em; + background: #333; + color: #ccc; + border: 1px solid #555; + border-radius: 0.8em; + font-weight: bold; +} + + .button:hover { background-color: #bc0000; }