Furry在文章标题右边添加编辑按钮

编辑/usr/themes/Furry/inc/center/navbar.php
找到

    <div class="flex justify-start items-center">
        <span class="text-xl"><?php $this->title() ?></span>
    </div>

将其替换为:

<div class="flex justify-between items-center w-full">
    <span class="text-xl"><?php $this->title() ?></span>

    <?php
    // 准备 admin 基址和目标编辑页
    $adminBase = rtrim($this->options->adminUrl, '/') . '/'; // 确保最后有斜线
    $editUrl   = $adminBase . 'write-post.php?cid=' . intval($this->cid);

    // 如果已登录就直接跳编辑页;未登录就跳登录页并带上 referer 参数
    if ($this->user->hasLogin()) {
        $href = $editUrl;
    } else {
        $href = $adminBase . 'login.php?referer=' . urlencode($editUrl);
    }
    ?>

    <!-- 小号编辑按钮 -->
    <a href="<?= htmlspecialchars($href) ?>"
       class="ml-3 inline-flex items-center gap-x-1 py-1 px-2 rounded border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 text-xs leading-none"
       title="编辑文章" aria-label="编辑文章">
        <svg class="flex-shrink-0 w-3 h-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="12" height="12" aria-hidden="true">
            <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"/>
        </svg>
    </a>
</div>
无标签
评论区
头像
    头像
    szbzepeiuy
      

    2025年10月新盘 做第一批吃螃蟹的人coinsrore.com
    新车新盘 嘎嘎稳 嘎嘎靠谱coinsrore.com
    新车首发,新的一年,只带想赚米的人coinsrore.com
    新盘 上车集合 留下 我要发发 立马进裙coinsrore.com
    做了几十年的项目 我总结了最好的一个盘(纯干货)coinsrore.com
    新车上路,只带前10个人coinsrore.com
    新盘首开 新盘首开 征召客户!!!coinsrore.com
    新项目准备上线,寻找志同道合 的合作伙伴coinsrore.com
    新车即将上线 真正的项目,期待你的参与coinsrore.com
    新盘新项目,不再等待,现在就是最佳上车机会!coinsrore.com
    新盘新盘 这个月刚上新盘 新车第一个吃螃蟹!coinsrore.com

    头像
    nkllxeynoz
      

    2025年10月新盘 做第一批吃螃蟹的人coinsrore.com
    新车新盘 嘎嘎稳 嘎嘎靠谱coinsrore.com
    新车首发,新的一年,只带想赚米的人coinsrore.com
    新盘 上车集合 留下 我要发发 立马进裙coinsrore.com
    做了几十年的项目 我总结了最好的一个盘(纯干货)coinsrore.com
    新车上路,只带前10个人coinsrore.com
    新盘首开 新盘首开 征召客户!!!coinsrore.com
    新项目准备上线,寻找志同道合的合作伙伴coinsrore.com
    新车即将上线 真正的项目,期待你的参与coinsrore.com
    新盘新项目,不再等待,现在就是最佳上车机会!coinsrore.com
    新盘新盘 这个月刚上新盘 新车第一个吃螃蟹!coinsrore.com

    头像
    pdzhvnhbgw
      

    2025年10月新盘 做第一批吃螃蟹的人coinsrore.com