| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- {% extends "base.html" %}
- {% block content %}
- <div class="flex flex-1 justify-center items-center p-4" id="login-view">
- <div class="tech-panel p-10 rounded-xl w-full max-w-sm shadow-2xl border-blue-500/50">
- <h2 class="text-3xl font-extrabold text-center mb-2 text-cyan-300">
- 系统登录
- </h2>
- <p class="text-center text-gray-500 text-sm mb-10">{{ app_name }}</p>
- <!-- SSO 登录(主入口) -->
- <a href="{{ url_for('sso.sso_authorize') }}?redirect=true"
- 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">
- <i class="fas fa-right-to-bracket mr-2"></i> SSO 统一认证登录
- </a>
- <div class="flex items-center gap-3 mb-6">
- <div class="flex-1 border-t border-blue-900/50"></div>
- <span class="text-xs text-gray-500">或</span>
- <div class="flex-1 border-t border-blue-900/50"></div>
- </div>
- <!-- 本地密码登录(兜底) -->
- <details class="group">
- <summary class="cursor-pointer text-sm text-gray-400 hover:text-cyan-300 transition text-center mb-4 list-none">
- <i class="fas fa-key mr-1"></i> 使用本地账号密码登录
- </summary>
- <form class="space-y-6 mt-4" action="{{ url_for('main.login') }}" method="POST">
- <div class="relative">
- <i class="fas fa-user absolute left-4 top-1/2 transform -translate-y-1/2 text-blue-400"></i>
- <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">
- </div>
- <div class="relative">
- <i class="fas fa-lock absolute left-4 top-1/2 transform -translate-y-1/2 text-blue-400"></i>
- <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">
- </div>
- <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">
- <i class="fas fa-sign-in-alt mr-2"></i> 本地登录
- </button>
- {% if error %}
- <p class="mt-4 text-center text-sm text-red-400">{{ error }}</p>
- {% endif %}
- </form>
- </details>
- </div>
- </div>
- {% endblock %}
|