更新完善功能
This commit is contained in:
1 parent
4e6d6e5307
commit
e08a87a4c2
8 files changed
+330
-95
No files matched your search
+63
-63
@@ -372,69 +372,6 @@ admin_topbar('content');
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 四大板块:名称 / 说明 / 顺序 -->
|
||||
<div class="fieldset-card">
|
||||
<div class="fs-title">四大板块(名称 / 悬停说明文案 / 顺序)</div>
|
||||
<form method="post">
|
||||
<?= csrf_field() ?><input type="hidden" name="act" value="boards">
|
||||
<?php foreach ($cats as $c): $id = (int)$c['id']; ?>
|
||||
<div class="m-block" style="margin-bottom:10px">
|
||||
<div class="m-block-head">
|
||||
<strong><?= he((string)$c['key']) ?></strong>
|
||||
<span class="ops"><input type="number" name="b_sort[<?= $id ?>]" value="<?= (int)$c['sort'] ?>" min="1" max="99" style="width:70px" title="顺序数值,越小越靠前"></span>
|
||||
</div>
|
||||
<div class="m-items">
|
||||
<div class="icon-ctl" style="margin-top:8px">
|
||||
<span class="icon-preview"></span>
|
||||
<input type="text" class="icon-input" name="b_icon[<?= $id ?>]" value="<?= he((string)($c['icon'] ?? '')) ?>" placeholder="字符 / emoji,或粘贴/上传图片">
|
||||
<button type="button" class="btn btn-sm icon-upload" title="上传图片(≤200KB)">上传</button>
|
||||
<input type="file" class="icon-file" accept="image/*" hidden>
|
||||
</div>
|
||||
<input type="text" name="b_name[<?= $id ?>]" value="<?= he((string)$c['name']) ?>" placeholder="板块名称" style="margin-top:8px">
|
||||
<textarea name="b_desc[<?= $id ?>]" rows="2" placeholder="悬停说明文案"><?= he(trim((string)$c['description']) !== '' ? (string)$c['description'] : ($boardDefaults[(string)$c['key']] ?? '')) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<button type="submit" class="btn btn-primary">保存板块设置</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 首页快捷站点(本域名其它网站) -->
|
||||
<div class="fieldset-card">
|
||||
<div class="fs-title">首页快捷站点(四大板块上方的胶囊按钮,新标签页打开)</div>
|
||||
<form method="post" id="qlForm">
|
||||
<?= csrf_field() ?><input type="hidden" name="act" value="quicklinks">
|
||||
<textarea name="data" id="qlData" hidden></textarea>
|
||||
<p class="tip">用于放置本域名下的其它网站入口;点击后新开标签页。地址需为完整 http(s) 链接。列表顺序即展示顺序。</p>
|
||||
<div id="qlRows">
|
||||
<?php $quickLinks = $pdo->query('SELECT * FROM quick_links ORDER BY sort ASC, id ASC')->fetchAll(); ?>
|
||||
<?php foreach ($quickLinks as $ql): ?>
|
||||
<div class="l-row" data-id="<?= (int)$ql['id'] ?>">
|
||||
<span class="icon-ctl">
|
||||
<span class="icon-preview"></span>
|
||||
<input type="text" class="icon-input l-icon" value="<?= he((string)$ql['icon']) ?>" placeholder="图标">
|
||||
<button type="button" class="btn btn-sm icon-upload" title="上传图片(≤200KB)">上传</button>
|
||||
<input type="file" class="icon-file" accept="image/*" hidden>
|
||||
</span>
|
||||
<input type="text" class="l-name" value="<?= he((string)$ql['name']) ?>" placeholder="站点名称(必填)">
|
||||
<input type="text" class="l-url" value="<?= he((string)$ql['url']) ?>" placeholder="完整网址,如 https://子站.域名.com">
|
||||
<input type="text" class="l-note" value="<?= he((string)($ql['note'] ?? '')) ?>" placeholder="备注 / 网站介绍(悬停首页按钮显示)">
|
||||
<label class="t-on"><input type="checkbox" class="l-enabled"<?= (int)$ql['enabled'] === 1 ? ' checked' : '' ?>> 启用</label>
|
||||
<span class="ops">
|
||||
<button type="button" class="btn btn-sm l-up" title="上移">↑</button>
|
||||
<button type="button" class="btn btn-sm l-down" title="下移">↓</button>
|
||||
<button type="button" class="btn btn-sm btn-danger l-del" title="删除">✕</button>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="field-row" style="margin:12px 0">
|
||||
<button type="button" class="btn btn-sm" id="qlAdd">+ 添加快捷站点</button>
|
||||
<button type="submit" class="btn btn-primary">保存快捷站点</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 底部信息 -->
|
||||
<div class="fieldset-card">
|
||||
<div class="fs-title">底部信息</div>
|
||||
@@ -519,6 +456,69 @@ admin_topbar('content');
|
||||
<div style="margin-top:12px"><button type="submit" class="btn btn-primary">修改密码</button></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 四大板块:名称 / 说明 / 顺序 -->
|
||||
<div class="fieldset-card col-span-2">
|
||||
<div class="fs-title">四大板块(名称 / 悬停说明文案 / 顺序)</div>
|
||||
<form method="post">
|
||||
<?= csrf_field() ?><input type="hidden" name="act" value="boards">
|
||||
<?php foreach ($cats as $c): $id = (int)$c['id']; ?>
|
||||
<div class="m-block" style="margin-bottom:10px">
|
||||
<div class="m-block-head">
|
||||
<strong><?= he((string)$c['key']) ?></strong>
|
||||
<span class="ops"><input type="number" name="b_sort[<?= $id ?>]" value="<?= (int)$c['sort'] ?>" min="1" max="99" style="width:70px" title="顺序数值,越小越靠前"></span>
|
||||
</div>
|
||||
<div class="m-items">
|
||||
<div class="icon-ctl" style="margin-top:8px">
|
||||
<span class="icon-preview"></span>
|
||||
<input type="text" class="icon-input" name="b_icon[<?= $id ?>]" value="<?= he((string)($c['icon'] ?? '')) ?>" placeholder="字符 / emoji,或粘贴/上传图片">
|
||||
<button type="button" class="btn btn-sm icon-upload" title="上传图片(≤200KB)">上传</button>
|
||||
<input type="file" class="icon-file" accept="image/*" hidden>
|
||||
</div>
|
||||
<input type="text" name="b_name[<?= $id ?>]" value="<?= he((string)$c['name']) ?>" placeholder="板块名称" style="margin-top:8px">
|
||||
<textarea name="b_desc[<?= $id ?>]" rows="2" placeholder="悬停说明文案"><?= he(trim((string)$c['description']) !== '' ? (string)$c['description'] : ($boardDefaults[(string)$c['key']] ?? '')) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<button type="submit" class="btn btn-primary">保存板块设置</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 首页快捷站点(本域名其它网站) -->
|
||||
<div class="fieldset-card col-span-2">
|
||||
<div class="fs-title">首页快捷站点(四大板块上方的胶囊按钮,新标签页打开)</div>
|
||||
<form method="post" id="qlForm">
|
||||
<?= csrf_field() ?><input type="hidden" name="act" value="quicklinks">
|
||||
<textarea name="data" id="qlData" hidden></textarea>
|
||||
<p class="tip">用于放置本域名下的其它网站入口;点击后新开标签页。地址需为完整 http(s) 链接。列表顺序即展示顺序。</p>
|
||||
<div id="qlRows">
|
||||
<?php $quickLinks = $pdo->query('SELECT * FROM quick_links ORDER BY sort ASC, id ASC')->fetchAll(); ?>
|
||||
<?php foreach ($quickLinks as $ql): ?>
|
||||
<div class="l-row" data-id="<?= (int)$ql['id'] ?>">
|
||||
<span class="icon-ctl">
|
||||
<span class="icon-preview"></span>
|
||||
<input type="text" class="icon-input l-icon" value="<?= he((string)$ql['icon']) ?>" placeholder="图标">
|
||||
<button type="button" class="btn btn-sm icon-upload" title="上传图片(≤200KB)">上传</button>
|
||||
<input type="file" class="icon-file" accept="image/*" hidden>
|
||||
</span>
|
||||
<input type="text" class="l-name" value="<?= he((string)$ql['name']) ?>" placeholder="站点名称(必填)">
|
||||
<input type="text" class="l-url" value="<?= he((string)$ql['url']) ?>" placeholder="完整网址,如 https://子站.域名.com">
|
||||
<input type="text" class="l-note" value="<?= he((string)($ql['note'] ?? '')) ?>" placeholder="备注 / 网站介绍(悬停首页按钮显示)">
|
||||
<label class="t-on"><input type="checkbox" class="l-enabled"<?= (int)$ql['enabled'] === 1 ? ' checked' : '' ?>> 启用</label>
|
||||
<span class="ops">
|
||||
<button type="button" class="btn btn-sm l-up" title="上移">↑</button>
|
||||
<button type="button" class="btn btn-sm l-down" title="下移">↓</button>
|
||||
<button type="button" class="btn btn-sm btn-danger l-del" title="删除">✕</button>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="field-row" style="margin:12px 0">
|
||||
<button type="button" class="btn btn-sm" id="qlAdd">+ 添加快捷站点</button>
|
||||
<button type="submit" class="btn btn-primary">保存快捷站点</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in new issue
Block a user