fully responsive UI

This commit is contained in:
2025-11-24 23:43:51 +01:00
parent bdc4992d16
commit 177a9cbac3
12 changed files with 1297 additions and 865 deletions

View File

@@ -1,347 +1,3 @@
#book-details-view {
display: flex;
flex-direction: column;
gap: 1.5rem;
padding-bottom: 4rem;
max-width: 1400px;
margin: 0 auto;
width: 100%;
}
.book-top-nav {
display: flex;
align-items: center;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border);
}
.back-btn-large {
display: inline-flex;
align-items: center;
gap: 0.75rem;
font-size: 1.1rem;
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
transition: 0.2s;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
}
.back-btn-large:hover {
color: var(--text-primary);
background: var(--bg-surface-hover);
}
@media (max-width: 767px) {
.back-btn-large {
font-size: 0.95rem;
gap: 0.5rem;
padding: 0.4rem 0.8rem;
}
}
.book-layout-grid {
display: grid;
grid-template-columns: 300px 1fr;
gap: 3rem;
align-items: start;
}
@media (max-width: 1024px) {
.book-layout-grid {
grid-template-columns: 250px 1fr;
gap: 2rem;
}
}
@media (max-width: 767px) {
.book-layout-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
}
}
.book-left-col {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
@media (min-width: 768px) {
.book-left-col {
position: sticky;
top: 20px;
}
}
@media (max-width: 767px) {
.book-left-col {
flex-direction: row;
align-items: flex-start;
gap: 1rem;
}
}
.book-poster-large {
width: 100%;
border-radius: var(--radius-lg);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
aspect-ratio: 2 / 3;
object-fit: cover;
border: 1px solid var(--border);
background: #111;
}
@media (max-width: 767px) {
.book-poster-large {
width: 120px;
flex-shrink: 0;
}
}
.book-title-sidebar {
font-size: 1.5rem;
font-weight: 700;
line-height: 1.3;
margin: 0;
color: var(--text-primary);
text-align: center;
word-wrap: break-word;
}
@media (max-width: 767px) {
.book-title-sidebar {
font-size: 1.2rem;
text-align: left;
}
}
.book-chapters-column {
display: flex;
flex-direction: column;
gap: 1.5rem;
min-width: 0;
}
.chapter-table-container {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
overflow: hidden;
}
.chapter-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
cursor: pointer;
transition: background 0.2s;
}
.chapter-row:last-child {
border-bottom: none;
}
.chapter-row:hover {
background: var(--bg-surface-hover);
}
@media (max-width: 767px) {
.chapter-row {
padding: 0.75rem 1rem;
flex-direction: column;
align-items: flex-start;
gap: 0.25rem;
}
}
.chapter-main-text {
font-weight: 600;
font-size: 1rem;
color: var(--text-primary);
}
.chapter-sub-text {
font-size: 0.9rem;
color: var(--text-tertiary);
}
@media (max-width: 767px) {
.chapter-main-text {
font-size: 0.9rem;
}
.chapter-sub-text {
font-size: 0.8rem;
}
}
.pagination-bar {
display: flex;
justify-content: center;
align-items: center;
gap: 1.5rem;
margin-top: 1rem;
padding-top: 1rem;
flex-wrap: wrap;
}
.page-btn {
background: var(--bg-surface);
border: 1px solid var(--border);
color: var(--text-primary);
padding: 0.5rem 1.5rem;
border-radius: var(--radius-md);
cursor: pointer;
font-weight: 500;
transition: 0.2s;
}
.page-btn:hover:not(:disabled) {
background: var(--bg-surface-hover);
border-color: var(--accent);
}
.page-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
@media (max-width: 767px) {
.page-btn {
padding: 0.4rem 1rem;
font-size: 0.9rem;
}
}
#reader-view {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 200;
background: #0d0d0d;
overflow-y: auto;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 60px;
}
.reader-page-img {
max-width: 100%;
width: auto;
display: block;
margin-bottom: 0;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.reader-text-content {
max-width: 900px;
width: 95%;
color: #e4e4e7;
font-size: 1.1rem;
line-height: 1.8;
padding: 2rem;
background: #18181b;
margin-bottom: 4rem;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.reader-text-content p {
margin-bottom: 1.5rem;
}
@media (max-width: 767px) {
.reader-text-content {
font-size: 1rem;
line-height: 1.7;
padding: 1.5rem;
width: 100%;
border-radius: 0;
}
}
.reader-close-btn {
position: fixed;
top: 20px;
left: 20px;
z-index: 210;
background: rgba(0, 0, 0, 0.8);
color: white;
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
font-weight: 600;
backdrop-filter: blur(4px);
}
.reader-close-btn:hover {
background: var(--accent);
border-color: var(--accent);
}
@media (max-width: 767px) {
.reader-close-btn {
top: 10px;
left: 10px;
padding: 8px 16px;
font-size: 0.9rem;
}
}
.loading-state {
text-align: center;
padding: 4rem;
color: var(--text-tertiary);
}
@media (max-width: 767px) {
.loading-state {
padding: 2rem 1rem;
}
}
.book-read-overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.5rem;
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
color: white;
z-index: 10;
}
.image-entry[data-type="book"]:hover .book-read-overlay {
opacity: 1;
}
.book-read-overlay span {
font-weight: 700;
font-size: 1.1rem;
text-transform: uppercase;
letter-spacing: 1px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.book-read-overlay svg {
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
color: var(--accent);
}
.image-entry[data-type="book"]::after {
content: "";
position: absolute;
@@ -419,4 +75,330 @@
.gallery-masonry .image-entry[data-type="book"]:hover .book-read-overlay {
opacity: 1;
}
.book-top-nav {
margin-bottom: 2rem;
}
.back-btn-large {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.25rem;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
cursor: pointer;
transition: 0.2s;
font-weight: 500;
}
.back-btn-large:hover {
background: var(--bg-surface-hover);
border-color: var(--accent);
}
.back-btn-large svg {
flex-shrink: 0;
}
.book-layout-grid {
display: grid;
grid-template-columns: 300px 1fr;
gap: 2rem;
align-items: start;
}
.book-left-col {
position: sticky;
top: 2rem;
}
.book-poster-large {
width: 100%;
border-radius: var(--radius-lg);
border: 1px solid var(--border);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
margin-bottom: 1.5rem;
}
.book-title-sidebar {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
margin: 0;
line-height: 1.3;
}
.book-chapters-column {
display: flex;
flex-direction: column;
gap: 1rem;
}
.chapter-table-container {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
overflow: hidden;
}
.chapter-row {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
cursor: pointer;
transition: 0.2s;
display: flex;
align-items: center;
justify-content: space-between;
}
.chapter-row:last-child {
border-bottom: none;
}
.chapter-row:hover {
background: var(--bg-surface-hover);
}
.chapter-main-text {
font-weight: 500;
color: var(--text-primary);
font-size: 0.95rem;
}
.pagination-bar {
display: flex;
justify-content: center;
}
.page-btn {
padding: 0.5rem 1rem;
background: var(--bg-base);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
cursor: pointer;
transition: 0.2s;
font-weight: 500;
}
.page-btn:hover:not(:disabled) {
background: var(--accent);
border-color: var(--accent);
}
.page-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
#reader-view {
position: fixed;
inset: 0;
background: #000;
z-index: 100;
overflow-y: auto;
padding: 4rem 0 2rem 0;
}
.reader-close-btn {
position: fixed;
top: 1rem;
right: 1rem;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
color: white;
padding: 0.75rem 1.25rem;
border-radius: var(--radius-md);
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 500;
z-index: 101;
transition: 0.2s;
}
.reader-close-btn:hover {
background: rgba(139, 92, 246, 0.9);
border-color: var(--accent);
}
#reader-content {
max-width: 900px;
margin: 0 auto;
padding: 0 1rem;
}
.reader-page-img {
width: 100%;
height: auto;
display: block;
margin-bottom: 0;
border-radius: 4px;
}
.reader-text-content {
background: #1a1a1a;
color: #e5e5e5;
padding: 3rem;
border-radius: var(--radius-lg);
line-height: 1.8;
font-size: 1.05rem;
max-width: 800px;
margin: 0 auto;
}
.reader-text-content p {
margin-bottom: 1.5rem;
}
.reader-text-content h1,
.reader-text-content h2,
.reader-text-content h3 {
color: var(--accent);
margin-top: 2rem;
margin-bottom: 1rem;
}
@media (max-width: 767px) {
/* Book Cards */
.gallery-masonry.books-only {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 1rem;
}
.image-entry[data-type="book"] img {
height: 200px;
}
.image-entry[data-type="book"]:hover {
transform: none;
}
.image-entry[data-type="book"] .image-buttons {
padding: 0.5rem;
gap: 0.4rem;
opacity: 0.9;
}
.image-entry[data-type="book"] .image-buttons button {
width: 32px;
height: 32px;
}
/* Book Details */
.book-layout-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.book-left-col {
position: relative;
top: 0;
display: grid;
grid-template-columns: 140px 1fr;
gap: 1rem;
align-items: start;
}
.book-poster-large {
width: 100%;
margin-bottom: 0;
}
.book-title-sidebar {
font-size: 1.2rem;
align-self: center;
}
.back-btn-large {
padding: 0.6rem 1rem;
font-size: 0.9rem;
margin-bottom: 1rem;
}
/* Chapter List */
.chapter-row {
padding: 0.85rem 1rem;
}
.chapter-main-text {
font-size: 0.9rem;
}
.pagination-bar {
flex-wrap: wrap;
gap: 0.75rem;
padding: 0.75rem;
}
.page-btn {
padding: 0.5rem 0.85rem;
font-size: 0.85rem;
}
#reader-view {
padding: 3.5rem 0 1rem 0;
}
.reader-close-btn {
top: 0.75rem;
right: 0.75rem;
padding: 0.6rem 1rem;
font-size: 0.9rem;
}
#reader-content {
padding: 0 0.75rem;
}
.reader-text-content {
padding: 1.5rem;
font-size: 1rem;
line-height: 1.7;
}
.reader-page-img {
border-radius: 2px;
}
}
@media (min-width: 768px) and (max-width: 1023px) {
.gallery-masonry.books-only {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.book-layout-grid {
grid-template-columns: 240px 1fr;
gap: 1.5rem;
}
.image-entry[data-type="book"] img {
height: 280px;
}
.book-left-col {
position: sticky;
top: 1rem;
}
}
@media (min-width: 1400px) {
.gallery-masonry.books-only {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.image-entry[data-type="book"] img {
height: 340px;
}
.book-layout-grid {
grid-template-columns: 320px 1fr;
gap: 2.5rem;
}
}