Skip to content

Commit 64f703b

Browse files
committed
Update templates - icons, fonts
1 parent 54ccd0f commit 64f703b

18 files changed

Lines changed: 148 additions & 185 deletions

File tree

assets/css/src.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
@tailwind base;
2-
3-
@layer base {
4-
svg {
5-
display: inline-block;
6-
vertical-align: -.125rem;
7-
}
8-
}
9-
102
@tailwind components;
113
@tailwind utilities;
124

assets/css/styles.css

Lines changed: 48 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,6 @@ video {
417417
height: auto;
418418
}
419419

420-
svg {
421-
display: inline-block;
422-
vertical-align: -.125rem;
423-
}
424-
425420
*, ::before, ::after {
426421
--tw-border-spacing-x: 0;
427422
--tw-border-spacing-y: 0;
@@ -667,38 +662,10 @@ svg {
667662
margin-bottom: 1rem;
668663
}
669664

670-
.-mx-1\.5 {
671-
margin-left: -0.375rem;
672-
margin-right: -0.375rem;
673-
}
674-
675-
.-my-1\.5 {
676-
margin-top: -0.375rem;
677-
margin-bottom: -0.375rem;
678-
}
679-
680-
.-mx-1 {
681-
margin-left: -0.25rem;
682-
margin-right: -0.25rem;
683-
}
684-
685-
.-my-1 {
686-
margin-top: -0.25rem;
687-
margin-bottom: -0.25rem;
688-
}
689-
690665
.mr-1 {
691666
margin-right: 0.25rem;
692667
}
693668

694-
.ml-auto {
695-
margin-left: auto;
696-
}
697-
698-
.ml-3 {
699-
margin-left: 0.75rem;
700-
}
701-
702669
.mr-3 {
703670
margin-right: 0.75rem;
704671
}
@@ -880,10 +847,6 @@ svg {
880847
justify-items: stretch;
881848
}
882849

883-
.gap-1 {
884-
gap: 0.25rem;
885-
}
886-
887850
.gap-2 {
888851
gap: 0.5rem;
889852
}
@@ -953,6 +916,10 @@ svg {
953916
border-top-width: 1px;
954917
}
955918

919+
.border-transparent {
920+
border-color: transparent;
921+
}
922+
956923
.border-gray-300 {
957924
--tw-border-opacity: 1;
958925
border-color: rgb(209 213 219 / var(--tw-border-opacity));
@@ -1122,14 +1089,6 @@ svg {
11221089
padding: 0.75rem;
11231090
}
11241091

1125-
.p-1\.5 {
1126-
padding: 0.375rem;
1127-
}
1128-
1129-
.p-1 {
1130-
padding: 0.25rem;
1131-
}
1132-
11331092
.p-5 {
11341093
padding: 1.25rem;
11351094
}
@@ -1217,16 +1176,21 @@ svg {
12171176
line-height: 1.75rem;
12181177
}
12191178

1220-
.text-sm {
1221-
font-size: 0.875rem;
1222-
line-height: 1.25rem;
1223-
}
1224-
12251179
.text-xs {
12261180
font-size: 0.75rem;
12271181
line-height: 1rem;
12281182
}
12291183

1184+
.text-base {
1185+
font-size: 1rem;
1186+
line-height: 1.5rem;
1187+
}
1188+
1189+
.text-sm {
1190+
font-size: 0.875rem;
1191+
line-height: 1.25rem;
1192+
}
1193+
12301194
.font-bold {
12311195
font-weight: 700;
12321196
}
@@ -1239,10 +1203,6 @@ svg {
12391203
font-weight: 600;
12401204
}
12411205

1242-
.font-medium {
1243-
font-weight: 500;
1244-
}
1245-
12461206
.uppercase {
12471207
text-transform: uppercase;
12481208
}
@@ -1537,12 +1497,12 @@ svg {
15371497
border: 0;
15381498
}
15391499

1540-
.file\:mr-4::-webkit-file-upload-button {
1541-
margin-right: 1rem;
1500+
.file\:mr-3::-webkit-file-upload-button {
1501+
margin-right: 0.75rem;
15421502
}
15431503

1544-
.file\:mr-4::file-selector-button {
1545-
margin-right: 1rem;
1504+
.file\:mr-3::file-selector-button {
1505+
margin-right: 0.75rem;
15461506
}
15471507

15481508
.file\:rounded::-webkit-file-upload-button {
@@ -1553,12 +1513,20 @@ svg {
15531513
border-radius: 0.25rem;
15541514
}
15551515

1556-
.file\:border-0::-webkit-file-upload-button {
1557-
border-width: 0px;
1516+
.file\:border::-webkit-file-upload-button {
1517+
border-width: 1px;
15581518
}
15591519

1560-
.file\:border-0::file-selector-button {
1561-
border-width: 0px;
1520+
.file\:border::file-selector-button {
1521+
border-width: 1px;
1522+
}
1523+
1524+
.file\:border-transparent::-webkit-file-upload-button {
1525+
border-color: transparent;
1526+
}
1527+
1528+
.file\:border-transparent::file-selector-button {
1529+
border-color: transparent;
15621530
}
15631531

15641532
.file\:bg-sky-500::-webkit-file-upload-button {
@@ -1581,14 +1549,14 @@ svg {
15811549
padding-bottom: 0.375rem;
15821550
}
15831551

1584-
.file\:px-3::-webkit-file-upload-button {
1585-
padding-left: 0.75rem;
1586-
padding-right: 0.75rem;
1552+
.file\:px-2::-webkit-file-upload-button {
1553+
padding-left: 0.5rem;
1554+
padding-right: 0.5rem;
15871555
}
15881556

1589-
.file\:px-3::file-selector-button {
1590-
padding-left: 0.75rem;
1591-
padding-right: 0.75rem;
1557+
.file\:px-2::file-selector-button {
1558+
padding-left: 0.5rem;
1559+
padding-right: 0.5rem;
15921560
}
15931561

15941562
.file\:py-1::-webkit-file-upload-button {
@@ -1601,14 +1569,14 @@ svg {
16011569
padding-bottom: 0.25rem;
16021570
}
16031571

1604-
.file\:text-sm::-webkit-file-upload-button {
1605-
font-size: 0.875rem;
1606-
line-height: 1.25rem;
1572+
.file\:text-base::-webkit-file-upload-button {
1573+
font-size: 1rem;
1574+
line-height: 1.5rem;
16071575
}
16081576

1609-
.file\:text-sm::file-selector-button {
1610-
font-size: 0.875rem;
1611-
line-height: 1.25rem;
1577+
.file\:text-base::file-selector-button {
1578+
font-size: 1rem;
1579+
line-height: 1.5rem;
16121580
}
16131581

16141582
.file\:font-semibold::-webkit-file-upload-button {
@@ -1693,12 +1661,12 @@ svg {
16931661
opacity: 0.75;
16941662
}
16951663

1696-
.hover\:file\:bg-sky-600::-webkit-file-upload-button:hover {
1664+
.file\:hover\:bg-sky-600:hover::-webkit-file-upload-button {
16971665
--tw-bg-opacity: 1;
16981666
background-color: rgb(2 132 199 / var(--tw-bg-opacity));
16991667
}
17001668

1701-
.hover\:file\:bg-sky-600::file-selector-button:hover {
1669+
.file\:hover\:bg-sky-600:hover::file-selector-button {
17021670
--tw-bg-opacity: 1;
17031671
background-color: rgb(2 132 199 / var(--tw-bg-opacity));
17041672
}
@@ -1832,10 +1800,6 @@ svg {
18321800
display: inline-block;
18331801
}
18341802

1835-
.md\:flex {
1836-
display: flex;
1837-
}
1838-
18391803
.md\:table-cell {
18401804
display: table-cell;
18411805
}
@@ -1907,6 +1871,10 @@ svg {
19071871
display: inline-block;
19081872
}
19091873

1874+
.lg\:flex {
1875+
display: flex;
1876+
}
1877+
19101878
.lg\:grid {
19111879
display: grid;
19121880
}
@@ -1932,14 +1900,6 @@ svg {
19321900
}
19331901
}
19341902

1935-
.\[\&\>svg\]\:align-middle>svg {
1936-
vertical-align: middle;
1937-
}
1938-
1939-
.\[\&\>svg\]\:align-\[-0\.05rem\]>svg {
1940-
vertical-align: -0.05rem;
1941-
}
1942-
19431903
.\[\&\:nth-last-child\(2\)\>\*\]\:border-b-0:nth-last-child(2)>* {
19441904
border-bottom-width: 0px;
19451905
}

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use RobiNN\Pca\Admin;
1414
use RobiNN\Pca\Config;
15+
use RobiNN\Pca\Helpers;
1516
use RobiNN\Pca\Http;
1617
use RobiNN\Pca\Template;
1718

templates/components/alert.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div class="ml-auto py-3 px-4 flex items-center rounded {{ alert_color ? alert_color : 'bg-blue-500' }} shadow-lg fixed top-5 right-5 z-50 w-auto">
2-
<div class="ml-3 mr-3 flex items-center gap-1 text-sm font-medium text-white">{{ message|raw }}</div>
3-
<button type="button" class="close -mx-1.5 -my-1.5 ml-auto p-1.5 inline-flex text-white hover:opacity-75" onclick="this.parentElement.remove();">
4-
{{ svg('x') }}
1+
<div class="py-3 px-4 flex items-center rounded {{ alert_color ? alert_color : 'bg-blue-500' }} shadow-lg fixed top-5 right-5 z-50 w-auto">
2+
<div class="mr-3 text-white">{{ message|raw }}</div>
3+
<button type="button" class="close text-white hover:opacity-75" onclick="this.parentElement.remove();">
4+
{{ svg('x', 13) }}
55
</button>
66
</div>

templates/components/button.twig

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
{% if icon %}
2-
{% set icon_css = ' inline-flex items-center gap-1 [&>svg]:align-middle' %}
3-
{% endif %}
4-
51
{% if btn_green %}
62
{% set btn_color = 'bg-green-500 hover:bg-green-600 focus:ring-green-300' %}
73
{% elseif btn_red %}
@@ -11,17 +7,18 @@
117
{% endif %}
128

139
{% if link %}
14-
<a href="{{ link }}" class="rounded py-1.5 px-3 text-sm font-semibold text-white shadow focus:ring-4 {{ btn_color }}{{ icon_css }}{{ class|space }}">
10+
<a href="{{ link }}"
11+
class="inline-flex items-center border border-transparent rounded py-1.5 px-3 text-base font-semibold text-white align-middle shadow focus:ring-4 {{ btn_color }}{{ class|space }}">
1512
{% if icon %}
16-
{{ svg(icon) }}
13+
{{ svg(icon, 16, (text ? 'mr-1' : '')) }}
1714
{% endif %}
1815
{{ text }}
1916
</a>
2017
{% else %}
2118
<button type="{{ submit ? 'submit' : 'button' }}" id="{{ id }}" name="{{ id }}"
22-
class="rounded py-1.5 px-3 text-sm font-semibold text-white shadow focus:ring-4 {{ btn_color }}{{ icon_css }}{{ class|space }}">
19+
class="inline-flex items-center border border-transparent rounded py-1.5 px-3 text-base font-semibold text-white align-middle shadow focus:ring-4 {{ btn_color }}{{ class|space }}">
2320
{% if icon %}
24-
{{ svg(icon) }}
21+
{{ svg(icon, 16, (text ? 'mr-1' : '')) }}
2522
{% endif %}
2623
{{ text }}
2724
</button>

templates/components/input.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="mb-3"{{ extra_attr|raw }}>
22
<label for="{{ id }}" class="mb-2 block text-sm font-semibold">{{ label }}</label>
33
<input id="{{ id }}" name="{{ id }}" type="{{ type ? type : 'text' }}" value="{{ value }}"
4-
class="w-full rounded border border-gray-300 bg-white py-1.5 px-3 text-sm leading-normal text-gray-600 placeholder-gray-400
4+
class="w-full rounded border border-gray-300 bg-white py-1.5 px-3 text-base text-gray-600 placeholder-gray-400
55
focus:outline-none focus:ring focus:ring-{{ color }}-100 focus:border-{{ color }}-300"{{ required ? ' required' : '' }}{{ attr|raw }}>
66
{% if help %}
77
<small class="text-xs text-gray-500">{{ help }}</small>

templates/components/select.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<select id="{{ id }}" name="{{ id }}"
2-
class="select w-full appearance-none rounded border border-gray-300 bg-white py-1.5 px-3 text-sm leading-normal text-gray-600 placeholder-gray-400
2+
class="select w-full appearance-none rounded border border-gray-300 bg-white py-1.5 px-3 text-base text-gray-600 placeholder-gray-400
33
focus:outline-none focus:ring focus:ring-{{ color }}-100 focus:border-{{ color }}-300{{ class|space }}" aria-label="">
44
{% for value, name in options %}
55
<option value="{{ value }}"{{ value == selected ? ' selected' : '' }}>{{ name }}</option>

templates/dashboards/memcached/form.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<div class="mb-3">
3333
<label for="value" class="mb-2 block text-sm font-semibold">Value</label>
3434
<textarea id="value" name="value"
35-
class="w-full rounded border border-gray-300 bg-white py-1.5 px-3 text-sm leading-normal text-gray-600 placeholder-gray-400
35+
class="w-full rounded border border-gray-300 bg-white py-1.5 px-3 text-base text-gray-600 placeholder-gray-400
3636
focus:outline-none focus:ring focus:ring-{{ color }}-100 focus:border-{{ color }}-300" rows="10" required>{{ value }}</textarea>
3737
</div>
3838

templates/dashboards/memcached/memcached.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="mb-5 flex gap-1 md:justify-end">
1+
<div class="mb-5 lg:flex lg:justify-end">
22
{{ include('partials/keys_buttons.twig') }}
33
</div>
44

templates/dashboards/opcache.twig

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
<div class="mb-5 flex gap-1 md:justify-end">
2-
{{ include('components/button.twig', {
3-
text: (is_ignored ? 'Show' : 'Ignore') ~ ' scripts from this tool',
4-
link: ignore_url,
5-
}) }}
1+
<div class="mb-5 lg:flex lg:justify-end">
2+
<div>
3+
{{ include('components/button.twig', {
4+
text: (is_ignored ? 'Show' : 'Ignore') ~ ' scripts from this tool',
5+
link: ignore_url,
6+
class: 'mr-1',
7+
}) }}
68

7-
{{ include('components/button.twig', {
8-
text: 'Reset cache',
9-
icon: 'reset',
10-
id: 'delete_all',
11-
}) }}
9+
{{ include('components/button.twig', {
10+
text: 'Reset cache',
11+
icon: 'reset',
12+
id: 'delete_all',
13+
}) }}
14+
</div>
1215
</div>
1316

1417
<div class="mb-5 rounded bg-white shadow-sm shadow-gray-300">

0 commit comments

Comments
 (0)