Compare commits
3 Commits
c31b66c492
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3305a89c63 | |||
| d3637e8758 | |||
| b972d54a7d |
@@ -22,3 +22,99 @@ He was an older man, hair starting to grey, tall, but other than that, absolutel
|
|||||||
"I know, I know, I just... hoped you'd finally tell me something interesting, that's it"
|
"I know, I know, I just... hoped you'd finally tell me something interesting, that's it"
|
||||||
|
|
||||||
"I really don't think if something like that finally happens it'd be school, or even school-related"
|
"I really don't think if something like that finally happens it'd be school, or even school-related"
|
||||||
|
|
||||||
|
"I guess you're right, though you really should socialise more, talk to people, make friends and so on"
|
||||||
|
|
||||||
|
"I *know*, **dad**..."
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
After eating dinner in pretty much complete silence, Clara went to her room and sat down in front of her desk.
|
||||||
|
|
||||||
|
_Okay..._
|
||||||
|
|
||||||
|
`Super+T`
|
||||||
|
|
||||||
|
`> mkdir Projects/new_website_5`
|
||||||
|
|
||||||
|
`> cd Projects/new_website_5`
|
||||||
|
|
||||||
|
`> edit .`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`Ctrl+N`
|
||||||
|
|
||||||
|
`index.html`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`<html>`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`</html>`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`Shift+Ctrl+Left`
|
||||||
|
|
||||||
|
`Backspace`
|
||||||
|
|
||||||
|
`<body>`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`Shift+Ctrl+Left`
|
||||||
|
|
||||||
|
`Backspace`
|
||||||
|
|
||||||
|
`<head>`
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`<title>Fuck this</titile`
|
||||||
|
|
||||||
|
`Ctrl+S`
|
||||||
|
|
||||||
|
`Super+Q`
|
||||||
|
|
||||||
|
"Ugh..."
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
`Super+L`
|
||||||
|
|
||||||
|
She got up from her laptop and started walking in circles around the room.
|
||||||
|
|
||||||
|
_Something's weird today, something's weird today, something's weird today, something's weird today..._
|
||||||
|
|
||||||
|
She looked out the window
|
||||||
|
|
||||||
|
_Oh, full moon, yeah, okay, right, that'd do it_
|
||||||
|
|
||||||
|
"Fuck me"
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Chapter 2
|
||||||
|
|
||||||
|
Clara opened her eyes and ever-so-slightly got out from under the duvet, enough to turn off the alarm but not enough to *actually* get out of bed.
|
||||||
|
|
||||||
|
"Shut up, phone..."
|
||||||
|
|
||||||
|
She was definitely not well-rested, yesterday, she only managed to go to sleep after midnight.
|
||||||
@@ -7,3 +7,7 @@
|
|||||||
- Aliens
|
- Aliens
|
||||||
- AU
|
- AU
|
||||||
- Magitech
|
- Magitech
|
||||||
|
|
||||||
|
## Chapters
|
||||||
|
|
||||||
|
- [Chapter 1](1.md)
|
||||||
|
|||||||
@@ -2,23 +2,14 @@
|
|||||||
|
|
||||||
CSS=$(cat ./styles.css)
|
CSS=$(cat ./styles.css)
|
||||||
|
|
||||||
HTML_BEGIN="<!DOCTYPE html>
|
|
||||||
<html lang=\"en\">
|
|
||||||
<head>
|
|
||||||
<meta charset=\"utf-8\">
|
|
||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
|
||||||
<style>$CSS</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<nav><a href=\"../\">← Parent Directory</a></nav>
|
|
||||||
<hr>"
|
|
||||||
|
|
||||||
HTML_END="
|
HTML_END="
|
||||||
</body>
|
</body>
|
||||||
</html>"
|
</html>"
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
ROOT_DIR="$(pwd)"
|
||||||
|
|
||||||
find . -type f -name "*.md" -print0 | while IFS= read -r -d '' mdfile; do
|
find . -type f -name "*.md" -print0 | while IFS= read -r -d '' mdfile; do
|
||||||
dir=$(dirname "$mdfile")
|
dir=$(dirname "$mdfile")
|
||||||
base=$(basename "$mdfile" .md)
|
base=$(basename "$mdfile" .md)
|
||||||
@@ -34,10 +25,48 @@ find . -type f -name "*.md" -print0 | while IFS= read -r -d '' mdfile; do
|
|||||||
|
|
||||||
pandoc "$mdfile" -t html -o "$html_raw"
|
pandoc "$mdfile" -t html -o "$html_raw"
|
||||||
|
|
||||||
|
abs_dir="$(cd "$dir" && pwd)"
|
||||||
|
rel_depth="${abs_dir#$ROOT_DIR}"
|
||||||
|
rel_depth="${rel_depth#/}"
|
||||||
|
|
||||||
|
nav=""
|
||||||
|
if [[ -z "$rel_depth" ]]; then
|
||||||
|
if [[ "$out_base" != "index" ]]; then
|
||||||
|
nav='<nav><a href="./index.html"><- Index</a></nav>'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "$out_base" == "index" ]]; then
|
||||||
|
nav='<nav><a href="../index.html"><- Home</a></nav>'
|
||||||
|
else
|
||||||
|
nav='<nav><a href="./index.html"><- Index</a> | <a href="../index.html"><- Home</a></nav>'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$nav" ]]; then
|
||||||
|
nav="$nav<hr>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
HTML_BEGIN="<!DOCTYPE html>
|
||||||
|
<html lang=\"en\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"utf-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<style>$CSS</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$nav"
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "$HTML_BEGIN"
|
echo "$HTML_BEGIN"
|
||||||
sed -E 's/href="(\.\/[^.]+)"/href="\1\/"/g' "$html_raw" | \
|
sed -E 's/href="(\.\/[^.]+)"/href="\1\/"/g' "$html_raw" | \
|
||||||
python3 -c "import sys, re; print(re.sub(r'href=\"([^\"]+)\"', lambda m: 'href=\"' + m.group(1).replace('?', '%3F').replace('!', '%21') + '\"', sys.stdin.read()), end='')"
|
sed -E 's/href="([^"]*)\.md"/href="\1.html"/g' | \
|
||||||
|
python3 -c "
|
||||||
|
import sys, re
|
||||||
|
text = sys.stdin.read()
|
||||||
|
text = re.sub(r'<p><em>(.*?)</em></p>', r'<p class=\"thought\"><em>\1</em></p>', text, flags=re.DOTALL)
|
||||||
|
text = re.sub(r'href=\"([^\"]+)\"', lambda m: 'href=\"' + m.group(1).replace('?', '%3F').replace('!', '%21') + '\"', text)
|
||||||
|
print(text, end='')
|
||||||
|
"
|
||||||
echo "$HTML_END"
|
echo "$HTML_END"
|
||||||
} > "$html_final"
|
} > "$html_final"
|
||||||
|
|
||||||
|
|||||||
128
styles.css
128
styles.css
@@ -3,6 +3,7 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: #1a1a1a;
|
background: #1a1a1a;
|
||||||
@@ -10,8 +11,9 @@ body {
|
|||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
text-shadow: 0 0 5px rgba(224, 224, 224, 0.2);
|
text-shadow: 0 0 5px rgba(224, 224, 224, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
@@ -19,13 +21,14 @@ h4,
|
|||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
color: #00a4dc;
|
color: #00a4dc;
|
||||||
margin: 20px 0 10px;
|
|
||||||
text-shadow: 0 0 8px rgba(0, 164, 220, 0.4);
|
text-shadow: 0 0 8px rgba(0, 164, 220, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
border-bottom: 1px solid #333;
|
border-bottom: 1px solid #333;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
margin: 20px 0 10px;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
@@ -33,79 +36,70 @@ h2 {
|
|||||||
h3 {
|
h3 {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
p {
|
|
||||||
|
p,
|
||||||
|
ul,
|
||||||
|
li {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
a {
|
ul {
|
||||||
color: #888;
|
margin-left: 20px;
|
||||||
text-decoration: none;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #e0e0e0;
|
|
||||||
text-shadow: 0 0 10px rgba(224, 224, 224, 0.5);
|
|
||||||
}
|
|
||||||
code {
|
|
||||||
background: #0a0a0a;
|
|
||||||
padding: 2px 6px;
|
|
||||||
border: 1px solid #333;
|
|
||||||
font-size: 13px;
|
|
||||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
background: #0a0a0a;
|
|
||||||
border: 1px solid #333;
|
|
||||||
padding: 15px;
|
|
||||||
overflow-x: auto;
|
|
||||||
margin: 15px 0;
|
|
||||||
box-shadow: 0 0 10px rgba(0, 164, 220, 0.1);
|
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
border-left: 3px solid #333;
|
|
||||||
padding-left: 15px;
|
|
||||||
color: #888;
|
|
||||||
margin: 15px 0;
|
|
||||||
}
|
|
||||||
ul,
|
|
||||||
ol {
|
|
||||||
margin: 10px 0 10px 20px;
|
|
||||||
}
|
}
|
||||||
li {
|
li {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #888;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
text-shadow: 0 0 5px rgba(224, 224, 224, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #e0e0e0;
|
||||||
|
text-shadow: 0 0 10px rgba(224, 224, 224, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.thought {
|
||||||
|
margin: 15px 0;
|
||||||
|
padding: 10px 20px;
|
||||||
|
color: #c8a2c8;
|
||||||
|
text-shadow: 0 0 8px rgba(200, 162, 200, 0.3);
|
||||||
|
border-left: 2px solid rgba(200, 162, 200, 0.3);
|
||||||
|
background: rgba(200, 162, 200, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background: #2a2a2a;
|
||||||
|
color: #00a4dc;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 0.95em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: #2a2a2a;
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border-left: 3px solid #00a4dc;
|
||||||
|
overflow-x: auto;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid #333;
|
border-top: 1px solid #333;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border: 1px solid #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
margin: 15px 0;
|
|
||||||
}
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
border: 1px solid #333;
|
|
||||||
padding: 8px 12px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
background: #222;
|
|
||||||
color: #00a4dc;
|
|
||||||
}
|
|
||||||
tr:nth-child(even) {
|
|
||||||
background: #111;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user