Skip to content

Commit

Permalink
improves multicolumn view; based on #159
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Neomy committed Feb 18, 2023
1 parent 5a44138 commit 7e85c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions v3/data/reader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const update = {
document.querySelector('[data-id=full-width] input').checked = Boolean(prefs.width) === false;
// as a CSS selector
document.body.dataset.font = prefs.font;
document.body.dataset.colums = prefs['column-count'];
//
document.querySelector('#font-details [data-id="font-size"]').textContent = prefs['font-size'] + 'px';
document.querySelector('#font-details [data-id="screen-width"]').textContent = prefs['width'] || 'unset';
Expand Down
4 changes: 3 additions & 1 deletion v3/data/reader/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@
mark.hghlght {
background-color: var(--hg);
}
h1,h2,h3, h4 {
body:not([data-columns="1"]) .page :is(h1, h2, h3, h4) {
column-span: all;
background-color: rgba(125, 125, 125, 0.1);
padding: 10px;
}
.hidden {
display: none;
Expand Down

0 comments on commit 7e85c7b

Please sign in to comment.