From 2687c00f35b6846c099d6e0389f0813727c91ef7 Mon Sep 17 00:00:00 2001 From: "h.hein" <26-h-kyaw-sakuracommunication@it-college.co.jp> Date: Tue, 27 Oct 2026 09:34:55 +0900 Subject: [PATCH] Login Desing Html Css --- .../src/main/resources/static/css/style.css | 179 ++++++++------- .../src/main/resources/templates/login.html | 216 +++++++++--------- 2 files changed, 206 insertions(+), 189 deletions(-) diff --git a/book-rent/src/main/resources/static/css/style.css b/book-rent/src/main/resources/static/css/style.css index bfebba8..056edc5 100644 --- a/book-rent/src/main/resources/static/css/style.css +++ b/book-rent/src/main/resources/static/css/style.css @@ -1,90 +1,113 @@ -body -{font-family: - "Meiryo","Hiragino Sans",sans-serif; - margin:0;color:#222; - background:#f6f7f9} -header.top -{display:flex; - justify-content:space-between; - align-items:center; - background:#176a78;color:#fff; - padding:10px 20px +/* ---------------------------------------------------- + Login Layout & Animation Styles (Updated) +---------------------------------------------------- */ +body { + font-family: "Meiryo", "Hiragino Sans", sans-serif; + margin: 0; + color: #222; + background: #f6f7f9; } -header.top form -{display:inline; - margin:0} -header.top .user -{margin-right:12px +header.top { + display: flex; + justify-content: space-between; + align-items: center; + background: #176a78; + color: #fff; + padding: 10px 20px; } -main -{max-width:960px; - margin:24px auto; - padding:0 16px +header.top form { display: inline; margin: 0; } +header.top .user { margin-right: 12px; } +main { max-width: 960px; margin: 24px auto; padding: 0 16px; } +h1 { font-size: 20px; } +.card { background: #fff; border: 1px solid #dde; border-radius: 6px; padding: 20px; margin-bottom: 16px; } +label { display: block; margin: 10px 0 4px; font-weight: bold; } +input[type=text], input[type=password], input[type=email] { width: 100%; max-width: 360px; padding: 6px; box-sizing: border-box; } +button, .btn { display: inline-block; background: #176a78; color: #fff; border: 0; border-radius: 4px; padding: 7px 16px; cursor: pointer; text-decoration: none; font-size: 14px; } +button.sub, .btn.sub { background: #6b7b80; } +.error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2be; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; } +.info { background: #e8f4ea; color: #1b5e20; border: 1px solid #bfdcc3; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; } +table { border-collapse: collapse; width: 100%; background: #fff; } +th, td { border: 1px solid #dde; padding: 6px 8px; text-align: left; font-size: 14px; } +th { background: #eaf4f6; } +.menu a { display: block; margin: 8px 0; } + +/* Flexbox Layout: ဘယ်ဘက် Icon နှင့် ညာဘက် Login အချက်အလက်များ ဘေးချင်းယှဉ်ရန် */ +.login-container-flex { + display: flex; + align-items: flex-start; + gap: 35px; /* Icon နှင့် Form ကြား အကွာအဝေး */ } -h1 -{font-size:20px + +/* ဘယ်ဘက်ခြမ်း Icon Box Styling */ +.avatar-box { + flex-shrink: 0; + width: 90px; + height: 90px; + background: #eaf4f6; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.4s ease; + cursor: pointer; + margin-top: 5px; } -.card -{background:#fff; - border:1px solid #dde; - border-radius:6px; - padding:20px; - margin-bottom:16px + +.avatar-box:hover { + transform: scale(1.08); + background: #d5edf1; } -label -{display:block; - margin:10px 0 4px; - font-weight:bold + +/* ညာဘက်ခြမ်း Form Area ကို အပြည့်အသုံးပြုရန် */ +.form-content-area { + flex-grow: 1; } -input[type=text],input[type=password],input[type=email] -{width:100%; - max-width:360px; - padding:6px; - box-sizing:border-box + +/* 1. FALSE / ERROR State (တုန်ခါမည်) */ +.card.shake { + animation: shake 0.4s ease-in-out; } -button,.btn -{display:inline-block; - background:#176a78; - color:#fff;border:0; - border-radius:4px; - padding:7px 16px; - cursor:pointer; - text-decoration:none; - font-size:14px + +.avatar-box.error-state { + background: #fdecea !important; + animation: pulseError 0.4s ease-in-out; } -button.sub,.btn.sub -{background:#6b7b80 + +@keyframes shake { + 0%, 100% { transform: translateX(0); } + 20%, 60% { transform: translateX(-8px); } + 40%, 80% { transform: translateX(8px); } } -.error -{background:#fdecea;color:#b3261e; - border:1px solid #f5c2be; - padding:8px 12px; - border-radius:4px; - margin-bottom:12px + +@keyframes pulseError { + 0% { transform: scale(1); } + 50% { transform: scale(1.15); } + 100% { transform: scale(1); } } -.info -{background:#e8f4ea; - color:#1b5e20; - border:1px solid #bfdcc3; - padding:8px 12px; - border-radius:4px; - margin-bottom:12px + +/* 2. TRUE / SUCCESS State (အောင်မြင်မှု Animation) */ +.avatar-box.success-state { + background: #e8f4ea !important; + animation: successFly 0.6s ease-in-out forwards; } -table -{border-collapse:collapse; - width:100%; - background:#fff -} -th,td -{border:1px solid #dde; - padding:6px 8px; - text-align:left; - font-size:14px -} -th -{background:#eaf4f6 -} -.menu a -{display:block; - margin:8px 0 + +@keyframes successFly { + 0% { transform: scale(1); } + 40% { transform: scale(1.2) translateY(-8px); } + 100% { transform: scale(0.9) translateY(-20px); opacity: 0.8; } } + +/* Responsive (ဖုန်းစခရင်သေးများတွင် အောက်သို့ ဆင်းသွားစေရန်) */ +@media (max-width: 600px) { + .login-container-flex { + flex-direction: column; + align-items: center; + text-align: center; + } + .form-content-area { + width: 100%; + } + input[type=text], input[type=password], input[type=email] { + max-width: 100% !important; + } +} \ No newline at end of file diff --git a/book-rent/src/main/resources/templates/login.html b/book-rent/src/main/resources/templates/login.html index 26aaa40..5452d9d 100644 --- a/book-rent/src/main/resources/templates/login.html +++ b/book-rent/src/main/resources/templates/login.html @@ -1,123 +1,117 @@ - - - ログイン - + + ログイン + + + + + - -
-

書籍貸出管理システム

-
-

ログイン

-
-
- - - - -

-
-
-
+
+

書籍貸出管理システム

+
+ + + + +
+
+ + - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - \ No newline at end of file +