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