1Panel 自定义页面参考(简洁单页,欢迎来扒)(二)

本文首发于 Anyeの小站点击链接 访问原文体验更佳

网站停用页

亮色模式

深色模式

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 Not Found</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --text-color: #333;
            --card-bg: white;
            --heading-color: #2c3e50;
            --link-color: #3498db;
            --footer-color: #666;
        }
        .dark-mode {
            --bg-color: #1a1a1a;
            --text-color: #e0e0e0;
            --card-bg: #2c2c2c;
            --heading-color: #ffffff;
            --link-color: #63b3ed;
            --footer-color: #999;
        }
        body {
            font-family: Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s;
        }
        .container {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 500px;
            width: 100%;
            margin-bottom: 20px;
            transition: background-color 0.3s;
        }
        h1 {
            color: var(--heading-color);
            margin-bottom: 20px;
            transition: color 0.3s;
        }
        p {
            line-height: 1.6;
            margin-bottom: 20px;
        }
        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }
        .footer {
            text-align: center;
            font-size: 12px;
            color: var(--footer-color);
            margin-top: 20px;
            transition: color 0.3s;
        }
        .footer a {
            color: var(--footer-color);
            text-decoration: none;
            transition: color 0.3s;
        }
        .footer a:hover {
            text-decoration: underline;
        }
        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }
        .theme-toggle:hover {
            transform: scale(1.1);
        }
        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
        }
    </style>
</head>
<body>
    <button class="theme-toggle" onclick="toggleTheme()" aria-label="切换主题">🌓</button>
    <div class="container">
        <div class="icon">🛠️</div>
        <h1>网站维护中</h1>
        <p>非常抱歉,我们的网站正在进行例行维护。我们正在努力改进,以便为您提供更好的服务。</p>
        <p>预计恢复时间:<strong>未知</strong></p>
        <p>感谢您的耐心等待和理解。</p>
    </div>

    <footer class="footer">
        <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">ICP备案号</a> | 
        <a href="http://www.beian.gov.cn/portal/registerSystemInfo" target="_blank" rel="noopener noreferrer">公安备案号</a>
    </footer>

    <script>
        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
            localStorage.setItem('theme', document.body.classList.contains('dark-mode') ? 'dark' : 'light');
        }

        const savedTheme = localStorage.getItem('theme');
        if (savedTheme === 'dark') {
            document.body.classList.add('dark-mode');
        }

        const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
        function handleThemeChange(e) {
            if (savedTheme) return;
            if (e.matches) {
                document.body.classList.add('dark-mode');
            } else {
                document.body.classList.remove('dark-mode');
            }
        }
        mediaQuery.addListener(handleThemeChange);
        handleThemeChange(mediaQuery);
    </script>
</body>
</html>

WAF 拦截页 - 禁止访问 (403)

亮色模式

深色模式

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>请求拦截</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --text-color: #333;
            --card-bg: white;
            --heading-color: #e74c3c;
            --link-color: #3498db;
        }

        .dark-mode {
            --bg-color: #1a1a1a;
            --text-color: #e0e0e0;
            --card-bg: #2c2c2c;
            --heading-color: #e74c3c;
            --link-color: #63b3ed;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s;
        }

        .container {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
            transition: background-color 0.3s;
        }

        h1 {
            color: var(--heading-color);
            margin-bottom: 20px;
            font-size: 2.5em;
            transition: color 0.3s;
        }

        p {
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        .back-link {
            color: var(--link-color);
            text-decoration: none;
            font-weight: bold;
            transition: color 0.3s;
        }

        .back-link:hover {
            text-decoration: underline;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
        }
    </style>
</head>

<body>
    <button class="theme-toggle" onclick="toggleTheme()" aria-label="切换主题">🌓</button>
    <div class="container">
        <div class="icon">🛑</div>
        <h1>请求拦截</h1>
        <p>请求携带恶意参数 已被拦截</p>
        <p>为了保护系统安全,您的请求已被系统拦截。</p>
        <a href="/" class="back-link">返回首页</a>
    </div>

    <script>
        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
            localStorage.setItem('theme', document.body.classList.contains('dark-mode') ? 'dark' : 'light');
        }

        const savedTheme = localStorage.getItem('theme');
        if (savedTheme === 'dark') {
            document.body.classList.add('dark-mode');
        }

        const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
        function handleThemeChange(e) {
            if (savedTheme) return;
            if (e.matches) {
                document.body.classList.add('dark-mode');
            } else {
                document.body.classList.remove('dark-mode');
            }
        }
        mediaQuery.addListener(handleThemeChange);
        handleThemeChange(mediaQuery);
    </script>
</body>

</html>

WAF 拦截页 - 网站不存在

亮色模式

深色模式

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网站不存在</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --text-color: #333;
            --card-bg: white;
            --heading-color: #2c3e50;
            --link-color: #3498db;
        }

        .dark-mode {
            --bg-color: #1a1a1a;
            --text-color: #e0e0e0;
            --card-bg: #2c2c2c;
            --heading-color: #ffffff;
            --link-color: #63b3ed;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s;
        }

        .container {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
            transition: background-color 0.3s;
        }

        h1 {
            color: var(--heading-color);
            margin-bottom: 20px;
            font-size: 2.5em;
            transition: color 0.3s;
        }

        p {
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        .back-link {
            color: var(--link-color);
            text-decoration: none;
            font-weight: bold;
            transition: color 0.3s;
        }

        .back-link:hover {
            text-decoration: underline;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
        }
    </style>
</head>

<body>
    <button class="theme-toggle" onclick="toggleTheme()" aria-label="切换主题">🌓</button>
    <div class="container">
        <div class="icon">🌐</div>
        <h1>网站不存在</h1>
        <p>网站不存在,请检查域名</p>
        <a href="javascript:history.back()" class="back-link">返回上一页</a>
    </div>

    <script>
        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
            localStorage.setItem('theme', document.body.classList.contains('dark-mode') ? 'dark' : 'light');
        }

        const savedTheme = localStorage.getItem('theme');
        if (savedTheme === 'dark') {
            document.body.classList.add('dark-mode');
        }

        const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
        function handleThemeChange(e) {
            if (savedTheme) return;
            if (e.matches) {
                document.body.classList.add('dark-mode');
            } else {
                document.body.classList.remove('dark-mode');
            }
        }
        mediaQuery.addListener(handleThemeChange);
        handleThemeChange(mediaQuery);
    </script>
</body>

</html>

WAF 拦截页 - 地区限制

亮色模式

深色模式

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Access Denied</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --text-color: #333;
            --card-bg: white;
            --heading-color: #2c3e50;
            --link-color: #3498db;
        }

        .dark-mode {
            --bg-color: #1a1a1a;
            --text-color: #e0e0e0;
            --card-bg: #2c2c2c;
            --heading-color: #ffffff;
            --link-color: #63b3ed;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s;
        }

        .container {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
            transition: background-color 0.3s;
        }

        h1 {
            color: var(--heading-color);
            margin-bottom: 20px;
            font-size: 2.5em;
            transition: color 0.3s;
        }

        p {
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        .language-toggle {
            position: absolute;
            top: 20px;
            left: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }

        .language-toggle:hover {
            transform: scale(1.1);
        }

        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
        }
    </style>
</head>

<body>
    <button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle theme">🌓</button>
    <button class="language-toggle" onclick="toggleLanguage()" aria-label="Toggle language">🌐</button>
    <div class="container" role="main">
        <div class="icon" aria-hidden="true">🚫</div>
        <h1 id="title">Access Denied</h1>
        <p id="message">Your region is blocked from accessing this content.</p>
    </div>

    <script>
        const translations = {
            en: {
                title: "Access Denied",
                message: "Your region is blocked from accessing this content.",
                themeLabel: "Toggle theme",
                langLabel: "Toggle language"
            },
            zh: {
                title: "地区拦截",
                message: "你的区域被禁止访问",
                themeLabel: "切换主题",
                langLabel: "切换语言"
            }
        };

        let currentLang = navigator.language.startsWith('zh') ? 'zh' : 'en';

        function updateContent() {
            document.getElementById('title').textContent = translations[currentLang].title;
            document.getElementById('message').textContent = translations[currentLang].message;
            document.querySelector('.theme-toggle').setAttribute('aria-label', translations[currentLang].themeLabel);
            document.querySelector('.language-toggle').setAttribute('aria-label', translations[currentLang].langLabel);
            document.documentElement.lang = currentLang;
        }

        function toggleLanguage() {
            currentLang = currentLang === 'en' ? 'zh' : 'en';
            updateContent();
        }

        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
            localStorage.setItem('theme', document.body.classList.contains('dark-mode') ? 'dark' : 'light');
        }

        const savedTheme = localStorage.getItem('theme');
        if (savedTheme === 'dark') {
            document.body.classList.add('dark-mode');
        }

        const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
        function handleThemeChange(e) {
            if (savedTheme) return;
            if (e.matches) {
                document.body.classList.add('dark-mode');
            } else {
                document.body.classList.remove('dark-mode');
            }
        }
        mediaQuery.addListener(handleThemeChange);
        handleThemeChange(mediaQuery);

        updateContent();
    </script>
</body>

</html>

WAF 拦截页 - IP 黑名单

亮色模式

深色模式

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IP 黑名单拦截</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --text-color: #333;
            --card-bg: white;
            --heading-color: #2c3e50;
            --link-color: #3498db;
        }

        .dark-mode {
            --bg-color: #1a1a1a;
            --text-color: #e0e0e0;
            --card-bg: #2c2c2c;
            --heading-color: #ffffff;
            --link-color: #63b3ed;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
            transition: background-color 0.3s, color 0.3s;
        }

        .container {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
            transition: background-color 0.3s;
        }

        h1 {
            color: var(--heading-color);
            margin-bottom: 20px;
            font-size: 2em;
            transition: color 0.3s;
        }

        p {
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        .contact-link {
            color: var(--link-color);
            text-decoration: none;
            font-weight: bold;
            transition: color 0.3s;
        }

        .contact-link:hover {
            text-decoration: underline;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 24px;
            transition: transform 0.3s;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
        }
    </style>
</head>

<body>
    <button class="theme-toggle" onclick="toggleTheme()" aria-label="切换主题">🌓</button>
    <main class="container">
        <div class="icon" aria-hidden="true">🚫</div>
        <h1>黑名单拦截</h1>
        <p>很抱歉,您的 IP 被禁止访问</p>
        <p>如果您认为这是一个错误,请联系我们的支持团队。</p>
        <a href="mailto:youremail" class="contact-link">联系支持</a>
    </main>

    <script>
        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
            localStorage.setItem('theme', document.body.classList.contains('dark-mode') ? 'dark' : 'light');
        }

        const savedTheme = localStorage.getItem('theme');
        if (savedTheme === 'dark') {
            document.body.classList.add('dark-mode');
        }

        const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
        function handleThemeChange(e) {
            if (savedTheme) return;
            if (e.matches) {
                document.body.classList.add('dark-mode');
            } else {
                document.body.classList.remove('dark-mode');
            }
        }
        mediaQuery.addListener(handleThemeChange);
        handleThemeChange(mediaQuery);
    </script>
</body>

</html>