|
@@ -15,10 +15,14 @@
|
|
|
<!-- <list-item type="content" onclick="showOrHidePop" show="{{!!content}}">
|
|
<!-- <list-item type="content" onclick="showOrHidePop" show="{{!!content}}">
|
|
|
<text class="book-text" style="{{contentStyle}}">{{ content }}</text>
|
|
<text class="book-text" style="{{contentStyle}}">{{ content }}</text>
|
|
|
</list-item> -->
|
|
</list-item> -->
|
|
|
- <list-item type="content" show="{{!!content}}" onclick="showOrHidePop">
|
|
|
|
|
|
|
+ <!-- show="{{!!content}}" onclick="showOrHidePop" -->
|
|
|
|
|
+ <list-item type="content" >
|
|
|
<div class="doc-page">
|
|
<div class="doc-page">
|
|
|
- <richtext scene="book" if="showRich" style="{{contentStyle}}" @splitpage="pageEndFunction" id="book" @pagechanged="pageChangeFunction">
|
|
|
|
|
- {{ content }}</richtext>
|
|
|
|
|
|
|
+ <swiper class="swiper" style="{{swiperStyle}}" index="{{currentPage - 1}}" @change="onSwiperChange" indicator="false" loop="false">
|
|
|
|
|
+ <div for="{{pages}}" class="swiper-page">
|
|
|
|
|
+ <text class="book-text" style="{{contentStyle}}">{{ $item }}</text>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </swiper>
|
|
|
<text if="{{totalPage > 0}}" class="index-class">{{ currentPage }} / {{ totalPage }} </text>
|
|
<text if="{{totalPage > 0}}" class="index-class">{{ currentPage }} / {{ totalPage }} </text>
|
|
|
</div>
|
|
</div>
|
|
|
</list-item>
|
|
</list-item>
|
|
@@ -95,7 +99,7 @@
|
|
|
<text
|
|
<text
|
|
|
class="btn"
|
|
class="btn"
|
|
|
onclick="sizeChange('minus')"
|
|
onclick="sizeChange('minus')"
|
|
|
- disabled="{{userSetting.fontsize <= 30}}"
|
|
|
|
|
|
|
+ disabled="{{userSetting.fontsize <= 36}}"
|
|
|
>A-</text
|
|
>A-</text
|
|
|
>
|
|
>
|
|
|
<text class="size">{{ userSetting.fontsize }}</text>
|
|
<text class="size">{{ userSetting.fontsize }}</text>
|
|
@@ -126,7 +130,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</stack>
|
|
</stack>
|
|
|
- <add-desktop bottom="50"></add-desktop>
|
|
|
|
|
|
|
+ <!-- <add-desktop bottom="50"></add-desktop> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -136,7 +140,7 @@ import { getBookContent } from '../../assets/data/book-content.js'
|
|
|
import { contentsData } from '../../assets/data/contents.js'
|
|
import { contentsData } from '../../assets/data/contents.js'
|
|
|
import fetch from '@system.fetch'
|
|
import fetch from '@system.fetch'
|
|
|
import device from '@system.device'
|
|
import device from '@system.device'
|
|
|
-import ad from '@service.ad'
|
|
|
|
|
|
|
+// import ad from '@service.ad'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
public: {
|
|
public: {
|
|
@@ -149,8 +153,6 @@ export default {
|
|
|
shelfList:[],//书架列表
|
|
shelfList:[],//书架列表
|
|
|
totalPage: 0,
|
|
totalPage: 0,
|
|
|
index: 0,
|
|
index: 0,
|
|
|
- showRich:false,
|
|
|
|
|
- componentName: 'richtext',
|
|
|
|
|
screenHeight:1000,
|
|
screenHeight:1000,
|
|
|
screenWidth: 720,
|
|
screenWidth: 720,
|
|
|
pages: [], // 分页后的内容数组
|
|
pages: [], // 分页后的内容数组
|
|
@@ -160,7 +162,7 @@ export default {
|
|
|
showPop: false,
|
|
showPop: false,
|
|
|
showCategory:false,
|
|
showCategory:false,
|
|
|
userSetting: {
|
|
userSetting: {
|
|
|
- fontsize: 30,
|
|
|
|
|
|
|
+ fontsize: 36,
|
|
|
bgColor: '#EAEAEF',
|
|
bgColor: '#EAEAEF',
|
|
|
nightMode: false,
|
|
nightMode: false,
|
|
|
fontFamily: 'default'
|
|
fontFamily: 'default'
|
|
@@ -203,24 +205,34 @@ export default {
|
|
|
fontFamily: this.userSetting.fontFamily,
|
|
fontFamily: this.userSetting.fontFamily,
|
|
|
color: this.userSetting.nightMode ? 'rgb(126,129,134)' : '#000000',
|
|
color: this.userSetting.nightMode ? 'rgb(126,129,134)' : '#000000',
|
|
|
fontSize: this.userSetting.fontsize + 'px',
|
|
fontSize: this.userSetting.fontsize + 'px',
|
|
|
- height:this.screenHeight + 'px',
|
|
|
|
|
|
|
+ lineHeight: (this.userSetting.fontsize * 1.5) + 'px'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ swiperStyle() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ height: (this.screenHeight - 400) + 'px'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async onInit() {
|
|
async onInit() {
|
|
|
var that = this
|
|
var that = this
|
|
|
- this.initAd()
|
|
|
|
|
|
|
+ const deviceInfo = await device.getInfo()
|
|
|
|
|
+ console.log('deviceInfo',deviceInfo)
|
|
|
|
|
+ this.screenHeight = (deviceInfo.data.screenHeight * 1) || 1100
|
|
|
|
|
+ this.screenWidth = deviceInfo.data.screenWidth * 1
|
|
|
|
|
|
|
|
- device.getInfo({
|
|
|
|
|
- success: function(ret) {
|
|
|
|
|
- that.screenHeight = (ret.screenHeight * 1 - 500) || 1100
|
|
|
|
|
- that.screenWidth = ret.screenWidth * 1
|
|
|
|
|
- console.log(`handling success, brand = ${ ret.screenHeight } ${ ret.screenWidth }`)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.initAd()
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ if(this.bannerAd) {
|
|
|
|
|
+ this.bannerAd.show();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.initAd();
|
|
|
|
|
+ }
|
|
|
|
|
+ },50)
|
|
|
$utils.getStorage('bookshelf').then(value => {
|
|
$utils.getStorage('bookshelf').then(value => {
|
|
|
- console.log('value bookshelf',value)
|
|
|
|
|
|
|
+ if(value){
|
|
|
this.shelfList = JSON.parse(value)
|
|
this.shelfList = JSON.parse(value)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
//搜索优化
|
|
//搜索优化
|
|
|
this.$page.setMeta({
|
|
this.$page.setMeta({
|
|
@@ -241,7 +253,7 @@ export default {
|
|
|
let infos = res.data.result.list[0]
|
|
let infos = res.data.result.list[0]
|
|
|
this.chapterTitle = infos.chapterName
|
|
this.chapterTitle = infos.chapterName
|
|
|
this.getTxtContent(infos.content)
|
|
this.getTxtContent(infos.content)
|
|
|
- console.log('this.content',this.content)
|
|
|
|
|
|
|
+ // console.log('this.content',this.content)
|
|
|
},
|
|
},
|
|
|
initAd() {
|
|
initAd() {
|
|
|
try {
|
|
try {
|
|
@@ -249,20 +261,12 @@ export default {
|
|
|
this.bannerAd = require('@service.ad').createBannerAd({ // 使用require方式避免在不支持广告接口的厂商运行时报错
|
|
this.bannerAd = require('@service.ad').createBannerAd({ // 使用require方式避免在不支持广告接口的厂商运行时报错
|
|
|
adUnitId: '9bcd5671a506459c9e6ef9c642468dc9',
|
|
adUnitId: '9bcd5671a506459c9e6ef9c642468dc9',
|
|
|
style:{
|
|
style:{
|
|
|
- width:750,
|
|
|
|
|
|
|
+ width:1080,
|
|
|
height:100,
|
|
height:100,
|
|
|
|
|
+ left: 0,
|
|
|
|
|
+ top: this.screenHeight - 100,
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- this.bannerAd.onLoad(() => { // 监听广告加载
|
|
|
|
|
- console.log('onLoad event emit')
|
|
|
|
|
- this.bannerAd.show()
|
|
|
|
|
- })
|
|
|
|
|
- this.bannerAd.onError((err) => { // 监听广告出错
|
|
|
|
|
- console.log('onError event emit', err)
|
|
|
|
|
- })
|
|
|
|
|
- this.bannerAd.onClose((res) => { // 监听广告关闭
|
|
|
|
|
- console.log('onClose event emit', res)
|
|
|
|
|
- })
|
|
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log('initAd',e)
|
|
console.log('initAd',e)
|
|
|
}
|
|
}
|
|
@@ -277,22 +281,9 @@ export default {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
// 处理文本编码
|
|
// 处理文本编码
|
|
|
const text = this.decodeData(res.data);
|
|
const text = this.decodeData(res.data);
|
|
|
- this.content = formatText(text);
|
|
|
|
|
- this.showRich = false
|
|
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- this.showRich = true
|
|
|
|
|
- },50)
|
|
|
|
|
- // this.paginateContent()
|
|
|
|
|
- // 格式化文本:为每行添加p标签
|
|
|
|
|
- function formatText(text) {
|
|
|
|
|
- const lines = text.split('\n');
|
|
|
|
|
- return lines.map(line => {
|
|
|
|
|
- // 跳过空行
|
|
|
|
|
- if (line.trim() === '') return '';
|
|
|
|
|
- return `<p>${line}</p>`;
|
|
|
|
|
- }).join('');
|
|
|
|
|
- }
|
|
|
|
|
- console.log('this.content',this.content)
|
|
|
|
|
|
|
+ this.content = text;
|
|
|
|
|
+ this.paginateContent();
|
|
|
|
|
+ // console.log('this.content',this.content)
|
|
|
} else {
|
|
} else {
|
|
|
console.error('请求失败:', res.code);
|
|
console.error('请求失败:', res.code);
|
|
|
}
|
|
}
|
|
@@ -316,6 +307,44 @@ export default {
|
|
|
return ''
|
|
return ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 根据页面高度分段内容
|
|
|
|
|
+ paginateContent() {
|
|
|
|
|
+ if (!this.content) return;
|
|
|
|
|
+ const maxHeight = this.screenHeight - 500; // 减去标题、底部按钮和边距的高度
|
|
|
|
|
+ const fontSize = this.userSetting.fontsize;
|
|
|
|
|
+ const lineHeight = fontSize * 1.5; // 行高
|
|
|
|
|
+ const maxLinesPerPage = Math.floor(maxHeight / lineHeight);
|
|
|
|
|
+ // console.log(`maxHeight${maxHeight} fontSize ${fontSize}lineHeight${lineHeight} maxLinesPerPage${maxLinesPerPage} this.screenWidth ${this.screenWidth}`)
|
|
|
|
|
+ const lines = this.content.split('\n').filter(line => line.trim() !== '');
|
|
|
|
|
+ const pages = [];
|
|
|
|
|
+ let currentPage = '';
|
|
|
|
|
+ let currentLineCount = 0;
|
|
|
|
|
+ for (let i = 0; i < lines.length; i++) {
|
|
|
|
|
+ const line = lines[i];
|
|
|
|
|
+ // 更准确地计算每行能容纳的字符数,考虑屏幕宽度和边距
|
|
|
|
|
+ const availableWidth = this.screenWidth - 120; // 减去左右边距和padding
|
|
|
|
|
+ const charsPerLine = Math.floor(availableWidth / (fontSize * 0.9)); // 0.6是字符宽度比例
|
|
|
|
|
+ const estimatedLines = Math.ceil(line.length / charsPerLine);
|
|
|
|
|
+ if (currentLineCount + estimatedLines > maxLinesPerPage && currentPage.trim() !== '') {
|
|
|
|
|
+ pages.push(currentPage.trim());
|
|
|
|
|
+ currentPage = line + '\n';
|
|
|
|
|
+ currentLineCount = estimatedLines;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ currentPage += line + '\n';
|
|
|
|
|
+ currentLineCount += estimatedLines;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (currentPage.trim() !== '') {
|
|
|
|
|
+ pages.push(currentPage.trim());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.pages = pages;
|
|
|
|
|
+ this.totalPage = pages.length;
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
|
+ // console.log('pages',this.pages)
|
|
|
|
|
+ // console.log('分页完成,总页数:', this.totalPage, '屏幕高度:', this.screenHeight, '字体大小:', fontSize, '每页最大行数:', maxLinesPerPage, '可用高度:', maxHeight);
|
|
|
|
|
+ },
|
|
|
async onReady() {
|
|
async onReady() {
|
|
|
//获取用户自定义的样式,不存在自定义样式时使用默认样式
|
|
//获取用户自定义的样式,不存在自定义样式时使用默认样式
|
|
|
const data = await $utils.getStorage('user-setting')
|
|
const data = await $utils.getStorage('user-setting')
|
|
@@ -418,16 +447,12 @@ export default {
|
|
|
$utils.routerBack()
|
|
$utils.routerBack()
|
|
|
},
|
|
},
|
|
|
sizeChange(type) {
|
|
sizeChange(type) {
|
|
|
- if(type == 'minus' && this.userSetting.fontsize <=30 || type == 'plus' && this.userSetting.fontsize >=50){
|
|
|
|
|
|
|
+ if(type == 'minus' && this.userSetting.fontsize <=36 || type == 'plus' && this.userSetting.fontsize >=50){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- // if(this.currentPage != 0){ //
|
|
|
|
|
- // $utils.showToast('请回到第一页后再调整')
|
|
|
|
|
- // return
|
|
|
|
|
- // }
|
|
|
|
|
- // this.paginateContent()
|
|
|
|
|
if (type === 'plus') this.userSetting.fontsize = this.userSetting.fontsize+ 2
|
|
if (type === 'plus') this.userSetting.fontsize = this.userSetting.fontsize+ 2
|
|
|
else this.userSetting.fontsize = this.userSetting.fontsize - 2
|
|
else this.userSetting.fontsize = this.userSetting.fontsize - 2
|
|
|
|
|
+ this.paginateContent() // 重新分页
|
|
|
this.saveUserSettings()
|
|
this.saveUserSettings()
|
|
|
},
|
|
},
|
|
|
bgcolorChange(color) {
|
|
bgcolorChange(color) {
|
|
@@ -436,6 +461,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
fontChange(item) {
|
|
fontChange(item) {
|
|
|
this.userSetting.fontFamily = item.font
|
|
this.userSetting.fontFamily = item.font
|
|
|
|
|
+ this.paginateContent() // 重新分页
|
|
|
this.saveUserSettings()
|
|
this.saveUserSettings()
|
|
|
},
|
|
},
|
|
|
changeNightMode(e) {
|
|
changeNightMode(e) {
|
|
@@ -465,173 +491,236 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- pageChangeFunction(evt) {
|
|
|
|
|
- // 获取当前页数
|
|
|
|
|
- this.currentPage = evt.curpage
|
|
|
|
|
- },
|
|
|
|
|
- pageEndFunction(evt) {
|
|
|
|
|
- this.totalPage = evt.totalpage
|
|
|
|
|
|
|
+ onSwiperChange(evt) {
|
|
|
|
|
+ this.currentPage = evt.index + 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style lang="less">
|
|
|
|
|
-@import '../../assets/styles/index.less';
|
|
|
|
|
-
|
|
|
|
|
|
|
+<style>
|
|
|
.doc-page {
|
|
.doc-page {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- /* background-color: #ebcda3; */
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ min-height: 800px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.index-class {
|
|
.index-class {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
- font-size: 30px;
|
|
|
|
|
|
|
+ font-size: 36px;
|
|
|
color: grey;
|
|
color: grey;
|
|
|
left: 0px;
|
|
left: 0px;
|
|
|
bottom: 10px;
|
|
bottom: 10px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.rich-text {
|
|
|
|
|
- font-size: 22px;
|
|
|
|
|
- margin: 24px;
|
|
|
|
|
|
|
+.book-text {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ max-height: 100%;
|
|
|
|
|
+ /* line-height: 1.5;
|
|
|
|
|
+ text-align: justify;
|
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
|
+ word-break: break-all; */
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.index-wrapper {
|
|
.index-wrapper {
|
|
|
width: 100px;
|
|
width: 100px;
|
|
|
height: 100px;
|
|
height: 100px;
|
|
|
- /* background-color: red; */
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.swiper {
|
|
.swiper {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 1100px;
|
|
|
|
|
|
|
+ height: 800px;
|
|
|
}
|
|
}
|
|
|
-.swiper-item {
|
|
|
|
|
|
|
+
|
|
|
|
|
+.swiper-page {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- padding: 20px;
|
|
|
|
|
|
|
+ /* padding: 20px; */
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ overflow: scroll;
|
|
|
|
|
+ flex-direction: column;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.stack-wrapper {
|
|
.stack-wrapper {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.book-content {
|
|
.book-content {
|
|
|
- padding: 0 @gap-4;
|
|
|
|
|
|
|
+ padding: 0 32px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
- .flex-box-mixins(column, flex-start, flex-start);
|
|
|
|
|
- .book-title {
|
|
|
|
|
- .title;
|
|
|
|
|
- margin: 30px 0 @gap-3 0;
|
|
|
|
|
- }
|
|
|
|
|
- .g22kjdgy{
|
|
|
|
|
- color: #ffffff;
|
|
|
|
|
- }
|
|
|
|
|
- /* .book-text {
|
|
|
|
|
- margin: @gap-3 0;
|
|
|
|
|
- } */
|
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.book-title {
|
|
|
|
|
+ font-size: 48px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ margin: 30px 0 24px 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.g22kjdgy {
|
|
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.btn-bottom {
|
|
.btn-bottom {
|
|
|
- .btn-primary;
|
|
|
|
|
- margin: 0 @gap-2;
|
|
|
|
|
|
|
+ background-color: #007aff;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ padding: 20px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ margin: 0 16px;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.btn-margin {
|
|
.btn-margin {
|
|
|
- margin: 0 @gap-2;
|
|
|
|
|
|
|
+ margin: 0 16px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.btn-bottom-disabled {
|
|
.btn-bottom-disabled {
|
|
|
- .btn-disabled;
|
|
|
|
|
|
|
+ background-color: #cccccc;
|
|
|
|
|
+ color: #999999;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.pop-layer {
|
|
.pop-layer {
|
|
|
- .page-column;
|
|
|
|
|
- .header {
|
|
|
|
|
- .flex-box-mixins(row, flex-start, center);
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 30 * @size-factor;
|
|
|
|
|
- background-color: @layer-bg;
|
|
|
|
|
- padding: 0 @gap-4;
|
|
|
|
|
- image {
|
|
|
|
|
- width: 10 * @size-factor;
|
|
|
|
|
- height: 10 * @size-factor;
|
|
|
|
|
- margin-right: @gap-4;
|
|
|
|
|
- }
|
|
|
|
|
- text {
|
|
|
|
|
- font-size: 8 * @size-factor;
|
|
|
|
|
- color: @white;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .footer {
|
|
|
|
|
- padding-top: @gap-3;
|
|
|
|
|
- .flex-box-mixins(column, flex-start, center);
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- background-color: @layer-bg;
|
|
|
|
|
- .font-size-change {
|
|
|
|
|
- width: 90%;
|
|
|
|
|
- padding: @gap-1 @gap-4;
|
|
|
|
|
- .flex-box-mixins(row, space-between, center);
|
|
|
|
|
- .btn {
|
|
|
|
|
- font-size: 10 * @size-factor;
|
|
|
|
|
- color: @white;
|
|
|
|
|
- }
|
|
|
|
|
- .btn:disabled {
|
|
|
|
|
- opacity: 0.5;
|
|
|
|
|
- }
|
|
|
|
|
- .size {
|
|
|
|
|
- font-size: 8 * @size-factor;
|
|
|
|
|
- color: @white;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .bg-color-change {
|
|
|
|
|
- width: 90%;
|
|
|
|
|
- padding: @gap-1 @gap-4;
|
|
|
|
|
- .flex-box-mixins(row, space-between, center);
|
|
|
|
|
- .color-item {
|
|
|
|
|
- width: 20 * @size-factor;
|
|
|
|
|
- height: 10 * @size-factor;
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
- }
|
|
|
|
|
- .selected {
|
|
|
|
|
- border: 5px solid @brand;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- .font-change {
|
|
|
|
|
- width: 90%;
|
|
|
|
|
- padding: @gap-1 @gap-4;
|
|
|
|
|
- .flex-box-mixins(row, space-between, center);
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- .font-item {
|
|
|
|
|
- .btn-primary;
|
|
|
|
|
- color: @grey;
|
|
|
|
|
- border-color: @grey;
|
|
|
|
|
- width: 45%;
|
|
|
|
|
- margin-bottom: 2 * @size-factor;
|
|
|
|
|
- }
|
|
|
|
|
- .selected {
|
|
|
|
|
- color: @brand;
|
|
|
|
|
- border-color: @brand;
|
|
|
|
|
- border-width: 3px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .middle {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- .float-btn {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- right: 10 * @size-factor;
|
|
|
|
|
- .flex-box-mixins(row, center, center);
|
|
|
|
|
- width: 20 * @size-factor;
|
|
|
|
|
- height: 20 * @size-factor;
|
|
|
|
|
- background-color: @layer-bg;
|
|
|
|
|
- border-radius: 100%;
|
|
|
|
|
- image {
|
|
|
|
|
- width: 10 * @size-factor;
|
|
|
|
|
- height: 10 * @size-factor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+.header {
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 120px;
|
|
|
|
|
+ background-color: #333333;
|
|
|
|
|
+ padding: 0 32px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.header image {
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ margin-right: 32px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.header text {
|
|
|
|
|
+ font-size: 32px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.footer {
|
|
|
|
|
+ padding-top: 24px;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background-color: #333333;
|
|
|
|
|
+ height: 550px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-size-change {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ padding: 8px 32px;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-size-change .btn {
|
|
|
|
|
+ font-size: 40px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-size-change .btn:disabled {
|
|
|
|
|
+ opacity: 0.5;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-size-change .size {
|
|
|
|
|
+ font-size: 32px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.bg-color-change {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ padding: 8px 32px;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.bg-color-change .color-item {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.bg-color-change .selected {
|
|
|
|
|
+ border: 5px solid #007aff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-change {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ padding: 8px 32px;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-change .font-item {
|
|
|
|
|
+ background-color: #007aff;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ padding: 20px;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ border: 2px solid #007aff;
|
|
|
|
|
+ width: 45%;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.font-change .selected {
|
|
|
|
|
+ color: #007aff;
|
|
|
|
|
+ border-color: #007aff;
|
|
|
|
|
+ border-width: 3px;
|
|
|
|
|
+ background-color: transparent;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.middle {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.float-btn {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 40px;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 80px;
|
|
|
|
|
+ background-color: #333333;
|
|
|
|
|
+ border-radius: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.float-btn image {
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.bottom-bar{
|
|
|
|
|
+ width: 100%;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|