Skip to content

Commit

Permalink
Update foliate-js: use Shadow DOM
Browse files Browse the repository at this point in the history
Also make header and footer use system UI font
  • Loading branch information
johnfactotum committed May 15, 2023
1 parent a893796 commit dde59e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/foliate-js
Submodule foliate-js updated 5 files
+15 −18 README.md
+49 −58 fixed-layout.js
+101 −86 paginator.js
+1 −3 reader.js
+17 −14 view.js
18 changes: 4 additions & 14 deletions src/reader/reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@
.invert {
background: #000;
}
.invert .foliate-filter {
.invert foliate-view::part(filter) {
filter: invert(1) hue-rotate(180deg);
}
}
.foliate-header > *, .foliate-footer > * {
display: flex;
min-width: 0;
align-items: center;
text-align: center;
font-size: .75em;
opacity: .6;
}
.foliate-header > * > *, .foliate-footer > * > * {
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
foliate-view::part(head), foliate-view::part(foot) {
font-family: system-ui;
font-size: 9pt;
}
#ribbon {
visibility: hidden;
Expand Down
4 changes: 1 addition & 3 deletions src/reader/reader.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { View } from '../foliate-js/view.js'
import '../foliate-js/view.js'
import { Overlayer } from '../foliate-js/overlayer.js'
import { toPangoMarkup } from './markup.js'

customElements.define('foliate-view', View)

// TODO: make this translatable
const format = {
loc: (a, b) => `Loc ${a} of ${b}`,
Expand Down

0 comments on commit dde59e2

Please sign in to comment.