nomadro/apps/navmini/weapp/pages/index/index.wxml
eric d93a355fd5 Migrate navmini/ebook/nomadweb into apps/ as same-origin portal subpaths.
Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:30:34 -05:00

136 lines
4.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="app-shell {{themeClass}}">
<view class="topbar" style="padding-top: {{statusBarHeight}}px;">
<view class="topbar-inner" style="height: {{navBarHeight}}px;">
<view class="icon-btn" bindtap="openDrawer" hover-class="icon-btn-hover">
<view class="menu-bars">
<view class="bar"></view>
<view class="bar"></view>
<view class="bar short"></view>
</view>
</view>
<view class="brand-mark">
<image class="brand-logo" src="{{brandIcon}}" mode="aspectFit" />
<view class="brand-text">
<text class="brand-name">{{brand}}</text>
<text class="brand-current">{{activeTitle}}</text>
</view>
</view>
<view class="icon-btn" bindtap="toggleTheme" hover-class="icon-btn-hover">
<text class="theme-ico">{{themeIcon}}</text>
</view>
</view>
</view>
<view class="page" style="padding-top: {{pagePadTop}}px;">
<view wx:if="{{loadError}}" class="load-error">{{loadError}}</view>
<block wx:for="{{categories}}" wx:key="id">
<view class="cat-panel" id="cat-{{item.id}}">
<view class="cat-heading">
<text class="cat-title">{{item.title}}</text>
<text class="cat-count">{{item.linkCount}}</text>
</view>
<block wx:for="{{item.groups}}" wx:for-item="group" wx:key="id">
<view class="group-block">
<text class="group-title">{{group.title}}</text>
<view class="link-grid">
<view
wx:for="{{group.links}}"
wx:for-item="link"
wx:key="id"
class="link-card"
hover-class="link-card-hover"
data-id="{{link.id}}"
data-catid="{{item.id}}"
data-groupid="{{group.id}}"
bindtap="onTapLink"
>
<view class="link-icon-wrap">
<image
class="link-icon"
src="{{link.icon}}"
mode="aspectFit"
lazy-load
/>
</view>
<view class="link-meta">
<text class="link-title">{{link.title}}</text>
<text class="link-desc">{{link.subtitle}}</text>
</view>
</view>
</view>
</view>
</block>
</view>
</block>
<view class="footer">{{footer}}</view>
</view>
<view class="drawer-root {{drawerOpen ? 'open' : ''}}">
<view class="drawer-mask" bindtap="closeDrawer"></view>
<view class="drawer-panel" catchtap="noop">
<view class="drawer-head" style="padding-top: {{statusBarHeight}}px;">
<view class="drawer-brand-wrap">
<image class="drawer-logo" src="{{brandIcon}}" mode="aspectFit" />
<view>
<text class="drawer-brand">{{brand}}</text>
<text class="drawer-sub">{{tagline}}</text>
</view>
</view>
<view class="icon-btn" bindtap="closeDrawer" hover-class="icon-btn-hover">
<text class="close-ico">×</text>
</view>
</view>
<scroll-view scroll-y class="drawer-nav" show-scrollbar="{{false}}">
<view
wx:for="{{categories}}"
wx:key="id"
class="drawer-item {{item.active ? 'active' : ''}}"
data-id="{{item.id}}"
bindtap="onSelectCategory"
hover-class="drawer-item-hover"
>
<text class="drawer-emoji">{{item.emoji}}</text>
<view class="drawer-item-text">
<text class="drawer-item-title">{{item.title}}</text>
<text class="drawer-item-count">{{item.linkCount}} 个入口</text>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="sheet-root" wx:if="{{sheetOpen}}">
<view class="sheet-mask" bindtap="closeSheet"></view>
<view class="sheet-panel" catchtap="noop">
<view class="sheet-head">
<image class="sheet-icon" src="{{sheetLink.icon}}" mode="aspectFit" />
<view class="sheet-titles">
<text class="sheet-title">{{sheetLink.title}}</text>
<text class="sheet-sub">{{sheetLink.subtitle}}</text>
</view>
</view>
<view class="sheet-label">网址</view>
<view class="sheet-url">{{sheetLink.href}}</view>
<view class="sheet-actions">
<button class="sheet-btn primary" bindtap="copySheetUrl">复制链接</button>
<button class="sheet-btn" bindtap="closeSheet">关闭</button>
</view>
<view class="sheet-hint">小程序无法直接打开外链,复制后到浏览器粘贴打开</view>
</view>
</view>
<view
class="back-top {{showTop ? 'show' : ''}}"
bindtap="backTop"
hover-class="back-top-hover"
>
<text>↑</text>
</view>
<view class="toast {{toast ? 'show' : ''}}">{{toast}}</view>
</view>