-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Page Style - Replace footer with icon buttons - Esparto home - Share document (for compatible systems) - Print page - Add CSS style for icon buttons - Prefer fully specified fonts to system fonts - Remove underline from URLs
- Loading branch information
Showing
16 changed files
with
2,039 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
__author__ = """Dominic Thorn""" | ||
__email__ = "[email protected]" | ||
__version__ = "4.0.0.post1" | ||
__version__ = "4.1.0" | ||
|
||
_MODULE_PATH: _Path = _Path(__file__).parent.absolute() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Convert document to text file. | ||
const getDocumentFile = function () { | ||
let filename = document.title + ".html" | ||
let docString = new XMLSerializer().serializeToString(document) | ||
return new File([docString], filename, { type: "text/html" }) | ||
} | ||
|
||
const share_button = document.getElementById('share-button'); | ||
|
||
// Only show share button if web share API is supported. | ||
if (navigator.canShare) { | ||
share_button.style.display = "block"; | ||
} else { | ||
console.log("Web Share API not supported.") | ||
} | ||
|
||
// Share must be triggered by "user activation". | ||
share_button.addEventListener('click', async () => { | ||
try { | ||
let docFile = getDocumentFile() | ||
let shareData = { files: [docFile] } | ||
await navigator.share(shareData) | ||
} catch (err) { | ||
alert(`Error while sharing document:\n${err}`) | ||
} | ||
}); | ||
|
||
|
||
const print_button = document.getElementById('print-button') | ||
|
||
print_button.addEventListener('click', () => { | ||
window.print() | ||
}); |
Oops, something went wrong.