diff --git a/components.d.ts b/components.d.ts index 45496f0d..6362f2e6 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,6 +10,7 @@ declare module 'vue' { export interface GlobalComponents { About: typeof import('./src/components/About.vue')['default'] ArticleList: typeof import('./src/components/list/ArticleList.vue')['default'] + ArticleSetting: typeof import('./src/components/setting/ArticleSetting.vue')['default'] ArticleSettting: typeof import('./src/components/setting/ArticleSettting.vue')['default'] Audio: typeof import('./src/components/base/Audio.vue')['default'] BackIcon: typeof import('./src/components/BackIcon.vue')['default'] @@ -50,6 +51,7 @@ declare module 'vue' { IconFluentArrowClockwise20Regular: typeof import('~icons/fluent/arrow-clockwise20-regular')['default'] IconFluentArrowDownload20Regular: typeof import('~icons/fluent/arrow-download20-regular')['default'] IconFluentArrowLeft16Regular: typeof import('~icons/fluent/arrow-left16-regular')['default'] + IconFluentArrowMove20Regular: typeof import('~icons/fluent/arrow-move20-regular')['default'] IconFluentArrowRepeatAll20Regular: typeof import('~icons/fluent/arrow-repeat-all20-regular')['default'] IconFluentArrowRight16Regular: typeof import('~icons/fluent/arrow-right16-regular')['default'] IconFluentArrowShuffle16Regular: typeof import('~icons/fluent/arrow-shuffle16-regular')['default'] diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index 0b8fb4b9..37407e66 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -1,14 +1,10 @@ -@use "anim" as *; +@use 'anim' as *; @use 'shepherd.css'; :root { --color-reverse-white: white; --color-reverse-black: black; --bg-history: white; - --color-item-bg: rgb(228, 230, 232); - --color-item-hover: white; - //--color-item-active: rgb(75, 110, 175); - --color-item-active: rgb(253, 246, 236); --color-item-border: rgb(226, 226, 226); --color-tooltip-bg: white; @@ -31,7 +27,6 @@ --modal-padding: 1.3rem; --space: 0.9rem; --stat-gap: 1rem; - --shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px; --word-panel-margin-left: calc(50% + var(--toolbar-width) / 2 + 1rem); --anim-time: 0.5s; @@ -48,66 +43,53 @@ --font-family: -apple-system, sans-serif; --word-font-family: ui-monospace, sans-serif; --en-article-family: Georgia, sans-serif; - --zh-article-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif; + --zh-article-family: 'Songti SC', 'SimSun', 'Noto Serif CJK SC', serif; - - --color-primary: #E6E8EB; + --color-primary: #e6e8eb; --color-second: rgb(247, 247, 247); - --color-third: rgb(226 232 240 / 1); - --color-fourth: rgb(193, 193, 193); + --color-third: rgb(228, 230, 232); + --color-fourth: rgb(218, 220, 222); + --color-fifth: rgb(253, 246, 236); //--color-card-active: #FED7AA; --color-card-active: rgb(253, 246, 236); - --color-list-item-active: rgb(253, 246, 236); --color-icon-hightlight: rgb(12, 140, 233); //--color-icon-hightlight: rgb(12, 140, 233); --color-sub-text: gray; --color-main-text: rgb(91, 91, 91); --color-select-bg: rgb(12, 140, 233); - --color-select-text: white; - - --color-notice-bg: rgb(247, 247, 247); - //修改的进度条底色 --color-progress-bar: #d1d5df !important; --color-label-bg: whitesmoke; - --color-link: #2563EB; + --color-link: #2563eb; --color-card-bg: white; - --bg-card-primary: white; --bg-card-secend: rgb(247, 247, 247); -} -.footer { - &.hide { - --color-progress-bar: #dbdbdb !important; - } + --bg-book: rgb(226 232 240); } html.dark { --color-reverse-white: black; --color-reverse-black: white; - --color-primary: #0E1217; - --color-second: rgb(30, 31, 34); - --color-third: rgb(43, 45, 48); + --color-primary: #202124; + --color-second: #292a2d; + --color-third: #35373a; + --color-fourth: rgb(70, 70, 70); + --color-fifth: rgb(84, 84, 84); + --color-card-active: rgb(84, 84, 84); - --color-list-item-active: rgb(84, 84, 84); --color-icon-hightlight: rgb(147, 173, 227); --color-sub-text: #b8b8b8; --color-main-text: rgba(249, 250, 251, 0.8); --color-select-bg: rgb(147, 173, 227); - --color-select-text: black; - --color-notice-bg: rgb(43, 45, 48); --bg-history: rgb(43, 45, 48); - --color-item-bg: rgb(43, 45, 48); - --color-item-hover: rgb(67, 69, 74); - --color-item-active: rgb(84, 84, 84); --color-item-border: rgb(41, 41, 41); --color-tooltip-bg: #252525; @@ -119,8 +101,7 @@ html.dark { --color-scrollbar: rgb(92, 93, 94); --color-input-color: white; - --color-input-bg: rgba(14, 18, 23, 1); - --color-input-icon: #383737; + --color-input-bg: var(--color-third); --color-textarea-bg: rgb(43, 45, 48); --color-article: white; @@ -134,11 +115,8 @@ html.dark { --bg-card-primary: rgb(30, 31, 34); --bg-card-secend: rgb(43, 45, 48); - .footer { - &.hide { - --color-progress-bar: var(--color-third) !important; - } - } + --bg-book: #35373a; + } @media (max-width: 1720px) { @@ -186,7 +164,10 @@ html.dark { } .anim { - transition: background var(--anim-time), color var(--anim-time), border var(--anim-time), opacity var(--anim-time); + transition: background var(--anim-time), + color var(--anim-time), + border var(--anim-time), + opacity var(--anim-time); } .en-article-family { @@ -200,9 +181,7 @@ html.dark { html, body { //font-size: 1px; - padding: 0; - margin: 0; - overflow-x: hidden; + @apply p-0 m-0 overflow-x-hidden; color: var(--color-main-text); font-family: var(--font-family); background: var(--color-primary); @@ -211,42 +190,14 @@ body { } .page { - position: relative; - z-index: 1; - height: 100%; - width: 100%; - font-size: 1rem; - display: flex; - flex-direction: column; -} - -.mask { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - background: rgba(0, 0, 0, 0.3); - transition: all .3s; + @apply relative z-1 h-full w-full flex flex-col; } .mobile-page { - position: fixed; - left: 0; - right: 0; - bottom: 0; - top: 0; - overflow: auto; - font-size: 18rem; - width: 100vw; - height: 100vh; - display: flex; - flex-direction: column; + @apply fixed left-0 right-0 bottom-0 top-0 overflow-auto font-size-18 w-full h-full flex flex-col; & > .page-content { - padding: 10rem; - box-sizing: border-box; - overflow: auto; + @apply p-10 box-border overflow-auto; } } @@ -271,38 +222,33 @@ a { @supports selector(::-webkit-scrollbar) { ::-webkit-scrollbar { - width: .5rem; - height: .6rem; + width: 0.5rem; + height: 0.6rem; } ::-webkit-scrollbar-track { background: transparent; - border-radius: .1rem; + border-radius: 0.1rem; } ::-webkit-scrollbar-thumb { background: var(--color-scrollbar); - border-radius: .6rem; + border-radius: 0.6rem; } } .panel-page-item { - display: flex; - flex-direction: column; - height: 100%; + @apply flex flex-col h-full box-border; padding-bottom: var(--space); - box-sizing: border-box; } .scroll { padding: 0 var(--space); - flex: 1; - overflow: auto; + @apply flex-1 overflow-auto; } .virtual-list { - overflow: overlay; - height: 100%; + @apply overflow-overlay h-full; padding: 0 var(--space); } @@ -311,45 +257,27 @@ a { } .common-list-item { - cursor: pointer; - width: 100%; - box-sizing: border-box; - background: var(--color-item-bg); + @apply cursor-pointer w-full box-border bg-third rounded-lg flex justify-between gap-1 transition-all duration-300 p-2; color: var(--color-main-text); - font-size: 1.1rem; - border-radius: .5rem; - display: flex; - justify-content: space-between; - transition: all .3s; - padding: .6rem; - gap: .3rem; border: 1px solid var(--color-item-border); .left { - display: flex; - gap: .6rem; - + @apply flex gap-1; .title-wrapper { - display: flex; - flex-direction: column; - gap: .2rem; - word-break: break-word; + @apply flex flex-col gap-0.5 word-break-break-word; } } .right { - display: flex; - flex-direction: column; - gap: .1rem; - transition: all .3s; + @apply flex flex-col gap-0.5 transition-all duration-300; } svg { - opacity: 0; + @apply opacity-0; } &.active { - background: var(--color-list-item-active); + @apply bg-fifth; .item-sub-title { color: var(--color-sub-text); @@ -364,6 +292,7 @@ a { &:hover { @extend .active; + background: var(--color-fourth); svg { opacity: 1; @@ -373,7 +302,7 @@ a { .item-title { display: flex; align-items: center; - gap: .5rem; + gap: 0.5rem; color: var(--color-main-text); flex-wrap: wrap; @@ -386,7 +315,7 @@ a { } .phonetic { - font-size: .9rem; + font-size: 0.9rem; color: gray; } } @@ -399,7 +328,7 @@ a { .word-shadow { color: transparent !important; - text-shadow: #b0b0b0 0 0 .5rem; + text-shadow: #b0b0b0 0 0 0.5rem; user-select: none; } @@ -415,14 +344,14 @@ a { .slide { flex: 1; width: 100%; - transition: height .3s; + transition: height 0.3s; position: relative; overflow: hidden; .slide-infinite { z-index: 1; margin-top: 0; - transition: all .3s; + transition: all 0.3s; } .slide-list { @@ -466,7 +395,8 @@ a { .book { @extend .anim; - @apply p-3 rounded-md relative cursor-pointer bg-third hover:bg-card-active flex flex-col justify-between shrink-0; + @apply p-3 rounded-md relative cursor-pointer hover:bg-fifth flex flex-col justify-between shrink-0; + background: var(--bg-book); $w: 7rem; width: $w; height: calc($w * 1.4); @@ -476,7 +406,6 @@ a { width: 100%; border-bottom: 1px solid var(--color-item-border); @apply hover:text-blue-700; - } .line-white { @@ -501,31 +430,19 @@ a { } @keyframes underline { - 0%, 100% { - border-left: .1rem solid var(--color-article); + border-left: 0.1rem solid var(--color-article); } 50% { - border-left: .1rem solid transparent; + border-left: 0.1rem solid transparent; } } #typing-listener { - position: fixed; - left: -9999px; - top: -9999px; - width: 1px; - height: 1px; - opacity: 0.01; - z-index: -1; - pointer-events: none; - border: none; - outline: none; - background: transparent; + @apply fixed left-[-9999px] top-[-9999px] w-1 h-1 opacity-0.01 z-[-1] pointer-events-none border-none outline-none bg-transparent text-transparent; font-size: 16px; // 防止iOS缩放 - color: transparent; // 文字透明 } .btn-no-margin { @@ -536,5 +453,5 @@ a { .target-number { @apply text-3xl!; - color: rgb(176, 116, 211)!important; + color: rgb(176, 116, 211) !important; } diff --git a/src/components/Panel.vue b/src/components/Panel.vue index 142a16b6..d81846c2 100644 --- a/src/components/Panel.vue +++ b/src/components/Panel.vue @@ -33,14 +33,9 @@ provide('tabIndex', computed(() => tabIndex)) \ No newline at end of file + diff --git a/src/components/setting/SettingDialog.vue b/src/components/setting/SettingDialog.vue index 6a0673d6..091a746e 100644 --- a/src/components/setting/SettingDialog.vue +++ b/src/components/setting/SettingDialog.vue @@ -3,7 +3,7 @@ import { defineAsyncComponent } from "vue"; import BaseIcon from "@/components/BaseIcon.vue"; import CommonSetting from "@/components/setting/CommonSetting.vue"; import WordSetting from "@/components/setting/WordSetting.vue"; -import ArticleSettting from "@/components/setting/ArticleSettting.vue"; +import ArticleSetting from "@/components/setting/ArticleSetting.vue"; const Dialog = defineAsyncComponent(() => import('@/components/dialog/Dialog.vue')) @@ -39,7 +39,7 @@ let show = $ref(false)
- +
diff --git a/src/pages/article/BatchEditArticlePage.vue b/src/pages/article/BatchEditArticlePage.vue index 2de4b405..c890e5d8 100644 --- a/src/pages/article/BatchEditArticlePage.vue +++ b/src/pages/article/BatchEditArticlePage.vue @@ -309,7 +309,6 @@ function updateList(e) { height: 100vh; box-sizing: border-box; color: var(--color-font-1); - background: var(--color-second); display: flex; .close { diff --git a/src/pages/article/PracticeArticles.vue b/src/pages/article/PracticeArticles.vue index 03dac8bf..df98a93c 100644 --- a/src/pages/article/PracticeArticles.vue +++ b/src/pages/article/PracticeArticles.vue @@ -1,9 +1,8 @@