{{-- resources/views/library/book/read.blade.php 全站共用阅读器。供 anthology/read 和 tipitaka/read 路由使用。 重构:改为 @extends('layouts.reader'),移除 CDN 引入,JS 提取为模块。 --}} @extends('layouts.reader') @section('title', $book['title']) @section('body-class', session('theme', 'light') . '-mode') {{-- 术语抽屉(所有阅读页统一使用 wiki.term-drawer) --}} @push('scripts') @vite(['resources/js/modules/term-tooltip.js','resources/js/reader.js']) @endpush @section('reader-content') {{-- 术语抽屉 --}} {{-- Navbar --}} {{-- 版本 Offcanvas(mobile) --}} @if(!empty($channels))
选择版本
@foreach($channels as $channel) @php $isActive = request('channel') == $channel['id']; @endphp @if($isActive)
{{ $channel['name'] }}
{{ __('language.' . $channel['lang']) }}
@else
{{ $channel['name'] }}
{{ __('language.' . $channel['lang']) }}
@endif @endforeach
@endif {{-- TOC Offcanvas(mobile) --}}
目录
@include('library.book._toc', ['toc' => $book['toc'] ?? []])
{{-- 主内容区 --}}
{{-- TOC 侧边栏(tablet+) --}}
目录
@include('library.book._toc', ['toc' => $book['toc'] ?? []])
{{-- 正文 --}}

{{ $book['title'] }}

作者: {{ $book['author'] }} @if(isset($book['publisher'])) @ {{ $book['publisher']->nickname }} @endif

{{-- ↓ 正文内容用 article 包裹,隔离排版作用域 ── --}}
@if(isset($book['content'])) {!! $book['content'] !!} @else
没有内容
@endif
{{-- 上下翻页 --}}
{{-- 右侧边栏 --}}
{{-- 阅读设置 Modal --}} @endsection @push('scripts') @endpush