Styling mit Bootstrap

This commit is contained in:
phil 2021-02-10 00:26:31 +00:00
parent ba12652b1c
commit 23b4cac045
5 changed files with 46 additions and 37 deletions

7
static/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -8,11 +8,17 @@
<head/> <head/>
<body> <body>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-sm-offset-3 col-md-offset-4">
<form name="show_htpasswd" action="manage" method="POST"> <form name="show_htpasswd" action="manage" method="POST">
<div class="form-group">
<label for="name">Wiki:</label> <label for="name">Wiki:</label>
<input type="text" size="30" name="zone" id="name" /> <input type="text" name="zone" id="name" class="form-control"/>
<input type="submit" name="submit" value="Show" /> </div>
<button type="submit" name="submit" class="btn btn-primary">Show</button>
</form> </form>
</div>
</div>
</body> </body>
</html> </html>

View file

@ -14,29 +14,14 @@
<py:match path="body" once="true"> <py:match path="body" once="true">
<body py:attrs="select('@*')"> <body py:attrs="select('@*')">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/admin/wikis">Start</a>
</nav>
<div id="header"> <div class="container" style="margin-top:20px;">
<table border="0">
<tr><td>
<a href="/"><img src="/logo.png" alt="sl-logo" style="border:none"/></a>
</td>
<td><h1><a href="/">systemausfall.org</a>&nbsp;&nbsp;</h1></td>
</tr>
</table>
</div>
<div id="content">${select('*|text()')}</div> <div id="content">${select('*|text()')}</div>
<div id="footer">
<table width="100%">
<tr><td style="width:70%"><div class="text">
&quot;A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.&quot; -- Antoine de Saint-Exup&eacute;ry
</div></td>
<td style="width:10%"><div class="link">
</div></td>
</tr>
</table>
</div> </div>
</body> </body>
</py:match> </py:match>

View file

@ -8,8 +8,8 @@
<head/> <head/>
<body> <body>
<ul> <ul class="list-group">
<li py:for="zone_name, admin_url in mapping"> <li py:for="zone_name, admin_url in mapping" class="list-group-item">
<a href="${admin_url}">${zone_name}</a> <a href="${admin_url}">${zone_name}</a>
</li> </li>
</ul> </ul>

View file

@ -8,21 +8,26 @@
<head/> <head/>
<body> <body>
<h2>Manage user access for <i>${zone}</i></h2> <h2>Manage user access for wiki: <a href="https://systemausfall.org/wikis/${zone}" target="_blank">${zone}</a></h2>
<div py:if="error" class="error">${error}</div> <div py:if="error" class="alert alert-danger" role="alert">${error}</div>
<div py:if="success" class="success">${success}</div> <div py:if="success" class="alert alert-success">${success}</div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-sm-offset-3 col-md-offset-4">
<h3>Add user</h3> <h3>Add user</h3>
<form name="add-passwd" action="" method="POST"> <form name="add-passwd" action="" method="POST">
<div class="form-group">
<label for="username_add">User name:</label> <label for="username_add">User name:</label>
<input type="text" size="20" name="username" id="username_add" /> <input type="text" name="username" id="username_add" class="form-control"/>
<br/> </div>
<div class="form-group">
<label for="password_add">Password:</label> <label for="password_add">Password:</label>
<input type="password" size="20" name="password" id="password_add" /> <input type="password" name="password" id="password_add" class="form-control"/>
</div>
<input type="hidden" name="action" value="new" /> <input type="hidden" name="action" value="new" />
<input type="hidden" name="zone" value="${zone}"/> <input type="hidden" name="zone" value="${zone}"/>
<input type="submit" name="submit" value="Add user" /> <button type="submit" name="submit" class="btn btn-primary">Add user</button>
</form> </form>
<py:if test="usernames"> <py:if test="usernames">
@ -30,32 +35,38 @@
<h3>Change password</h3> <h3>Change password</h3>
<form name="update-passwd" action="" method="POST"> <form name="update-passwd" action="" method="POST">
<div class="form-group">
<label for="username_update">User name:</label> <label for="username_update">User name:</label>
<select name="username" id="username_update" size="1"> <select name="username" id="username_update" class="form-control">
<option py:for="username in usernames">${username}</option> <option py:for="username in usernames">${username}</option>
</select> </select>
<br/> </div>
<div class="form-group">
<label for="password_update">New password:</label> <label for="password_update">New password:</label>
<input type="password" size="20" name="password" id="password_update" /> <input type="password" name="password" id="password_update" class="form-control"/>
</div>
<input type="hidden" name="action" value="update" /> <input type="hidden" name="action" value="update" />
<input type="hidden" name="zone" value="${zone}"/> <input type="hidden" name="zone" value="${zone}"/>
<input type="submit" name="submit" value="Change password" /> <button type="submit" name="submit" class="btn btn-primary">Change password</button>
</form> </form>
<hr/> <hr/>
<h3>Delete user</h3> <h3>Delete user</h3>
<form name="del-passwd" action="" method="POST"> <form name="del-passwd" action="" method="POST">
<div class="form-group">
<label for="username_del">User name:</label> <label for="username_del">User name:</label>
<select name="username" id="username_del" size="1"> <select name="username" id="username_del" class="form-control">
<option py:for="username in usernames">${username}</option> <option py:for="username in usernames">${username}</option>
</select> </select>
</div>
<input type="hidden" name="action" value="del" /> <input type="hidden" name="action" value="del" />
<input type="hidden" name="zone" value="${zone}"/> <input type="hidden" name="zone" value="${zone}"/>
<input type="submit" name="submit" value="Delete user" /> <button type="submit" name="submit" class="btn btn-primary">Delete user</button>
</form> </form>
</py:if> </py:if>
</div>
</div>
</body> </body>
</html> </html>