Skip to content

Commit

Permalink
sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
eyaler committed Jan 6, 2024
1 parent b3cdcb2 commit 06291f9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Alef:wght@400;700&display=block">
<link rel="stylesheet" href="styles/index.css">
<title>אוליפֹה</title>
<noscript><style>body {visibility: visible}</style></noscript>
</head>
<body style="visibility: hidden" onload="document.body.style.visibility = 'visible'">
<noscript><style>body {visibility: visible !important}</style></noscript>
<body onload="document.body.style.visibility = 'visible'">
<h3 id="nav">
<a style="visibility: hidden">מי פה?</a>
<a href="resen/" class="rotating-border">רֶסֶן – כתב עת</a>
Expand Down
4 changes: 2 additions & 2 deletions resen/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function iframe_load_handler() {
const footer = this.contentDocument.querySelector('footer')
if (footer)
footer.style.display = 'hidden'
this.contentDocument.documentElement.style.overflowY = 'hidden' // Prevent redundant scrollbars in Chrome
this.contentDocument.documentElement.style.overflowY = 'clip' // Prevent redundant scrollbars in Chrome
const observer = new ResizeObserver(() => this.style.height = this.contentDocument.documentElement.scrollHeight + 'px')
observer.observe(this.contentDocument.documentElement)
}
Expand Down Expand Up @@ -445,7 +445,7 @@ function make_header(reorder_contents=default_reorder_contents) {
if (trans)
trans.hash = url_kw
set_next_prev_page(page, next, prev, lang, url_kw)
page_items.forEach(p => p.firstElementChild.hash = p.firstElementChild.classList.contains('non_' + url_kw) ? '' : url_kw)
page_items.forEach(p => p.firstChild.hash = p.classList.contains('non_' + url_kw) ? '' : url_kw)
}
const fg_rgb = `rgb(${getComputedStyle(document.documentElement).getPropertyValue('--fg_rgb').replace(/ /g, ', ')})`
page_items.forEach(p => {const enabled = getComputedStyle(p).color == fg_rgb; p.querySelectorAll('a').forEach(a => {if (enabled) a.removeAttribute('aria-disabled'); else a.ariaDisabled = 'true'})})
Expand Down
14 changes: 7 additions & 7 deletions resen/petri/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ function step(grid, json, steps=0, max_tokens={}, result_counter={}, reset_count
const pelem = grid.querySelector(`[data-id="${place}"]`)
if (inp + out)
if (is_vertical(grid, elem.dataset.id)) {
if (elem.previousElementSibling == pelem && index % cols)
if (elem.previousSibling == pelem && index % cols)
elem.dataset.before = arrows(inp, out, label)
else if (elem.nextElementSibling == pelem && (index+1) % cols)
else if (elem.nextSibling == pelem && (index+1) % cols)
elem.dataset.after = arrows(out, inp, label)
else if (elem.parentElement.children[index - cols] == pelem)
elem.parentElement.children[index - cols].dataset.after = arrows(inp, out)
Expand All @@ -173,10 +173,10 @@ function step(grid, json, steps=0, max_tokens={}, result_counter={}, reset_count
else
long_arrows.push([elem, pelem, inp, out])
} else if (!comp)
if (elem.previousElementSibling == pelem && index % cols)
elem.previousElementSibling.children[0].dataset.after = arrows(inp, out, '')
else if (elem.nextElementSibling == pelem && (index+1) % cols)
elem.nextElementSibling.children[0].dataset.before = arrows(out, inp, '')
if (elem.previousSibling == pelem && index % cols)
elem.previousSibling.firstChild.dataset.after = arrows(inp, out, '')
else if (elem.nextSibling == pelem && (index+1) % cols)
elem.nextSibling.firstChild.dataset.before = arrows(out, inp, '')
else if (elem.parentElement.children[index - cols] == pelem)
elem.dataset.before = arrows(inp, out, 1)
else if (elem.parentElement.children[index + cols] == pelem)
Expand All @@ -185,7 +185,7 @@ function step(grid, json, steps=0, max_tokens={}, result_counter={}, reset_count
long_arrows.push([elem, pelem, inp, out])
})
} else {
elem.children[0].textContent = place_symbol(label, tokens[elem.dataset.id], elem.classList.contains('above'))
elem.firstChild.textContent = place_symbol(label, tokens[elem.dataset.id], elem.classList.contains('above'))
if (!steps) {
max_tokens[elem.dataset.id] ??= []
max_tokens[elem.dataset.id].push(tokens[elem.dataset.id] || 0)
Expand Down
5 changes: 3 additions & 2 deletions resen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ blockquote {
margin-block: 3ex;
}

blockquote, p {
blockquote, li, p {
text-align: justify;
text-wrap: pretty;
}

button, [id^=kw_] {
Expand Down Expand Up @@ -865,7 +866,7 @@ a.sponsors {
}

@media (hover: none), (max-device-width: 500px), (max-device-height: 500px) {
blockquote, p {
blockquote, li, p {
text-align: start;
}

Expand Down
2 changes: 2 additions & 0 deletions styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ body {
justify-content: space-evenly;
margin: 0;
min-height: 100vh;
min-height: 100dvh;
text-align: center;
text-underline-position: under;
visibility: hidden;
}

@supports (-webkit-touch-callout: none) {
Expand Down
1 change: 1 addition & 0 deletions styles/whom.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
body {
font-family: Alef, Arial, sans-serif;
margin: 0;
visibility: hidden;
}

figure {
Expand Down
2 changes: 1 addition & 1 deletion whom.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Alef:wght@400;700&display=block">
<link rel="stylesheet" href="styles/whom.css">
<title>מי פה?</title>
<noscript><style>body {visibility: visible}</style></noscript>
</head>
<body style="visibility: hidden" onload="document.body.style.visibility = 'visible'">
<noscript><style>body {visibility: visible !important}</style></noscript>
<h3><a href=".">אוליפֹה</a></h3>
<div id="grid"></div>
<script>
Expand Down

0 comments on commit 06291f9

Please sign in to comment.