reupload of project
517
web/static/css/style.css
Normal file
@@ -0,0 +1,517 @@
|
||||
/* Global styles */
|
||||
* {
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Body styling */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: black;
|
||||
color: white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('/static/img/background-1.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
filter: brightness(50%);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Rounded corners applied directly */
|
||||
.about, .map, .service-info, .photos, .directions, .services, .service-item, .review-box {
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
/* Header title styling */
|
||||
.nazev {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Flex container class for consistent layout */
|
||||
.flex-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Header and Footer background graphics */
|
||||
header, footer {
|
||||
background-color: #333;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
width: 75%;
|
||||
margin: 0 auto;
|
||||
color: white;
|
||||
}
|
||||
|
||||
header {
|
||||
height: 9.5em;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: fit-content; /* Change width to auto */
|
||||
border-top-left-radius: 1em;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background-color: #444;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
width: 75%;
|
||||
margin: 0 auto;
|
||||
border-bottom-left-radius: 0.5em;
|
||||
border-bottom-right-radius: 0.5em;
|
||||
}
|
||||
|
||||
/* Navbar links */
|
||||
.navbar a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
/* Navbar buttons */
|
||||
.navbar button {
|
||||
background-color: #808080;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
.navbar button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Content layout */
|
||||
.container {
|
||||
margin: auto;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
/* Section styles */
|
||||
.about, .service-info, .photos, .directions {
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
background-color: #222;
|
||||
border: 1px solid #555;
|
||||
color: white;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.directions {
|
||||
flex: 1 1 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.directions-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.directions-content iframe {
|
||||
flex: 1 1 50%;
|
||||
}
|
||||
|
||||
.directions-text {
|
||||
flex: 1 1 50%;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* About and Map are larger sections */
|
||||
.about {
|
||||
flex: 2 1 50%;
|
||||
}
|
||||
|
||||
.photos, .directions {
|
||||
flex: 1 1 30%;
|
||||
}
|
||||
|
||||
/* Service section */
|
||||
.services {
|
||||
margin: 20px 0;
|
||||
padding: 15px;
|
||||
background-color: #222;
|
||||
border: 1px solid #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.service-list {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.service-item {
|
||||
flex: 1 1 200px;
|
||||
background-color: #333;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.service-item img {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.service-item:first-child img {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/* Hover effects for buttons and service items */
|
||||
.service-item:hover,
|
||||
.reservation-button:hover,
|
||||
.login-button:hover,
|
||||
.review-box:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.button, .reservation-button, .login-button, .navbar button {
|
||||
background-color: #808080;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 10px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
.button:hover, .reservation-button:hover, .login-button:hover, .navbar button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Flex container for buttons */
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-top: 1.7em;
|
||||
}
|
||||
|
||||
/* Reviews section */
|
||||
.reviews {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.review-box {
|
||||
width: 200px;
|
||||
min-height: 100px;
|
||||
background-color: #444;
|
||||
border: 1px solid #555;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Text alignment for Directions */
|
||||
.directions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Align-right class */
|
||||
.align-right {
|
||||
float: right;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* Popup form styles */
|
||||
.popup-form {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
background-color: #333;
|
||||
padding: 20px;
|
||||
border: 1px solid #555;
|
||||
width: 80%;
|
||||
max-width: 500px;
|
||||
border-radius: 1em;
|
||||
color: white;
|
||||
margin-top: 5%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 1%;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
color: white;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close-button:hover,
|
||||
.close-button:focus {
|
||||
color: #bbb;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-container label {
|
||||
display: block;
|
||||
margin: 10px 0 5px;
|
||||
}
|
||||
|
||||
.form-container input,
|
||||
.form-container textarea {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin: 5px 0 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background-color: #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-container button {
|
||||
background-color: #808080;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
.form-container button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Required field indicator */
|
||||
.required {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* Logo styles */
|
||||
.logo {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* About content styles */
|
||||
.about-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.about-text, .about-image {
|
||||
flex: 1 1 50%;
|
||||
}
|
||||
|
||||
.about-text {
|
||||
padding-right: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.about-image img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
/* Service offer section */
|
||||
.nabidka-sluzeb {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Table styling */
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
padding: 12px 15px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
table td {
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
table tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
/* Media queries for mobile responsiveness */
|
||||
@media (max-width: 768px) {
|
||||
.navbar, .container, .about, .map, .service-info, .photos, .directions, .services, .service-item, .review-box {
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navbar a {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.about-content, .directions-content {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.directions-content iframe, .directions-text {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.reservation-button, .login-button {
|
||||
width: 100%;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.service-list {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.service-item {
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.reviews {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.review-box {
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Button link styles */
|
||||
.button-link {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #007bff;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.button-link:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Logout button styles */
|
||||
.logout-button {
|
||||
background-color: #808080;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 10px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
.logout-button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* User info section */
|
||||
.user-info {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
border-bottom-left-radius: 1em;
|
||||
z-index: 1000;
|
||||
}
|
||||
BIN
web/static/db/db.sqlite
Normal file
BIN
web/static/img/atv-icon.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
web/static/img/autoservis.jpg
Normal file
|
After Width: | Height: | Size: 339 KiB |
BIN
web/static/img/background-1.jpg
Normal file
|
After Width: | Height: | Size: 371 KiB |
BIN
web/static/img/background-2.png
Normal file
|
After Width: | Height: | Size: 781 KiB |
BIN
web/static/img/car-icon.png
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
web/static/img/logo.webp
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
web/static/img/motorcycle-icon.png
Normal file
|
After Width: | Height: | Size: 717 KiB |
BIN
web/static/img/scooter-icon.png
Normal file
|
After Width: | Height: | Size: 201 KiB |
18
web/static/scripts/create_user.js
Normal file
@@ -0,0 +1,18 @@
|
||||
function handleCreateUser(event) {
|
||||
event.preventDefault();
|
||||
const form = event.target;
|
||||
fetch(form.action, {
|
||||
method: form.method,
|
||||
body: new FormData(form),
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(result => {
|
||||
if (result === 'exists') {
|
||||
alert('Uživatel s tímto uživatelským jménem již existuje.');
|
||||
} else {
|
||||
alert('Nový uživatel byl úspěšně vytvořen.');
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
8
web/static/scripts/reservation.js
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
function openReservationForm() {
|
||||
document.getElementById("reservationForm").style.display = "block";
|
||||
}
|
||||
|
||||
function closeReservationForm() {
|
||||
document.getElementById("reservationForm").style.display = "none";
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
header, footer {
|
||||
background-color: #ccc;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 90%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.contact-info, .buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background-color: #ddd;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.navbar a {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.about, .map, .service-info, .photos {
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
background-color: white;
|
||||
margin: 10px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.about, .map {
|
||||
flex: 2 1 60%;
|
||||
}
|
||||
|
||||
.photos, .directions {
|
||||
flex: 1 1 30%;
|
||||
}
|
||||
|
||||
.map {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.services {
|
||||
margin: 20px 0;
|
||||
padding: 15px;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.service-list {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.service-item {
|
||||
flex: 1 1 200px;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.service-item img {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #ccc;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.footer div {
|
||||
flex: 1 1 100px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.reviews {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.review-box {
|
||||
width: 150px;
|
||||
height: 80px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||