From e874610a2fea74703e881a21c1a4a8b692fd8bc7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 4 May 2022 18:19:47 +0300 Subject: Giant rework of how file lists are made --- generate-dev.sh | 1 + make-file-lists.sh | 47 +++++++++++++ src/archives.md | 146 +++++++++++++++++++--------------------- src/archives/index.md | 146 +++++++++++++++++++--------------------- src/docs.md | 109 ++++++++++++++---------------- src/docs/index.md | 109 ++++++++++++++---------------- src/img/folder-minus-tabler.svg | 58 ++++++++++++++++ src/img/folder-plus-tabler.svg | 65 ++++++++++++++++++ src/index.md | 34 ---------- src/styles.css | 23 ++++++- 10 files changed, 433 insertions(+), 305 deletions(-) create mode 100755 make-file-lists.sh create mode 100644 src/img/folder-minus-tabler.svg create mode 100644 src/img/folder-plus-tabler.svg delete mode 100644 src/index.md diff --git a/generate-dev.sh b/generate-dev.sh index c558650..4d2478b 100755 --- a/generate-dev.sh +++ b/generate-dev.sh @@ -14,6 +14,7 @@ sudo ssg6 src /var/www/synd/ "Syndamia" "https://www.syndamia.com" sudo ./make-titles.sh /var/www/synd sudo ./make-descriptions.sh /var/www/synd +sudo ./make-file-lists.sh /var/www/synd # # Tiny version diff --git a/make-file-lists.sh b/make-file-lists.sh new file mode 100755 index 0000000..3952728 --- /dev/null +++ b/make-file-lists.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# This is a really rudementary way to make making file lists less HTML-y +# I made it so: +# 1) You don't have to write quite as much HTML +# 2) The Data columns for each file get to be formatted as Markdown ( is not recognized as a block-level element, so the stuff inside get formatted https://kristaps.bsd.lv/lowdown/lowdown.5.html#HTML_Blocks) + +# Very roughly, each file list has the same structure: +#
Folder Info File Data
+ +# In Markdown you type in something like (without the "# " in front): +# +# &&fos +# Description +# &&fs0 +# Data 1 +# Data 1.1 +# Data 1.2 +# &&fs +# Data 2 +# Data 2.1 +# Data 2.2 +# &&fod +# +# And the lines starting with && (I'll call them ftags) get replaced by some HTML. The around each file Data is mandatory. +# &&fs0 must only be used on before the very first file data. There must be no empty lines, lines mustn't start with spaces, there mustn't be anything around ftags and ftags have to be on their own lines. +# The commands have intuitive abbreviations: +# &&fos folder start +# &&fs0 file start of first file +# &&fs file start +# &&fod folder end + +if [ -z "$1" ]; then + echo First parameter must be a path + exit +fi + +for file in $(find "$1" -type f -name "*.html"); do + # Replaces "&&fos" with "
" + sed -i 's/^

&&fos$/

/g' "$file" + # Replaces "&&fs0" with "" + sed -i 's/^&&fs0$/<\/summary>
/g' "$file" + # Replaces "&&fs" with "" + sed -i 's/^&&fs$/<\/tr>/g' "$file" + # Replaces "&&fod" with "
" + sed -i 's/^&&fod<\/p>$/<\/tr><\/table><\/details>/g' "$file" +done diff --git a/src/archives.md b/src/archives.md index e739663..8f29c30 100644 --- a/src/archives.md +++ b/src/archives.md @@ -7,81 +7,73 @@ A wide variety of files (not made by me) that are hosted on my server for digita *Work here is under no license. If you believe something is infringing on your Copyright/Copyleft, please [Contact Me](/about) immediately with a method, listed under the "Work contact" section.* - Scanned manual of the Soviet Analog Multimeter [43208-У](http://radioamator.ru/izmereniya/multimetry-testery/221-kombinirovannyj-pribor-43208-u-osobennosti-skhemy-i-remonta) (in russian) - - - - - - - - -
[Прибор электроизмерительный комбинированный типа 43208-У](/files/43208-У/43208-У.pdf)1991-10-14 00:00PDF35M
+&&fos +Scanned manual of the Soviet Analog Multimeter [43208-У](http://radioamator.ru/izmereniya/multimetry-testery/221-kombinirovannyj-pribor-43208-u-osobennosti-skhemy-i-remonta) (in russian) +&&fs0 + +[Прибор электроизмерительный комбинированный типа 43208-У](/files/43208-У/43208-У.pdf) +1991-10-14 00:00 +PDF +35M +&&fs +&&fod - [Bryan Lunduke](https://lunduke.substack.com/) || Odysee content - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Programmers can't play Nintendo games...](/files/lunduke/25a5dc.jpeg)2021-04-26 05:20JPEG217K[src](https://odysee.com/Lunduke-2021-04-25-SwitchCaseBreak:d)
[In Defense of Richard Stallman](/files/lunduke/200763902_DefenseofStallman.mp4)2021-03-24 08:30MP476M[src](https://odysee.com/DefenseofStallman:9)
[I'm giving up. Exiting Vim.](/files/lunduke/410260814_Lunduke-2021-04-28-ExitingVIM.jpg)2021-04-28 09:40JPEG110K[src](https://odysee.com/Lunduke-2021-04-28-ExitingVIM:1)
[Computers Should Be Fun](/files/lunduke/209398324_ComputersShouldBeFun.mp4)2021-03-12 03:00MP437M[src](https://odysee.com/ComputersShouldBeFun:9)
[IBM (and Red Hat) employees not allowed to use email for personal hobbies?](/files/lunduke/456567373_IBMHobbies.mp4)2021-04-21 02:30MP423M[src](https://odysee.com/IBMHobbies:9)
[The Windows 2000 Launch (and the party)](/files/lunduke/630259980_Win2KLaunch.mp4)2021-04-15 12:00MP450M[src](https://odysee.com/Win2KLaunch:d)
[Mozilla Firefox drops FTP. Focuses on DRM, Censorship](/files/lunduke/687036626_FirefoxDropsFTP.mp4)2021-04-21 02:20MP416M[src](https://odysee.com/FirefoxDropsFTP:f)
[Lunduke condemns LBRY & Odysee](/files/lunduke/condemn-odysee.md)2021-08-09 06:30Md7.9K[src](https://odysee.com/condemn-odysee:2)
+&&fos +[Bryan Lunduke](https://lunduke.substack.com/) || Odysee content +&&fs0 + +[Programmers can't play Nintendo games...](/files/lunduke/25a5dc.jpeg) +2021-04-26 05:20 +JPEG +217K +[src](https://odysee.com/Lunduke-2021-04-25-SwitchCaseBreak:d) +&&fs + +[In Defense of Richard Stallman](/files/lunduke/200763902_DefenseofStallman.mp4) +2021-03-24 08:30 +MP4 +76M +[src](https://odysee.com/DefenseofStallman:9) +&&fs + +[I'm giving up. Exiting Vim.](/files/lunduke/410260814_Lunduke-2021-04-28-ExitingVIM.jpg) +2021-04-28 09:40 +JPEG +110K +[src](https://odysee.com/Lunduke-2021-04-28-ExitingVIM:1) +&&fs + +[Computers Should Be Fun](/files/lunduke/209398324_ComputersShouldBeFun.mp4) +2021-03-12 03:00 +MP4 +37M +[src](https://odysee.com/ComputersShouldBeFun:9) +&&fs + +[IBM (and Red Hat) employees not allowed to use email for personal hobbies?](/files/lunduke/456567373_IBMHobbies.mp4) +2021-04-21 02:30 +MP4 +23M +[src](https://odysee.com/IBMHobbies:9) +&&fs + +[The Windows 2000 Launch (and the party)](/files/lunduke/630259980_Win2KLaunch.mp4) +2021-04-15 12:00 +MP4 +50M +[src](https://odysee.com/Win2KLaunch:d) +&&fs + +[Mozilla Firefox drops FTP. Focuses on DRM, Censorship](/files/lunduke/687036626_FirefoxDropsFTP.mp4) +2021-04-21 02:20 +MP4 +16M +[src](https://odysee.com/FirefoxDropsFTP:f) +&&fs + +[Lunduke condemns LBRY & Odysee](/files/lunduke/condemn-odysee.md) +2021-08-09 06:30 +Md +7.9K +[src](https://odysee.com/condemn-odysee:2) +&&fod diff --git a/src/archives/index.md b/src/archives/index.md index e739663..8f29c30 100644 --- a/src/archives/index.md +++ b/src/archives/index.md @@ -7,81 +7,73 @@ A wide variety of files (not made by me) that are hosted on my server for digita *Work here is under no license. If you believe something is infringing on your Copyright/Copyleft, please [Contact Me](/about) immediately with a method, listed under the "Work contact" section.* - Scanned manual of the Soviet Analog Multimeter [43208-У](http://radioamator.ru/izmereniya/multimetry-testery/221-kombinirovannyj-pribor-43208-u-osobennosti-skhemy-i-remonta) (in russian) - - - - - - - - -
[Прибор электроизмерительный комбинированный типа 43208-У](/files/43208-У/43208-У.pdf)1991-10-14 00:00PDF35M
+&&fos +Scanned manual of the Soviet Analog Multimeter [43208-У](http://radioamator.ru/izmereniya/multimetry-testery/221-kombinirovannyj-pribor-43208-u-osobennosti-skhemy-i-remonta) (in russian) +&&fs0 + +[Прибор электроизмерительный комбинированный типа 43208-У](/files/43208-У/43208-У.pdf) +1991-10-14 00:00 +PDF +35M +&&fs +&&fod - [Bryan Lunduke](https://lunduke.substack.com/) || Odysee content - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Programmers can't play Nintendo games...](/files/lunduke/25a5dc.jpeg)2021-04-26 05:20JPEG217K[src](https://odysee.com/Lunduke-2021-04-25-SwitchCaseBreak:d)
[In Defense of Richard Stallman](/files/lunduke/200763902_DefenseofStallman.mp4)2021-03-24 08:30MP476M[src](https://odysee.com/DefenseofStallman:9)
[I'm giving up. Exiting Vim.](/files/lunduke/410260814_Lunduke-2021-04-28-ExitingVIM.jpg)2021-04-28 09:40JPEG110K[src](https://odysee.com/Lunduke-2021-04-28-ExitingVIM:1)
[Computers Should Be Fun](/files/lunduke/209398324_ComputersShouldBeFun.mp4)2021-03-12 03:00MP437M[src](https://odysee.com/ComputersShouldBeFun:9)
[IBM (and Red Hat) employees not allowed to use email for personal hobbies?](/files/lunduke/456567373_IBMHobbies.mp4)2021-04-21 02:30MP423M[src](https://odysee.com/IBMHobbies:9)
[The Windows 2000 Launch (and the party)](/files/lunduke/630259980_Win2KLaunch.mp4)2021-04-15 12:00MP450M[src](https://odysee.com/Win2KLaunch:d)
[Mozilla Firefox drops FTP. Focuses on DRM, Censorship](/files/lunduke/687036626_FirefoxDropsFTP.mp4)2021-04-21 02:20MP416M[src](https://odysee.com/FirefoxDropsFTP:f)
[Lunduke condemns LBRY & Odysee](/files/lunduke/condemn-odysee.md)2021-08-09 06:30Md7.9K[src](https://odysee.com/condemn-odysee:2)
+&&fos +[Bryan Lunduke](https://lunduke.substack.com/) || Odysee content +&&fs0 + +[Programmers can't play Nintendo games...](/files/lunduke/25a5dc.jpeg) +2021-04-26 05:20 +JPEG +217K +[src](https://odysee.com/Lunduke-2021-04-25-SwitchCaseBreak:d) +&&fs + +[In Defense of Richard Stallman](/files/lunduke/200763902_DefenseofStallman.mp4) +2021-03-24 08:30 +MP4 +76M +[src](https://odysee.com/DefenseofStallman:9) +&&fs + +[I'm giving up. Exiting Vim.](/files/lunduke/410260814_Lunduke-2021-04-28-ExitingVIM.jpg) +2021-04-28 09:40 +JPEG +110K +[src](https://odysee.com/Lunduke-2021-04-28-ExitingVIM:1) +&&fs + +[Computers Should Be Fun](/files/lunduke/209398324_ComputersShouldBeFun.mp4) +2021-03-12 03:00 +MP4 +37M +[src](https://odysee.com/ComputersShouldBeFun:9) +&&fs + +[IBM (and Red Hat) employees not allowed to use email for personal hobbies?](/files/lunduke/456567373_IBMHobbies.mp4) +2021-04-21 02:30 +MP4 +23M +[src](https://odysee.com/IBMHobbies:9) +&&fs + +[The Windows 2000 Launch (and the party)](/files/lunduke/630259980_Win2KLaunch.mp4) +2021-04-15 12:00 +MP4 +50M +[src](https://odysee.com/Win2KLaunch:d) +&&fs + +[Mozilla Firefox drops FTP. Focuses on DRM, Censorship](/files/lunduke/687036626_FirefoxDropsFTP.mp4) +2021-04-21 02:20 +MP4 +16M +[src](https://odysee.com/FirefoxDropsFTP:f) +&&fs + +[Lunduke condemns LBRY & Odysee](/files/lunduke/condemn-odysee.md) +2021-08-09 06:30 +Md +7.9K +[src](https://odysee.com/condemn-odysee:2) +&&fod diff --git a/src/docs.md b/src/docs.md index 4980c6c..33282fd 100644 --- a/src/docs.md +++ b/src/docs.md @@ -10,63 +10,56 @@ A list of documents that are made by me and are hosted on my server. **Със сигурност е възможно да има грешки и неточности във файловете, изполвайте внимателно!** - Алгебра 1 (Линейна алгебра, Зимен семестър, 2021/2022) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Домашна работа 1](/files/uni-work/algebra1/hw1-checked.pdf) (проверено)2021-11-12 00:00PDF116K
[Домашна работа 2](/files/uni-work/algebra1/hw2-checked.pdf) (проверено)2021-11-12 00:00PDF116K
[Домашна работа 3](/files/uni-work/algebra1/hw3-checked.pdf) (проверено)2022-01-03 00:00PDF151K
[Разписани теми](/files/uni-work/algebra1/topics.pdf) (за устен изпит)2022-02-05 00:00PDF281K
+&&fos +Алгебра 1 (Линейна алгебра, Зимен семестър, 2021/2022) +&&fs0 + +[Домашна работа 1](/files/uni-work/algebra1/hw1-checked.pdf) (проверено) +2021-11-12 00:00 +PDF +116K +&&fs + +[Домашна работа 2](/files/uni-work/algebra1/hw2-checked.pdf) (проверено) +2021-11-12 00:00 +PDF +116K +&&fs + +[Домашна работа 3](/files/uni-work/algebra1/hw3-checked.pdf) (проверено) +2022-01-03 00:00 +PDF +151K +&&fs + +[Разписани теми](/files/uni-work/algebra1/topics.pdf) (за устен изпит) +2022-02-05 00:00 +PDF +281K +&&fod - ДИС 1 (Диференциално и интегрално смятане, Зимен семестър, 2021/2022) - - - - - - - - - - - - - - - -
[Записки върху материала](/files/uni-work/dis1/notes.pdf)2022-01-15 10:00PDF116K
[Основни доказателства](/files/uni-work/dis1/notes-appendix.pdf)2022-01-31 15:14PDF105K
+&&fos +ДИС 1 (Диференциално и интегрално смятане, Зимен семестър, 2021/2022) +&&fs0 + +[Записки върху материала](/files/uni-work/dis1/notes.pdf) +2022-01-15 10:00 +PDF +116K +&&fs + +[Основни доказателства](/files/uni-work/dis1/notes-appendix.pdf) +2022-01-31 15:14 +PDF +105K +&&fod - ДСТР (Дискретни структури, Зимен семестър, 2021/2022) - - - - - - - - -
[Записки върху материала](/files/uni-work/dstr/notes.pdf)2022-01-15 10:00PDF97K
+&&fos +ДСТР (Дискретни структури, Зимен семестър, 2021/2022) +&&fs0 + +[Записки върху материала](/files/uni-work/dstr/notes.pdf) +2022-01-15 10:00 +PDF +97K +&&fod diff --git a/src/docs/index.md b/src/docs/index.md index 4980c6c..33282fd 100644 --- a/src/docs/index.md +++ b/src/docs/index.md @@ -10,63 +10,56 @@ A list of documents that are made by me and are hosted on my server. **Със сигурност е възможно да има грешки и неточности във файловете, изполвайте внимателно!** - Алгебра 1 (Линейна алгебра, Зимен семестър, 2021/2022) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Домашна работа 1](/files/uni-work/algebra1/hw1-checked.pdf) (проверено)2021-11-12 00:00PDF116K
[Домашна работа 2](/files/uni-work/algebra1/hw2-checked.pdf) (проверено)2021-11-12 00:00PDF116K
[Домашна работа 3](/files/uni-work/algebra1/hw3-checked.pdf) (проверено)2022-01-03 00:00PDF151K
[Разписани теми](/files/uni-work/algebra1/topics.pdf) (за устен изпит)2022-02-05 00:00PDF281K
+&&fos +Алгебра 1 (Линейна алгебра, Зимен семестър, 2021/2022) +&&fs0 + +[Домашна работа 1](/files/uni-work/algebra1/hw1-checked.pdf) (проверено) +2021-11-12 00:00 +PDF +116K +&&fs + +[Домашна работа 2](/files/uni-work/algebra1/hw2-checked.pdf) (проверено) +2021-11-12 00:00 +PDF +116K +&&fs + +[Домашна работа 3](/files/uni-work/algebra1/hw3-checked.pdf) (проверено) +2022-01-03 00:00 +PDF +151K +&&fs + +[Разписани теми](/files/uni-work/algebra1/topics.pdf) (за устен изпит) +2022-02-05 00:00 +PDF +281K +&&fod - ДИС 1 (Диференциално и интегрално смятане, Зимен семестър, 2021/2022) - - - - - - - - - - - - - - - -
[Записки върху материала](/files/uni-work/dis1/notes.pdf)2022-01-15 10:00PDF116K
[Основни доказателства](/files/uni-work/dis1/notes-appendix.pdf)2022-01-31 15:14PDF105K
+&&fos +ДИС 1 (Диференциално и интегрално смятане, Зимен семестър, 2021/2022) +&&fs0 + +[Записки върху материала](/files/uni-work/dis1/notes.pdf) +2022-01-15 10:00 +PDF +116K +&&fs + +[Основни доказателства](/files/uni-work/dis1/notes-appendix.pdf) +2022-01-31 15:14 +PDF +105K +&&fod - ДСТР (Дискретни структури, Зимен семестър, 2021/2022) - - - - - - - - -
[Записки върху материала](/files/uni-work/dstr/notes.pdf)2022-01-15 10:00PDF97K
+&&fos +ДСТР (Дискретни структури, Зимен семестър, 2021/2022) +&&fs0 + +[Записки върху материала](/files/uni-work/dstr/notes.pdf) +2022-01-15 10:00 +PDF +97K +&&fod diff --git a/src/img/folder-minus-tabler.svg b/src/img/folder-minus-tabler.svg new file mode 100644 index 0000000..a391c46 --- /dev/null +++ b/src/img/folder-minus-tabler.svg @@ -0,0 +1,58 @@ + + + + + Download more icon variants from https://tabler-icons.io/i/folder-minus + + + + diff --git a/src/img/folder-plus-tabler.svg b/src/img/folder-plus-tabler.svg new file mode 100644 index 0000000..ede9b24 --- /dev/null +++ b/src/img/folder-plus-tabler.svg @@ -0,0 +1,65 @@ + + + + + Download more icon variants from https://tabler-icons.io/i/folder-plus + + + + + diff --git a/src/index.md b/src/index.md deleted file mode 100644 index 46ad95b..0000000 --- a/src/index.md +++ /dev/null @@ -1,34 +0,0 @@ -# Welcome - ---- ---- - -
- -
-

Hello! My name is Kamen Mladenov and I am a computer science student.

-

This is my website and personal playing ground. Currently it only hosts some articles and documnets, but hopefully there will be much more in the future.

-

- Mozilla Observatory - Security Headers - HSTS -
- - Created With VIM - W3C Valid HTML - W3C Valid CSS -
- - -

-
-
- -

- -||| -|---|---| -|About the website| [Website policies](/policies.html) \|\| [Detailed usage of JavaScript](/regarding-js.html) \|\| [License](/license.html) \|\| [Acknowledgements](/acknowledgements.html)| -|Services|[Digital preservation (Archives)](/archives)| -|Content by me|[Documents](/docs) \|\| [Blog](/blog) \|\| [Tutorials](/tutorials)| -||| diff --git a/src/styles.css b/src/styles.css index 06c308e..66cb5e1 100644 --- a/src/styles.css +++ b/src/styles.css @@ -375,12 +375,33 @@ blockquote > :last-child { /* File tables */ +.file-wrapper { + margin: 0.5em 0; +} + +.file-wrapper > summary { + background: url('/img/folder-plus-tabler.svg') no-repeat left top; + list-style: none; + padding-left: 1.5em; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.file-wrapper[open] > summary { + background: url('/img/folder-minus-tabler.svg') no-repeat left top; +} + +.file-wrapper > summary:hover { + cursor: pointer; +} + .file-list { table-layout: auto; border-collapse: collapse; margin-left: 1.5em; width: auto; - margin-top: -0.9em; } .file-list td, .file-list tr { -- cgit v1.3.1-26-gb76a