поправила html-ки и теперь все красиво

This commit is contained in:
Елена Бакальская 2024-05-14 13:17:45 +04:00
parent 534db18d1f
commit 23789c477e
9 changed files with 60 additions and 14 deletions

View File

@ -9,5 +9,6 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override @Override
public void addViewControllers(ViewControllerRegistry registry) { public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/login").setViewName("login"); registry.addViewController("/login").setViewName("login");
// registry.addViewController("/").setViewName("default");
} }
} }

View File

@ -13,8 +13,8 @@ spring.datasource.password=elina
spring.datasource.driver-class-name=org.h2.Driver spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.hibernate.ddl-auto=create spring.jpa.hibernate.ddl-auto=create
spring.jpa.open-in-view=false spring.jpa.open-in-view=false
spring.jpa.show-sql=true #spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true #spring.jpa.properties.hibernate.format_sql=true
# H2 console # H2 console
spring.h2.console.enabled=true spring.h2.console.enabled=true

View File

@ -137,3 +137,7 @@
font-size: 3.5vh; font-size: 3.5vh;
text-decoration: underline; text-decoration: underline;
} }
html {
height: 100%;
}

View File

@ -8,7 +8,7 @@
<body> <body>
<main layout:fragment="content" class='main-bg-into d-flex flex-fill'> <main layout:fragment="content" class='main-bg-into d-flex flex-fill'>
<form action="#" th:action="@{/login}" method="post" <form action="#" th:action="@{/categories}" method="post"
class="body flex-fill d-flex flex-column justify-content-around align-items-center" id="into-page"> class="body flex-fill d-flex flex-column justify-content-around align-items-center" id="into-page">
<p class="text-label mt-4 d-flex flex-column align-items-center align-content-center"> <p class="text-label mt-4 d-flex flex-column align-items-center align-content-center">

View File

@ -5,22 +5,23 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<!-- <link rel="image" type="image/svg+xml" src="../public/images/logo_livecinema.png" /> -->
<link rel="icon" type="image" src="/images/logo_livecinema.png"> <link rel="icon" type="image" src="/images/logo_livecinema.png">
<meta name=" viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">LiveCinema</title> <title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">LiveCinema</title>
<script type="text/javascript" src="/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js"></script> <script type="text/javascript" src="/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="/webjars/bootstrap/5.3.3/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="/webjars/bootstrap/5.3.3/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="/webjars/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" /> <link rel="stylesheet" href="/webjars/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" />
<link rel="stylesheet" href="/css/style.css" /> <link rel="stylesheet" href="/css/style.css" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
</head> </head>
<body class=""> <body class="d-flex flex-column flex-fill h-100">
<nav expand="md" data-bs-theme="dark" class="my-navbar"> <nav expand="md" data-bs-theme="dark" class="navbar my-navbar navbar-expand-md">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<!-- <i class="bi bi-cart2 d-inline-block align-top me-1 logo"></i> --> <img src="/images/logo_livecinema.png" class="logo" style="height: 2vh;" />
<img src="/images/logo_livecinema.png" alt="" class="logo" style="height: 2vh;" />
LiveCinema LiveCinema
</a> </a>
<th:block sec:authorize="isAuthenticated()" th:with="userName=${#authentication.name}"> <th:block sec:authorize="isAuthenticated()" th:with="userName=${#authentication.name}">
@ -32,6 +33,10 @@
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}"> <ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
<th:block sec:authorize="hasRole('ADMIN')"> <th:block sec:authorize="hasRole('ADMIN')">
<a class="nav-link" href="/admin/categories" th:classappend="${activeLink.startsWith('/admin/movies') <a class="nav-link" href="/admin/categories" th:classappend="${activeLink.startsWith('/admin/movies')
? 'active' : '' }">
Категории
</a>
<a class="nav-link" href="/admin/movies" th:classappend="${activeLink.startsWith('/admin/movies')
? 'active' : '' }"> ? 'active' : '' }">
Фильмы Фильмы
</a> </a>
@ -51,9 +56,9 @@
</th:block> </th:block>
</div> </div>
</nav> </nav>
<main class="w-100 flex-fill d-flex justify-content-center p-0 m-0" layout:fragment="content"> <main layout:fragment="content" class="d-flex flex-column flex-fill">
</main> </main>
<footer class="my-footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center"> <footer class="my-footer mt-auto d-flex flex-shrink-0 justify-content-center">
Бакальская Е.Д. (@)LiveCinema [[${#dates.year(#dates.createNow())}]]. Все права защищены Бакальская Е.Д. (@)LiveCinema [[${#dates.year(#dates.createNow())}]]. Все права защищены
</footer> </footer>
</body> </body>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="ru" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
<head>
<title>Ошибка</title>
</head>
<body>
<main layout:fragment="content">
<ul class="list-group mb-2">
<th:block th:if="${#strings.isEmpty(message)}">
<li class="list-group-item">
Неизвестная ошибка
</li>
</th:block>
<th:block th:if="${not #strings.isEmpty(message)}">
<li class="list-group-item">
<strong>Ошибка:</strong> [[${message}]]
</li>
</th:block>
<th:block th:if="${not #strings.isEmpty(url)}">
<li class="list-group-item">
<strong>Адрес:</strong> [[${url}]]
</li>
<li class="list-group-item">
<strong>Класс исключения:</strong> [[${exception}]]
</li>
<li class="list-group-item">
[[${method}]] ([[${file}]]:[[${line}]])
</li>
</th:block>
</ul>
<a class="btn btn-primary button-fixed-width" href="/">На главную</a>
</main>
</body>
</html>

View File

@ -6,8 +6,7 @@
</head> </head>
<body> <body>
<main layout:fragment="content" class="main-bg-into w-100 flex-fill d-flex justify-content-center p-0 m-0">
<main layout:fragment="content" class='main-bg-into d-flex flex-fill'>
<form action="#" th:action="@{/login}" method="post" <form action="#" th:action="@{/login}" method="post"
class="body flex-fill d-flex flex-column justify-content-around align-items-center" id="into-page"> class="body flex-fill d-flex flex-column justify-content-around align-items-center" id="into-page">

View File

@ -5,7 +5,7 @@
<title>Регистрация</title> <title>Регистрация</title>
</head> </head>
<body class="d-flex flex-column"> <body>
<main layout:fragment="content"> <main layout:fragment="content">
<form action="#" th:action="@{/signup}" th:object="${user}" method="post" class="flex-fill d-flex" <form action="#" th:action="@{/signup}" th:object="${user}" method="post" class="flex-fill d-flex"
id="login-page"> id="login-page">

Binary file not shown.