Changeset 834bcc3 in Klonkt for src/routes/artists.js
- Timestamp:
- 06/23/2026 06:14:27 PM (3 months ago)
- Branches:
- main
- Children:
- d774679
- Parents:
- bb42dfb
- File:
-
- 1 edited
-
src/routes/artists.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/artists.js
rbb42dfb r834bcc3 1 1 /** 2 * Arti esten-directory — alleen in hub-modus.2 * Artists directory — hub mode only. 3 3 * 4 * GET /leden?q=&page= -> doorzoekbare, gepagineerde lijst van ALLE5 * Klonkt -site's. De hub-home toont maar een beperkte selectie; deze pagina6 * sc haalt naar honderden/duizenden artiesten via zoeken + paginering.4 * GET /leden?q=&page= -> searchable, paginated list of ALL 5 * Klonkt sites. The hub home shows only a limited selection; this page 6 * scales to hundreds/thousands of artists via search + pagination. 7 7 * 8 * In solo -modus bestaat er maar één site -> next() (valt door naarpostsRoutes,9 * die 'artiesten' als onbekende slug afhandelt).8 * In solo mode there is only one site -> next() (falls through to postsRoutes, 9 * which handles 'artiesten' as an unknown slug). 10 10 */ 11 11 … … 26 26 if (!Number.isFinite(page) || page < 1) page = 1; 27 27 28 // De hoofd-/labelsite (oudste) is geen artiest -> uit de directory weren,29 // consistent met de hub-home die 'm apart toont.28 // The main/label site (oldest) is not an artist -> exclude from the directory, 29 // consistent with the hub home which displays it separately. 30 30 const mainRow = db.prepare('SELECT id FROM sites ORDER BY created_at ASC LIMIT 1').get(); 31 31 const mainId = mainRow ? mainRow.id : ''; 32 32 33 // Zoekterm tegen titel/slug/tagline (case-insensitive via LIKE; SQLite LIKE is34 // standaard ongevoelig voor ASCII-hoofdletters). De ESCAPE '\' maakt %, _ en\35 // in de zoekterm letterlijk (anders zouden ze als wildcards werken).33 // Search term against title/slug/tagline (case-insensitive via LIKE; SQLite LIKE is 34 // case-insensitive for ASCII by default). ESCAPE '\' makes %, _, and \ 35 // in the search term literal (otherwise they would act as wildcards). 36 36 const like = '%' + q.replace(/[\\%_]/g, (m) => '\\' + m) + '%'; 37 37 const conds = ['s.id != @mainId'];
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)