地址发布单页源码

梦淡如非(UID:8) · 7 天前 · 54 次点击

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。 您需要 登录 才可以下载或查看,没有账号?立即注册

x
演示图片:

地址发布单页源码

地址发布单页源码

  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">
  6.     <title>6ke论坛-地址发布页,收藏我回家不迷路!</title>
  7.     <meta name="description" content="6ke论坛-地址发布页,收藏我回家不迷路!">
  8.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
  9.     <style>
  10.         @font-face {
  11.             font-family: 'HarmonyOS Sans SC';
  12.             src: url('/DIY/ziti/HarmonyOS_Sans_SC_Regular.woff2') format('woff2');
  13.             font-weight: normal;
  14.             font-style: normal;
  15.         }
  16.         :root {
  17.             --primary-color: #3b82f6;
  18.             --secondary-color: #60a5fa;
  19.             --text-color: #1f2937;
  20.             --card-background: rgba(255, 255, 255, 0.9);
  21.             --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  22.         }
  23.         * {
  24.             box-sizing: border-box;
  25.             margin: 0;
  26.             padding: 0;
  27.         }
  28.         body {
  29.             font-family: 'HarmonyOS Sans SC', sans-serif;
  30.             color: var(--text-color);
  31.             line-height: 1.6;
  32.             min-height: 100vh;
  33.             display: flex;
  34.             justify-content: center;
  35.             align-items: center;
  36.             background: linear-gradient(-45deg, #e6f2ff, #fff0f5, #f0f7ff, #fff5e6);
  37.             background-size: 400% 400%;
  38.             animation: gradientBG 15s ease infinite;
  39.             overflow-x: hidden;
  40.             font-size: 16px;
  41.         }
  42.         @keyframes gradientBG {
  43.             0% { background-position: 0% 50%; }
  44.             50% { background-position: 100% 50%; }
  45.             100% { background-position: 0% 50%; }
  46.         }
  47.         .wrapper {
  48.             padding: 2rem;
  49.             width: 100%;
  50.             max-width: 600px;
  51.             position: relative;
  52.         }
  53.         .main {
  54.             background-color: var(--card-background);
  55.             border-radius: 20px;
  56.             box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  57.             padding: 2.5rem;
  58.             backdrop-filter: blur(10px);
  59.             transition: var(--transition);
  60.         }
  61.         .main:hover {
  62.             box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  63.         }
  64.         h1 {
  65.             font-size: 2.5rem;
  66.             color: var(--primary-color);
  67.             text-align: center;
  68.             margin-bottom: 1.5rem;
  69.             font-weight: 700;
  70.         }
  71.         ul {
  72.             list-style-type: none;
  73.             margin-bottom: 1.5rem;
  74.         }
  75.         li {
  76.             margin-bottom: 1rem;
  77.             padding: 1rem;
  78.             background-color: rgba(248, 250, 252, 0.8);
  79.             border-radius: 10px;
  80.             transition: var(--transition);
  81.             cursor: pointer;
  82.             display: flex;
  83.             align-items: center;
  84.             justify-content: space-between;
  85.         }
  86.         li:hover {
  87.             transform: translateY(-3px);
  88.             box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  89.         }
  90.         li a {
  91.             color: var(--primary-color);
  92.             text-decoration: none;
  93.             font-weight: bold;
  94.             transition: var(--transition);
  95.             display: flex;
  96.             align-items: center;
  97.         }
  98.         li a:hover {
  99.             color: var(--secondary-color);
  100.         }
  101.         li a i {
  102.             margin-right: 0.5rem;
  103.             font-size: 1.2em;
  104.         }
  105.         .notice {
  106.             background-color: rgba(230, 242, 255, 0.8);
  107.             border-left: 4px solid var(--primary-color);
  108.             padding: 1rem;
  109.             margin-top: 1rem;
  110.             border-radius: 10px;
  111.             transition: var(--transition);
  112.         }
  113.         .notice:hover {
  114.             background-color: rgba(230, 242, 255, 1);
  115.         }
  116.         .footer {
  117.             margin-top: 2rem;
  118.             text-align: center;
  119.             color: var(--text-color);
  120.             font-weight: 300;
  121.             opacity: 0.8;
  122.             transition: var(--transition);
  123.         }
  124.         .footer:hover {
  125.             opacity: 1;
  126.         }
  127.         .bookmark-btn {
  128.             display: block;
  129.             width: 100%;
  130.             padding: 1rem;
  131.             background-color: var(--primary-color);
  132.             color: white;
  133.             text-align: center;
  134.             border: none;
  135.             border-radius: 10px;
  136.             font-size: 1rem;
  137.             font-weight: 600;
  138.             cursor: pointer;
  139.             transition: var(--transition);
  140.             margin-bottom: 1.5rem;
  141.             position: relative;
  142.             overflow: hidden;
  143.         }
  144.         .bookmark-btn:hover {
  145.             background-color: var(--secondary-color);
  146.             transform: translateY(-2px);
  147.             box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  148.         }
  149.         .bookmark-btn::after {
  150.             content: '';
  151.             position: absolute;
  152.             top: 50%;
  153.             left: 50%;
  154.             width: 5px;
  155.             height: 5px;
  156.             background: rgba(255, 255, 255, 0.5);
  157.             opacity: 0;
  158.             border-radius: 100%;
  159.             transform: scale(1, 1) translate(-50%);
  160.             transform-origin: 50% 50%;
  161.         }
  162.         .bookmark-btn:focus:not(:active)::after {
  163.             animation: ripple 1s ease-out;
  164.         }
  165.         @keyframes ripple {
  166.             0% { transform: scale(0, 0); opacity: 1; }
  167.             20% { transform: scale(25, 25); opacity: 1; }
  168.             100% { opacity: 0; transform: scale(40, 40); }
  169.         }
  170.         .bg-animation {
  171.             position: fixed;
  172.             top: 0;
  173.             left: 0;
  174.             width: 100%;
  175.             height: 100%;
  176.             z-index: -1;
  177.         }
  178.         .bg-animation span {
  179.             position: absolute;
  180.             display: block;
  181.             width: 20px;
  182.             height: 20px;
  183.             background: rgba(255, 255, 255, 0.2);
  184.             animation: move 25s infinite linear;
  185.         }
  186.         .bg-animation span:nth-child(1) { top: 20%; left: 20%; animation-duration: 15s; }
  187.         .bg-animation span:nth-child(2) { top: 60%; left: 80%; animation-duration: 17s; width: 40px; height: 40px; }
  188.         .bg-animation span:nth-child(3) { top: 40%; left: 40%; animation-duration: 19s; }
  189.         .bg-animation span:nth-child(4) { top: 80%; left: 10%; animation-duration: 21s; }
  190.         @keyframes move {
  191.             0% { transform: translateX(0) translateY(0) rotate(0); opacity: 1; border-radius: 0; }
  192.             100% { transform: translateX(-1000px) translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; }
  193.         }
  194.         @media (max-width: 768px) {
  195.             body {
  196.                 font-size: calc(14px + 0.390625vw); /* 在移动设备上使用响应式字体大小 */
  197.             }
  198.             .main {
  199.                 padding: 2rem;
  200.             }
  201.             h1 {
  202.                 font-size: 2rem;
  203.             }
  204.         }
  205.          .status-badge {
  206.             padding: 2px 6px;
  207.             border-radius: 4px;
  208.             font-size: 0.8em;
  209.             margin-left: 10px;
  210.         }
  211.         .status-normal {
  212.             background-color: #4CAF50;
  213.             color: white;
  214.         }
  215.         .status-error {
  216.             background-color: #f44336;
  217.             color: white;
  218.         }
  219.         li.disabled {
  220.             opacity: 0.5;
  221.             cursor: not-allowed;
  222.         }
  223.         li.disabled a {
  224.             pointer-events: none;
  225.         }
  226.     </style>
  227. </head>
  228. <body>
  229.     <div class="bg-animation">
  230.         <span></span>
  231.         <span></span>
  232.         <span></span>
  233.         <span></span>
  234.     </div>
  235.    <div class="wrapper">
  236.         <main class="main">
  237.             <h1>6ke论坛-地址发布页</h1>
  238.             <button class="bookmark-btn">
  239.                 <i class="fas fa-bookmark"></i> Ctrl+D 收藏本页到浏览器收藏夹
  240.             </button>
  241.             <ul id="url-list">
  242.                 <li data-url="https://6.ke/">
  243.                     <span>6ke论坛(主)</span>
  244.                     <a href="https://6.ke/" target="_blank">
  245.                         <i class="fas fa-external-link-alt"></i> 6.ke
  246.                     </a>
  247.                     <span class="status-badge"></span>
  248.                 </li>
  249.                 <li data-url="https://6ke.li/">
  250.                     <span>6ke论坛(备)</span>
  251.                     <a href="https://6ke.li/" target="_blank">
  252.                         <i class="fas fa-external-link-alt"></i> 6ke.li
  253.                     </a>
  254.                     <span class="status-badge"></span>
  255.                 </li>
  256.             </ul>
  257.             <div class="notice">
  258.                 <i class="fas fa-info-circle"></i> 部分中国网络屏蔽网址,打不开请爬梯子访问!
  259.             </div>
  260.         </main>
  261.         <footer class="footer">
  262.             <p>&copy; 2024 6ke论坛. 保留所有权利。</p>
  263.         </footer>
  264.     </div>

  265.     <script>
  266.         function checkUrl(url) {
  267.             return new Promise((resolve, reject) => {
  268.                 fetch(url, { mode: 'no-cors', method: 'HEAD' })
  269.                     .then(() => resolve(true))
  270.                     .catch(() => resolve(false));
  271.             });
  272.         }

  273.         function updateUrlStatus(li, isAccessible) {
  274.             const statusBadge = li.querySelector('.status-badge');
  275.             if (isAccessible) {
  276.                 li.classList.remove('disabled');
  277.                 statusBadge.textContent = '正常';
  278.                 statusBadge.className = 'status-badge status-normal';
  279.             } else {
  280.                 li.classList.add('disabled');
  281.                 statusBadge.textContent = '无法访问';
  282.                 statusBadge.className = 'status-badge status-error';
  283.             }
  284.         }

  285.         async function checkAllUrls() {
  286.             const urlList = document.getElementById('url-list');
  287.             const listItems = urlList.querySelectorAll('li');

  288.             for (const li of listItems) {
  289.                 const url = li.dataset.url;
  290.                 const isAccessible = await checkUrl(url);
  291.                 updateUrlStatus(li, isAccessible);
  292.             }
  293.         }

  294.         // 初始检查
  295.         checkAllUrls();

  296.         // 每5分钟检查一次
  297.         setInterval(checkAllUrls, 5 * 60 * 1000);
  298.     </script>
  299. </body>
  300. </html>
复制代码
3 条回复  
七夏(UID:1) 管理员 7 天前
好家伙,你直接把单页弄个附件上传算了😐这么长的代码
梦淡如非(UID:8) 楼主 超级版主 7 天前
七夏 发表于 2024-9-28 21:59
好家伙,你直接把单页弄个附件上传算了😐这么长的代码

好家伙,我是搬运的,哈哈。
七夏(UID:1) 管理员 7 天前
梦淡如非 发表于 2024-9-28 22:00
好家伙,我是搬运的,哈哈。

您需要登录后才可以回帖 登录
返回顶部