commit 63dd5fd5b3214eea2123acceec64a948cd88add4 Author: Joss Date: Sun Nov 17 23:06:42 2024 +0100 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..410d087 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +sync.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..279ad53 --- /dev/null +++ b/build.sh @@ -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 "
  • $(realpath --relative-to ../src/ $x | sed -e 's/.md$//')
  • " | 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 diff --git a/src/about.md b/src/about.md new file mode 100644 index 0000000..0f513f2 --- /dev/null +++ b/src/about.md @@ -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. diff --git a/src/contact.md b/src/contact.md new file mode 100644 index 0000000..2a51658 --- /dev/null +++ b/src/contact.md @@ -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)! diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..39451e9 --- /dev/null +++ b/src/index.md @@ -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 diff --git a/src/others.md b/src/others.md new file mode 100644 index 0000000..a5bd654 --- /dev/null +++ b/src/others.md @@ -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: diff --git a/src/queer.md b/src/queer.md new file mode 100644 index 0000000..99a3e92 --- /dev/null +++ b/src/queer.md @@ -0,0 +1 @@ +# Yes. diff --git a/style.css b/style.css new file mode 100644 index 0000000..4e1ff94 --- /dev/null +++ b/style.css @@ -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; +} diff --git a/template.tpl b/template.tpl new file mode 100755 index 0000000..f4102b0 --- /dev/null +++ b/template.tpl @@ -0,0 +1,22 @@ + + + + Jocelyn Otto + + + + + + +
    + {CONTENT} +
    + +