1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-14 16:26:23 -07:00

Use generic page header for manage pages, add login template

This commit is contained in:
Eggbertx 2022-01-04 17:48:46 -08:00
parent c8d8af077b
commit b2318af7a3
12 changed files with 132 additions and 44 deletions

View file

@ -1,4 +1,4 @@
<h1 class="manage-header">Ban user</h1>
<h1>Ban user</h1>
<form method="POST" action="/manage?action=bans">
<input type="hidden" name="do" value="add" />
<b>User filter:</b><br />

View file

@ -1,4 +1,4 @@
<h2 class="manage-header">Config editor</h2>
<h1>Config editor</h1>
{{if ne .status ""}}{{.status}}<hr />{{end}}
Some fields omitted because they can not be (safely) edited from the web interface while Gochan is running.
Edit these directly in gochan.json, then restart Gochan.<br />

View file

@ -1,3 +1,30 @@
<h1 class="manage-header">Dashboard</h1>
{{/*
TODO: Make this actually useful
*/}}
Coming soon
<h2>Dashboard</h2>
(still a work in progress)<br /><br />
<fieldset><legend>Announcements</legend>
<div class="announcement">
<b>Announcement title</b><br />
Announcement body goes here
</div><hr />
<div class="announcement">
<b>Announcement title 2</b><br />
Announcement body goes here
</div>
</fieldset><br />
<fieldset><legend>Boards</legend>
<ul>
<li><a href="/test/">/test/</a> - Testing board</li>
<li><a href="/test2/">/test2/</a> - Testing board 2</li>
<li><a href="/test3/">/test2/</a> - Testing board 3</li>
</ul>
</fieldset><br />
<fieldset><legend>Staff actions (role: administrator)</legend>
<ul>
<li><a href="/manage?action=logout">Log out</a></li>
<li><a href="/manage?action=rebuildall">Rebuild everything</a></li>
<li><a href="/manage?action=bans">Bans</a></li>
</ul>
</fieldset>

View file

@ -1,8 +0,0 @@
<title>Gochan Manage page</title>
<link rel="stylesheet" href="{{.WebRoot}}css/global.css" />
<link id="theme" rel="stylesheet" href="{{.WebRoot}}css/{{.DefaultStyle}}" />
<link rel="shortcut icon" href="{{.WebRoot}}favicon.png" />
<script type="text/javascript" src="{{.WebRoot}}js/consts.js"></script>
<script type="text/javascript" src="{{.WebRoot}}js/gochan.js"></script>
</head>
<body>

View file

@ -0,0 +1,9 @@
<h1>Login</h1><br />
<form method="POST" action="{{.webroot}}manage?action=login" id="login-box" class="staff-form">
<input type="hidden" name="redirect" value="{{.redirect}}" />
<table>
<tr><td>Login</td><td><input type="text" name="username" class="logindata" /><br /></td></tr>
<tr><td>Password</td><td><input type="password" name="password" class="logindata" /><br /></td></tr>
<tr><td><input type="submit" value="Login" /></td></tr>
</table>
</form><br />

View file

@ -1,4 +1,3 @@
<h1 class="manage-header">Staff</h1><br />
<table id="stafftable" border="1">
<tr>

View file

@ -10,11 +10,11 @@
{{- else}}<title>/{{$.board.Dir}}/ - #{{$.op.ID}}</title>{{end}}
{{- else}}<title>/{{$.board.Dir}}/ - {{$.board.Title}}</title>{{end}}
{{- else}}<title>{{.site_config.SiteName}}</title>{{end}}
<link rel="stylesheet" href="{{$.webroot}}css/global.css" />
<link id="theme" rel="stylesheet" href="{{.webroot}}css/{{.board.DefaultStyle}}" />
<link rel="stylesheet" href="{{.webroot}}css/global.css" />
<link id="theme" rel="stylesheet" href="{{.webroot}}css/{{.board_config.DefaultStyle}}" />
<link rel="shortcut icon" href="{{.webroot}}favicon.png">
<script type="text/javascript" src="{{$.webroot}}js/consts.js"></script>
<script type="text/javascript" src="{{$.webroot}}js/gochan.js"></script>
<script type="text/javascript" src="{{.webroot}}js/consts.js"></script>
<script type="text/javascript" src="{{.webroot}}js/gochan.js"></script>
</head>
<body>
<div id="topbar">