找回密码
 立即注册
搜索
查看: 208|回复: 0

司令论坛地址发布页最新版源码HTML源码

[复制链接]

796

主题

5

回帖

1336

积分

管理员

积分
1336
发表于 2026-1-16 15:13:12 | 显示全部楼层 |阅读模式

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.   <meta charset="UTF-8" />
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
  6.   <title>司令论坛 · 官方入口</title>
  7.   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" integrity="sha512-..." crossorigin="anonymous" referrerpolicy="no-referrer" />
  8.   <style>
  9.     /* ===== 主题变量 ===== */
  10.     :root {
  11.       --primary: #4361ee;
  12.       --primary-light: #4895ef;
  13.       --primary-dark: #3a56d4;
  14.       --bg-body: #f9fbfd;
  15.       --bg-card: #ffffff;
  16.       --text-main: #2b2d42;
  17.       --text-muted: #6c757d;
  18.       --border-color: #eaeef5;
  19.       --success: #4ade80;
  20.       --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  21.       --shadow-md: 0 6px 16px rgba(0,0,0,0.08);
  22.       --radius: 16px;
  23.       --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  24.     }

  25.     .dark-mode {
  26.       --primary: #4cc9f0;
  27.       --primary-light: #5abaff;
  28.       --primary-dark: #3db9e8;
  29.       --bg-body: #0f172a;
  30.       --bg-card: #1e293b;
  31.       --text-main: #f1f5f9;
  32.       --text-muted: #94a3b8;
  33.       --border-color: #334155;
  34.       --success: #34d399;
  35.       --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  36.       --shadow-md: 0 6px 16px rgba(0,0,0,0.25);
  37.     }

  38.     * {
  39.       margin: 0;
  40.       padding: 0;
  41.       box-sizing: border-box;
  42.     }

  43.     body {
  44.       min-height: 100vh;
  45.       font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  46.       background-color: var(--bg-body);
  47.       color: var(--text-main);
  48.       padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  49.       display: flex;
  50.       justify-content: center;
  51.       align-items: center;
  52.       line-height: 1.6;
  53.       -webkit-font-smoothing: antialiased;
  54.       -moz-osx-font-smoothing: grayscale;
  55.     }

  56.     .container {
  57.       width: 100%;
  58.       max-width: 540px;
  59.       background: var(--bg-card);
  60.       border-radius: var(--radius);
  61.       box-shadow: var(--shadow-md);
  62.       overflow: hidden;
  63.       animation: fadeIn 0.4s ease-out;
  64.     }

  65.     @keyframes fadeIn {
  66.       from { opacity: 0; transform: translateY(12px); }
  67.       to { opacity: 1; transform: translateY(0); }
  68.     }

  69.     .header {
  70.       display: flex;
  71.       justify-content: space-between;
  72.       align-items: center;
  73.       padding: 26px 26px 18px; /* 调整:减少 bottom padding,避免与 links-grid 重叠 */
  74.       border-bottom: 1px solid var(--border-color);
  75.     }

  76.     h1 {
  77.       font-size: 1.8rem;
  78.       font-weight: 800;
  79.       background: linear-gradient(90deg, var(--primary), var(--primary-light));
  80.       -webkit-background-clip: text;
  81.       background-clip: text;
  82.       color: transparent;
  83.       letter-spacing: -0.8px;
  84.     }

  85.     .actions {
  86.       display: flex;
  87.       gap: 12px;
  88.     }

  89.     .btn {
  90.       border: none;
  91.       border-radius: 12px;
  92.       padding: 10px 16px;
  93.       cursor: pointer;
  94.       font-size: 14px;
  95.       font-weight: 600;
  96.       display: flex;
  97.       align-items: center;
  98.       gap: 6px;
  99.       transition: var(--transition);
  100.       outline: none;
  101.       position: relative;
  102.       min-width: 42px;
  103.       justify-content: center;
  104.     }

  105.     .bookmark-btn {
  106.       background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  107.       color: white;
  108.       box-shadow: 0 3px 8px rgba(67, 97, 238, 0.35);
  109.     }

  110.     .bookmark-btn:hover {
  111.       transform: translateY(-2px);
  112.       box-shadow: 0 5px 12px rgba(67, 97, 238, 0.45);
  113.     }

  114.     .theme-btn {
  115.       width: 44px;
  116.       height: 44px;
  117.       padding: 0;
  118.       border-radius: 50%;
  119.       background: var(--bg-card);
  120.       color: var(--text-main);
  121.       display: flex;
  122.       align-items: center;
  123.       justify-content: center;
  124.       box-shadow: var(--shadow-sm);
  125.     }

  126.     .theme-btn:hover {
  127.       transform: rotate(25deg) scale(1.1);
  128.       background: var(--primary);
  129.       color: white;
  130.     }

  131.     .links-grid {
  132.       padding: 22px 26px; /* 上下 = 22px,等于 gap 值,实现首尾对称 */
  133.       display: flex;
  134.       flex-direction: column;
  135.       gap: 22px; /* 所有卡片间距一致 */
  136.     }

  137.     .link-card {
  138.       padding: 22px;
  139.       border-radius: var(--radius);
  140.       background: var(--bg-card);
  141.       border: 1px solid var(--border-color);
  142.       transition: var(--transition);
  143.       position: relative;
  144.       overflow: hidden;
  145.     }

  146.     .link-card::before {
  147.       content: '';
  148.       position: absolute;
  149.       top: 0;
  150.       left: 0;
  151.       height: 100%;
  152.       width: 4px;
  153.       background: var(--primary);
  154.       opacity: 0.7;
  155.     }

  156.     .link-card:hover {
  157.       transform: translateY(-4px);
  158.       box-shadow: var(--shadow-md);
  159.       border-color: var(--primary);
  160.     }

  161.     .link-header {
  162.       display: flex;
  163.       justify-content: space-between;
  164.       align-items: flex-start;
  165.       margin-bottom: 10px;
  166.     }

  167.     .link-title {
  168.       font-size: 1.18rem;
  169.       font-weight: 700;
  170.       display: flex;
  171.       align-items: center;
  172.       gap: 10px;
  173.       flex: 1;
  174.     }

  175.     .link-title i {
  176.       color: var(--primary);
  177.       font-size: 1.15rem;
  178.     }

  179.     .copy-btn {
  180.       background: none;
  181.       border: none;
  182.       color: var(--text-muted);
  183.       cursor: pointer;
  184.       width: 32px;
  185.       height: 32px;
  186.       border-radius: 8px;
  187.       display: flex;
  188.       align-items: center;
  189.       justify-content: center;
  190.       transition: var(--transition);
  191.       flex-shrink: 0;
  192.     }

  193.     .copy-btn:hover {
  194.       background: rgba(67, 97, 238, 0.1);
  195.       color: var(--primary);
  196.     }

  197.     .copy-btn.copied {
  198.       color: var(--success) !important;
  199.       transform: scale(1.1);
  200.     }

  201.     .link-url {
  202.       text-decoration: none;
  203.       font-size: 0.96rem;
  204.       color: var(--text-muted);
  205.       word-break: break-all;
  206.       display: block;
  207.       padding: 4px 0;
  208.       position: relative;
  209.       transition: color 0.2s;
  210.     }

  211.     .link-url:hover {
  212.       color: var(--primary);
  213.     }

  214.     .link-url::after {
  215.       content: '';
  216.       position: absolute;
  217.       bottom: 0;
  218.       left: 0;
  219.       width: 0;
  220.       height: 1.6px;
  221.       background: var(--primary);
  222.       transition: width 0.3s ease;
  223.     }

  224.     .link-url:hover::after {
  225.       width: 100%;
  226.     }

  227.     .footer {
  228.       padding: 18px 26px;
  229.       text-align: center;
  230.       font-size: 12px;
  231.       color: var(--text-muted);
  232.       border-top: 1px solid var(--border-color);
  233.       font-weight: 500;
  234.     }

  235.     /* 响应式 */
  236.     @media (max-width: 480px) {
  237.       .container {
  238.         margin: 0 12px;
  239.       }
  240.       .header,
  241.       .links-grid {
  242.         padding-left: 20px;
  243.         padding-right: 20px;
  244.       }
  245.       h1 {
  246.         font-size: 1.55rem;
  247.       }
  248.       .link-card {
  249.         padding: 18px;
  250.       }
  251.       .btn {
  252.         padding: 9px 14px;
  253.         font-size: 13px;
  254.       }
  255.       .theme-btn {
  256.         width: 42px;
  257.         height: 42px;
  258.       }
  259.     }

  260.     /* 可访问性:仅当键盘导航时显示焦点 */
  261.     .btn:focus:not(:focus-visible) {
  262.       outline: none;
  263.     }

  264.     .btn:focus-visible {
  265.       outline: 2px solid var(--primary);
  266.       outline-offset: 2px;
  267.       border-radius: 12px;
  268.     }

  269.     .copy-btn:focus-visible {
  270.       outline-offset: 1px;
  271.       border-radius: 8px;
  272.     }
  273.   </style>
  274. </head>
  275. <body class="light-mode">
  276.   <div class="container">
  277.     <div class="header">
  278.       <h1>司令论坛</h1>
  279.       <div class="actions">
  280.         <button class="btn bookmark-btn" onclick="bookmarkPage()" aria-label="收藏本页">
  281.           <i class="fas fa-bookmark"></i> 收藏
  282.         </button>
  283.         <button class="btn theme-btn" onclick="toggleTheme()" title="切换明暗主题" aria-label="切换主题">
  284.           <i class="fas fa-moon" id="themeIcon"></i>
  285.         </button>
  286.       </div>
  287.     </div>

  288.     <div class="links-grid" id="linksGrid">
  289.       <!-- 链接将由 JS 渲染 -->
  290.     </div>

  291.     <div class="footer">
  292.       Copyright &copy; 2026 cmdrbbs.com All Rights Reserved
  293.     </div>
  294.   </div>

  295.   <script>
  296.     // 链接数据(便于维护)
  297.     const links = [
  298.       {
  299.         title: "司令论坛",
  300.         url: "https://www.cmdrbbs.com",
  301.         icon: "fa-link"
  302.       },
  303.       {
  304.         title: "三毛机场 · 5元1200G",
  305.         url: "https://gw-1.xn--ehqx7tcnnope.com/#/register?code=MMWgjJKw",
  306.         icon: "fa-link"
  307.       }
  308.     ];

  309.     // 渲染链接卡片
  310.     function renderLinks() {
  311.       const grid = document.getElementById('linksGrid');
  312.       grid.innerHTML = links.map((link, index) => `
  313.         <div class="link-card">
  314.           <div class="link-header">
  315.             <span class="link-title">
  316.               <i class="fas ${link.icon}"></i> ${link.title}
  317.             </span>
  318.             <button class="copy-btn"
  319.                     onclick="copyUrl(this, '${link.url}')"
  320.                     aria-label="复制链接"
  321.                     data-index="${index}">
  322.               <i class="fas fa-copy"></i>
  323.             </button>
  324.           </div>
  325.           <a href="${link.url}" target="_blank" class="link-url" rel="noopener noreferrer">
  326.             ${link.url}
  327.           </a>
  328.         </div>
  329.       `).join('');
  330.     }

  331.     // 复制链接功能
  332.     async function copyUrl(btn, url) {
  333.       try {
  334.         await navigator.clipboard.writeText(url);
  335.         const icon = btn.querySelector('i');
  336.         icon.className = 'fas fa-check';
  337.         btn.classList.add('copied');
  338.         
  339.         setTimeout(() => {
  340.           icon.className = 'fas fa-copy';
  341.           btn.classList.remove('copied');
  342.         }, 2000);
  343.       } catch (err) {
  344.         console.warn('复制失败:', err);
  345.         alert('无法复制链接,请手动复制');
  346.       }
  347.     }

  348.     // 主题切换
  349.     function toggleTheme() {
  350.       const body = document.body;
  351.       const isDark = body.classList.contains('dark-mode');
  352.       const newMode = isDark ? 'light-mode' : 'dark-mode';
  353.       
  354.       body.classList.remove(isDark ? 'dark-mode' : 'light-mode');
  355.       body.classList.add(newMode);
  356.       
  357.       const icon = document.getElementById('themeIcon');
  358.       icon.className = newMode === 'dark-mode' ? 'fas fa-sun' : 'fas fa-moon';
  359.       
  360.       localStorage.setItem('siteTheme', newMode);
  361.     }

  362.     // 初始化
  363.     document.addEventListener('DOMContentLoaded', () => {
  364.       // 渲染链接
  365.       renderLinks();
  366.       
  367.       // 应用主题
  368.       const saved = localStorage.getItem('siteTheme') || 'light-mode';
  369.       document.body.className = saved;
  370.       document.getElementById('themeIcon').className =
  371.         saved === 'dark-mode' ? 'fas fa-sun' : 'fas fa-moon';
  372.     });

  373.     // 收藏提示
  374.     function bookmarkPage() {
  375.       alert('📌 请使用快捷键收藏本页:\n\nWindows/Linux: Ctrl + D\nMac: ⌘ Command + D');
  376.     }
  377.   </script>

  378.   <!-- 统计脚本(建议异步加载) -->
  379.   <script async charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
  380.   <script>
  381.     window.addEventListener('load', () => {
  382.       if (typeof LA !== 'undefined') {
  383.         LA.init({id:"3OdH4Am1dhJUBXA2",ck:"3OdH4Am1dhJUBXA2"});
  384.       }
  385.     });
  386.   </script>
  387. </body>
  388. </html>
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|司令论坛

GMT+8, 2026-2-26 06:36 , Processed in 0.087535 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表