Ditch UWP solution completely.
This commit is contained in:
51
Wino.Packaging/JS/reader.html
Normal file
51
Wino.Packaging/JS/reader.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="./global.css" />
|
||||
<script src="./libs/darkreader.js"></script>
|
||||
<style>
|
||||
body {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
margin: 0px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#readerDiv {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<meta name="color-scheme" content="dark light">
|
||||
<script>
|
||||
function RenderHTML(htmlString) {
|
||||
var containerDiv = document.getElementById("readerDiv");
|
||||
containerDiv.innerHTML = htmlString;
|
||||
}
|
||||
|
||||
function ChangeFontFamily(fontFamily) {
|
||||
var containerDiv = document.getElementById("readerDiv");
|
||||
containerDiv.style.fontFamily = fontFamily;
|
||||
}
|
||||
|
||||
function ChangeFontSize(size) {
|
||||
var containerDiv = document.getElementById("readerDiv");
|
||||
containerDiv.style.fontSize = size;
|
||||
}
|
||||
|
||||
function SetLightEditor() {
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
DarkReader.disable();
|
||||
}
|
||||
|
||||
function SetDarkEditor() {
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
DarkReader.enable();
|
||||
}
|
||||
</script>
|
||||
<div id="readerDiv"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user