feat: add notes
This commit is contained in:
parent
ae59cb7ed9
commit
ba85815b7e
4
components/md-post.html
Normal file
4
components/md-post.html
Normal file
@ -0,0 +1,4 @@
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
19
components/md-pre.html
Normal file
19
components/md-pre.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Javalsai's Website</title>
|
||||
<meta name="author" content="javalsai" />
|
||||
<meta name="description" content="🐧javalsai's personal website" />
|
||||
<meta name="theme-color" content="#dd5555" />
|
||||
|
||||
<link rel="stylesheet" href="/styles/bundles/markdown.css">
|
||||
<link rel="stylesheet" href="/styles/code-highlight/default.css">
|
||||
</head>
|
||||
|
||||
<body class="flex column">
|
||||
<!--# include virtual="/components/header.html" -->
|
||||
<main>
|
30
notes/example.html
Normal file
30
notes/example.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!--# include virtual="/components/md-pre.html" -->
|
||||
<h1 id="test-document">Test Document</h1>
|
||||
<p>This is a text markdown document with even <code>code</code>,
|
||||
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>L</mi><mi>a</mi><mi>T</mi><mi>e</mi><mi>X</mi><mo>=</mo><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow><annotation encoding="application/x-tex">LaTeX = \frac{x}{y}</annotation></semantics></math>,</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="bu">console</span><span class="op">.</span><span class="fu">log</span>(<span class="st">'language codeblocks'</span>)<span class="op">;</span></span></code></pre></div>
|
||||
<p>and
|
||||
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>L</mi><mi>a</mi><mi>T</mi><mi>e</mi><mi>X</mi><mspace width="0.222em"></mspace><mi>B</mi><mi>l</mi><mi>o</mi><mi>c</mi><mi>k</mi><mi>s</mi><mo>=</mo><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow><annotation encoding="application/x-tex">
|
||||
LaTeX~Blocks = \frac{x}{y}
|
||||
</annotation></semantics></math></p>
|
||||
<h2 id="and-ofc">and ofc</h2>
|
||||
<p>a complex syntax example</p>
|
||||
<div class="sourceCode" id="cb2"><pre
|
||||
class="sourceCode rust"><code class="sourceCode rust"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Handler<span class="op"><</span>T<span class="op">:</span> <span class="pp">surrealdb::</span>Connection<span class="op">></span> <span class="op">{</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> config<span class="op">:</span> <span class="kw">crate</span><span class="pp">::config::</span>Schema<span class="op">,</span></span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="at">#[</span>allow<span class="at">(</span>dead_code<span class="at">)]</span></span>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> db<span class="op">:</span> <span class="pp">surrealdb::</span>Surreal<span class="op"><</span>T<span class="op">>,</span></span>
|
||||
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
|
||||
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="co">// This is a comment</span></span>
|
||||
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="co">/* And this</span></span>
|
||||
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co">is multiline</span></span>
|
||||
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="co">*/</span></span>
|
||||
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="at">#[</span>async_trait<span class="at">]</span></span>
|
||||
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="kw">impl</span><span class="op"><</span>T<span class="op">:</span> <span class="pp">surrealdb::</span>Connection<span class="op">></span> EventHandler <span class="cf">for</span> Handler<span class="op"><</span>T<span class="op">></span> <span class="op">{</span></span>
|
||||
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">async</span> <span class="kw">fn</span> message(<span class="op">&</span><span class="kw">self</span><span class="op">,</span> ctx<span class="op">:</span> Context<span class="op">,</span> msg<span class="op">:</span> Message) <span class="op">{</span></span>
|
||||
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> maybe_cmds <span class="op">=</span></span>
|
||||
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> <span class="pp">commands::parser::MsgParser::</span>new(<span class="op">&</span><span class="kw">self</span><span class="op">.</span>config<span class="op">.</span>prefix<span class="op">.</span>to_string()<span class="op">,</span> <span class="op">&</span>msg<span class="op">.</span>content)<span class="op">.</span>parse()<span class="op">;</span></span>
|
||||
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
|
||||
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<!--# include virtual="/components/md-post.html" -->
|
31
notes/example.md
Normal file
31
notes/example.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Test Document
|
||||
This is a text markdown document with even `code`, $LaTeX = \frac{x}{y}$,
|
||||
```js
|
||||
console.log('language codeblocks');
|
||||
```
|
||||
and
|
||||
$$
|
||||
LaTeX~Blocks = \frac{x}{y}
|
||||
$$
|
||||
|
||||
## and ofc
|
||||
a complex syntax example
|
||||
```rust
|
||||
struct Handler<T: surrealdb::Connection> {
|
||||
config: crate::config::Schema,
|
||||
#[allow(dead_code)]
|
||||
db: surrealdb::Surreal<T>,
|
||||
}
|
||||
|
||||
// This is a comment
|
||||
/* And this
|
||||
is multiline
|
||||
*/
|
||||
#[async_trait]
|
||||
impl<T: surrealdb::Connection> EventHandler for Handler<T> {
|
||||
async fn message(&self, ctx: Context, msg: Message) {
|
||||
let maybe_cmds =
|
||||
commands::parser::MsgParser::new(&self.config.prefix.to_string(), &msg.content).parse();
|
||||
}
|
||||
}
|
||||
```
|
28
notes/index.html
Normal file
28
notes/index.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Javalsai's Website - Notes</title>
|
||||
<link rel="stylesheet" href="/styles/bundles/complete.css">
|
||||
</head>
|
||||
|
||||
<body class="flex column">
|
||||
<!--# include virtual="/components/header.html" -->
|
||||
<main>
|
||||
<h1><a class="reference" id="notes" href="#notes">Notes</a></h1>
|
||||
<p>This will just contain markdown notes about academic stuff. Will try to use nice web stuff as much as
|
||||
possible, like idk, integrate qalc graphs and that into formulas or smth.</p>
|
||||
<ul class="row-ul">
|
||||
<li><a href="math">math</a></li>
|
||||
<li><a href="physics">physics</a></li>
|
||||
<li><a href="tech">tech</a></li>
|
||||
</ul>
|
||||
<p>Just for my record, my idea is to name everything as in
|
||||
<code>U<unit>_<name>.<md/html></code></p>
|
||||
<p>Also, example of the markdown to html thing right now, from <a href="example.md">this</a> to <a href="example.html">this</a></p>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
18
notes/make-views.sh
Executable file
18
notes/make-views.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e;
|
||||
|
||||
MYSELF=$(realpath "$0");
|
||||
MYDIR=$(dirname "$MYSELF");
|
||||
|
||||
PRE_IMPORT=${PRE_IMPORT:-/components/md-pre.html}
|
||||
POST_IMPORT=${POST_IMPORT:-/components/md-post.html}
|
||||
|
||||
find "${1-$MYDIR}" -iname '*.md' | while read -r line; do
|
||||
# target=${line//\.md/.html}
|
||||
target=$(sed 's/\.md$/\.html/' <<< "$line")
|
||||
|
||||
echo "$line -> $target";
|
||||
echo "<!--# include virtual=\"$PRE_IMPORT\" -->" > "$target"
|
||||
pandoc --mathml "$line" -o - >> "$target"
|
||||
echo "<!--# include virtual=\"$POST_IMPORT\" -->" >> "$target"
|
||||
done
|
0
notes/math/.gitkeep
Normal file
0
notes/math/.gitkeep
Normal file
0
notes/physics/.gitkeep
Normal file
0
notes/physics/.gitkeep
Normal file
0
notes/tech/.gitkeep
Normal file
0
notes/tech/.gitkeep
Normal file
59
styles/bundles/markdown.css
Normal file
59
styles/bundles/markdown.css
Normal file
@ -0,0 +1,59 @@
|
||||
@import url('/styles/common.css');
|
||||
@import url('/styles/classes/breaks.css');
|
||||
@import url('/styles/classes/flex.css');
|
||||
@import url('/styles/classes/ul-directions.css');
|
||||
|
||||
@import url('/styles/components/footer.css');
|
||||
@import url('/styles/components/header.css');
|
||||
@import url('/styles/components/pre-icon.css');
|
||||
@import url('/styles/components/reference.css');
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');
|
||||
|
||||
body {
|
||||
max-width: 800px;
|
||||
min-width: 300px;
|
||||
padding: 4em;
|
||||
margin: 4.5em auto auto;
|
||||
|
||||
background: var(--background);
|
||||
font-family: var(--mono-font);
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
color: var(--text);
|
||||
caret-color: var(--primary);
|
||||
}
|
||||
|
||||
math {
|
||||
font-family: "Crimson Text";
|
||||
}
|
||||
|
||||
pre.sourceCode {
|
||||
width: 100%;
|
||||
counter-reset: line-numbering;
|
||||
}
|
||||
|
||||
code.sourceCode {
|
||||
width: 100%;
|
||||
padding: 1em;
|
||||
display: inline-block;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
code.sourceCode > span {
|
||||
counter-increment: line-numbering;
|
||||
}
|
||||
|
||||
code.sourceCode > span::before {
|
||||
content: counter(line-numbering);
|
||||
display: inline-block;
|
||||
width: 2em;
|
||||
margin-right: 1em;
|
||||
text-align: right;
|
||||
color: #888;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
transition: all .3s ease-out;
|
||||
}
|
28
styles/code-highlight/default.css
Normal file
28
styles/code-highlight/default.css
Normal file
@ -0,0 +1,28 @@
|
||||
.sourceCode {
|
||||
color: lightblue;
|
||||
}
|
||||
|
||||
.sourceCode .bu, .sourceCode .pp {
|
||||
color: khaki;
|
||||
}
|
||||
|
||||
.sourceCode .op {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.sourceCode .fu {
|
||||
color: dodgerblue;
|
||||
}
|
||||
|
||||
.sourceCode .kw, .sourceCode .cf {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.sourceCode .co {
|
||||
color: #aaa;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.sourceCode .st {
|
||||
color: orange;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user