First push
This commit is contained in:
84
ACC/templates/base.html
Normal file
84
ACC/templates/base.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<html>
|
||||
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
rel="stylesheet">
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function nospaces(t){
|
||||
if(t.value.match(/\s/g)){
|
||||
alert('Spaces are not allowed');
|
||||
t.value=t.value.replace(/\s/g,'');
|
||||
}}
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: { "X-CSRFToken": '{{csrf_token}}' }
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
margin:0;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
header nav {
|
||||
width:100%;
|
||||
height:60px;
|
||||
background: #c21807;
|
||||
}
|
||||
|
||||
#content {
|
||||
position:absolute;
|
||||
top:60px;
|
||||
bottom:30px;
|
||||
left:0;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 2px 16px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
color: black;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.breadcrumb > li {
|
||||
float:left;
|
||||
}
|
||||
.breadcrumb:last-child {
|
||||
color: black;
|
||||
}
|
||||
.divider {
|
||||
color: black;
|
||||
padding-right: .2em;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<div id="wrapper">
|
||||
{% block base %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<footer style="float: right; text-align: right; position: absolute; bottom: 0px; right: 10px;">
|
||||
© 2023 Matthias Gorzellik | v0.4 | <a href="https://github.com/gotzl/accservermanager">GitHub</a>
|
||||
</footer>
|
||||
</body>
|
||||
<html>
|
32
ACC/templates/main.html
Normal file
32
ACC/templates/main.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
{% block base %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
||||
<div class="navbar-nav">
|
||||
<a class="nav-link" style="font-size:20px; font-weight: bold;" href="/cfgs">Configs</a>
|
||||
<a class="nav-link" style="font-size:20px; font-weight: bold;" href="/instances">Instances</a>
|
||||
<a class="nav-link" style="font-size:20px; font-weight: bold;" href="{% url 'logout' %}">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div id="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'login' %}">login</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
16
ACC/templates/main_app.html
Normal file
16
ACC/templates/main_app.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block base %}
|
||||
|
||||
<header>
|
||||
<nav style="background: #c21807;">
|
||||
<a href="/cfgs">Configs</a>
|
||||
<a href="/instances">Instances</a>
|
||||
<a href="/results">Results</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div id="content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
31
ACC/templates/registration/login.html
Normal file
31
ACC/templates/registration/login.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% block base %}
|
||||
|
||||
<style>
|
||||
/* Add some padding inside the card container */
|
||||
.container {
|
||||
padding: 20px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% bootstrap_css %}
|
||||
{% bootstrap_javascript %}
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
{% if 'username' in form.fields %}
|
||||
{% bootstrap_form form %}
|
||||
{% else %}
|
||||
{% bootstrap_form form %}
|
||||
{% endif %}
|
||||
<div class="action right-align">
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user