52 lines
1.4 KiB
HTML
52 lines
1.4 KiB
HTML
<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>
|