From e80e02cb52f4d7d67b257a5f72e7fbe28c5b74f9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 10 Aug 2024 15:31:25 +0300 Subject: feat!: Removed CSMA, made minor styling changes --- src/scripts/expand-navbar.js | 8 ++++---- src/scripts/page-width.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/expand-navbar.js b/src/scripts/expand-navbar.js index 4cea31c..988d211 100644 --- a/src/scripts/expand-navbar.js +++ b/src/scripts/expand-navbar.js @@ -1,15 +1,15 @@ const expandBtn = document.getElementById('expandNavbarBtn'); -const sidebarElem = document.getElementById('sidebar'); +const wrapperElem = document.getElementById('content-wrapper'); if (localStorage.getItem('navbar') === 'hidden' || window.innerWidth <= 610 || window.innerHeight <= 610) { expandBtn.innerText = '\u25BC'; - sidebarElem.classList.add('sidebar-hidden'); + wrapperElem.classList.add('content-wrapper-vertical'); } expandBtn.onclick = function() { - sidebarElem.classList.toggle('sidebar-hidden'); + wrapperElem.classList.toggle('content-wrapper-vertical'); - if (!sidebarElem.classList.contains('sidebar-hidden')) { + if (!wrapperElem.classList.contains('content-wrapper-vertical')) { expandBtn.innerText = '\u25B2'; // triangle pointing up if (window.innerWidth > 610) localStorage.setItem('navbar', 'norm'); } diff --git a/src/scripts/page-width.js b/src/scripts/page-width.js index 784c0f2..353dc4d 100644 --- a/src/scripts/page-width.js +++ b/src/scripts/page-width.js @@ -4,11 +4,11 @@ const articleElem = document.getElementsByTagName('article')[0]; if (localStorage.getItem('width') === 'wide') { widthLabel.innerText = 'Narrow'; - articleElem.classList.add('noMaxWidth'); + articleElem.classList.add('article-wide'); } widthBtn.onclick = function() { - articleElem.classList.toggle('noMaxWidth'); + articleElem.classList.toggle('article-wide'); if (localStorage.getItem('width') !== 'norm') { widthLabel.innerText = 'Wide'; -- cgit v1.3.1-23-gd82d From 3042828975df7cce9a5419d9b1d58a3d11dc142d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 10 Aug 2024 15:36:07 +0300 Subject: feat(keyboard.js): Added width and expand toggle key shortcuts --- src/index.md | 2 ++ src/scripts/keyboard.js | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/scripts') diff --git a/src/index.md b/src/index.md index 6d99115..117f509 100644 --- a/src/index.md +++ b/src/index.md @@ -27,6 +27,8 @@ Have a look around and enjoy your stay! |Key|Available|Action| |---|---------|------| |C |Everywhere|Toggles the theme between light and dark| +|W |Everywhere|Toggles the page width| +|E |Everywhere|Expands/shrinks the sidebar| |K, Backspace, PageUp, Left arrow, Up arrow|Presentations|Go to previous slide| |J, Spacebar, Enter key, PageDown, Right arrow, Down arrow|Presentations|Go to next slide| |P, T|Presentations|Start or stop (toggle) presenting| diff --git a/src/scripts/keyboard.js b/src/scripts/keyboard.js index bacbea1..1de93cf 100644 --- a/src/scripts/keyboard.js +++ b/src/scripts/keyboard.js @@ -2,11 +2,16 @@ document.addEventListener('keydown', function (e) { if (e.ctrlKey) return; switch (e.code) { - /* theme-changer.js */ - case 'KeyC': + case 'KeyC': // theme-changer.js themeBtn.click(); break; + case 'KeyW': // page-width.js + widthBtn.click(); + break; + case 'KeyE': // expand-navbar.js + expandBtn.click(); + break; /* presentation.js */ -- cgit v1.3.1-23-gd82d From edc8dc145e584302f81a11ca87efb1fb9a3f8ae3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 10 Aug 2024 15:40:03 +0300 Subject: fix(image-show)!: Removed feature Styling was already removed --- src/_footer.html | 1 - src/about.md | 6 +++--- src/about/index.md | 6 +++--- src/acknowledgements.md | 2 +- src/index.md | 12 ++++++------ src/scripts/image-show.js | 24 ------------------------ 6 files changed, 13 insertions(+), 38 deletions(-) delete mode 100644 src/scripts/image-show.js (limited to 'src/scripts') diff --git a/src/_footer.html b/src/_footer.html index 61bf08d..605da32 100644 --- a/src/_footer.html +++ b/src/_footer.html @@ -8,7 +8,6 @@ - diff --git a/src/about.md b/src/about.md index 964393e..ecc4fd0 100644 --- a/src/about.md +++ b/src/about.md @@ -1,10 +1,10 @@ # About Me **Contact me casually** -: syndamia@protonmail.com PGP key
kamen.s@syndamia.com PGP key *(for this one, make sure to check your spam folder!)* +: syndamia@protonmail.com PGP key
kamen.s@syndamia.com PGP key *(for this one, make sure to check your spam folder!)* **Contact me about work and projects I'm maintaining** -: kamen.d.mladenov@protonmail.com PGP key
kamen@syndamia.com PGP key *(for this one, make sure to check your spam folder!)*
[linkedin.com/in/kamen-mladenov](https://www.linkedin.com/in/kamen-mladenov/) +: kamen.d.mladenov@protonmail.com PGP key
kamen@syndamia.com PGP key *(for this one, make sure to check your spam folder!)*
[linkedin.com/in/kamen-mladenov](https://www.linkedin.com/in/kamen-mladenov/) **Resume** : [Български](/files/resume-bg.pdf) | [English](/files/resume-en.pdf) @@ -13,7 +13,7 @@ ### Antibio [(opposite of bio, and much more fun)](https://www.brendangregg.com/antibio.html) - + I'm a [university](https://www.fmi.uni-sofia.bg/en) student and general computer nerd. My current interests include: operating systems, functional programming, webdev (without **any** libraries, pure JavaScript), old tech, some amount of server administration and a teeny weeny bit of computer history. diff --git a/src/about/index.md b/src/about/index.md index 964393e..ecc4fd0 100644 --- a/src/about/index.md +++ b/src/about/index.md @@ -1,10 +1,10 @@ # About Me **Contact me casually** -: syndamia@protonmail.com PGP key
kamen.s@syndamia.com PGP key *(for this one, make sure to check your spam folder!)* +: syndamia@protonmail.com PGP key
kamen.s@syndamia.com PGP key *(for this one, make sure to check your spam folder!)* **Contact me about work and projects I'm maintaining** -: kamen.d.mladenov@protonmail.com PGP key
kamen@syndamia.com PGP key *(for this one, make sure to check your spam folder!)*
[linkedin.com/in/kamen-mladenov](https://www.linkedin.com/in/kamen-mladenov/) +: kamen.d.mladenov@protonmail.com PGP key
kamen@syndamia.com PGP key *(for this one, make sure to check your spam folder!)*
[linkedin.com/in/kamen-mladenov](https://www.linkedin.com/in/kamen-mladenov/) **Resume** : [Български](/files/resume-bg.pdf) | [English](/files/resume-en.pdf) @@ -13,7 +13,7 @@ ### Antibio [(opposite of bio, and much more fun)](https://www.brendangregg.com/antibio.html) - + I'm a [university](https://www.fmi.uni-sofia.bg/en) student and general computer nerd. My current interests include: operating systems, functional programming, webdev (without **any** libraries, pure JavaScript), old tech, some amount of server administration and a teeny weeny bit of computer history. diff --git a/src/acknowledgements.md b/src/acknowledgements.md index d5ad17b..3d0ae3e 100644 --- a/src/acknowledgements.md +++ b/src/acknowledgements.md @@ -26,7 +26,7 @@ [Cari D. Burstein](https://www.anybrowser.org/cdaveb/) : For his [Viewable with Any Browser](https://www.anybrowser.org/campaign/index.html) comapign and the awesome [provided badges](https://www.anybrowser.org/campaign/abgraphics.html) -[RusticCyberpunk/cypnk](https://sh2.us/) +[RusticCyberpunk/cypnk](https://sh2.us/) : For his [archive](https://sh2.us/buttons/) of [Taylor McKnight's](https://gtmcknight.com/) collection of buttons [Adam Kalsey](https://kalsey.com/) diff --git a/src/index.md b/src/index.md index 117f509..c4da21c 100644 --- a/src/index.md +++ b/src/index.md @@ -15,12 +15,12 @@ Have a look around and enjoy your stay!
-Created With VIM -Viewable With Any Browser -Spyware Watchdog -Mozilla Observatory Score -Security Headers Score -SSL Report +Created With VIM +Viewable With Any Browser +Spyware Watchdog +Mozilla Observatory Score +Security Headers Score +SSL Report ### Keyboard navigation (requires javascript) diff --git a/src/scripts/image-show.js b/src/scripts/image-show.js deleted file mode 100644 index 8664ef4..0000000 --- a/src/scripts/image-show.js +++ /dev/null @@ -1,24 +0,0 @@ -let scrollPosition = 0; - -function clickToView() { - if (scrollPosition === 0) { - scrollPosition = window.scrollY; - window.scrollTo(0, 0); - } - - this.classList.toggle('clicked-image'); - document.body.classList.toggle('body-on-clicked-image'); - - if (!this.classList.contains('clicked-image')) { - window.scrollTo(0, scrollPosition); - scrollPosition = 0; - } -} - -const images = document.getElementsByTagName('img'); - -for (const image of images) { - if (image.alt !== '🔗' && !image.classList.contains('unzoomable')) { - image.onclick = clickToView; - } -} -- cgit v1.3.1-23-gd82d