small visual changes
This commit is contained in:
parent
f27baac09c
commit
edc5a2780d
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>notes</title>
|
||||
<meta name="theme-color" content="#FFFFFF" />
|
||||
<meta name="theme-color" content="white" />
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
|
|
9
main.js
9
main.js
|
@ -1952,13 +1952,14 @@ function rawline(index)
|
|||
var emptyline = "<br>";
|
||||
function rawline2html(line, index, options)
|
||||
{
|
||||
var shadow = "0.75px 0 0";
|
||||
line = escapeHtml(line);
|
||||
|
||||
// headings
|
||||
if (line.startsWith("#"))
|
||||
{
|
||||
line = line.replace(/(#* )/, "<span style='color:" + settings.accentcolor + "'>$1</span>"); // to check!
|
||||
line = "<span style='text-shadow: 1px 0 0;'>" + line + "</span>";
|
||||
line = "<span style='text-shadow: " + shadow + ";'>" + line + "</span>";
|
||||
}
|
||||
|
||||
// bold and italics
|
||||
|
@ -1967,7 +1968,7 @@ function rawline2html(line, index, options)
|
|||
{
|
||||
temp = line.substring(2);
|
||||
}
|
||||
temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='text-shadow: 1px 0 0;'>**$1**</span>");
|
||||
temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='text-shadow: " + shadow + ";'>**$1**</span>");
|
||||
temp = temp.replace(/\*([^\*]*)\*/g, "<em>*$1*</em>");
|
||||
|
||||
if (line.startsWith("* "))
|
||||
|
@ -2093,8 +2094,8 @@ function rawline2html(line, index, options)
|
|||
}
|
||||
else
|
||||
{
|
||||
line = line.replace(/(\(\w\))/g, "<span style='text-shadow: 1px 0 0; color:" + settings.accentcolor + "'>$1</span>");
|
||||
line = line.replace(/(@\w*)/g, "<span style='text-shadow: 1px 0 0; color:grey'>$1</span>");
|
||||
line = line.replace(/(\(\w\))/g, "<span style='text-shadow: " + shadow + "; color:" + settings.accentcolor + "'>$1</span>");
|
||||
line = line.replace(/(@\w*)/g, "<span style='text-shadow: " + shadow + "; color:grey'>$1</span>");
|
||||
line = line.replace(/(\s\+\w*)/g, "<span style='color:grey'>$1</span>");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue