dodanie szablonów

This commit is contained in:
Mateusz779 2023-04-19 12:58:31 +02:00
parent bfd11c6d7d
commit 63951315c9
4 changed files with 50 additions and 46 deletions

36
templates/base.html Normal file
View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
{% block style %}{% endblock %}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Panel administracyjny</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav" >
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Lista maszyn</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/create/conf">Tworzenie obrazu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Wyloguj</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
{% block content %}{% endblock %}
</div>
</body>
</html>

View File

@ -1,10 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Formularz</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
{% extends "base.html" %}
{% block title %}Tworzenie obrazu{% endblock %}
{% block style %}
/* styl dla całej strony */
body {
font-family: Arial, sans-serif;
@ -66,10 +62,9 @@ form button[type="submit"] {
form button[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
{% extends 'navbar.html' %}
{% endblock %}
{% block content %}
<h1>Formularz tworzenia pliku konfiguracyjnego</h1>
<form method="POST" action="/api/createconf" enctype="multipart/form-data">
<label>Nazwa konfiguracji:</label><br>
@ -82,5 +77,4 @@ form button[type="submit"]:hover {
<textarea name="authorized_keys_config" rows="4" cols="50"></textarea><br><br>
<input type="submit" value="Wyślij">
</form>
</body>
</html>
{% endblock %}

View File

@ -1,9 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Panel administracyjny</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
{% extends "base.html" %}
{% block title %}Panel administracyjny{% endblock %}
{% block style %}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
@ -57,10 +54,9 @@
background-color: #3e8e41;
}
</style>
</head>
<body>
{% extends 'navbar.html' %}
{% endblock %}
{% block content %}
<div class="container">
<h1 class="my-5">Lista maszyn</h1>
<table class="table table-striped table-hover">
@ -96,5 +92,4 @@
window.open(newUrl,"_blank");
}
</script>
</body>
</html>
{% endblock %}

View File

@ -1,21 +0,0 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Panel administracyjny</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav" >
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Lista maszyn</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/create/conf">Tworzenie obrazu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Wyloguj</a>
</li>
</ul>
</div>
</div>
</nav>