drop some theme settings

This commit is contained in:
quenousimporte 2023-11-15 21:24:38 +01:00
parent 1cb23c7108
commit ffabf2453f
2 changed files with 6 additions and 18 deletions

22
main.js
View File

@ -1,7 +1,5 @@
var defaultsettings =
{
bgcolor: "white",
fontfamily: "system-ui",
fontsize: "16px",
fontcolor: "rgb(55, 53, 47)",
lineheight: "24px",
@ -18,7 +16,6 @@ var defaultsettings =
sync: false,
tagsinlists: true,
tagfilter: "",
darkcode: true,
uselinkpopup: true
};
@ -674,7 +671,7 @@ function shownotelinks()
{
color:
{
background: settings.bgcolor,
background: "white",
border: settings.fontcolor,
},
font:
@ -1317,8 +1314,6 @@ function loadstorage()
function applystyle()
{
document.body.style.background = settings.bgcolor;
document.body.style.fontFamily = settings.fontfamily;
document.body.style.fontSize = settings.fontsize;
document.body.style.lineHeight = settings.lineheight;
document.body.style.color = settings.fontcolor;
@ -2162,19 +2157,13 @@ function rawline2html(line, index, options)
{
options.code = true;
options.language = line.substring(3);
if (settings.darkcode)
{
line = "<div class='color-code'>" + line.replace(new RegExp("(" + options.language + ")"), "<span style='text-shadow: " + shadow + ";color:" + settings.accentcolor + ";'>$1</span>") + "</div>";
}
line = "<div class='color-code'>" + line.replace(new RegExp("(" + options.language + ")"), "<span style='text-shadow: " + shadow + ";color:" + settings.accentcolor + ";'>$1</span>") + "</div>";
}
else if (line == "```" && options.code)
{
options.code = false;
options.language = "";
if (settings.darkcode)
{
line = "<div class='color-code'>" + line + "</div>";
}
line = "<div class='color-code'>" + line + "</div>";
}
else if (options.code)
{
@ -2184,10 +2173,7 @@ function rawline2html(line, index, options)
line = "<span style='color:grey'>" + line + "</span>";
comment = true;
}
if (settings.darkcode)
{
line = "<div class='color-code'>" + (line || emptyline) + "</div>";
}
line = "<div class='color-code'>" + (line || emptyline) + "</div>";
if (!comment && languagekeywords[options.language])
{
var keywords = languagekeywords[options.language];

View File

@ -3,6 +3,8 @@
body {
margin-left: 7%;
margin-right: 7%;
background: white;
font-family: system-ui;
}
a {