Skip to content

Commit

Permalink
fix media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
eyaler committed Jan 28, 2024
1 parent 9333b90 commit ed7de0d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
11 changes: 9 additions & 2 deletions resen/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ const collator = Intl.Collator(document.documentElement.lang, {numeric: true})


function reorder(list_of_strings, lang='', labels=kw_labels) {
return [...new Set(list_of_strings)].map(String).sort((a, b) => {const issues = !!b.match(/^\d+$/) - !!(a.match(/^\d+$/)); if (!lang) a = labels[a] ?? a, b = labels[b] ?? b; return issues || collator.compare(a, b)})
return [...new Set(list_of_strings)].map(String).sort((a, b) => {
const issues = !!b.match(/^\d+$/) - !!(a.match(/^\d+$/))
if (!lang) {
a = labels[a] ?? a
b = labels[b] ?? b
}
return issues || collator.compare(a, b)
})
}


Expand Down Expand Up @@ -406,7 +413,7 @@ function make_header(reorder_contents=default_reorder_contents, new_tab_for_soci
document.title = titles.label
let index_title = get_set_titles('/', lang).label
let is_mobile = false;
if (matchMedia('max-width: 480px').matches) {
if (matchMedia('(max-width: 480px)').matches) {
index_title = index_title.split(' ').slice(0, lang ? 1 : 2).join(' ')
is_mobile = true;
}
Expand Down
14 changes: 7 additions & 7 deletions resen/style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@font-face {
font-family: 'Alef Mono';
font-display: block;
src: url('Alef-Monospace.woff2');
}

:root, ::backdrop { /* In Chrome ::backdrop does not inherit from :root. See: https://bugs.chromium.org/p/chromium/issues/detail?id=827397 */
--bg: #f6e5d5;
--fg_rgb: 0 0 0;
Expand Down Expand Up @@ -40,6 +34,12 @@
background-color: var(--complementary);
}

@font-face {
font-family: 'Alef Mono';
font-display: block;
src: url('Alef-Monospace.woff2');
}

html {
scroll-padding-block: 5rem 3rem;
}
Expand Down Expand Up @@ -887,7 +887,7 @@ a.sponsors {
}
}

@media max-width: 480px {
@media (max-width: 480px) {
blockquote, li, p:not(.story) {
text-align: start;
}
Expand Down

0 comments on commit ed7de0d

Please sign in to comment.