|
|
@ -1,226 +1,254 @@ |
|
|
|
<template> |
|
|
|
<div class="chapter-container"> |
|
|
|
<div class="chapter-header"> |
|
|
|
<div class="header-content"> |
|
|
|
<div class="back" @click="goBack"> |
|
|
|
<el-icon><ArrowLeft /></el-icon> |
|
|
|
<span>返回目录</span> |
|
|
|
<div class="chapter-container"> |
|
|
|
|
|
|
|
|
|
|
|
<div class="chapter-content"> |
|
|
|
<div class="chapter-title-container"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<ArrowLeft /> |
|
|
|
</el-icon> |
|
|
|
<h1 class="chapter-title">{{ chapter.title }}</h1> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="chapter-text"> |
|
|
|
<p v-for="(paragraph, index) in chapter.content" :key="index" class="paragraph"> |
|
|
|
{{ paragraph }} |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="title">{{ chapter.title }}</div> |
|
|
|
<div class="book-title">《{{ bookTitle }}》</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="chapter-content"> |
|
|
|
<h1 class="chapter-title">{{ chapter.title }}</h1> |
|
|
|
|
|
|
|
<div class="content-navigation"> |
|
|
|
<el-button v-if="prevChapterId" @click="goToChapter(prevChapterId)" plain>上一章</el-button> |
|
|
|
<el-button @click="goToBookDetail">目录</el-button> |
|
|
|
<el-button v-if="nextChapterId" @click="goToChapter(nextChapterId)" type="primary">下一章</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="chapter-text"> |
|
|
|
<p v-for="(paragraph, index) in chapter.content" :key="index" class="paragraph"> |
|
|
|
{{ paragraph }} |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="content-navigation bottom"> |
|
|
|
<el-button v-if="prevChapterId" @click="goToChapter(prevChapterId)" plain>上一章</el-button> |
|
|
|
<el-button @click="goToBookDetail">目录</el-button> |
|
|
|
<el-button v-if="nextChapterId" @click="goToChapter(nextChapterId)" type="primary">下一章</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="reading-settings"> |
|
|
|
<div class="settings-buttons"> |
|
|
|
<el-button @click="toggleFontSize(2)" circle plain> |
|
|
|
<el-icon><ZoomIn /></el-icon> |
|
|
|
</el-button> |
|
|
|
<el-button @click="toggleFontSize(-2)" circle plain> |
|
|
|
<el-icon><ZoomOut /></el-icon> |
|
|
|
</el-button> |
|
|
|
<el-button @click="toggleTheme" circle plain> |
|
|
|
<el-icon><MoonNight /></el-icon> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="chapter-menu"> |
|
|
|
<div class="chapter-menu-item"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<ArrowUp /> |
|
|
|
</el-icon> |
|
|
|
<span>上一章</span> |
|
|
|
</div> |
|
|
|
<div class="chapter-menu-item"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<ArrowDown /> |
|
|
|
</el-icon> |
|
|
|
<span>下一章</span> |
|
|
|
</div> |
|
|
|
<div class="chapter-menu-item"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<Reading /> |
|
|
|
</el-icon> |
|
|
|
<span>加书架</span> |
|
|
|
</div> |
|
|
|
<div class="chapter-menu-item"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<ArrowRight /> |
|
|
|
</el-icon> |
|
|
|
<span>目录</span> |
|
|
|
</div> |
|
|
|
<div class="chapter-menu-item" |
|
|
|
@click="toggleTheme"> |
|
|
|
<el-icon size="20px"> |
|
|
|
<MoonNight /> |
|
|
|
</el-icon> |
|
|
|
<span>夜间</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <div class="reading-settings"> |
|
|
|
<div class="settings-buttons"> |
|
|
|
<el-button @click="toggleFontSize(2)" circle plain> |
|
|
|
<el-icon> |
|
|
|
<ZoomIn /> |
|
|
|
</el-icon> |
|
|
|
</el-button> |
|
|
|
<el-button @click="toggleFontSize(-2)" circle plain> |
|
|
|
<el-icon> |
|
|
|
<ZoomOut /> |
|
|
|
</el-icon> |
|
|
|
</el-button> |
|
|
|
<el-button @click="toggleTheme" circle plain> |
|
|
|
<el-icon> |
|
|
|
<MoonNight /> |
|
|
|
</el-icon> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { ref, computed, onMounted } from 'vue'; |
|
|
|
import { useRoute, useRouter } from 'vue-router'; |
|
|
|
import { ArrowLeft, ZoomIn, ZoomOut, MoonNight } from '@element-plus/icons-vue'; |
|
|
|
import { ArrowLeft, ZoomIn, ZoomOut, MoonNight, ArrowUp, ArrowDown, Reading } from '@element-plus/icons-vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'ChapterDetail', |
|
|
|
components: { |
|
|
|
ArrowLeft, |
|
|
|
ZoomIn, |
|
|
|
ZoomOut, |
|
|
|
MoonNight |
|
|
|
}, |
|
|
|
setup() { |
|
|
|
const route = useRoute(); |
|
|
|
const router = useRouter(); |
|
|
|
const bookId = route.params.id; |
|
|
|
const chapterId = route.params.chapterId; |
|
|
|
|
|
|
|
const bookTitle = ref('重生之财源滚滚'); |
|
|
|
const fontSize = ref(18); |
|
|
|
const isDarkMode = ref(false); |
|
|
|
|
|
|
|
// 模拟章节数据 |
|
|
|
const chapter = ref({ |
|
|
|
id: chapterId, |
|
|
|
title: '第' + chapterId + '章 ' + (chapterId === '1' ? '重回2004' : '精彩内容'), |
|
|
|
content: [ |
|
|
|
'贺季宁站在天台上,俯瞰着城市的点点灯光,感到一阵恍惚。', |
|
|
|
'他曾经有多么意气风发,现在就有多么落魄。', |
|
|
|
'三年前,他是A市土豪公司的金牌经理,工资高,福利好,女友漂亮,车位靓,最重要的是老板信任他。', |
|
|
|
'但是贺季宁的对手们不服,老板娘不喜欢他,不怀好意的对手们联合一起,终于把他拉下台了。', |
|
|
|
'他失去工作,更可悲的是,他连公司配他的贷款的房子都搭进去了,欠了几百万的债,女友也离他而去。', |
|
|
|
'这三年,他一直试图东山再起,却处处碰壁,如今债主们逼得紧,他已经走投无路。', |
|
|
|
'"如果老天再给我一次机会,我一定要好好做人,赚很多钱,让那帮人看着我过得好,他们就会比我难受!"', |
|
|
|
'贺季宁苦笑着喃喃自语,闭上了眼睛。', |
|
|
|
'他感觉自己似乎在坠落,又似乎在飘浮,时间不知过了多久...', |
|
|
|
'当他再次睁开眼睛,发现自己躺在一张熟悉又陌生的床上。', |
|
|
|
'这是他十几年前住过的出租屋!', |
|
|
|
'贺季宁一个鲤鱼打挺坐了起来,环顾四周,破旧的家具,泛黄的墙壁,一切都像是回到了过去。', |
|
|
|
'他猛地抓起床头的手机——诺基亚!', |
|
|
|
'日期显示:2004年3月15日。', |
|
|
|
'"我...重生了?"贺季宁不敢相信自己的眼睛,他竟然回到了2004年,回到了一切开始之前!', |
|
|
|
'一切都可以重来!所有的错误都可以避免!他知道未来的风口,知道哪些投资会成功,知道哪些陷阱要避开。', |
|
|
|
'贺季宁握紧了拳头,眼中闪烁着坚定的光芒。', |
|
|
|
'"这一次,我一定要扭转命运!"' |
|
|
|
] |
|
|
|
}); |
|
|
|
|
|
|
|
// 前一章和后一章ID |
|
|
|
const prevChapterId = computed(() => { |
|
|
|
const current = parseInt(chapterId); |
|
|
|
return current > 1 ? (current - 1).toString() : null; |
|
|
|
}); |
|
|
|
|
|
|
|
const nextChapterId = computed(() => { |
|
|
|
const current = parseInt(chapterId); |
|
|
|
return current < 50 ? (current + 1).toString() : null; |
|
|
|
}); |
|
|
|
|
|
|
|
// 返回书籍详情页 |
|
|
|
const goToBookDetail = () => { |
|
|
|
router.push(`/book/${bookId}`); |
|
|
|
}; |
|
|
|
|
|
|
|
// 返回上一页 |
|
|
|
const goBack = () => { |
|
|
|
router.back(); |
|
|
|
}; |
|
|
|
|
|
|
|
// 跳转到其他章节 |
|
|
|
const goToChapter = (targetChapterId) => { |
|
|
|
router.push(`/book/${bookId}/chapter/${targetChapterId}`); |
|
|
|
}; |
|
|
|
|
|
|
|
// 调整字体大小 |
|
|
|
const toggleFontSize = (change) => { |
|
|
|
const newSize = fontSize.value + change; |
|
|
|
if (newSize >= 14 && newSize <= 24) { |
|
|
|
fontSize.value = newSize; |
|
|
|
document.documentElement.style.setProperty('--reading-font-size', `${fontSize.value}px`); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// 切换暗黑模式 |
|
|
|
const toggleTheme = () => { |
|
|
|
isDarkMode.value = !isDarkMode.value; |
|
|
|
if (isDarkMode.value) { |
|
|
|
document.documentElement.classList.add('dark-theme'); |
|
|
|
} else { |
|
|
|
document.documentElement.classList.remove('dark-theme'); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
// 设置初始字体大小 |
|
|
|
document.documentElement.style.setProperty('--reading-font-size', `${fontSize.value}px`); |
|
|
|
|
|
|
|
// 滚动到顶部 |
|
|
|
window.scrollTo(0, 0); |
|
|
|
|
|
|
|
// 实际应用中这里应该从API获取章节内容 |
|
|
|
console.log(`加载章节内容,书籍ID: ${bookId},章节ID: ${chapterId}`); |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
|
bookTitle, |
|
|
|
chapter, |
|
|
|
prevChapterId, |
|
|
|
nextChapterId, |
|
|
|
goToBookDetail, |
|
|
|
goBack, |
|
|
|
goToChapter, |
|
|
|
toggleFontSize, |
|
|
|
toggleTheme |
|
|
|
}; |
|
|
|
} |
|
|
|
name: 'ChapterDetail', |
|
|
|
components: { |
|
|
|
ArrowLeft, |
|
|
|
ZoomIn, |
|
|
|
ZoomOut, |
|
|
|
MoonNight, |
|
|
|
ArrowUp, |
|
|
|
ArrowDown, |
|
|
|
Reading |
|
|
|
}, |
|
|
|
setup() { |
|
|
|
const route = useRoute(); |
|
|
|
const router = useRouter(); |
|
|
|
const bookId = route.params.id; |
|
|
|
const chapterId = route.params.chapterId; |
|
|
|
|
|
|
|
const bookTitle = ref('重生之财源滚滚'); |
|
|
|
const fontSize = ref(18); |
|
|
|
const isDarkMode = ref(false); |
|
|
|
|
|
|
|
// 模拟章节数据 |
|
|
|
const chapter = ref({ |
|
|
|
id: chapterId, |
|
|
|
title: '第' + chapterId + '章 ' + (chapterId === '1' ? '重回2004' : '精彩内容'), |
|
|
|
content: [ |
|
|
|
'贺季宁站在天台上,俯瞰着城市的点点灯光,感到一阵恍惚。', |
|
|
|
'他曾经有多么意气风发,现在就有多么落魄。', |
|
|
|
'三年前,他是A市土豪公司的金牌经理,工资高,福利好,女友漂亮,车位靓,最重要的是老板信任他。三年前,他是A市土豪公司的金牌经理,工资高,福利好,女友漂亮,车位靓,最重要的是老板信任他。', |
|
|
|
'但是贺季宁的对手们不服,老板娘不喜欢他,不怀好意的对手们联合一起,终于把他拉下台了。', |
|
|
|
'他失去工作,更可悲的是,他连公司配他的贷款的房子都搭进去了,欠了几百万的债,女友也离他而去。', |
|
|
|
'这三年,他一直试图东山再起,却处处碰壁,如今债主们逼得紧,他已经走投无路。', |
|
|
|
'"如果老天再给我一次机会,我一定要好好做人,赚很多钱,让那帮人看着我过得好,他们就会比我难受!"', |
|
|
|
'贺季宁苦笑着喃喃自语,闭上了眼睛。', |
|
|
|
'他感觉自己似乎在坠落,又似乎在飘浮,时间不知过了多久...', |
|
|
|
'当他再次睁开眼睛,发现自己躺在一张熟悉又陌生的床上。', |
|
|
|
'这是他十几年前住过的出租屋!', |
|
|
|
'贺季宁一个鲤鱼打挺坐了起来,环顾四周,破旧的家具,泛黄的墙壁,一切都像是回到了过去。', |
|
|
|
'他猛地抓起床头的手机——诺基亚!', |
|
|
|
'日期显示:2004年3月15日。', |
|
|
|
'"我...重生了?"贺季宁不敢相信自己的眼睛,他竟然回到了2004年,回到了一切开始之前!', |
|
|
|
'一切都可以重来!所有的错误都可以避免!他知道未来的风口,知道哪些投资会成功,知道哪些陷阱要避开。', |
|
|
|
'贺季宁握紧了拳头,眼中闪烁着坚定的光芒。', |
|
|
|
'"这一次,我一定要扭转命运!"' |
|
|
|
] |
|
|
|
}); |
|
|
|
|
|
|
|
// 前一章和后一章ID |
|
|
|
const prevChapterId = computed(() => { |
|
|
|
const current = parseInt(chapterId); |
|
|
|
return current > 1 ? (current - 1).toString() : null; |
|
|
|
}); |
|
|
|
|
|
|
|
const nextChapterId = computed(() => { |
|
|
|
const current = parseInt(chapterId); |
|
|
|
return current < 50 ? (current + 1).toString() : null; |
|
|
|
}); |
|
|
|
|
|
|
|
// 返回书籍详情页 |
|
|
|
const goToBookDetail = () => { |
|
|
|
router.push(`/book/${bookId}`); |
|
|
|
}; |
|
|
|
|
|
|
|
// 返回上一页 |
|
|
|
const goBack = () => { |
|
|
|
router.back(); |
|
|
|
}; |
|
|
|
|
|
|
|
// 跳转到其他章节 |
|
|
|
const goToChapter = (targetChapterId) => { |
|
|
|
router.push(`/book/${bookId}/chapter/${targetChapterId}`); |
|
|
|
}; |
|
|
|
|
|
|
|
// 调整字体大小 |
|
|
|
const toggleFontSize = (change) => { |
|
|
|
const newSize = fontSize.value + change; |
|
|
|
if (newSize >= 14 && newSize <= 24) { |
|
|
|
fontSize.value = newSize; |
|
|
|
document.documentElement.style.setProperty('--reading-font-size', `${fontSize.value}px`); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// 切换暗黑模式 |
|
|
|
const toggleTheme = () => { |
|
|
|
isDarkMode.value = !isDarkMode.value; |
|
|
|
if (isDarkMode.value) { |
|
|
|
document.documentElement.classList.add('dark-theme'); |
|
|
|
} else { |
|
|
|
document.documentElement.classList.remove('dark-theme'); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
// 设置初始字体大小 |
|
|
|
document.documentElement.style.setProperty('--reading-font-size', `${fontSize.value}px`); |
|
|
|
|
|
|
|
// 滚动到顶部 |
|
|
|
window.scrollTo(0, 0); |
|
|
|
|
|
|
|
// 实际应用中这里应该从API获取章节内容 |
|
|
|
console.log(`加载章节内容,书籍ID: ${bookId},章节ID: ${chapterId}`); |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
|
bookTitle, |
|
|
|
chapter, |
|
|
|
prevChapterId, |
|
|
|
nextChapterId, |
|
|
|
goToBookDetail, |
|
|
|
goBack, |
|
|
|
goToChapter, |
|
|
|
toggleFontSize, |
|
|
|
toggleTheme |
|
|
|
}; |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
// 全局暗黑模式样式 |
|
|
|
:root { |
|
|
|
--reading-font-size: 18px; |
|
|
|
--reading-background: #f8f8f8; |
|
|
|
--reading-text-color: #333; |
|
|
|
--reading-border-color: #eee; |
|
|
|
--reading-font-size: 18px; |
|
|
|
--reading-background: #f8f8f8; |
|
|
|
--reading-text-color: #333; |
|
|
|
--reading-border-color: #eee; |
|
|
|
} |
|
|
|
|
|
|
|
.dark-theme { |
|
|
|
--reading-background: #252525; |
|
|
|
--reading-text-color: #ccc; |
|
|
|
--reading-border-color: #333; |
|
|
|
|
|
|
|
.chapter-container { |
|
|
|
background-color: var(--reading-background) !important; |
|
|
|
|
|
|
|
.chapter-header { |
|
|
|
background-color: #202020 !important; |
|
|
|
color: #ddd !important; |
|
|
|
border-bottom-color: #333 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-content { |
|
|
|
background-color: var(--reading-background) !important; |
|
|
|
color: var(--reading-text-color) !important; |
|
|
|
|
|
|
|
.chapter-title { |
|
|
|
color: #eee !important; |
|
|
|
} |
|
|
|
|
|
|
|
.paragraph { |
|
|
|
color: var(--reading-text-color) !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.el-button { |
|
|
|
background-color: #333 !important; |
|
|
|
border-color: #555 !important; |
|
|
|
color: #ddd !important; |
|
|
|
|
|
|
|
&.is-plain { |
|
|
|
background: transparent !important; |
|
|
|
} |
|
|
|
|
|
|
|
&.el-button--primary { |
|
|
|
background-color: var(--el-color-primary) !important; |
|
|
|
border-color: var(--el-color-primary) !important; |
|
|
|
color: #fff !important; |
|
|
|
} |
|
|
|
--reading-background: #252525; |
|
|
|
--reading-text-color: #ccc; |
|
|
|
--reading-border-color: #333; |
|
|
|
|
|
|
|
.chapter-container { |
|
|
|
background-color: var(--reading-background) !important; |
|
|
|
|
|
|
|
.chapter-header { |
|
|
|
background-color: #202020 !important; |
|
|
|
color: #ddd !important; |
|
|
|
border-bottom-color: #333 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-content { |
|
|
|
background-color: var(--reading-background) !important; |
|
|
|
color: var(--reading-text-color) !important; |
|
|
|
|
|
|
|
.chapter-title { |
|
|
|
color: #eee !important; |
|
|
|
} |
|
|
|
|
|
|
|
.paragraph { |
|
|
|
color: var(--reading-text-color) !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.el-button { |
|
|
|
background-color: #333 !important; |
|
|
|
border-color: #555 !important; |
|
|
|
color: #ddd !important; |
|
|
|
|
|
|
|
&.is-plain { |
|
|
|
background: transparent !important; |
|
|
|
} |
|
|
|
|
|
|
|
&.el-button--primary { |
|
|
|
background-color: var(--el-color-primary) !important; |
|
|
|
border-color: var(--el-color-primary) !important; |
|
|
|
color: #fff !important; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
@ -228,125 +256,112 @@ export default { |
|
|
|
@use '@/assets/styles/variables.scss' as vars; |
|
|
|
|
|
|
|
.chapter-container { |
|
|
|
min-height: 100vh; |
|
|
|
background-color: var(--reading-background); |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
min-height: 100vh; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-header { |
|
|
|
position: sticky; |
|
|
|
top: 0; |
|
|
|
z-index: 10; |
|
|
|
background-color: #fff; |
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); |
|
|
|
border-bottom: 1px solid var(--reading-border-color); |
|
|
|
|
|
|
|
.header-content { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
max-width: 1000px; |
|
|
|
|
|
|
|
.chapter-content { |
|
|
|
flex: 1; |
|
|
|
max-width: 1100px; |
|
|
|
margin: 0 auto; |
|
|
|
padding: 15px 20px; |
|
|
|
|
|
|
|
.back { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
cursor: pointer; |
|
|
|
color: vars.$primary-color; |
|
|
|
|
|
|
|
.el-icon { |
|
|
|
margin-right: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.title { |
|
|
|
font-weight: bold; |
|
|
|
font-size: 16px; |
|
|
|
max-width: 300px; |
|
|
|
white-space: nowrap; |
|
|
|
overflow: hidden; |
|
|
|
text-overflow: ellipsis; |
|
|
|
padding: 30px 20px 50px; |
|
|
|
background-color: #F3EFE6; |
|
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); |
|
|
|
|
|
|
|
.chapter-title-container { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 30px; |
|
|
|
padding-bottom: 10px; |
|
|
|
border-bottom: 1px solid #e9e4d8; |
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
.chapter-title { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
text-align: left; |
|
|
|
font-size: 24px; |
|
|
|
color: #333; |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.book-title { |
|
|
|
font-size: 14px; |
|
|
|
color: #666; |
|
|
|
|
|
|
|
|
|
|
|
.chapter-text { |
|
|
|
line-height: 1.8; |
|
|
|
|
|
|
|
.paragraph { |
|
|
|
margin-bottom: 20px; |
|
|
|
font-size: var(--reading-font-size); |
|
|
|
color: var(--reading-text-color); |
|
|
|
text-indent: 2em; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-content { |
|
|
|
flex: 1; |
|
|
|
max-width: 800px; |
|
|
|
margin: 0 auto; |
|
|
|
padding: 30px 20px 50px; |
|
|
|
background-color: #fff; |
|
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); |
|
|
|
|
|
|
|
.chapter-title { |
|
|
|
text-align: center; |
|
|
|
font-size: 24px; |
|
|
|
margin-bottom: 30px; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
|
|
|
|
.content-navigation { |
|
|
|
.chapter-menu { |
|
|
|
position: fixed; |
|
|
|
bottom: 20%; |
|
|
|
left: 50%; |
|
|
|
transform: translateX(550px); |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
gap: 15px; |
|
|
|
margin-bottom: 30px; |
|
|
|
|
|
|
|
&.bottom { |
|
|
|
margin-top: 50px; |
|
|
|
margin-bottom: 0; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
margin-top: 20px; |
|
|
|
padding: 0 20px; |
|
|
|
gap: 10px; |
|
|
|
|
|
|
|
.chapter-menu-item { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
flex-direction: column; |
|
|
|
border-radius: 10px; |
|
|
|
background-color: #F3EFE6; |
|
|
|
cursor: pointer; |
|
|
|
height: 80px; |
|
|
|
width: 80px; |
|
|
|
font-size: 14px; |
|
|
|
gap: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-text { |
|
|
|
line-height: 1.8; |
|
|
|
|
|
|
|
.paragraph { |
|
|
|
margin-bottom: 20px; |
|
|
|
font-size: var(--reading-font-size); |
|
|
|
color: var(--reading-text-color); |
|
|
|
text-indent: 2em; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.reading-settings { |
|
|
|
position: fixed; |
|
|
|
bottom: 30px; |
|
|
|
right: 30px; |
|
|
|
z-index: 10; |
|
|
|
|
|
|
|
.settings-buttons { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 10px; |
|
|
|
|
|
|
|
.el-button { |
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); |
|
|
|
position: fixed; |
|
|
|
bottom: 30px; |
|
|
|
right: 30px; |
|
|
|
z-index: 10; |
|
|
|
|
|
|
|
.settings-buttons { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 10px; |
|
|
|
|
|
|
|
.el-button { |
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 响应式调整 |
|
|
|
@media screen and (max-width: vars.$md) { |
|
|
|
.chapter-content { |
|
|
|
padding: 20px 15px 40px; |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-header { |
|
|
|
.header-content { |
|
|
|
padding: 12px 15px; |
|
|
|
|
|
|
|
.title { |
|
|
|
max-width: 200px; |
|
|
|
} |
|
|
|
.chapter-content { |
|
|
|
padding: 20px 15px 40px; |
|
|
|
} |
|
|
|
|
|
|
|
.chapter-header { |
|
|
|
.header-content { |
|
|
|
padding: 12px 15px; |
|
|
|
|
|
|
|
.title { |
|
|
|
max-width: 200px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |