base.ftl 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!doctype html>
  2. <html class="dark">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title><#if title??>${title}<#else>Pig 统一身份认证</#if></title>
  7. <script src="https://cdn.tailwindcss.com"></script>
  8. <script>
  9. tailwind.config = {
  10. darkMode: 'class',
  11. theme: {
  12. extend: {
  13. colors: {
  14. primary: '#6366f1'
  15. }
  16. }
  17. }
  18. }
  19. </script>
  20. <style>
  21. .dark-mode-toggle {
  22. transition: all 0.3s ease;
  23. }
  24. .dark-mode-toggle:hover {
  25. transform: scale(1.1);
  26. }
  27. .animate-spin-slow {
  28. animation: spin 2s linear infinite;
  29. }
  30. </style>
  31. <#if extraHead??>${extraHead}</#if>
  32. </head>
  33. <body class="min-h-screen">
  34. <!-- 暗黑模式切换按钮 -->
  35. <div class="fixed top-6 right-6 z-50">
  36. <button id="theme-toggle" class="dark-mode-toggle p-3 rounded-xl bg-purple-100/90 dark:bg-gray-800/90 text-purple-600 dark:text-yellow-300 hover:bg-purple-200 dark:hover:bg-gray-700 focus:outline-none transition-all duration-300 shadow-lg">
  37. <!-- 月亮图标 -->
  38. <svg id="moon-icon" class="w-6 h-6 hidden dark:block" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  39. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
  40. </svg>
  41. <!-- 太阳图标 -->
  42. <svg id="sun-icon" class="w-6 h-6 block dark:hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  43. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
  44. </svg>
  45. </button>
  46. </div>
  47. <!-- 背景渐变 -->
  48. <div class="bg-purple-900 fixed top-0 left-0 bg-gradient-to-b from-gray-900 via-gray-900 to-purple-800 w-full h-full -z-10">
  49. </div>
  50. <div class="relative min-h-screen flex flex-col md:flex-row items-center justify-center px-4 py-12 md:px-8">
  51. <!-- 左侧说明文本 -->
  52. <div class="flex-1 max-w-xl mb-8 md:mb-0 md:mr-12 z-10">
  53. <div class="hidden md:block">
  54. <h2 class="text-3xl font-bold text-white mb-6">统一身份认证平台</h2>
  55. <p class="text-gray-300 text-lg leading-relaxed opacity-90">
  56. 为企业提供一套集中式的账号、权限、认证、审计工具,帮助企业打通身份数据孤岛,实现"一个账号、一次认证、多点通行"的效果,强化企业安全体系的同时,提升组织管理效率,助力企业数字化升级转型。
  57. </p>
  58. </div>
  59. </div>
  60. <!-- 右侧内容区 -->
  61. <div class="flex-1 w-full max-w-md z-10">
  62. <div class="p-8 md:p-10 bg-white dark:bg-gray-900 rounded-2xl shadow-2xl backdrop-blur-sm transition-all duration-300">
  63. <#if content??>${content}</#if>
  64. <!-- 版权信息 -->
  65. <div class="mt-8 pt-6 text-center text-gray-400 dark:text-gray-500 text-sm border-t border-gray-100 dark:border-gray-800">
  66. <span>
  67. Copyright © 2021-2025
  68. <a href="#" class="text-purple-600 dark:text-purple-400 hover:text-purple-700 dark:hover:text-purple-300 transition-colors">PIGCLOUD</a>
  69. </span>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <!-- 底部波浪装饰 -->
  75. <svg class="fixed bottom-0 left-0 w-full transition-colors -z-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
  76. <path class="fill-white dark:fill-gray-900 transition-colors"
  77. d="M0,0L40,42.7C80,85,160,171,240,197.3C320,224,400,192,480,154.7C560,117,640,75,720,74.7C800,75,880,117,960,154.7C1040,192,1120,224,1200,213.3C1280,203,1360,149,1400,122.7L1440,96L1440,320L1400,320C1360,320,1280,320,1200,320C1120,320,1040,320,960,320C880,320,800,320,720,320C640,320,560,320,480,320C400,320,320,320,240,320C160,320,80,320,40,320L0,320Z">
  78. </path>
  79. </svg>
  80. <script>
  81. // 主题切换功能
  82. const themeToggle = document.getElementById('theme-toggle');
  83. const html = document.documentElement;
  84. // 检查本地存储中的主题设置
  85. if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
  86. html.classList.add('dark');
  87. } else {
  88. html.classList.remove('dark');
  89. }
  90. // 切换主题
  91. themeToggle.addEventListener('click', () => {
  92. html.classList.toggle('dark');
  93. // 保存主题设置到本地存储
  94. if (html.classList.contains('dark')) {
  95. localStorage.theme = 'dark';
  96. } else {
  97. localStorage.theme = 'light';
  98. }
  99. // 添加点击动画效果
  100. themeToggle.classList.add('animate-spin-slow');
  101. setTimeout(() => {
  102. themeToggle.classList.remove('animate-spin-slow');
  103. }, 300);
  104. });
  105. </script>
  106. </body>
  107. </html>