fix(frontend): align page-set hint bar and FA5 icons with the reference
- 齿轮提示横条改为参考主题的 .abs-right 垂直居中几何(top:50% + right:.7em + translateY(-50%)),本站 legacy .abs-right 是 top:0/right:0 导致横条贴到按钮顶角 - 新增 front-page-admin-set.js:横条 2 秒后淡出 1 秒消失(对齐参考 主题 js/page-edit.js),开关关闭时不出队脚本 - 齿轮与弹窗内图标统一为 FA5 惯例 fa fas fa-*,并采用 FA5 的 glyph 重命名(sliders→sliders-h、pie-chart→chart-pie)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* AKSRT Frontend Page Admin Set — 前台编辑齿轮的提示横条
|
||||
*
|
||||
* 齿轮按钮左侧的「在此编辑此页面参数」横条只是首次进入的引导提示,
|
||||
* 2 秒后淡出 1 秒消失,避免常驻遮挡悬浮按钮栏(对齐参考主题 js/page-edit.js)。
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function fadeHint() {
|
||||
var hint = document.querySelector('.admin-set-page .admin-set-info');
|
||||
if (!hint) return;
|
||||
|
||||
setTimeout(function () {
|
||||
hint.style.transition = 'opacity 1s';
|
||||
hint.style.opacity = '0';
|
||||
setTimeout(function () {
|
||||
hint.style.display = 'none';
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', fadeHint);
|
||||
} else {
|
||||
fadeHint();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user