try fix darkmode, hide capter bar
@@ -43,25 +43,25 @@ if ($q !== '') {
43
43
44
44
<div class="topBar">
45
45
<div class="topBarInner">
46
47
<div class="chapterPicker">
48
<button class="menuButton" id="chapterMenuBtn" type="button" aria-expanded="false">
49
Chapters ▾
50
</button>
51
52
<div class="chapterDropdown" id="chapterDropdown" role="menu" aria-label="Chapter list">
53
<?php foreach ($chaptersOrdered as $ch):
54
$num = $ch->number ?? '';
55
$title = $ch->title ?? '';
56
$id = 'chapter-' . $num;
57
?>
58
<button type="button" data-target="<?= htmlspecialchars($id, ENT_QUOTES) ?>">
59
<?= htmlspecialchars("Chapter $num — $title", ENT_QUOTES) ?>
60
</button>
61
<?php endforeach; ?>
46
<?php if ($q === '' && !isset($_GET['path'])): ?>
47
<div class="chapterPicker">
48
<button class="menuButton" id="chapterMenuBtn" type="button" aria-expanded="false">
49
Chapters ▾
50
</button>
51
52
<div class="chapterDropdown" id="chapterDropdown" role="menu" aria-label="Chapter list">
53
<?php foreach ($chaptersOrdered as $ch):
54
$num = $ch->number ?? '';
55
$title = $ch->title ?? '';
56
$id = 'chapter-' . $num;
57
?>
58
<button type="button" data-target="<?= htmlspecialchars($id, ENT_QUOTES) ?>">
59
<?= htmlspecialchars("Chapter $num — $title", ENT_QUOTES) ?>
60
</button>
61
<?php endforeach; ?>
62
</div>
62
63
</div>
63
</div>
64
64
<?php endif; ?>
65
65
<form class="searchForm" method="get" action="">
66
66
<input class="searchInput" type="search" name="q" value="<?= htmlspecialchars($q, ENT_QUOTES) ?>"
67
67
placeholder="Search rules, items, proficiencies…">
@@ -80,8 +80,7 @@ if ($q !== '') {
80
80
<?php else: ?>
81
81
<div>
82
82
<?php foreach ($searchResults as $r): ?>
83
<article
84
class="searchResultArticle">
83
<article class="searchResultArticle">
85
84
<div class="searchResult">
86
85
<strong><a
87
86
href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>
@@ -43,25 +43,25 @@ if ($q !== '') {43
43
44
<div class="topBar">44
<div class="topBar">45
<div class="topBarInner">45
<div class="topBarInner">46
46
<?php if ($q === '' && !isset($_GET['path'])): ?>47
<div class="chapterPicker">47
<div class="chapterPicker">48
<button class="menuButton" id="chapterMenuBtn" type="button" aria-expanded="false">48
<button class="menuButton" id="chapterMenuBtn" type="button" aria-expanded="false">49
Chapters ▾49
Chapters ▾50
</button>50
</button>51
51
52
<div class="chapterDropdown" id="chapterDropdown" role="menu" aria-label="Chapter list">52
<div class="chapterDropdown" id="chapterDropdown" role="menu" aria-label="Chapter list">53
<?php foreach ($chaptersOrdered as $ch):53
<?php foreach ($chaptersOrdered as $ch):54
$num = $ch->number ?? '';54
$num = $ch->number ?? '';55
$title = $ch->title ?? '';55
$title = $ch->title ?? '';56
$id = 'chapter-' . $num;56
$id = 'chapter-' . $num;57
?>57
?>58
<button type="button" data-target="<?= htmlspecialchars($id, ENT_QUOTES) ?>">58
<button type="button" data-target="<?= htmlspecialchars($id, ENT_QUOTES) ?>">59
<?= htmlspecialchars("Chapter $num — $title", ENT_QUOTES) ?>59
<?= htmlspecialchars("Chapter $num — $title", ENT_QUOTES) ?>60
</button>60
</button>61
<?php endforeach; ?>61
<?php endforeach; ?>62
</div>62
</div>63
</div>63
</div>64
<?php endif; ?>64
65
<form class="searchForm" method="get" action="">65
<form class="searchForm" method="get" action="">66
<input class="searchInput" type="search" name="q" value="<?= htmlspecialchars($q, ENT_QUOTES) ?>"66
<input class="searchInput" type="search" name="q" value="<?= htmlspecialchars($q, ENT_QUOTES) ?>"67
placeholder="Search rules, items, proficiencies…">67
placeholder="Search rules, items, proficiencies…">@@ -80,8 +80,7 @@ if ($q !== '') {80
<?php else: ?>80
<?php else: ?>81
<div>81
<div>82
<?php foreach ($searchResults as $r): ?>82
<?php foreach ($searchResults as $r): ?>83
<article83
<article class="searchResultArticle">84
class="searchResultArticle">85
<div class="searchResult">84
<div class="searchResult">86
<strong><a85
<strong><a87
href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>86
href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>@@ -210,7 +210,6 @@ article {
210
210
border-radius: 12px;
211
211
padding: 1rem;
212
212
margin: 0.75rem 0;
213
background: #fff;
214
213
}
215
214
216
215
.searchResult {
@@ -233,7 +232,6 @@ hit {
233
232
234
233
.searchSubmit {
235
234
border: 1px solid #bbb;
236
background: #fff;
237
235
border-radius: 999px;
238
236
padding: 0.45rem 0.75rem;
239
237
cursor: pointer;
@@ -210,7 +210,6 @@ article {210
border-radius: 12px;210
border-radius: 12px;211
padding: 1rem;211
padding: 1rem;212
margin: 0.75rem 0;212
margin: 0.75rem 0;213
background: #fff;214
}213
}215
214
216
.searchResult {215
.searchResult {@@ -233,7 +232,6 @@ hit {233
232
234
.searchSubmit {233
.searchSubmit {235
border: 1px solid #bbb;234
border: 1px solid #bbb;236
background: #fff;237
border-radius: 999px;235
border-radius: 999px;238
padding: 0.45rem 0.75rem;236
padding: 0.45rem 0.75rem;239
cursor: pointer;237
cursor: pointer;