login画面追加

This commit is contained in:
admin
2026-02-07 14:25:28 +09:00
parent 9d1ad5594d
commit 331953bb7f
22 changed files with 763 additions and 135 deletions

View File

@@ -1,13 +1,19 @@
<!DOCTYPE html>
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>NJTS 会計システム - メイン</title>
<link rel="stylesheet" href="css/style.css" />
<script src="js/auth.js"></script>
<style>
body {
font-family: system-ui, -apple-system, "Yu Gothic UI",
"Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
font-family:
system-ui,
-apple-system,
"Yu Gothic UI",
"Hiragino Kaku Gothic ProN",
"メイリオ",
sans-serif;
padding: 24px;
}
.grid {
@@ -46,11 +52,34 @@
margin: 0;
font-size: 20px;
}
.user-info {
display: flex;
align-items: center;
gap: 15px;
font-size: 14px;
color: #333;
}
.logout-btn {
padding: 8px 12px;
background: #dc3545;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.logout-btn:hover {
background: #c82333;
}
</style>
</head>
<body>
<header>
<h1>NJTS</h1>
<div class="user-info">
<span>ユーザー: <strong id="username">読み込み中...</strong></span>
<button class="logout-btn" onclick="logout()">ログアウト</button>
</div>
</header>
<main class="grid">
@@ -78,6 +107,14 @@
</main>
<script>
// ユーザー情報を表示
document.addEventListener("DOMContentLoaded", function () {
const user = getCurrentUser();
if (user) {
document.getElementById("username").textContent = user.username;
}
});
// dropdown toggle
const toggle = document.getElementById("accountingToggle");
const menu = document.getElementById("accountingMenu");