diff --git a/src/main/resources/assets/playertime/web/css/style.css b/src/main/resources/assets/playertime/web/css/style.css index c2d0856..59f67ee 100644 --- a/src/main/resources/assets/playertime/web/css/style.css +++ b/src/main/resources/assets/playertime/web/css/style.css @@ -1,77 +1,218 @@ +:root { + --primary-color: #4361ee; + --primary-hover: #3a56d4; + --text-color: #2b2d42; + --bg-color: #f8f9fa; + --card-bg: #ffffff; + --border-color: #e9ecef; + --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); + --hover-bg: #f1f3f5; + --even-row: #f8f9fa; + --transition: all 0.3s ease; +} + +[data-theme="dark"] { + --primary-color: #3252df; + --primary-hover: #2360cf; + --text-color: #f8f9fa; + --bg-color: #121212; + --card-bg: #1e1e1e; + --border-color: #333; + --shadow: 0 4px 20px rgba(0, 0, 0, 0.3); + --hover-bg: #2d2d2d; + --even-row: #252525; +} + body { - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - margin: 0; - padding: 0; - background-color: #f5f5f5; - color: #333; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; + margin: 0; + padding: 0; + background-color: var(--bg-color); + color: var(--text-color); + transition: var(--transition); + min-height: 100vh; } .container { - max-width: 1200px; - margin: 0 auto; - padding: 20px; + max-width: 1200px; + margin: 0 auto; + padding: 2rem 1.5rem; +} + +.header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 2rem; } h1 { - color: #2c3e50; - text-align: center; - margin-bottom: 30px; + color: var(--primary-color); + margin: 0; + font-size: 2rem; + font-weight: 600; } .controls { - margin-bottom: 20px; - text-align: center; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1.5rem; + flex-wrap: wrap; + gap: 1rem; +} + +.info-note { + margin: 0; + color: var(--text-color); + opacity: 0.8; + font-size: 0.9rem; } button { - background-color: #3498db; - color: white; - border: none; - padding: 10px 20px; - border-radius: 4px; - cursor: pointer; - font-size: 16px; - transition: background-color 0.3s; + transition: var(--transition); + cursor: pointer; + border: none; + border-radius: 8px; + font-weight: 500; + display: flex; + align-items: center; + gap: 0.5rem; } -button:hover { - background-color: #2980b9; +.refresh-btn { + background-color: var(--primary-color); + color: white; + padding: 0.75rem 1.25rem; + font-size: 1rem; +} + +.refresh-btn:hover { + background-color: var(--primary-hover); + transform: translateY(-1px); +} + +.refresh-btn:active { + transform: translateY(0); +} + +.refresh-btn i { + transition: transform 0.5s ease; +} + +.refresh-btn.loading i { + transform: rotate(360deg); +} + +.theme-toggle { + background: transparent; + color: var(--text-color); + font-size: 1.25rem; + padding: 0.5rem; + position: relative; + width: 3rem; + height: 3rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; +} + +.theme-toggle:hover { + background-color: var(--hover-bg); +} + +.theme-toggle i { + position: absolute; + transition: opacity 0.3s ease, transform 0.3s ease; +} + +.theme-toggle .fa-moon { + opacity: 0; + transform: scale(0.8); +} + +[data-theme="dark"] .theme-toggle .fa-moon { + opacity: 1; + transform: scale(1); +} + +[data-theme="dark"] .theme-toggle .fa-sun { + opacity: 0; + transform: scale(0.8); } .stats-container { - background-color: white; - border-radius: 8px; - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); - overflow: hidden; + background-color: var(--card-bg); + border-radius: 12px; + box-shadow: var(--shadow); + overflow: hidden; + transition: var(--transition); } table { - width: 100%; - border-collapse: collapse; + width: 100%; + border-collapse: collapse; } th, td { - padding: 12px 15px; - text-align: left; - border-bottom: 1px solid #ddd; + padding: 1rem 1.5rem; + text-align: left; + border-bottom: 1px solid var(--border-color); + transition: var(--transition); } th { - background-color: #3498db; - color: white; + background-color: var(--primary-color); + color: white; + font-weight: 500; +} + +tr { + transition: var(--transition); } tr:hover { - background-color: #f1f1f1; + background-color: var(--hover-bg); } tr:nth-child(even) { - background-color: #f9f9f9; + background-color: var(--even-row); } +/* Loading animation */ +@keyframes fadeIn { + from { opacity: 0; transform: translateY(10px); } + to { opacity: 1; transform: translateY(0); } +} + +tbody tr { + animation: fadeIn 0.3s ease forwards; + opacity: 0; +} + +tbody tr:nth-child(1) { animation-delay: 0.05s; } +tbody tr:nth-child(2) { animation-delay: 0.1s; } +tbody tr:nth-child(3) { animation-delay: 0.15s; } +tbody tr:nth-child(4) { animation-delay: 0.2s; } +tbody tr:nth-child(5) { animation-delay: 0.25s; } +tbody tr:nth-child(6) { animation-delay: 0.3s; } +tbody tr:nth-child(7) { animation-delay: 0.35s; } +tbody tr:nth-child(8) { animation-delay: 0.4s; } +tbody tr:nth-child(9) { animation-delay: 0.45s; } +tbody tr:nth-child(10) { animation-delay: 0.5s; } + @media (max-width: 768px) { - table { - display: block; - overflow-x: auto; - } + .container { + padding: 1.5rem 1rem; + } + + th, td { + padding: 0.75rem 1rem; + } + + table { + display: block; + overflow-x: auto; + } } \ No newline at end of file diff --git a/src/main/resources/assets/playertime/web/index.html b/src/main/resources/assets/playertime/web/index.html index 0fe6da5..6ab47ed 100644 --- a/src/main/resources/assets/playertime/web/index.html +++ b/src/main/resources/assets/playertime/web/index.html @@ -5,12 +5,22 @@
仅跟踪和显示列入白名单的玩家