Skip to content

Commit 90e95a1

Browse files
committed
deploy: 9fa5aa8
1 parent 31ce175 commit 90e95a1

6 files changed

Lines changed: 2628 additions & 13 deletions

File tree

404.html

Lines changed: 136 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,21 @@
101101
<nav class="fixed top-0 w-full bg-white border-b z-40">
102102
<!-- Banner -->
103103

104+
<div class="w-full bg-blue-50" data-banner>
105+
<div class="max-w-screen-xl px-6 py-3 mx-auto flex items-center justify-between">
106+
107+
<div class="text-blue-700">
108+
💗 <a href="https://github.com/devlive-community/codeforge" target="_blank">CodeForge <em>2025.0.1</em> 已经发布, 如果喜欢我们的软件,请点击这里支持我们</a> ❤️
109+
</div>
110+
111+
<button class="text-blue-500 hover:text-blue-700" data-banner-close>
112+
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor">
113+
<path d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"/>
114+
</svg>
115+
</button>
116+
</div>
117+
</div>
118+
104119

105120
<div class="max-w-screen-xl px-4 mx-auto 2xl:px-0">
106121
<div class="flex items-center h-16">
@@ -124,7 +139,7 @@
124139
<ul class="flex items-center gap-2 shrink-0">
125140

126141
<li class="shrink-0">
127-
<a href="/release/25.0.0.html" class="inline-flex items-center rounded-lg justify-center px-3.5 py-3 text-sm font-medium leading-none whitespace-nowrap hover:text-gray-900 hover:bg-gray-50">
142+
<a href="/release/25.0.1.html" class="inline-flex items-center rounded-lg justify-center px-3.5 py-3 text-sm font-medium leading-none whitespace-nowrap hover:text-gray-900 hover:bg-gray-50">
128143
发布日志
129144
</a>
130145
</li>
@@ -261,7 +276,7 @@
261276
<div class="hidden lg:hidden" id="mobile-menu">
262277
<div class="px-2 pt-2 pb-3 space-y-2 border-t">
263278

264-
<a href="/release/25.0.0.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-50">
279+
<a href="/release/25.0.1.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-50">
265280
发布日志
266281
</a>
267282

@@ -393,9 +408,104 @@ <h1 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm
393408
<div class="flex items-center gap-4">
394409
<!-- 字体大小控制按钮 -->
395410

411+
<div class="flex items-center gap-2 p-0.5 bg-white dark:bg-gray-800 rounded-lg dark:border-gray-700 not-prose">
412+
<button id="decrease-font" class="p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" title="减小字体">
413+
<svg class="w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
414+
<path fill-rule="evenodd" d="M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z" clip-rule="evenodd"/>
415+
</svg>
416+
</button>
417+
<button id="reset-font" class="p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-sm" title="重置字体">A</button>
418+
<button id="increase-font" class="p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded" title="增大字体">
419+
<svg class="w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
420+
<path fill-rule="evenodd" d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd"/>
421+
</svg>
422+
</button>
423+
</div>
424+
396425

397426
<!-- 分享按钮 -->
398427

428+
<button type="button" id="share-btn" class="text-gray-400 hover:text-blue-700 dark:text-gray-400 dark:hover:text-gray-300">
429+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4">
430+
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/>
431+
<polyline points="16 6 12 2 8 6"/>
432+
<line x1="12" y1="2" x2="12" y2="15"/>
433+
</svg>
434+
</button>
435+
436+
<div id="share-popup" class="hidden fixed inset-0 z-50" onclick="handleClickOutside(event)">
437+
<div class="absolute inset-0 bg-gray-500 bg-opacity-75 dark:bg-gray-900 dark:bg-opacity-75"></div>
438+
<div class="relative z-10 flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0">
439+
<div class="relative transform overflow-visible rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 w-fit">
440+
<div class="social-share text-center" data-sites="qq,wechat,weibo" data-mobile-sites="qq,wechat,weibo" data-wechat-qrcode-title="微信扫一扫:分享" data-wechat-qrcode-helper="微信扫一扫后点击右上角分享">
441+
</div>
442+
</div>
443+
</div>
444+
</div>
445+
446+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css">
447+
<script src="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js"></script>
448+
449+
<style>
450+
/* 修复微信二维码显示被遮挡的问题 */
451+
.social-share .wechat-qrcode {
452+
z-index: 9999;
453+
width: fit-content;
454+
}
455+
</style>
456+
457+
<script>
458+
document.getElementById('share-btn')?.addEventListener('click', function () {
459+
document.getElementById('share-popup')?.classList.remove('hidden');
460+
document.body.style.overflow = 'hidden';
461+
});
462+
463+
function handleClickOutside(event) {
464+
const sharePopup = document.getElementById('share-popup');
465+
const shareContent = sharePopup?.querySelector('.transform');
466+
467+
// 如果点击的是弹窗内容之外的区域
468+
if (event.target === sharePopup || !shareContent?.contains(event.target)) {
469+
hideSharePopup();
470+
}
471+
}
472+
473+
function hideSharePopup() {
474+
document.getElementById('share-popup')?.classList.add('hidden');
475+
document.body.style.overflow = '';
476+
}
477+
478+
// 处理 ESC 键关闭
479+
document.addEventListener('keydown', function (e) {
480+
if (e.key === 'Escape') {
481+
hideSharePopup();
482+
}
483+
});
484+
485+
document.addEventListener('DOMContentLoaded', function () {
486+
// 初始化 social share
487+
socialShare('.social-share', {
488+
wechatQrcodeTitle: '微信扫一扫:分享',
489+
wechatQrcodeHelper: '微信扫一扫后点击右上角分享',
490+
url: window.location.href,
491+
source: document.title,
492+
wechat: function (elem, data) {
493+
// 自定义微信点击行为
494+
if (elem.classList.contains('icon-wechat')) {
495+
return false; // 阻止默认跳转
496+
}
497+
}
498+
});
499+
500+
// 防止微信图标点击跳转
501+
document.querySelector('.icon-wechat')?.addEventListener('click', function (e) {
502+
e.preventDefault();
503+
e.stopPropagation();
504+
return false;
505+
}, true);
506+
});
507+
</script>
508+
399509

400510
<!-- 编辑源码 -->
401511

@@ -478,6 +588,8 @@ <h1 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm
478588
© 2025 CodeForge All Rights Reserved. 使用 ❤️ <a href="https://pageforge.devlive.org" class="hover:text-blue-600" target="_blank">PageForge</a> 构建
479589

480590

591+
<a href="/sitemap.xml" target="_blank" class="ml-3 dark:hover:text-white hover:underline hover:text-blue-600">站点地图</a>
592+
481593
</span>
482594

483595

@@ -526,4 +638,26 @@ <h1 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm
526638

527639
<!-- 是否启用 Lucide 图标库 -->
528640

641+
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.js"></script>
642+
<script>
643+
// 在页面加载完成后执行
644+
window.addEventListener('load', () => {
645+
// 初始化图标
646+
lucide.createIcons();
647+
648+
// 延迟检查图标是否加载完成
649+
setTimeout(() => {
650+
document.querySelectorAll('[data-lucide]').forEach(icon => {
651+
if (icon.children.length > 0) {
652+
icon.style.display = 'block';
653+
const skeleton = icon.previousElementSibling;
654+
if (skeleton) {
655+
skeleton.style.display = 'none';
656+
}
657+
}
658+
});
659+
}, 100);
660+
});
661+
</script>
662+
529663
</html>

0 commit comments

Comments
 (0)