docs: add logout to every doc page and index
This commit is contained in:
@@ -56,11 +56,17 @@ td.cn {{ width: 140px; font-weight: 600; color: #333; }}
|
||||
td.en {{ color: #666; font-size: 14px; }}
|
||||
a {{ color: #0066cc; text-decoration: none; display: block; }}
|
||||
a:hover td {{ background: #f8f8f8; border-radius: 4px; }}
|
||||
.topbar {{ display: flex; justify-content: space-between; align-items: baseline; }}
|
||||
.logout-btn {{ font-size: 13px; color: #999; text-decoration: none; }}
|
||||
.logout-btn:hover {{ color: #cc0000; }}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="topbar">
|
||||
<h1>{title}</h1>
|
||||
<a class="logout-btn" href="#" onclick="fetch('/api/v1/auth/logout',{method:'POST'}).then(()=>window.location.reload());return false">Logout</a>
|
||||
</div>
|
||||
<p class="subtitle">{subtitle}</p>
|
||||
<table>{"".join(links)}</table>
|
||||
</div>
|
||||
@@ -108,11 +114,17 @@ pre code {{ background: none; padding: 0; }}
|
||||
a {{ color: #0066cc; }}
|
||||
.back {{ display: inline-block; margin-bottom: 20px; color: #666; }}
|
||||
.back:hover {{ color: #333; }}
|
||||
.topbar {{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }}
|
||||
.logout-btn {{ font-size: 13px; color: #999; text-decoration: none; }}
|
||||
.logout-btn:hover {{ color: #cc0000; }}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="topbar">
|
||||
<a class="back" href="index.html">← Back to index</a>
|
||||
<a class="logout-btn" href="#" onclick="fetch('/api/v1/auth/logout',{method:'POST'}).then(()=>window.location.reload());return false">Logout</a>
|
||||
</div>
|
||||
{content}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user