@page "/change-logs"
@model Dpz.Core.WebApi.Pages.ChangeLogs
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="zh-hans">
<head>
<title>更新日志</title>
<link rel="stylesheet" href="https://dpangzi.com/library/cherry-markdown/cherry-markdown.css">
<style>
html,
body {
padding: 0;
width: 70%;
min-width: 600px;
max-width: 1500px;
margin: 0 auto;
background-color: rgb(51, 51, 51);
}
.cherry {
box-shadow: none !important;
}
.cherry-previewer {
border-left: none !important;
padding: 0 !important;
}
.cherry-flex-toc{
background: #484646;
}
.cherry-flex-toc .cherry-toc-list .cherry-toc-one-a{
color: #d3d3d3;
}
.cherry-flex-toc,.cherry-flex-toc *{
color: #d3d3d3;
}
.cherry.theme__dark .cherry-flex-toc .cherry-toc-list .cherry-toc-one-a {
border-left-color: rgb(12 237 32 / 30%);
}
.cherry.theme__dark .cherry-flex-toc .cherry-toc-list .cherry-toc-one-a.current {
border-left-color: rgb(1 249 206);
color: rgb(1 249 206);
}
.cherry.theme__dark .cherry-flex-toc:hover {
background: #000000;
}
</style>
</head>
<body>
<div>
<pre id="preview">@Model.ChangeLog</pre>
<div id="markdown-preview"></div>
</div>
<script src="https://dpangzi.com/library/cherry-markdown/cherry-markdown.min.js"></script>
<script>
const previewElement = document.getElementById("preview");
if (localStorage["cherry-theme"] === undefined){
localStorage["cherry-theme"] = "dark";
}
new Cherry({
id: "markdown-preview",
value: previewElement?.textContent,
height: "100%",
editor: {
defaultModel: "previewOnly",
keepDocumentScrollAfterInit: true,
},
autoScrollByHashAfterInit: true,
themeSettings: {
mainTheme: "dark",
codeBlockTheme: 'one-dark',
},
engine: {
syntax: {
codeBlock: {
editCode: false,
changeLang: false,
},
}
},
toolbars: {
toolbar: false,
toc: {
updateLocationHash: true,
defaultModel: 'full',
position: 'fixed',
cssText: 'right: 20px;',
},
},
});
previewElement.style.display = "none";
</script>
</body>
</html>