login.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="flex flex-1 justify-center items-center p-4" id="login-view">
  4. <div class="tech-panel p-10 rounded-xl w-full max-w-sm shadow-2xl border-blue-500/50">
  5. <h2 class="text-3xl font-extrabold text-center mb-2 text-cyan-300">
  6. 系统登录
  7. </h2>
  8. <p class="text-center text-gray-500 text-sm mb-10">{{ app_name }}</p>
  9. <!-- SSO 登录(主入口) -->
  10. <a href="{{ url_for('sso.sso_authorize') }}?redirect=true"
  11. class="block w-full py-3.5 mb-6 bg-cyan-600 hover:bg-cyan-500 text-white font-bold rounded-lg shadow-lg transition duration-300 transform hover:scale-[1.01] border-cyan-400 text-center">
  12. <i class="fas fa-right-to-bracket mr-2"></i> SSO 统一认证登录
  13. </a>
  14. <div class="flex items-center gap-3 mb-6">
  15. <div class="flex-1 border-t border-blue-900/50"></div>
  16. <span class="text-xs text-gray-500">或</span>
  17. <div class="flex-1 border-t border-blue-900/50"></div>
  18. </div>
  19. <!-- 本地密码登录(兜底) -->
  20. <details class="group">
  21. <summary class="cursor-pointer text-sm text-gray-400 hover:text-cyan-300 transition text-center mb-4 list-none">
  22. <i class="fas fa-key mr-1"></i> 使用本地账号密码登录
  23. </summary>
  24. <form class="space-y-6 mt-4" action="{{ url_for('main.login') }}" method="POST">
  25. <div class="relative">
  26. <i class="fas fa-user absolute left-4 top-1/2 transform -translate-y-1/2 text-blue-400"></i>
  27. <input class="w-full p-3.5 pl-11 bg-gray-800 border border-blue-700 rounded-lg focus:ring-2 focus:ring-cyan-400 focus:border-cyan-400 text-white placeholder-gray-500 transition duration-200 shadow-inner" id="username" name="username" placeholder="用户名" required="" type="text">
  28. </div>
  29. <div class="relative">
  30. <i class="fas fa-lock absolute left-4 top-1/2 transform -translate-y-1/2 text-blue-400"></i>
  31. <input class="w-full p-3.5 pl-11 bg-gray-800 border border-blue-700 rounded-lg focus:ring-2 focus:ring-cyan-400 focus:border-cyan-400 text-white placeholder-gray-500 transition duration-200 shadow-inner" id="password" name="password" placeholder="密码" required="" type="password">
  32. </div>
  33. <button class="tech-button w-full py-3 bg-gray-700 hover:bg-gray-600 text-white font-bold rounded-lg shadow-lg transition duration-300 border-gray-500" type="submit">
  34. <i class="fas fa-sign-in-alt mr-2"></i> 本地登录
  35. </button>
  36. {% if error %}
  37. <p class="mt-4 text-center text-sm text-red-400">{{ error }}</p>
  38. {% endif %}
  39. </form>
  40. </details>
  41. </div>
  42. </div>
  43. {% endblock %}