Skip to content

Commit 08fd4b5

Browse files
authored
Refine :focus styles (hestiacp#3432)
* Disable outline on form elements with their own :focus styles * Apply some Prettier formatting
1 parent f0aa694 commit 08fd4b5

File tree

10 files changed

+27
-29
lines changed

10 files changed

+27
-29
lines changed

web/css/src/themes/default.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@
547547

548548
&:focus {
549549
border-right-color: #008fee;
550-
outline-offset: 1px;
551550
}
552551
}
553552

@@ -1459,6 +1458,7 @@
14591458
}
14601459

14611460
&:focus {
1461+
outline: 0;
14621462
border-color: #008fee;
14631463
background-color: #d7f9ff;
14641464
color: #333;
@@ -1518,6 +1518,7 @@
15181518
}
15191519

15201520
&:focus {
1521+
outline: 0;
15211522
border-color: #008fee;
15221523
}
15231524

web/css/themes/default.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/templates/footer.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ class="button button-secondary button-circle button-floating button-floating-top
8585
endif;
8686
?>
8787

88-
<?php
89-
if (($_SESSION['DEBUG_MODE']) == "true") {
90-
require $_SERVER['HESTIA'] . '/web/templates/pages/debug_panel.php';
91-
}
92-
?>
88+
<?php if ($_SESSION["DEBUG_MODE"] == "true") {
89+
require $_SERVER["HESTIA"] . "/web/templates/pages/debug_panel.php";
90+
} ?>
9391

9492
</body>
9593
</html>

web/templates/pages/add_dns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</button>
8989
</div>
9090
<div x-cloak x-show="showAdvanced" id="advtable">
91-
<?php if ($_SESSION['DNS_CLUSTER_SYSTEM'] == 'hestia-zone' && $_SESSION['SUPPORT_DNSSEC'] == 'yes'){?>
91+
<?php if ($_SESSION["DNS_CLUSTER_SYSTEM"] == "hestia-zone" && $_SESSION["SUPPORT_DNSSEC"] == "yes") { ?>
9292
<div class="form-check u-mb10">
9393
<input class="form-check-input" type="checkbox" name="v_dnssec" id="v_dnssec" value="yes" <?php if($v_dnssec === 'yes'){ echo ' checked'; } ?>>
9494
<label for="v_dnssec">

web/templates/pages/edit_dns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</select>
6565
</div>
6666
<?php } ?>
67-
<?php if ($_SESSION['DNS_CLUSTER_SYSTEM'] == 'hestia-zone' && $_SESSION['SUPPORT_DNSSEC'] == 'yes'){?>
67+
<?php if ($_SESSION["DNS_CLUSTER_SYSTEM"] == "hestia-zone" && $_SESSION["SUPPORT_DNSSEC"] == "yes") { ?>
6868
<div class="form-check u-mb10">
6969
<input class="form-check-input" type="checkbox" name="v_dnssec" id="v_dnssec" value="yes" <?php if($v_dnssec === 'yes'){ echo ' checked'; } ?>>
7070
<label for="v_dnssec">

web/templates/pages/list_firewall_ipset.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
</div>
3838

3939
<!-- Begin firewall IP address list item loop -->
40-
<?php
41-
foreach ($data as $key => $value) {
40+
<?php foreach ($data as $key => $value) {
4241
$listname = $key; ?>
4342
<div class="l-unit animate__animated animate__fadeIn">
4443
<div class="l-unit__col l-unit__col--right">

web/templates/pages/list_rrd.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<h2 class="u-mb20">
2424
<?= _($data[$key]["TITLE"]) ?>
2525
</h2>
26-
<a href="/list/rrd/image.php?/rrd/<?=$data[$key]['TYPE']."/".$period."-".$data[$key]['RRD'].".png"?>" class="u-block" target="_blank">
27-
<img class="u-image-fluid u-rounded" src="/list/rrd/image.php?/rrd/<?=$data[$key]['TYPE']."/".$period."-".$data[$key]['RRD'].".png"?>" alt="">
26+
<a href="/list/rrd/image.php?/rrd/<?= $data[$key]["TYPE"] . "/" . $period . "-" . $data[$key]["RRD"] . ".png" ?>" class="u-block" target="_blank">
27+
<img class="u-image-fluid u-rounded" src="/list/rrd/image.php?/rrd/<?= $data[$key]["TYPE"] . "/" . $period . "-" . $data[$key]["RRD"] . ".png" ?>" alt="">
2828
</a>
2929
</div>
3030
<?php } ?>

web/templates/pages/list_services.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ class="button button-secondary button-danger data-controls js-confirm-action"
137137
sort-memory="<?=$data[$key]['MEM']?>" sort-cpu="<?=$cpu;?>" sort-uptime="<?=$data[$key]['RTIME']?>">
138138
<div class="l-unit__col l-unit__col--right">
139139
<div class="clearfix l-unit__stat-col--left super-compact">
140-
<input id="check<?=$i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="service[]" value="<?=$key?>">
140+
<input id="check<?= $i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="service[]" value="<?= $key ?>">
141141
</div>
142142
<div class="clearfix l-unit__stat-col--left wide-2">
143-
<i class="fas <?=$state_icon;?> u-mr5"></i>
144-
<b><a href="/edit/server/<? echo $edit_url ?>/" title="<?= _("edit") ?>: <?=$key?>"><?=$key?></a></b>
143+
<i class="fas <?= $state_icon ?> u-mr5"></i>
144+
<b><a href="/edit/server/<? echo $edit_url ?>/" title="<?= _("edit") ?>: <?= $key ?>"><?= $key ?></a></b>
145145
</div>
146146
<div class="clearfix l-unit__stat-col--left u-text-center compact-2">
147147
<div class="actions-panel clearfix">
@@ -151,9 +151,9 @@ class="button button-secondary button-danger data-controls js-confirm-action"
151151
<div class="actions-panel__col actions-panel__stop shortcut-s" key-action="js">
152152
<a
153153
class="data-controls js-confirm-action"
154-
href="/restart/service/?srv=<?=$key?>&token=<?=$_SESSION['token']?>"
154+
href="/restart/service/?srv=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
155155
data-confirm-title="<?= _("Restart") ?>"
156-
data-confirm-message="<?= sprintf(_('RESTART_CONFIRMATION'), $key) ?>"
156+
data-confirm-message="<?= sprintf(_("RESTART_CONFIRMATION"), $key) ?>"
157157
>
158158
<i class="fas fa-arrow-rotate-left icon-highlight icon-dim"></i>
159159
</a>

web/templates/pages/list_updates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<div class="l-unit__col l-unit__col--right">
5858
<div>
5959
<div class="clearfix l-unit__stat-col--left super-compact center">
60-
<input id="check<?=$i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="pkg[]" value="<?=$key?>">
60+
<input id="check<?= $i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="pkg[]" value="<?= $key ?>">
6161
</div>
6262
<div class="clearfix l-unit__stat-col--left wide"><b><?=$key?></b></div>
6363
<div class="clearfix l-unit__stat-col--left wide-5"><?=_($data[$key]['DESCR'])?></div>

web/templates/pages/list_user.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<li entity="sort-name"><span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Name") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2222
</ul>
2323
<form x-data x-bind="BulkEdit" action="/bulk/user/" method="post">
24-
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
24+
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
2525
<select class="form-select" name="action">
2626
<option value=""><?= _("apply to selected") ?></option>
2727
<option value="rebuild"><?= _("rebuild") ?></option>
@@ -99,7 +99,7 @@
9999
sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DISK']?>">
100100
<div class="l-unit__col l-unit__col--right" style="<?php if (($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes') && ($_SESSION['user'] !== 'admin') && ($key === 'admin')) { echo 'display: none';} else {echo 'display: table-cell';}?>">
101101
<div class="clearfix l-unit__stat-col--left super-compact">
102-
<input id="check<?=$i?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="user[]" value="<?=$key?>">
102+
<input id="check<?= $i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="user[]" value="<?= $key ?>">
103103
</div>
104104
<div class="clearfix l-unit__stat-col--left wide-3 userlist-username">
105105
<?php if ($key == $user_plain) { ?>
@@ -108,24 +108,24 @@
108108
<b><a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("login as") ?> <?=$key?>"><?=$key?> <span style="font-weight: normal !important;">(<?=$data[$key]['NAME'];?>)</span></a></b>
109109
<?php } ?>
110110
<br>
111-
<div class="userlist-email"><b><?= _("Email") ?>:</b> <?=$data[$key]['CONTACT']?></div>
111+
<div class="userlist-email"><b><?= _("Email") ?>:</b> <?= $data[$key]["CONTACT"] ?></div>
112112
</div>
113113
<!-- START QUICK ACTION TOOLBAR AREA -->
114114
<div class="clearfix l-unit__stat-col--left u-text-right compact-3">
115115
<div class="l-unit-toolbar__col l-unit-toolbar__col--right u-noselect">
116116
<div class="actions-panel clearfix">
117117
<?php if ($key == $user_plain) { ?>
118-
<i class="fas fa-user-check icon-dim" title="<?=$key?> (<?=$data[$key]['NAME']?>)"></i>
118+
<i class="fas fa-user-check icon-dim" title="<?= $key ?> (<?= $data[$key]["NAME"] ?>)"></i>
119119
<?php } else { ?>
120-
<a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("login as") ?> <?=$key?>"><i class="fas fa-right-to-bracket icon-green icon-dim"></i></a>
120+
<a href="/login/?loginas=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("login as") ?> <?= $key ?>"><i class="fas fa-right-to-bracket icon-green icon-dim"></i></a>
121121
<?php } ?>
122-
<?php if (($_SESSION['userContext'] === 'admin') && ($key == 'admin') && ($_SESSION['user'] != 'admin')) { ?>
122+
<?php if ($_SESSION["userContext"] === "admin" && $key == "admin" && $_SESSION["user"] != "admin") { ?>
123123
<!-- Hide edit button from admin user when logged in with another admin user -->
124124
&nbsp;
125125
<?php } else { ?>
126126
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Editing User") ?>"><i class="fas fa-pencil icon-orange icon-dim"></i></a></div>
127127
<?php } ?>
128-
<?php if ($key == 'admin') { ?>
128+
<?php if ($key == "admin") { ?>
129129
<!-- Hide suspend and delete buttons in the user list for primary 'admin' account -->
130130
<?php } else { ?>
131131
<?php if ($key == $user_plain) { ?>
@@ -134,7 +134,7 @@
134134
<div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
135135
<a
136136
class="data-controls js-confirm-action"
137-
href="/<?=$spnd_action?>/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>"
137+
href="/<?= $spnd_action ?>/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
138138
data-confirm-title="<?= _($spnd_action) ?>"
139139
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
140140
>
@@ -144,9 +144,9 @@ class="data-controls js-confirm-action"
144144
<div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js">
145145
<a
146146
class="data-controls js-confirm-action"
147-
href="/delete/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>"
147+
href="/delete/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
148148
data-confirm-title="<?= _("Delete") ?>"
149-
data-confirm-message="<?= sprintf(_('DELETE_USER_CONFIRMATION'), $key) ?>"
149+
data-confirm-message="<?= sprintf(_("DELETE_USER_CONFIRMATION"), $key) ?>"
150150
>
151151
<i class="fas fa-trash icon-red icon-dim"></i>
152152
</a>

0 commit comments

Comments
 (0)