Update Author and Book page

This commit is contained in:
Dmitry Isaenko 2024-01-15 18:53:06 +03:00
parent eb593e8e28
commit 8f2828ea63
3 changed files with 47 additions and 33 deletions

View file

@ -55,20 +55,22 @@ td {
} }
a { a {
color: #cfcfcf; text-decoration: none;
text-align: center;
}
a:link {
color: #cfcfcf;
}
a:hover {
color: white;
} }
a:link,
a:visited{ a:visited{
color: #949494; color: #74bfbd;
}
a:hover,
a:visited:hover {
text-decoration: underline;
color: #cfcfcf;
}
.any:visited {
color: #548a88;
} }
ul { ul {
@ -300,3 +302,18 @@ button:hover {
padding-left: 5px; padding-left: 5px;
flex-basis: 350px; flex-basis: 350px;
} }
/* Book page */
.title{
font-weight: bold;
font-size: 2em;
}
.series{
font-style: italic;
font-size: 1.2em;
}
.not_important{
font-style: italic;
color: #888888;
}

View file

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<title>Marinesco</title> <title th:text="${author != null ? author.authorName : 'Marinesco'}"></title>
<link rel="icon" href="/favicon.svg" type="image/svg+xml"> <link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png"> <link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" /> <link rel="stylesheet" th:href="@{/styles/styles.css}" />
@ -10,22 +10,22 @@
<body> <body>
<div class="page"> <div class="page">
<div th:replace="~{fragments/header :: ${#authorization.expression('isAuthenticated()')} ? 'header-auth' : 'header-anon'}"></div> <div
th:replace="~{fragments/header :: ${#authorization.expression('isAuthenticated()')} ? 'header-auth' : 'header-anon'}">
</div>
<div class="container base"> <div class="container base">
<span class="validationError" th:if="${Error} != null" th:text="${Error}"></span> <span class="validationError" th:if="${Error} != null" th:text="${Error}"></span>
<div th:if="${author} != null"> <div th:if="${author} != null">
<h3><span th:text="${author.authorName}"></span></h3> <div class="title" th:text="${author.authorName}"><br /></div>
<div th:each="book : ${books}"> <div th:each="book : ${books}">
<a th:href="${'/book/' + book.id}"> <a th:href="${'/book/' + book.id}">
<span class="book_title" th:text="${book.title}"></span> <div class="book_title" th:text="${book.title}"></div>
</a> </a>
<em><div th:if="${book.series} != ''" th:text="${book.series}"></div></em>
<br /> <br />
<div th:if="${book.series} != ''" th:text="${'Series: ' + book.series}"> <a th:href="${'/download/?container=' + book.container + '&file=' + book.fsFileName}"
<br /> th:text="${'Download ' + book.fileExtension + ' (' + book.fileSizeForHumans + ')'}"></a>
</div> <hr>
<a th:href="${'/download/?container=' + book.container + '&file=' + book.fsFileName}" th:text="Download"></a>
<span th:text="${' (' + book.fileExtension + ' ' + book.fileSizeForHumans + ')'}"></span>
<p></p>
</div> </div>
</div> </div>

View file

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<title>Marinesco</title> <title th:text="${book != null ? book.title : 'Marinesco'}"></title>
<link rel="icon" href="/favicon.svg" type="image/svg+xml"> <link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png"> <link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" /> <link rel="stylesheet" th:href="@{/styles/styles.css}" />
@ -14,23 +14,20 @@
<div class="container base"> <div class="container base">
<span class="validationError" th:if="${Error} != null" th:text="${Error}"></span> <span class="validationError" th:if="${Error} != null" th:text="${Error}"></span>
<div th:if="${book} != null"> <div th:if="${book} != null">
<br /><span th:text="${'Title: ' + book.title}"></span> <div class="title" th:text="${book.title}"></div>
<br /><span>Authors: </span> <div class="series" th:if="${book.series} != ''" th:text="${book.series}"></div>
<br />
<div th:each="author : ${book.authors}"> <div th:each="author : ${book.authors}">
<span th:text="${' * ' + author.authorName}"></span> <a th:href="${'/author/' + author.id}" th:text="${author.authorName}"></a>
</div> </div>
<br /><span>Genres: </span> <br />
<div th:each="genre : ${book.genres}"> <span th:each="genre : ${book.genres}" th:text="${(genre.humanReadableDescription == '' ? genre.genreId : genre.humanReadableDescription) + '&nbsp;&nbsp;'}"></span>
<span th:text="${' * ' + genre.genreId + ' — ' + genre.humanReadableDescription}"></span>
</div>
<br /><span th:if="${book.series} != null" th:text="${'Series: ' + book.series}"></span>
<br /><span th:if="${book.serNo} != null" th:text="${'Series # : ' + book.serNo}"></span>
<br /><span th:text="${'Format: ' + book.fileExtension}"></span>
<br /><span th:if="${book.addedDate} != null" th:text="${'Added : ' + book.addedDate}"></span>
<br /><span th:text="${'Size: ' + book.fileSizeForHumans}"></span>
<p> <p>
<a th:href="${'/download/?container=' + book.container + '&file=' + book.fsFileName}" th:text="Download"></a> <a th:href="${'/download/?container=' + book.container + '&file=' + book.fsFileName}"
th:text="${'Download ' + book.fileExtension + ' (' + book.fileSizeForHumans + ')'}"></a>
</p> </p>
<div class="not_important" th:if="${book.serNo} != ''" th:text="${'Series # : ' + book.serNo}"></div>
<div class="not_important" th:if="${book.addedDate} != null" th:text="${'Added : ' + book.addedDate}"></div>
</div> </div>
</div> </div>
</div> </div>