BlueGit

timfa 66wiki

try fix css

timfa Tim · pushed by timfa

Authored 2025-12-20 · 11 months ago

Hash
3db6b9da6457ea323c192d0990f4b12ef258495b
Parent
c4b8fa75
2 files changed +23 −4
web/index.php +4 −4
@@ -81,8 +81,8 @@ if ($q !== '') {
81 81 <div>
82 82 <?php foreach ($searchResults as $r): ?>
83 83 <article
84 style="border:1px solid #ddd; border-radius:12px; padding:1rem; margin:0.75rem 0; background:#fff;">
85 <div style="display:flex; gap:0.75rem; flex-wrap:wrap; align-items:baseline;">
84 class="searchResultArticle">
85 <div class="searchResult">
86 86 <strong><a
87 87 href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>
88 88 <small>type: <?= htmlspecialchars($r['type'], ENT_QUOTES) ?></small>
@@ -91,8 +91,8 @@ if ($q !== '') {
91 91 <ul>
92 92 <?php foreach (array_slice($r['hits'], 0, 5) as $hit): ?>
93 93 <li>
94 <code><?= htmlspecialchars($hit['field'], ENT_QUOTES) ?></code>:
95 <?= htmlspecialchars($hit['snippet'], ENT_QUOTES) ?>
94 <code><?= $hit['field'] ?></code>:
95 <?= $hit['snippet'] ?>
96 96 </li>
97 97 <?php endforeach; ?>
98 98 </ul>
@@ -81,8 +81,8 @@ if ($q !== '') {
81 <div>
81 <div>
82 <?php foreach ($searchResults as $r): ?>
82 <?php foreach ($searchResults as $r): ?>
83 <article
83 <article
84 style="border:1px solid #ddd; border-radius:12px; padding:1rem; margin:0.75rem 0; background:#fff;">
84 class="searchResultArticle">
85 <div style="display:flex; gap:0.75rem; flex-wrap:wrap; align-items:baseline;">
85 <div class="searchResult">
86 <strong><a
86 <strong><a
87 href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>
87 href="<?= "?path=" . DIRECTORY_SEPARATOR . "data" . htmlspecialchars($r['file'], ENT_QUOTES) ?>"><?= htmlspecialchars($r['name'] ?: '(no name)', ENT_QUOTES) ?></a></strong>
88 <small>type: <?= htmlspecialchars($r['type'], ENT_QUOTES) ?></small>
88 <small>type: <?= htmlspecialchars($r['type'], ENT_QUOTES) ?></small>
@@ -91,8 +91,8 @@ if ($q !== '') {
91 <ul>
91 <ul>
92 <?php foreach (array_slice($r['hits'], 0, 5) as $hit): ?>
92 <?php foreach (array_slice($r['hits'], 0, 5) as $hit): ?>
93 <li>
93 <li>
94 <code><?= htmlspecialchars($hit['field'], ENT_QUOTES) ?></code>:
94 <code><?= $hit['field'] ?></code>:
95 <?= htmlspecialchars($hit['snippet'], ENT_QUOTES) ?>
95 <?= $hit['snippet'] ?>
96 </li>
96 </li>
97 <?php endforeach; ?>
97 <?php endforeach; ?>
98 </ul>
98 </ul>
web/main.css +19 −0
@@ -205,6 +205,25 @@ article {
205 205 align-items: center;
206 206 }
207 207
208 .searchResultArticle {
209 border: 1px solid #ddd;
210 border-radius: 12px;
211 padding: 1rem;
212 margin: 0.75rem 0;
213 background: #fff;
214 }
215
216 .searchResult {
217 display: flex;
218 gap: 0.75rem;
219 flex-wrap: wrap;
220 align-items: baseline;
221 }
222
223 hit {
224 background-color: yellow;
225 }
226
208 227 .searchInput {
209 228 width: min(420px, 45vw);
210 229 border: 1px solid #bbb;
@@ -205,6 +205,25 @@ article {
205 align-items: center;
205 align-items: center;
206}
206}
207
207
208.searchResultArticle {
209 border: 1px solid #ddd;
210 border-radius: 12px;
211 padding: 1rem;
212 margin: 0.75rem 0;
213 background: #fff;
214}
215
216.searchResult {
217 display: flex;
218 gap: 0.75rem;
219 flex-wrap: wrap;
220 align-items: baseline;
221}
222
223hit {
224 background-color: yellow;
225}
226
208.searchInput {
227.searchInput {
209 width: min(420px, 45vw);
228 width: min(420px, 45vw);
210 border: 1px solid #bbb;
229 border: 1px solid #bbb;