Skip to content

Commit 5649b81

Browse files
committed
Adjust UCP settings layout
1 parent e151c81 commit 5649b81

2 files changed

Lines changed: 51 additions & 7 deletions

File tree

styles/all/theme/phpbb_wpn.css

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,43 @@
1616
margin: 0 0 8px;
1717
}
1818

19+
.wpn-fieldset {
20+
display: grid;
21+
column-gap: 1rem;
22+
grid-template-columns: 1fr 320px;
23+
row-gap: 1.25rem;
24+
}
25+
26+
.wpn-fieldset > dl {
27+
display: contents;
28+
}
29+
30+
/* Optional styling */
31+
.wpn-fieldset dt {
32+
float: none;
33+
align-self: start;
34+
width: auto;
35+
}
36+
37+
.wpn-fieldset dd {
38+
display: flex;
39+
align-items: center;
40+
margin: 0;
41+
}
42+
43+
.wpn-fieldset dt label {
44+
line-height: 1.4;
45+
display: inline-block;
46+
}
47+
48+
.wpn-fieldset .fa-toggle-on {
49+
color: #105289;
50+
}
51+
52+
.wpn-fieldset .fa-toggle-off {
53+
color: #5d5d5d;
54+
}
55+
1956
.wpn-notification-dropdown-footer {
2057
font-size: 12px;
2158
white-space: nowrap;
@@ -47,8 +84,17 @@
4784
}
4885

4986
@media (max-width: 700px) {
50-
.wpn.button {
51-
margin-top: 8px;
87+
.wpn-fieldset {
88+
grid-template-columns: 1fr;
89+
row-gap: 0.5rem;
90+
}
91+
92+
.wpn-fieldset dt {
93+
grid-column: 1;
94+
}
95+
96+
.wpn-fieldset dd {
97+
grid-column: 1;
5298
}
5399
}
54100

styles/prosilver/template/event/ucp_notifications_content_before.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
{% if NOTIFICATIONS_WEBPUSH_ENABLE and notification_types is defined %}
22
<div class="panel">
33
<div class="inner">
4-
<fieldset>
4+
<fieldset class="wpn-fieldset">
55
<dl>
6-
<dt><label for="subscribe_webpush">{{ lang('NOTIFY_WEBPUSH_NOTIFICATIONS') ~ lang('COLON') }}</label></dt>
6+
<dt><label for="subscribe_webpush">{{ lang('NOTIFY_WEBPUSH_NOTIFICATIONS') ~ lang('COLON') }}</label><br><span>{{ lang('NOTIFY_WEBPUSH_ENABLE_EXPLAIN') }}</span></dt>
77
<dd>
88
<input id="subscribe_webpush" type="submit" name="subscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_ENABLE') }}" class="wpn button1 button button-form" data-l-err="{{ lang('INFORMATION')|e('html_attr') }}" data-l-msg="{{ lang('NOTIFY_WEBPUSH_DENIED')|e('html_attr') }}" data-l-unsupported="{{ lang('NOTIFY_WEBPUSH_NOT_SUPPORTED')|e('html_attr') }}">
99
<input id="unsubscribe_webpush" type="submit" name="unsubscribe_webpush" value="{{ lang('NOTIFY_WEBPUSH_DISABLE') }}" class="wpn button1 button button-form hidden">
10-
<br><span>{{ lang('NOTIFY_WEBPUSH_ENABLE_EXPLAIN') }}</span>
1110
</dd>
1211
</dl>
1312
<dl>
14-
<dt><label for="toggle_popup_prompt">{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE') ~ lang('COLON') }}</label></dt>
13+
<dt><label for="toggle_popup_prompt">{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE') ~ lang('COLON') }}</label><br><span>{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE_EXPLAIN') }}</span></dt>
1514
<dd>
1615
<button id="toggle_popup_prompt" type="button" name="toggle_popup_prompt" class="wpn-toggle-button" aria-label="{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE') }}">
1716
<i class="icon icon-lg fa-fw fa-toggle-{% if S_WEBPUSH_POPUP_DISABLED %}on{% else %}off{% endif %}" aria-hidden="true"></i>
1817
</button>
19-
<br><span>{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE_EXPLAIN') }}</span>
2018
</dd>
2119
</dl>
2220
</fieldset>

0 commit comments

Comments
 (0)