Compare commits

...

3 commits

Author SHA1 Message Date
Ell 15c9cdbd16 improved style 2023-08-11 22:49:12 +02:00
Ell fbc0ea0aa2 we don't need CORS handling 2023-08-11 21:28:42 +02:00
Ell 01e3098b00 never mind 2023-08-11 21:28:00 +02:00
4 changed files with 73 additions and 56 deletions

View file

@ -10,8 +10,6 @@
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.0.5/dist/purify.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/highlight.min.js"></script>
<!-- TODO consider parsing markdown on the server instead? -->
<script src="https://cdn.jsdelivr.net/npm/marked@7.0.2/lib/marked.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked-katex-extension@3.0.3/lib/index.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked-highlight@2.0.4/lib/index.umd.js"></script>
@ -19,58 +17,10 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=JetBrains+Mono&display=swap">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css">
<link href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/styles/github-dark.min.css" media="(prefers-color-scheme:dark)" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/styles/github.min.css" media="(prefers-color-scheme:light),(prefers-color-scheme:no-preference)" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/styles/github-dark.min.css" media="(prefers-color-scheme:dark)">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/styles/github.min.css" media="(prefers-color-scheme:light),(prefers-color-scheme:no-preference)">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="favicon.ico">
<!-- TODO consider improving the style or using Obsidian's default style as a basis? -->
<style>
html {
position: relative;
min-height: 100%;
}
body {
font-family: "Inter", sans-serif;
}
code {
font-family: "JetBrains Mono", monospace;
font-variant-ligatures: none;
border-radius: 5px;
}
img {
width: 100%;
height: auto;
}
.content {
max-width: 700px;
margin: 40px auto 80px;
}
#footer {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 40px;
margin-top: 40px;
text-align: center;
}
@media (prefers-color-scheme: dark) {
body {
color: #d8d8d8;
background-color: #1e1e1e;
}
}
</style>
</head>
<body>

View file

@ -1,7 +1,5 @@
<?php
header("Access-Control-Allow-Origin: *");
switch ($_SERVER["REQUEST_METHOD"]) {
case "GET":
handle_get();

68
server/public/style.css Normal file
View file

@ -0,0 +1,68 @@
html {
position: relative;
min-height: 100%;
}
body {
font-family: "Inter", sans-serif;
color: #222222;
}
code {
font-family: "JetBrains Mono", monospace;
font-variant-ligatures: none;
border-radius: 5px;
}
img {
width: 100%;
height: auto;
}
blockquote {
border-left: 2px solid #8b6cef;
padding: 0 0 0 16px;
margin-inline-start: 0;
margin-inline-end: 0;
}
a {
color: #9275f0;
outline: none;
text-decoration-line: underline;
text-decoration-thickness: auto;
}
a:hover {
color: #a48cf2;
}
.hljs {
background-color: #fafafa;
}
.content {
max-width: 700px;
margin: 40px auto 80px;
}
#footer {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 40px;
margin-top: 40px;
text-align: center;
}
@media (prefers-color-scheme: dark) {
body {
color: #dadada;
background-color: #1e1e1e;
}
.hljs {
background-color: #242424;
}
}

View file

@ -1,3 +1,4 @@
{
"accentColor": ""
"accentColor": "",
"theme": "moonstone"
}