Skip to content

Commit 8c7b742

Browse files
committed
Aesthetic patch.
*Slightly* improve the clickable transitions at the configuration page.
1 parent 91b86ed commit 8c7b742

File tree

10 files changed

+38
-16
lines changed

10 files changed

+38
-16
lines changed

assets/bluemetal/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
128128
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(127,191,251,.35),rgba(0,0,0,0))}
129129
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
130130
.warning{display:inline-block;margin:4px;font-weight:700;color:#fca;background:linear-gradient(90deg,rgba(0,128,192,0) 0,rgba(0,128,192,.8) 20% 80%,rgba(0,128,192,0) 100%);line-height:100%}
131+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
132+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
133+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/default/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
131131
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(251,191,127,.7),rgba(0,0,0,0))}
132132
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
133133
.warning{display:inline-block;margin:4px;font-weight:700;color:red;background:linear-gradient(90deg,rgba(255,192,0,0) 0,rgba(255,192,0,.8) 20% 80%,rgba(255,192,0,0) 100%);line-height:100%}
134+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
135+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
136+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/default/scripts.js

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/fullmoon/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
113113
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(251,191,127,.35),rgba(0,0,0,0))}
114114
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
115115
.warning{display:inline-block;margin:4px;font-weight:700;color:#e7ab7d;background:linear-gradient(90deg,rgba(128,92,0,0) 0,rgba(128,92,0,.8) 20% 80%,rgba(128,92,0,0) 100%);line-height:100%}
116+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
117+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
118+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/moss/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
129129
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(191,251,127,.7),rgba(0,0,0,0))}
130130
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
131131
.warning{display:inline-block;margin:4px;font-weight:700;color:#a04848;background:linear-gradient(90deg,rgba(255,192,0,0) 0,rgba(255,192,0,.8) 20% 80%,rgba(255,192,0,0) 100%);line-height:100%}
132+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
133+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
134+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/primer/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,6 @@ input[type=text][pattern]:invalid:not(input[type=text]:placeholder-shown){backgr
135135
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(251,191,127,.7),rgba(0,0,0,0))}
136136
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
137137
.warning{display:inline-block;margin:4px;font-weight:700;color:#cb2431;background:linear-gradient(90deg,rgba(255,192,0,0) 0,rgba(255,192,0,.8) 20% 80%,rgba(255,192,0,0) 100%);line-height:100%}
138+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
139+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
140+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/primerdark/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,6 @@ input[type=text][pattern]:invalid:not(input[type=text]:placeholder-shown){backgr
138138
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(251,191,127,.35),rgba(0,0,0,0))}
139139
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
140140
.warning{display:inline-block;margin:4px;font-weight:700;color:#f90;background:linear-gradient(90deg,rgba(0,128,192,0) 0,rgba(0,128,192,.8) 20% 80%,rgba(0,128,192,0) 100%);line-height:100%}
141+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
142+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
143+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/rbi/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
131131
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(127,191,251,.7),rgba(0,0,0,0))}
132132
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
133133
.warning{display:inline-block;margin:4px;font-weight:700;color:red;background:linear-gradient(90deg,rgba(255,192,0,0) 0,rgba(255,192,0,.8) 20% 80%,rgba(255,192,0,0) 100%);line-height:100%}
134+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
135+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
136+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

assets/slate/frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,6 @@ input[type=checkbox]+label,input[type=radio]+label,.gridboxitem>label,.gridboxit
129129
.configMatrixLabel.gridVB{background:linear-gradient(0deg,rgba(236,191,142,.6),rgba(0,0,0,0))}
130130
.warning::before,.warning::after{content:"⚠️";font-size:24px;display:inline;line-height:100%;position:relative;top:2px}
131131
.warning{display:inline-block;margin:4px;font-weight:700;color:#f52;background:linear-gradient(90deg,rgba(60,60,60,0) 0,rgba(85,85,85,.8) 20% 80%,rgba(60,60,60,0) 100%);line-height:100%}
132+
.showlink::before,.shownlink::before,.unshownlink::before{content:"➖";display:inline-block;margin-{FE_Align_Reverse}:6px}
133+
.shownlink::before{animation:forRotate .5s ease-out 1;animation-fill-mode:both}
134+
.unshownlink::before{animation:revRotate .5s ease-out 1;animation-fill-mode:both}

src/FrontEnd.php

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: Front-end handler (last modified: 2022.03.17).
11+
* This file: Front-end handler (last modified: 2022.03.22).
1212
*/
1313

1414
namespace phpMussel\FrontEnd;
@@ -1023,13 +1023,7 @@ public function view(string $Page = ''): void
10231023
$ConfigurationModified = false;
10241024

10251025
$FE['Indexes'] = '<ul class="pieul">';
1026-
1027-
/** Generate entries for display and regenerate configuration if any changes were submitted. */
1028-
$FE['ConfigFields'] = sprintf(
1029-
'<style>.showlink::before,.hidelink::before{content:"➖";display:inline-block;margin-%1$s:6px}.hidelink::before{transform:rotate(%2$s)}</style>',
1030-
$FE['FE_Align_Reverse'],
1031-
$FE['45deg']
1032-
);
1026+
$FE['ConfigFields'] = '';
10331027

10341028
/** For required extensions, classes, etc. */
10351029
$ReqsLookupCache = [];
@@ -1044,13 +1038,12 @@ public function view(string $Page = ''): void
10441038
}
10451039
$FE['ConfigFields'] .= sprintf(
10461040
'<table><tr><td class="ng2"><div id="%1$s-container" class="s">' .
1047-
'<a class="showlink" id="%1$s-showlink" href="#%1$s-container" onclick="javascript:showid(\'%1$s-hidelink\');hideid(\'%1$s-showlink\');show(\'%1$s-row\')">%1$s</a>' .
1048-
'<a class="hidelink" id="%1$s-hidelink" %2$s href="#" onclick="javascript:showid(\'%1$s-showlink\');hideid(\'%1$s-hidelink\');hide(\'%1$s-row\')">%1$s</a>' .
1049-
"%3\$s</div></td></tr></table>\n<span class=\"%1\$s-row\" %2\$s><table>\n",
1041+
'<a id="%1$sShowLink" class="showlink" href="#%1$s-container" onclick="javascript:toggleconfig(\'%1$sRow\',\'%1$sShowLink\')">%1$s</a>' .
1042+
'%3$s</div></td></tr></table><span id="%1$sRow" %2$s><table>',
10501043
$CatKey,
10511044
'style="display:none"',
10521045
$CatInfo
1053-
);
1046+
) . "\n";
10541047
$CatData = '';
10551048
foreach ($CatValue as $DirKey => $DirValue) {
10561049
$ThisDir = ['Preview' => '', 'Trigger' => '', 'FieldOut' => '', 'CatKey' => $CatKey];
@@ -1062,7 +1055,7 @@ public function view(string $Page = ''): void
10621055
$ThisDir['DirName'] = '<span class="normalHeight">' . $this->ltrInRtf($CatKey . '' . $DirKey) . '</span>';
10631056
$ThisDir['Friendly'] = $this->Loader->L10N->getString($ThisDir['DirLangKey'] . '_label') ?: $DirKey;
10641057
$CatData .= sprintf(
1065-
'<li><a onclick="javascript:showid(\'%1$s-hidelink\');hideid(\'%1$s-showlink\');show(\'%1$s-row\')" href="#%2$s">%3$s</a></li>',
1058+
'<li><a onclick="javascript:toggleconfigNav(\'%1$sRow\',\'%1$sShowLink\')" href="#%2$s">%3$s</a></li>',
10661059
$CatKey,
10671060
$ThisDir['DirLangKey'],
10681061
$ThisDir['Friendly']

0 commit comments

Comments
 (0)