Files
xuanzhi-wx/packages/tcm/pages/section/index.wxml

50 lines
1.5 KiB
Plaintext

<view class="reading-page reading-page--{{settings.bgMode}}">
<view class="reading-page__article" bindtap="handleToolbarToggle">
<text class="reading-page__chapter">{{chapterTitle}}</text>
<text class="reading-page__passage" wx:for="{{passages}}" wx:key="index">{{item}}</text>
</view>
<view wx:if="{{toolbarVisible}}" class="reading-toolbar">
<text class="reading-toolbar__title">{{title}}</text>
<view class="reading-toolbar__group">
<text class="reading-toolbar__label">行间距</text>
<view
class="reading-toolbar__pill {{settings.lineMode === item.key ? 'reading-toolbar__pill--active' : ''}}"
wx:for="{{lineModes}}"
wx:key="key"
data-mode="{{item.key}}"
bindtap="handleLineModeTap"
>
{{item.label}}
</view>
</view>
<view class="reading-toolbar__group">
<text class="reading-toolbar__label">背景</text>
<view
class="reading-toolbar__pill {{settings.bgMode === item.key ? 'reading-toolbar__pill--active' : ''}}"
wx:for="{{backgroundModes}}"
wx:key="key"
data-mode="{{item.key}}"
bindtap="handleBackgroundTap"
>
{{item.label}}
</view>
</view>
<view class="reading-toolbar__group">
<text class="reading-toolbar__label">目录</text>
<view
class="catalog-item"
wx:for="{{catalogItems}}"
wx:key="key"
data-route="{{item.route}}"
bindtap="handleCatalogTap"
>
{{item.title}}
</view>
</view>
</view>
</view>