chore(ui): add tailwind 4.3 and update classes (#1379)
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
}
|
||||
@if (nextBookInSeries()) {
|
||||
<div class="cbx-continuation-spacer" aria-hidden="true"></div>
|
||||
<div class="cbx-continuation-hint" [class.visible]="continuationHintVisible()" aria-live="polite">
|
||||
<div class="cbx-continuation-hint" [class.is-visible]="continuationHintVisible()" aria-live="polite">
|
||||
{{ 'readerCbx.continuation.scrollForNext' | transloco }}
|
||||
</div>
|
||||
}
|
||||
@@ -137,7 +137,7 @@
|
||||
}
|
||||
@if (nextBookInSeries()) {
|
||||
<div class="cbx-continuation-spacer" aria-hidden="true"></div>
|
||||
<div class="cbx-continuation-hint" [class.visible]="continuationHintVisible()" aria-live="polite">
|
||||
<div class="cbx-continuation-hint" [class.is-visible]="continuationHintVisible()" aria-live="polite">
|
||||
{{ 'readerCbx.continuation.scrollForNext' | transloco }}
|
||||
</div>
|
||||
}
|
||||
@@ -155,7 +155,7 @@
|
||||
}
|
||||
|
||||
@if (clickToPaginate()) {
|
||||
<div class="click-overlay visible" [class.rtl-overlay]="readingDirection() === CbxReadingDirection.RTL"
|
||||
<div class="click-overlay is-visible" [class.rtl-overlay]="readingDirection() === CbxReadingDirection.RTL"
|
||||
[class.magnifier-disabled]="isMagnifierActive()">
|
||||
<div class="click-zone click-zone-prev" role="button" tabindex="0" (click)="onClickZonePrev($event)"
|
||||
(keydown.enter)="onClickZonePrev($event)">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
transition: opacity 0.35s ease, transform 0.35s ease, color 0.35s ease;
|
||||
pointer-events: none;
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
color: rgb(255 255 255 / 72%);
|
||||
@@ -857,7 +857,7 @@
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@@ -890,7 +890,7 @@
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
&.visible .zone-arrow {
|
||||
&.is-visible .zone-arrow {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="cbx-footer" [class.visible]="forceVisible()">
|
||||
<div class="cbx-footer" [class.is-visible]="forceVisible()">
|
||||
|
||||
@if (state().hasSeries) {
|
||||
<button
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ $transition-fast: 150ms ease;
|
||||
transition: transform 0.3s ease, opacity 0.3s ease;
|
||||
pointer-events: none;
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="cbx-header" [class.visible]="forceVisible()">
|
||||
<div class="cbx-header" [class.is-visible]="forceVisible()">
|
||||
<div class="header-left">
|
||||
<button class="icon-btn" (click)="onOpenSidebar()" [title]="'readerCbx.header.contents' | transloco">
|
||||
<app-reader-icon name="menu" [size]="20" />
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
transform: translateY(0);
|
||||
transition: opacity 0.25s ease-out, transform 0.25s ease-out;
|
||||
|
||||
&:not(.visible) {
|
||||
&:not(.is-visible) {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translateY(-100%);
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@
|
||||
@if (bookmarks().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (bookmark of bookmarks(); track bookmark.id) {
|
||||
<li class="list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<li class="reader-list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<div class="item-content">
|
||||
<span class="item-title">{{ bookmark.title }}</span>
|
||||
<span class="item-meta">{{ bookmark.createdAt | date: 'MMM d, y' }}</span>
|
||||
@@ -118,7 +118,7 @@
|
||||
@if (filteredNotes().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (note of filteredNotes(); track note.id) {
|
||||
<li class="list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<li class="reader-list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<div class="note-bar" [style.background-color]="note.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="note-text">{{ note.noteContent }}</span>
|
||||
|
||||
+3
-3
@@ -302,7 +302,7 @@ $transition-normal: 200ms ease;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
.reader-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
@@ -403,8 +403,8 @@ $transition-normal: 200ms ease;
|
||||
}
|
||||
}
|
||||
|
||||
.list-item:hover .edit-btn,
|
||||
.list-item:hover .delete-btn {
|
||||
.reader-list-item:hover .edit-btn,
|
||||
.reader-list-item:hover .delete-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.footer'">
|
||||
<div class="reader-navbar" [class.visible]="navbarVisible">
|
||||
<div class="reader-navbar" [class.is-visible]="navbarVisible">
|
||||
<button class="icon-btn" [title]="t('previousSection')" [disabled]="!canGoPrevious" (click)="onPreviousSection()">
|
||||
<app-reader-icon name="chevron-left"></app-reader-icon>
|
||||
</button>
|
||||
|
||||
@@ -31,7 +31,7 @@ $transition-normal: 200ms ease;
|
||||
transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
|
||||
transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.header'">
|
||||
<div class="reader-header" [class.visible]="forceVisible()" [style.background]="theme().bg" [style.color]="theme().fg">
|
||||
<div class="reader-header" [class.is-visible]="forceVisible()" [style.background]="theme().bg" [style.color]="theme().fg">
|
||||
<div class="header-left">
|
||||
<button class="icon-btn" (click)="onShowChapters()" [title]="t('chapters')">
|
||||
<app-reader-icon name="menu" [size]="20"></app-reader-icon>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
transform: translateY(-100%);
|
||||
transition: opacity 0.25s ease-out, transform 0.25s ease-out;
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
<ul class="item-list search-results">
|
||||
@for (result of searchState().results; track result.cfi) {
|
||||
<li class="list-item search-result-item" role="button" tabindex="0" (click)="onSearchResultClick(result.cfi)" (keydown.enter)="onSearchResultClick(result.cfi)">
|
||||
<li class="reader-list-item search-result-item" role="button" tabindex="0" (click)="onSearchResultClick(result.cfi)" (keydown.enter)="onSearchResultClick(result.cfi)">
|
||||
<div class="item-content">
|
||||
<span class="search-excerpt">
|
||||
<span class="excerpt-context">{{ result.excerpt.pre }}</span>
|
||||
@@ -132,7 +132,7 @@
|
||||
@if (filteredNotes().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (note of filteredNotes(); track note.id) {
|
||||
<li class="list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<li class="reader-list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<div class="note-bar" [style.background-color]="note.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="note-text">{{ note.noteContent }}</span>
|
||||
|
||||
@@ -141,7 +141,7 @@ $transition-normal: 200ms ease;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
.reader-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
+2
-2
@@ -109,7 +109,7 @@
|
||||
@if (bookmarks().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (bookmark of bookmarks(); track bookmark.id) {
|
||||
<li class="list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<li class="reader-list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<div class="item-content">
|
||||
<span class="item-title">{{ bookmark.title }}</span>
|
||||
<span class="item-meta">{{ bookmark.createdAt | date: 'MMM d, y' }}</span>
|
||||
@@ -133,7 +133,7 @@
|
||||
@if (annotations().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (annotation of annotations(); track annotation.id) {
|
||||
<li class="list-item highlight-item" role="button" tabindex="0" (click)="onAnnotationClick(annotation.cfi)" (keydown.enter)="onAnnotationClick(annotation.cfi)">
|
||||
<li class="reader-list-item highlight-item" role="button" tabindex="0" (click)="onAnnotationClick(annotation.cfi)" (keydown.enter)="onAnnotationClick(annotation.cfi)">
|
||||
<div class="highlight-bar" [style.background-color]="annotation.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="highlight-text">"{{ annotation.text }}"</span>
|
||||
|
||||
+2
-2
@@ -245,7 +245,7 @@ $transition-normal: 200ms ease;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
.reader-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
@@ -323,7 +323,7 @@ $transition-normal: 200ms ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.list-item:hover .action-buttons {
|
||||
.reader-list-item:hover .action-buttons {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
@if (bookmarks().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (bookmark of bookmarks(); track bookmark.id) {
|
||||
<li class="list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark)" (keydown.enter)="onBookmarkClick(bookmark)">
|
||||
<li class="reader-list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark)" (keydown.enter)="onBookmarkClick(bookmark)">
|
||||
<div class="item-content">
|
||||
<span class="item-title">{{ bookmark.title }}</span>
|
||||
<span class="item-meta">{{ t('page') }} {{ bookmark.pageNumber }}</span>
|
||||
@@ -107,7 +107,7 @@
|
||||
@if (annotations().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (annotation of annotations(); track annotation.id) {
|
||||
<li class="list-item highlight-item" role="button" tabindex="0" (click)="onAnnotationClick(annotation)" (keydown.enter)="onAnnotationClick(annotation)">
|
||||
<li class="reader-list-item highlight-item" role="button" tabindex="0" (click)="onAnnotationClick(annotation)" (keydown.enter)="onAnnotationClick(annotation)">
|
||||
@if (annotation.color) {
|
||||
<div class="highlight-bar" [style.background-color]="annotation.color"></div>
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ $transition-fast: 150ms ease;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
.reader-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
@@ -430,7 +430,7 @@ $transition-fast: 150ms ease;
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
.reader-list-item {
|
||||
background: rgb(0 0 0 / 2%);
|
||||
|
||||
&:hover {
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
}
|
||||
|
||||
<!-- Footer (shared across both viewer modes) -->
|
||||
<div class="pdf-footer" [class.visible]="footerVisible()">
|
||||
<div class="pdf-footer" [class.is-visible]="footerVisible()">
|
||||
<div class="page-nav-left">
|
||||
<button class="nav-btn" (click)="goToFirstPage()" [disabled]="page() <= 1"
|
||||
[title]="'readerPdf.footer.firstPage' | transloco" [attr.aria-label]="'readerPdf.footer.firstPage' | transloco">
|
||||
|
||||
@@ -331,7 +331,7 @@ $transition-fast: 150ms ease;
|
||||
pointer-events: none;
|
||||
transition: transform 0.25s ease-out, opacity 0.25s ease-out;
|
||||
|
||||
&.visible {
|
||||
&.is-visible {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
|
||||
Reference in New Issue
Block a user