Skip to content

Commit

Permalink
OPDS: fix overflow and accommodate long metadata values
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfactotum committed Dec 6, 2023
1 parent 86a622d commit 6e674ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/opds/opds.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<meta name="color-scheme" content="light dark">
<style>
:root {
overflow-wrap: anywhere;
font-size: 11pt;
font-family: system-ui;
--shade: rgba(0, 0, 0, .1);
Expand Down Expand Up @@ -230,6 +231,9 @@
grid-template-rows: subgrid;
margin-bottom: 18px;
}
opds-pub-full > [slot="details"] tr.long {
grid-column: span 2;
}
opds-pub-full > [slot="details"] [role="listitem"] {
display: inline-flex;
gap: 1ex;
Expand Down
2 changes: 2 additions & 0 deletions src/opds/opds.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ customElements.define('opds-pub-full', class extends HTMLElement {
color-scheme: light dark;
font-family: system-ui;
margin: 0;
overflow-wrap: anywhere;
}
a:any-link {
color: highlight;
Expand Down Expand Up @@ -360,6 +361,7 @@ const renderEntry = async (entry, filter, getHref, baseURL) => {
tr.append(th, td)
th.textContent = globalThis.uiText.metadata[k]
td.textContent = v
if (v.length > 30) tr.classList.add('long')
table.append(tr)
}

Expand Down

0 comments on commit 6e674ae

Please sign in to comment.