login.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. {include file="common/meta" /}
  5. <style type="text/css">
  6. * {
  7. margin: 0;
  8. padding: 0;
  9. box-sizing: border-box;
  10. }
  11. body {
  12. font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  13. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  14. background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
  15. background: linear-gradient(135deg, #52c234 0%, #0f9b8e 50%, #1e5f74 100%);
  16. min-height: 100vh;
  17. display: flex;
  18. align-items: center;
  19. justify-content: center;
  20. position: relative;
  21. overflow: hidden;
  22. }
  23. /* 背景装饰元素 */
  24. body::before {
  25. content: '';
  26. position: absolute;
  27. width: 500px;
  28. height: 500px;
  29. background: rgba(255, 255, 255, 0.1);
  30. border-radius: 50%;
  31. top: -250px;
  32. right: -250px;
  33. animation: float 6s ease-in-out infinite;
  34. }
  35. body::after {
  36. content: '';
  37. position: absolute;
  38. width: 400px;
  39. height: 400px;
  40. background: rgba(255, 255, 255, 0.08);
  41. border-radius: 50%;
  42. bottom: -200px;
  43. left: -200px;
  44. animation: float 8s ease-in-out infinite reverse;
  45. }
  46. @keyframes float {
  47. 0%, 100% {
  48. transform: translateY(0) rotate(0deg);
  49. }
  50. 50% {
  51. transform: translateY(-20px) rotate(5deg);
  52. }
  53. }
  54. .container {
  55. width: 100%;
  56. max-width: 1200px;
  57. padding: 20px;
  58. position: relative;
  59. z-index: 1;
  60. }
  61. .login-wrapper {
  62. display: flex;
  63. align-items: center;
  64. justify-content: center;
  65. min-height: 80vh;
  66. }
  67. .login-screen {
  68. max-width: 450px;
  69. width: 100%;
  70. padding: 0;
  71. margin: 0 auto;
  72. }
  73. .login-screen .well {
  74. background: rgba(255, 255, 255, 0.98);
  75. backdrop-filter: blur(10px);
  76. border-radius: 20px;
  77. box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  78. border: 1px solid rgba(255, 255, 255, 0.3);
  79. overflow: hidden;
  80. padding: 0;
  81. animation: slideUp 0.6s ease-out;
  82. }
  83. @keyframes slideUp {
  84. from {
  85. opacity: 0;
  86. transform: translateY(30px);
  87. }
  88. to {
  89. opacity: 1;
  90. transform: translateY(0);
  91. }
  92. }
  93. @media (max-width: 767px) {
  94. .login-screen {
  95. padding: 0 20px;
  96. }
  97. }
  98. .login-head {
  99. background: linear-gradient(135deg, #52c234 0%, #0f9b8e 100%);
  100. padding: 50px 30px 80px;
  101. text-align: center;
  102. position: relative;
  103. overflow: hidden;
  104. }
  105. .login-head::before {
  106. content: '';
  107. position: absolute;
  108. width: 200%;
  109. height: 200%;
  110. background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  111. top: -50%;
  112. left: -50%;
  113. animation: rotate 20s linear infinite;
  114. }
  115. @keyframes rotate {
  116. from {
  117. transform: rotate(0deg);
  118. }
  119. to {
  120. transform: rotate(360deg);
  121. }
  122. }
  123. .login-title {
  124. color: #fff;
  125. font-size: 32px;
  126. font-weight: 600;
  127. margin: 0;
  128. text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  129. position: relative;
  130. z-index: 1;
  131. }
  132. .login-subtitle {
  133. color: rgba(255, 255, 255, 0.9);
  134. font-size: 14px;
  135. margin-top: 8px;
  136. position: relative;
  137. z-index: 1;
  138. }
  139. .profile-img-card {
  140. width: 90px;
  141. height: 90px;
  142. display: block;
  143. border-radius: 50%;
  144. margin: -45px auto 0;
  145. border: 5px solid #fff;
  146. box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  147. background: linear-gradient(135deg, #52c234 0%, #0f9b8e 100%);
  148. position: relative;
  149. z-index: 10;
  150. }
  151. .profile-name-card {
  152. text-align: center;
  153. color: #333;
  154. font-size: 16px;
  155. margin-top: 15px;
  156. }
  157. .login-form {
  158. padding: 30px 40px 40px;
  159. position: relative;
  160. z-index: 99;
  161. }
  162. #login-form {
  163. margin-top: 25px;
  164. }
  165. #login-form .input-group {
  166. margin-bottom: 20px;
  167. position: relative;
  168. width: 100%;
  169. }
  170. #login-form .input-group-addon {
  171. position: absolute;
  172. left: 15px;
  173. top: 50%;
  174. transform: translateY(-50%);
  175. z-index: 10;
  176. background: none;
  177. border: none;
  178. color: #52c234;
  179. font-size: 18px;
  180. }
  181. #login-form .form-control {
  182. width: 100%;
  183. height: 50px;
  184. border: 2px solid #e8f5e9;
  185. border-radius: 25px;
  186. padding-left: 50px;
  187. padding-right: 15px;
  188. font-size: 14px;
  189. transition: all 0.3s ease;
  190. background: #fff;
  191. color: #333;
  192. }
  193. #login-form .form-control:focus {
  194. border-color: #52c234;
  195. box-shadow: 0 0 0 3px rgba(82, 194, 52, 0.1);
  196. background: #fff;
  197. outline: none;
  198. }
  199. #login-form .form-control::placeholder {
  200. color: #b0bec5;
  201. }
  202. /* 验证码输入框特殊样式 */
  203. .captcha-wrapper {
  204. margin-bottom: 20px;
  205. }
  206. .captcha-input-row {
  207. display: flex;
  208. align-items: stretch;
  209. gap: 10px;
  210. }
  211. .captcha-input-box {
  212. flex: 1;
  213. position: relative;
  214. }
  215. .captcha-input-box .input-group-addon {
  216. position: absolute;
  217. left: 15px;
  218. top: 50%;
  219. transform: translateY(-50%);
  220. z-index: 10;
  221. background: none;
  222. border: none;
  223. color: #52c234;
  224. font-size: 18px;
  225. }
  226. .captcha-input-box .form-control {
  227. width: 100%;
  228. height: 50px;
  229. border: 2px solid #e8f5e9;
  230. border-radius: 25px;
  231. padding-left: 50px;
  232. padding-right: 15px;
  233. font-size: 14px;
  234. transition: all 0.3s ease;
  235. background: #fff;
  236. color: #333;
  237. }
  238. .captcha-input-box .form-control:focus {
  239. border-color: #52c234;
  240. box-shadow: 0 0 0 3px rgba(82, 194, 52, 0.1);
  241. outline: none;
  242. }
  243. .captcha-image-box {
  244. width: 140px;
  245. height: 50px;
  246. border: 2px solid #e8f5e9;
  247. border-radius: 10px;
  248. overflow: hidden;
  249. cursor: pointer;
  250. transition: all 0.3s ease;
  251. background: #fff;
  252. display: flex;
  253. align-items: center;
  254. justify-content: center;
  255. flex-shrink: 0;
  256. }
  257. .captcha-image-box:hover {
  258. border-color: #52c234;
  259. box-shadow: 0 2px 8px rgba(82, 194, 52, 0.2);
  260. }
  261. .captcha-image-box img {
  262. display: block;
  263. width: 100%;
  264. height: 100%;
  265. object-fit: cover;
  266. }
  267. .form-group.checkbox {
  268. margin: 20px 0;
  269. }
  270. .form-group.checkbox label {
  271. color: #666;
  272. font-size: 14px;
  273. cursor: pointer;
  274. display: flex;
  275. align-items: center;
  276. user-select: none;
  277. }
  278. .form-group.checkbox input[type="checkbox"] {
  279. width: 18px;
  280. height: 18px;
  281. margin-right: 8px;
  282. cursor: pointer;
  283. accent-color: #52c234;
  284. }
  285. .btn-login {
  286. width: 100%;
  287. height: 50px;
  288. background: linear-gradient(135deg, #52c234 0%, #0f9b8e 100%);
  289. border: none;
  290. border-radius: 25px;
  291. color: #fff;
  292. font-size: 16px;
  293. font-weight: 600;
  294. cursor: pointer;
  295. transition: all 0.3s ease;
  296. box-shadow: 0 4px 15px rgba(82, 194, 52, 0.3);
  297. position: relative;
  298. overflow: hidden;
  299. }
  300. .btn-login::before {
  301. content: '';
  302. position: absolute;
  303. top: 0;
  304. left: -100%;
  305. width: 100%;
  306. height: 100%;
  307. background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  308. transition: left 0.5s ease;
  309. }
  310. .btn-login:hover {
  311. transform: translateY(-2px);
  312. box-shadow: 0 6px 20px rgba(82, 194, 52, 0.4);
  313. }
  314. .btn-login:hover::before {
  315. left: 100%;
  316. }
  317. .btn-login:active {
  318. transform: translateY(0);
  319. }
  320. #errtips {
  321. background: #ffebee;
  322. color: #c62828;
  323. padding: 12px 15px;
  324. border-radius: 10px;
  325. margin-bottom: 15px;
  326. font-size: 13px;
  327. border-left: 4px solid #c62828;
  328. }
  329. #errtips.hide {
  330. display: none;
  331. }
  332. /* 响应式优化 */
  333. @media (max-width: 576px) {
  334. .login-form {
  335. padding: 25px 25px 35px;
  336. }
  337. .login-title {
  338. font-size: 26px;
  339. }
  340. #login-form .form-control {
  341. height: 45px;
  342. font-size: 13px;
  343. }
  344. .btn-login {
  345. height: 45px;
  346. font-size: 15px;
  347. }
  348. }
  349. /* 加载动画 */
  350. .loading {
  351. pointer-events: none;
  352. opacity: 0.6;
  353. }
  354. .loading::after {
  355. content: '';
  356. position: absolute;
  357. top: 50%;
  358. left: 50%;
  359. width: 20px;
  360. height: 20px;
  361. margin: -10px 0 0 -10px;
  362. border: 2px solid #fff;
  363. border-top-color: transparent;
  364. border-radius: 50%;
  365. animation: spin 0.6s linear infinite;
  366. }
  367. @keyframes spin {
  368. to {
  369. transform: rotate(360deg);
  370. }
  371. }
  372. </style>
  373. <!--@formatter:off-->
  374. {if $background}
  375. <style type="text/css">
  376. body{
  377. background-image: url('{$background|htmlentities}');
  378. }
  379. </style>
  380. {/if}
  381. <!--@formatter:on-->
  382. </head>
  383. <body>
  384. <div class="container">
  385. <div class="login-wrapper">
  386. <div class="login-screen">
  387. <div class="well">
  388. <div class="login-head">
  389. <h1 class="login-title">社区养老平台</h1>
  390. <p class="login-subtitle">Smart Elderly Care Management System</p>
  391. </div>
  392. <div class="login-form">
  393. <img id="profile-img" class="profile-img-card" src="__CDN__/assets/img/avatar.png"/>
  394. <p id="profile-name" class="profile-name-card">欢迎登录</p>
  395. <form action="" method="post" id="login-form">
  396. <!--@AdminLoginFormBegin-->
  397. <div id="errtips" class="hide"></div>
  398. {:token()}
  399. <div class="input-group">
  400. <div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
  401. <input type="text" class="form-control" id="pd-form-username" placeholder="请输入用户名" name="username" autocomplete="off" value="" data-rule="{:__('Username')}:required;username"/>
  402. </div>
  403. <div class="input-group">
  404. <div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
  405. <input type="password" class="form-control" id="pd-form-password" placeholder="请输入密码" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
  406. </div>
  407. <!--@CaptchaBegin-->
  408. {if $Think.config.fastadmin.login_captcha}
  409. <div class="captcha-wrapper">
  410. <div class="captcha-input-row">
  411. <div class="captcha-input-box">
  412. <div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
  413. <input type="text" name="captcha" class="form-control" placeholder="请输入验证码" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length|htmlentities})" autocomplete="off"/>
  414. </div>
  415. <div class="captcha-image-box" onclick="var img=this.querySelector('img'); img.src='{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r='+Math.random();" title="点击刷新验证码">
  416. <img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" alt="验证码"/>
  417. </div>
  418. </div>
  419. </div>
  420. {/if}
  421. <!--@CaptchaEnd-->
  422. {if $keeyloginhours>0}
  423. <div class="form-group checkbox">
  424. <label for="keeplogin" data-toggle="tooltip" title="{:__('The duration of the session is %s hours', $keeyloginhours)}">
  425. <input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
  426. {:__('Keep login')}
  427. </label>
  428. </div>
  429. {/if}
  430. <div class="form-group">
  431. <button type="submit" class="btn btn-login">{:__('Sign in')}</button>
  432. </div>
  433. <!--@AdminLoginFormEnd-->
  434. </form>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. </div>
  440. {include file="common/script" /}
  441. </body>
  442. </html>