@somecat/epub-reader 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/style.css CHANGED
@@ -11,6 +11,7 @@
11
11
  --epub-reader-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
12
12
  --epub-reader-radius: 10px;
13
13
  --epub-reader-bottom-bar-height: 40px;
14
+ --epub-reader-mobile-ui-max-width: 680px;
14
15
  }
15
16
 
16
17
  .epub-reader-icon {
@@ -50,7 +51,7 @@
50
51
  width: 100%;
51
52
  padding-left: 80px;
52
53
  padding-right: 80px;
53
- height: calc(100% - var(--epub-reader-bottom-bar-height));
54
+ height: 100%;
54
55
  background: var(--epub-reader-panel-bg);
55
56
  transition: background-color 0.2s ease;
56
57
  }
@@ -525,57 +526,50 @@
525
526
 
526
527
  .epub-reader__mbar {
527
528
  position: absolute;
528
- left: 16px;
529
- right: 16px;
530
- bottom: 16px;
529
+ left: 50%;
530
+ right: auto;
531
+ bottom: 12px;
531
532
  z-index: 15;
532
533
  display: flex;
533
534
  align-items: center;
534
- justify-content: space-between;
535
- gap: 8px;
536
- padding: 6px;
535
+ justify-content: flex-start;
536
+ gap: 6px;
537
+ width: min(calc(100% - 32px), var(--epub-reader-mobile-ui-max-width));
538
+ padding: 5px;
537
539
  border: 1px solid var(--epub-reader-border);
538
- border-radius: 24px;
539
- background: color-mix(in srgb, var(--epub-reader-panel-bg) 85%, transparent);
540
+ border-radius: 20px;
541
+ background: color-mix(in srgb, var(--epub-reader-panel-bg) 88%, transparent);
540
542
  color: var(--epub-reader-panel-fg);
541
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
543
+ box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
542
544
  backdrop-filter: blur(20px);
543
- transform: translateY(calc(100% + 20px));
545
+ transform: translate(-50%, calc(100% + 20px));
544
546
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
545
547
  }
546
548
 
547
- .epub-reader__mbar-left {
548
- flex: 1;
549
- display: flex;
550
- align-items: center;
551
- gap: 8px;
552
- min-width: 0;
553
- }
554
-
555
- .epub-reader__mbar-right {
556
- display: flex;
557
- align-items: center;
558
- gap: 8px;
559
- }
560
-
561
549
  .epub-reader__mbar.is-visible {
562
- transform: translateY(0);
550
+ transform: translate(-50%, 0);
563
551
  }
564
552
 
565
553
  .epub-reader__mbar .epub-reader__btn {
566
- height: 44px;
567
- border-radius: 18px;
554
+ height: 40px;
555
+ border-radius: 16px;
568
556
  background: transparent;
569
557
  border: none;
570
558
  display: flex;
571
559
  align-items: center;
572
560
  justify-content: center;
573
561
  color: inherit;
574
- opacity: 0.7;
562
+ opacity: 0.75;
575
563
  transition: all 0.2s ease;
576
564
  }
577
565
 
578
- .epub-reader__mbar-left .epub-reader__btn {
566
+ .epub-reader__mbar .epub-reader__btn svg {
567
+ width: 18px !important;
568
+ height: 18px !important;
569
+ min-width: 18px !important;
570
+ }
571
+
572
+ .epub-reader__mbar > .epub-reader__btn {
579
573
  flex: 1;
580
574
  }
581
575
 
@@ -583,7 +577,7 @@
583
577
  background: var(--epub-reader-accent);
584
578
  color: #fff;
585
579
  opacity: 1;
586
- box-shadow: 0 4px 12px color-mix(in srgb, var(--epub-reader-accent) 40%, transparent);
580
+ box-shadow: 0 4px 10px color-mix(in srgb, var(--epub-reader-accent) 34%, transparent);
587
581
  }
588
582
 
589
583
  .epub-reader__mbar .epub-reader__btn:active {
@@ -606,9 +600,10 @@
606
600
 
607
601
  .epub-reader__msheet {
608
602
  position: absolute;
609
- left: 0;
610
- right: 0;
603
+ left: 50%;
604
+ right: auto;
611
605
  bottom: 0;
606
+ width: min(100%, var(--epub-reader-mobile-ui-max-width));
612
607
  height: auto;
613
608
  max-height: 70%;
614
609
  background: var(--epub-reader-panel-bg);
@@ -616,7 +611,7 @@
616
611
  border-top: 1px solid var(--epub-reader-border);
617
612
  border-top-left-radius: 24px;
618
613
  border-top-right-radius: 24px;
619
- transform: translateY(100%);
614
+ transform: translate(-50%, 100%);
620
615
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
621
616
  z-index: 30;
622
617
  display: flex;
@@ -626,7 +621,7 @@
626
621
  }
627
622
 
628
623
  .epub-reader__msheet.is-open {
629
- transform: translateY(0);
624
+ transform: translate(-50%, 0);
630
625
  pointer-events: auto;
631
626
  }
632
627
 
@@ -635,14 +630,13 @@
635
630
  display: flex;
636
631
  align-items: center;
637
632
  justify-content: space-between;
638
- padding: 22px 20px 16px;
633
+ padding: 18px 18px 12px;
639
634
  border-bottom: 1px solid color-mix(in srgb, var(--epub-reader-border) 60%, transparent);
640
635
  }
641
-
642
- /* 拖拽手柄视觉提示 */
643
636
  .epub-reader__msheet-header::before {
644
637
  content: '';
645
638
  position: absolute;
639
+ position: absolute;
646
640
  top: 8px;
647
641
  left: 50%;
648
642
  transform: translateX(-50%);
@@ -659,15 +653,15 @@
659
653
  }
660
654
 
661
655
  .epub-reader__msheet-title {
662
- font-size: 17px;
656
+ font-size: 16px;
663
657
  font-weight: 700;
664
658
  opacity: 0.95;
665
659
  letter-spacing: -0.01em;
666
660
  }
667
661
 
668
662
  .epub-reader__msheet-header .epub-reader__btn {
669
- width: 28px;
670
- height: 28px;
663
+ width: 26px;
664
+ height: 26px;
671
665
  min-height: 0;
672
666
  padding: 0;
673
667
  border-radius: 50%;
@@ -708,6 +702,24 @@
708
702
  margin-top: 10px;
709
703
  }
710
704
 
705
+ .epub-reader__mnav {
706
+ display: flex;
707
+ align-items: center;
708
+ gap: 6px;
709
+ margin-top: 10px;
710
+ }
711
+
712
+ .epub-reader__mnav .epub-reader__btn {
713
+ flex: 1;
714
+ height: 40px;
715
+ border-radius: 16px;
716
+ background: rgba(0, 0, 0, 0.05);
717
+ }
718
+
719
+ .epub-reader[data-theme='dark'] .epub-reader__mnav .epub-reader__btn {
720
+ background: rgba(255, 255, 255, 0.1);
721
+ }
722
+
711
723
  .epub-reader__mprogress .epub-reader__range {
712
724
  width: 100%;
713
725
  appearance: none;
@@ -770,6 +782,38 @@
770
782
  gap: 12px;
771
783
  }
772
784
 
785
+ .epub-reader__msetting {
786
+ display: flex;
787
+ flex-direction: column;
788
+ gap: 10px;
789
+ padding: 10px 12px;
790
+ border-radius: 14px;
791
+ background: rgba(0, 0, 0, 0.04);
792
+ }
793
+
794
+ .epub-reader[data-theme='dark'] .epub-reader__msetting {
795
+ background: rgba(255, 255, 255, 0.08);
796
+ }
797
+
798
+ .epub-reader__msetting-head {
799
+ display: flex;
800
+ align-items: baseline;
801
+ justify-content: space-between;
802
+ gap: 10px;
803
+ }
804
+
805
+ .epub-reader__msetting-label {
806
+ font-size: 12px;
807
+ font-weight: 800;
808
+ opacity: 0.9;
809
+ }
810
+
811
+ .epub-reader__msetting-value {
812
+ font-size: 12px;
813
+ font-variant-numeric: tabular-nums;
814
+ opacity: 0.75;
815
+ }
816
+
773
817
  .epub-reader__msettings .epub-reader__btn {
774
818
  width: 100%;
775
819
  }