Initial commit
This commit is contained in:
commit
63dd5fd5b3
9 changed files with 140 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dist/
|
||||||
|
sync.sh
|
17
build.sh
Executable file
17
build.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source_to_target() { sed -E -e 's:\.\./src/:\./:' -e 's/.md$/.html/'; }
|
||||||
|
escape_newlines() { tr -d "\\n"; }
|
||||||
|
|
||||||
|
shopt -s globstar
|
||||||
|
rm -rf dist/
|
||||||
|
mkdir dist&&cd dist
|
||||||
|
cp ../style.css .
|
||||||
|
for file in $(du -a ../src/ | cut -f2 | grep -E '.md$'); do
|
||||||
|
target="$(echo $file | source_to_target)"
|
||||||
|
content="$(pandoc --from markdown+emoji --wrap=none -i $file | sed -e 's/[]\/$*.^[]/\\&/g' | escape_newlines )" # To escape the string for sed later on
|
||||||
|
prefix=$(realpath --relative-to $(dirname $target) .)
|
||||||
|
sidebar=$(for x in ../src/**/*.md; do echo "<li><a href=\"$(echo $prefix/$x | source_to_target)\">$(realpath --relative-to ../src/ $x | sed -e 's/.md$//')</a></li>" | sed -e 's/[]\/$*.^[]/\\&/g' | escape_newlines; done)
|
||||||
|
mkdir -p $(dirname $target)
|
||||||
|
cat ../template.tpl | sed -e "s/{CONTENT}/$content/" -e "s:{PREFIX}:$prefix:" -e "s/{SIDEBAR}/$sidebar/" > $target
|
||||||
|
done
|
15
src/about.md
Normal file
15
src/about.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# About this page
|
||||||
|
|
||||||
|
This page is written in Markdown, and transformed to HTML using a custom templating engine written in Bash script. It makes heavy use of `sed` and other Unix utilities.
|
||||||
|
Writing this was really fun, and a great little project to test and improve my skills :smiley:
|
||||||
|
|
||||||
|
Once I cleaned up the code, the generator will be made public under the MIT license.
|
||||||
|
|
||||||
|
Feature ToDo-list:
|
||||||
|
|
||||||
|
- Properly support subdirectories
|
||||||
|
- Add more buttons to the nav bar
|
||||||
|
- Make mobile friendly
|
||||||
|
- Make templates more powerful
|
||||||
|
|
||||||
|
If you have any questions about this, you can reach out to me.
|
12
src/contact.md
Normal file
12
src/contact.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Contact me
|
||||||
|
|
||||||
|
You can contact me in the following ways:
|
||||||
|
|
||||||
|
* By mail (preferred option), to [jotto5@](mailto:jotto5@hs-mittweida.de)
|
||||||
|
* On Discord ([@sleppo04](https://discord.com/users/sleppo04))
|
||||||
|
* Others on request
|
||||||
|
|
||||||
|
If you don't know what to contact me about: Try computers graphics, programming, music and trains! You can also talk to me if you want
|
||||||
|
to talk about trans-topics, or just want to vent about the difficulties of being queer :heart:
|
||||||
|
|
||||||
|
While not a contact channel per se, I can also be found in the fediverse as [@joss@tech.lgbt](https://tech.lgbt/@joss)!
|
10
src/index.md
Normal file
10
src/index.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Haii :3 :cherry_blossom:
|
||||||
|
|
||||||
|
This is my university page, which is still under heavy construction. It is replacing my older page, which, to be fair, looked awful.
|
||||||
|
|
||||||
|
A few small facts about me:
|
||||||
|
|
||||||
|
* My name is Jocelyn :dog:
|
||||||
|
* I am a student in the CB faculty of this university
|
||||||
|
* My preferred pronouns are `she/her`
|
||||||
|
* I like touching computers :3
|
8
src/others.md
Normal file
8
src/others.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Other sites
|
||||||
|
|
||||||
|
This is a place for me to put links to friendly websites!
|
||||||
|
|
||||||
|
* Emil's site: [~emarche](https://www.student.hs-mittweida.de/~emarche)
|
||||||
|
* My private homepage at [jossco.de](https://jossco.de)
|
||||||
|
|
||||||
|
If you want to be here, contact me :grin:
|
1
src/queer.md
Normal file
1
src/queer.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Yes.
|
53
style.css
Normal file
53
style.css
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
background-color: Purple;
|
||||||
|
color: #FFFFFF;
|
||||||
|
padding: 10px;
|
||||||
|
border-bottom: 1px solid #AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-name {
|
||||||
|
font-weight: 1000;
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar a {
|
||||||
|
float: right;
|
||||||
|
text-align: center;
|
||||||
|
padding-left: 25px;
|
||||||
|
display: block;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
height: 100%;
|
||||||
|
width: 200px;
|
||||||
|
position: fixed;
|
||||||
|
border-right: 1px solid #AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidemenu li {
|
||||||
|
list-style-type: "\02386";
|
||||||
|
list-style-position: outside;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidemenu li a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000040;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 20px;
|
||||||
|
margin-left: 200px;
|
||||||
|
color: #000040;
|
||||||
|
}
|
22
template.tpl
Executable file
22
template.tpl
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Jocelyn Otto</title>
|
||||||
|
<link rel="stylesheet" href="{PREFIX}/style.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header class="navbar">
|
||||||
|
<span class="nav-name">Jocelyn Otto</span>
|
||||||
|
<a href="https://jossco.de">Private page</a>
|
||||||
|
</header>
|
||||||
|
<div class="sidebar">
|
||||||
|
<ul class="sidemenu">
|
||||||
|
{SIDEBAR}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
{CONTENT}
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue