Refactor
This commit is contained in:
parent
b35379b379
commit
dfd0c2dc93
3 changed files with 11 additions and 13 deletions
|
@ -56,7 +56,7 @@ $(function() {
|
|||
/**
|
||||
* News
|
||||
*/
|
||||
fetch('/src/api/blog.php', {
|
||||
fetch('/src/api/blog.php', {
|
||||
method: 'GET'
|
||||
})
|
||||
.then(handleFetchError)
|
||||
|
|
|
@ -176,7 +176,6 @@ $(function () {
|
|||
|
||||
var wishlist_href = window.location.origin + $(event.currentTarget).attr('href');
|
||||
|
||||
|
||||
navigator.clipboard.writeText(wishlist_href).then(function() {
|
||||
$('body').toast({ message: text.toast_clipboard_success });
|
||||
}, function() {
|
||||
|
|
|
@ -50,22 +50,22 @@ class Page
|
|||
switch ($type) {
|
||||
case 'error':
|
||||
$containerClasses[] = 'error icon';
|
||||
$iconClasses[] = 'exclamation triangle';
|
||||
$iconClasses[] = 'exclamation triangle';
|
||||
break;
|
||||
|
||||
case 'warning':
|
||||
$containerClasses[] = 'warning icon';
|
||||
$iconClasses[] = 'exclamation circle';
|
||||
$iconClasses[] = 'exclamation circle';
|
||||
break;
|
||||
|
||||
case 'info':
|
||||
$containerClasses[] = 'info icon';
|
||||
$iconClasses[] = 'info circle';
|
||||
$iconClasses[] = 'info circle';
|
||||
break;
|
||||
|
||||
case 'success':
|
||||
$containerClasses[] = 'success icon';
|
||||
$iconClasses[] = 'check circle';
|
||||
$iconClasses[] = 'check circle';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,6 @@ class Page
|
|||
'home',
|
||||
'blog',
|
||||
'post',
|
||||
'install',
|
||||
'login',
|
||||
'maintenance',
|
||||
'register',
|
||||
|
@ -290,7 +289,7 @@ class Page
|
|||
*/
|
||||
|
||||
/** Fomantic UI */
|
||||
$stylesheetFomantic = 'semantic/dist/semantic.min.css';
|
||||
$stylesheetFomantic = 'semantic/dist/semantic.min.css';
|
||||
$stylesheetFomanticModified = filemtime($stylesheetFomantic);
|
||||
?>
|
||||
<link rel="stylesheet"
|
||||
|
@ -300,7 +299,7 @@ class Page
|
|||
<?php
|
||||
|
||||
/** Default */
|
||||
$stylesheetDefault = 'src/assets/css/default.css';
|
||||
$stylesheetDefault = 'src/assets/css/default.css';
|
||||
$stylesheetDefaultModified = filemtime($stylesheetDefault);
|
||||
?>
|
||||
<link rel="stylesheet"
|
||||
|
@ -408,21 +407,21 @@ class Page
|
|||
|
||||
<?php
|
||||
/** jQuery */
|
||||
$scriptjQuery = 'node_modules/jquery/dist/jquery.min.js';
|
||||
$scriptjQuery = 'node_modules/jquery/dist/jquery.min.js';
|
||||
$scriptjQueryModified = filemtime($scriptjQuery);
|
||||
?>
|
||||
<script defer src="/<?= $scriptjQuery ?>?m=<?= $scriptjQueryModified ?>"></script>
|
||||
<?php
|
||||
|
||||
/** Fomantic */
|
||||
$scriptFomantic = 'semantic/dist/semantic.min.js';
|
||||
$scriptFomantic = 'semantic/dist/semantic.min.js';
|
||||
$scriptFomanticModified = filemtime($scriptFomantic);
|
||||
?>
|
||||
<script defer src="/<?= $scriptFomantic ?>?m=<?= $scriptFomanticModified ?>"></script>
|
||||
<?php
|
||||
|
||||
/** Default */
|
||||
$scriptDefault = 'src/assets/js/default.js';
|
||||
$scriptDefault = 'src/assets/js/default.js';
|
||||
$scriptDefaultModified = filemtime($scriptDefault);
|
||||
?>
|
||||
<script defer src="/<?= $scriptDefault ?>?m=<?= $scriptDefaultModified ?>"></script>
|
||||
|
@ -534,7 +533,7 @@ class Page
|
|||
'icon' => 'sign out alternate',
|
||||
);
|
||||
} else {
|
||||
$pages[$login] = array(
|
||||
$pages[$login] = array(
|
||||
'text' => __('Login'),
|
||||
'alignment' => 'right',
|
||||
'items' => array(
|
||||
|
|
Loading…
Reference in a new issue