mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-28 14:47:21 -05:00
fix: settle the round 3 site packages together
This commit is contained in:
1 parent
d168ceb8a8
commit
f0e7d87def
10 files changed
+44
-11
No files matched your search
@@ -12,6 +12,9 @@
|
||||
// - on a level 0 or 1 page (`level: start` or `setup`), a three-column table
|
||||
// short enough to read as records (under RECORD_ROWS rows): one block per
|
||||
// row. A longer one is a list scanned by column and keeps its scroll.
|
||||
// - three columns or more where a column holds hashes: a hash cannot break,
|
||||
// so the row is wider than a phone at any length (NetherSX2's File,
|
||||
// Required, Hash summary measured 604 px in a 358 px column).
|
||||
//
|
||||
// A table of RECORD_ROWS rows or more gets its filter box here, above it.
|
||||
// Written by site.ts once the page had painted, the box pushed the table
|
||||
@@ -52,10 +55,13 @@ const holdsAction = (node) =>
|
||||
(child.type === 'raw' && ACTION_CLASS.test(child.value ?? '')),
|
||||
);
|
||||
|
||||
const HASH_HEADER = /^(hash|sha-?1|sha-?256|md5|crc-?32)$/i;
|
||||
|
||||
export const stackKind = ({ labels, rows, action, level }) => {
|
||||
if (labels.length === 2) return 'kv';
|
||||
if (labels.length >= WIDE_COLUMNS) return 'true';
|
||||
if (action || DOWNLOAD_HEADER.test(labels.at(-1) ?? '')) return 'true';
|
||||
if (labels.length > 2 && labels.some((label) => HASH_HEADER.test(label))) return 'true';
|
||||
if (READER_LEVELS.has(level) && labels.length > 2 && rows < RECORD_ROWS) return 'true';
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -317,7 +317,9 @@ const CATEGORY_WORDS: Record<string, string> = { bios: 'BIOS', game_data: 'game
|
||||
// own page (systems/sony-playstation/) is part of its manufacturer's file
|
||||
// (systems/sony.json), found by dropping words from the end of the slug.
|
||||
const heldFile = async (item: Item): Promise<Held | undefined> => {
|
||||
const slug = /^systems\/([^/]+)\//.exec(item.url)?.[1];
|
||||
// Lookup urls are site-absolute (/retrobios/systems/...) since the API
|
||||
// names every address from the site root.
|
||||
const slug = /(?:^|\/)systems\/([^/]+)\//.exec(item.url)?.[1];
|
||||
if (!slug || !item.sha1) return undefined;
|
||||
const words = slug.split('-');
|
||||
for (let size = words.length; size > 0; size -= 1) {
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
}
|
||||
@media (min-width: 50rem) {
|
||||
/* The reason a file is listed reads as a sentence, not a word per line. */
|
||||
.sl-markdown-content :is(td.rb-reason, td[data-label='Reason']) { min-width: 12rem; }
|
||||
.sl-markdown-content :is(td.rb-reason, td[data-label='Reason'], td:has(> .rb-reason)) { min-width: 12rem; }
|
||||
|
||||
/* Get your files: every group table shares one set of columns. */
|
||||
.sl-markdown-content :is(table.rb-packs, table:has(td[data-label='Runs on']):has(td[data-label='ZIP'])) {
|
||||
|
||||
Reference in new issue
Block a user