diff --git a/content-org/.dir-locals.el b/.dir-locals.el similarity index 100% rename from content-org/.dir-locals.el rename to .dir-locals.el diff --git a/content-org/posts/summer_2023_projects.org b/content-org/posts/summer_2023_projects.org index a7b232d..8c6ca3e 100644 --- a/content-org/posts/summer_2023_projects.org +++ b/content-org/posts/summer_2023_projects.org @@ -1,5 +1,7 @@ #+TITLE: My Little Techy Projects Summer 2023 #+date: 2023-09-20 +#+OPTIONS: toc:nil +#+HUGO_AUTO_SET_LASTMOD: t #+hugo_base_dir: ../../ #+hugo_section: posts #+HUGO_MENU: :menu "posts" @@ -28,7 +30,7 @@ Not gonna lie I had an extremely baller summer and I'm sad that the 21st is comi I hacked my day 1 Switch with a piece of literal tinfoil. ** Some boring skippable personal info -For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, many well known members of the community having been outed for sexual misconduct around this time and the ensuing aftermath was a further deterrent from ever wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend's place. +For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, wider community controversy and its ensuing aftermath gave me a more negative view of the scene which deterred me from wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend's place. ** @@html:@@Actual Switch hacks I know that the switch modding scene has had the past 6-7 years to mature but I did not expect it to be this easy. Of course, I reccommend following a written guide that's constantly updated (such as the [[https://rentry.co/SwitchHackingIsEasy][rentry]] guide) to avoid bricking your device, but it really wasn't that complicated [[cite:Reentry]]. The basics of the hack are to short two pins in the right joycon rail and presing the + and power button to put the device in recovery mode (RCM), which I did using a literal peice of tinfoil, though there are RCM jig devices on amazon that are easier to use. Burned onto the Tegra bootROM on all early Switches has a buffer overflow vulnerability that allows hackers to slip by the bootloader signature check, allowing unsigned payloads to be pushed to the device [[cite:Fusee]]. diff --git a/content/posts/summer_2023_projects.md b/content/posts/summer_2023_projects.md index 5cbb87c..f18a8e4 100644 --- a/content/posts/summer_2023_projects.md +++ b/content/posts/summer_2023_projects.md @@ -2,6 +2,7 @@ title = "My Little Techy Projects Summer 2023" summary = "I did some fun stuff this summer, including hacking my switch, switching to Qubes OS, and switching to OpenWRT on my router. Overall, a lot of switching." date = 2023-09-20 +lastmod = 2024-02-18T14:37:19-05:00 tags = ["technology", "personal", "qubes-os", "openwrt", "switch"] draft = false [menu] @@ -26,7 +27,7 @@ I hacked my day 1 Switch with a piece of literal tinfoil. ### Some boring skippable personal info {#some-boring-skippable-personal-info} -For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, many well known members of the community having been outed for sexual misconduct around this time and the ensuing aftermath was a further deterrent from ever wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend's place. +For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, wider community controversy and its ensuing aftermath gave me a more negative view of the scene which deterred me from wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend's place. ### Actual Switch hacks {#img-src-images-blog-reentry-racoon-dot-png-width-10-actual-switch-hacks} diff --git a/content/setup/_index.md b/content/setup/_index.md deleted file mode 100644 index ed45731..0000000 --- a/content/setup/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -+++ -title = "My Setup" -author = ["Jordan Herzstein"] -date = 2024-02-06 -draft = false -[menu] - [menu.setup] - identifier = "my-setup" -+++ - -## VPC Setup {#vpc-setup} - -I'm currently using a ROCKpro64 with it's respective NAS case and PCI-e SSD interface card. It runs DietPi, which is a distrobution of Debian optimized for arm SBCs. - -I also have a lynksys router at home that I use to run openwrt for it's security, performance, and customizability, especially compared to the default modems provided by ISPs. - - -## Personal Computer / Hardware {#personal-computer-hardware} - -Right now I'm mosting using a Thinkpad T430 running Qubes OS with an i7-3840QM and 16GB of RAM that I corebooted myself. Last year I was daily-driving a [librebooted](https://libreboot.org/) ThinkPad T400, [specially modded](https://vid.puffyan.us/watch?v=Fs4GjDiOie8) with a quad core CPU. It runs Debian 12, and I'm guessing the only non-free software running on it is the trackpad firmware. I also have a ThinkPad P15s that dual boots Arch Linux and Windows 10. I generally use this machine a lot less because the keyboard and mouse are broken and I haven't bothered to get it fixed for the past year and a half. I like listening to music while I study or run, for that I use an ipod nano 2g with [RockBox](https://www.rockbox.org/), a free firmware replacement for music players that can also play Doom. Recently I've been loading a lot of books, manga, and even school materials onto my Kobo Libra 2 (which I keep offline). It's has been really nice on my eyes, maybe I'll get around to trying the [PineNote](https://www.pine64.org/pinenote/) for it's full consumer release. - - -## Cell Phone {#cell-phone} - -I own an unlocked Pixel 7 running [GrapheneOS](https://grapheneos.org). Yes, I do enjoy the premium degoogled android experience on Google's very own hardware. Regardless, the stuff that the GrapheneOS team are doing is very impressive, if you're interested in using it make sure you purchase a compatable pixel device that is **unlocked**. - - -## Software {#software} - -In terms of software, Emacs is a huge part of my productivity environment, and acts as my IDE, document writer, RSS feed, and I even made this site with it! I of course use evil mode due to the extramarital affair I have with Vim. I've used a couple of window managers including dwm and awesomewm, but I'm sure I'll get to using wayland one of these years. My shell is bash, never really bothered to use anything else really. For browsing I use Librewolf, a fork of Firefox with more privacy protections by default. diff --git a/public/404.html b/public/404.html index b9b24fa..ef5eaee 100644 --- a/public/404.html +++ b/public/404.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/404/index.html b/public/404/index.html index 434f2dd..667ae17 100644 --- a/public/404/index.html +++ b/public/404/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/_404/index.html b/public/_404/index.html index 434f2dd..667ae17 100644 --- a/public/_404/index.html +++ b/public/_404/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/categories/index.html b/public/categories/index.html index 3af1863..4e77d7f 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/contact/index.html b/public/contact/index.html index 80380d4..9e72e80 100644 --- a/public/contact/index.html +++ b/public/contact/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/css/style.css b/public/css/style.css index 19ad1ef..d2551d5 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -3,11 +3,11 @@ html{ color:#dcdfe4; margin: auto; } + body { - font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } - .menu-container{ text-align: center; font-size: 1.2em; @@ -17,6 +17,19 @@ body { background-color: #282c34; } +.menu-nav ul { + display: flex; + flex-wrap: wrap; + list-style: none; + flex-row: row wrap; + justify-content: flex-start; + margin: auto var(--gap); +} + +.nav { + line-height: var(--header-height); +} + .page{ max-width: 750px; width: 90%; @@ -81,7 +94,7 @@ h4 { .content__body > p:first-of-type::first-letter { - font-size: 3.15em; + font-size: 3.0em; margin-right: 0.05em; font-weight: bold; float: left; @@ -98,9 +111,6 @@ h4 { text-decoration: underline; } -.tag { -} - pre { border: 1px solid ; background-color: #282c34; @@ -159,6 +169,20 @@ br { font-size: 0.9em; } + + +.ox-hugo-toc{ + font-size: 0.9em; + background-color: #21252B; + border: 1px solid ; + border-radius: .35em; + box-shadow: 4px 4px #dcdfe4; +} + +.ox-hugo-toc.toc{ + padding: .575em; +} + .tags{ background-color: #21252B; color: #61afef; diff --git a/public/index.html b/public/index.html index c4f2ca8..59bc8a1 100644 --- a/public/index.html +++ b/public/index.html @@ -17,11 +17,12 @@

Jordan Herzstein

setup - projects - - + - contact + @@ -29,6 +30,7 @@

Jordan Herzstein

+

Welcome

Hello, my name is Jordan, I’m a Computer Engineering student from Canada. I like all things FOSS, cybersecurity, server administration, selfhosting, thinkpads, and more. These past few years I’ve been living and breathing Linux, from desktop, server, and embedded, with some knowledge of Windows (desktop and server) and Android. Most of my programming experience is in bash, Python, and C/C++. Familiar with Java, SQL, Go, and PHP.

This is my website, I sometimes write blogs and technical guides. It is a very minimal static site with html and css, but this way my site is fast, responsive, and to the point. I can say that everything here is created and owned by me, not just as a creative outlet, but so every facet of my online existance is under my control. I engage very little with social media. I value understanding and being able to control my technology, which fuels my passion to learn new things all the time.

When I’m not in front of glowing rectangles made of polarized sheets and crystals, I like to swim, I’m also taking part in my school’s Brazillian Jiu Jitsu club. During COVID I stopped gaming entirely but more recently I’ve given a shot attending my local SSBU tournaments.

diff --git a/public/mysetup/index.html b/public/mysetup/index.html index 73a14a9..6223073 100644 --- a/public/mysetup/index.html +++ b/public/mysetup/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/posts/caps2esc/index.html b/public/posts/caps2esc/index.html index 291e09b..174db48 100644 --- a/public/posts/caps2esc/index.html +++ b/public/posts/caps2esc/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + @@ -44,7 +45,33 @@

Mapping Caps Lock to Esc and CTRL in Xorg

#tutorial -
+
+
+
+ + Table of Contents + + + +
+
+
+

The Emacs editor was designed in the 1980’s in the era of old unix keyboards when the control key was next to the “A” key, a lot of functionality in Emacs was designed around CTRL keybindings. While there are hobbyist keyboards for that kind of layout, no real usable laptop these days would oblige without some serious changes. This has had the undesireable outcome of exasterbating repetitive strain injury (RSI) in some pretty famous programmers(Lee 2022).

Now I’m regularly using evil mode to edit files with Emacs so it shouldn’t be as big of an issue for someone like myself, however, I’m not interesting in running the risk having RSI on my pinky by the time I’m 50 because I used C-x C-f too many times. One solution would be switching to Doom or Spacemacs or otherwise changing my init.el file in emacs to use the control key much less. Many people use xmonad to change keyboard layouts as well. However, I feel like those solutions are a bit overkill, and I found a decent solution for my case without having to change very much about my system using xkb, which is how keyboard codes are handled in Xorg(Unknown 2024).

The Guide

diff --git a/public/posts/index.html b/public/posts/index.html index 6cd9b69..cc48c83 100644 --- a/public/posts/index.html +++ b/public/posts/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact
+ diff --git a/public/posts/nyaa_menu/index.html b/public/posts/nyaa_menu/index.html index 0ae2778..df94b79 100644 --- a/public/posts/nyaa_menu/index.html +++ b/public/posts/nyaa_menu/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + @@ -44,7 +45,8 @@

nyaa_menu

#manga -
+
+
diff --git a/public/posts/skiffdead/index.html b/public/posts/skiffdead/index.html index e08042e..8674991 100644 --- a/public/posts/skiffdead/index.html +++ b/public/posts/skiffdead/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact
+ @@ -47,7 +48,8 @@

Skiff is Dead 🤡

#proton -
+
+
diff --git a/public/posts/summer_2023_projects/index.html b/public/posts/summer_2023_projects/index.html index 67ba080..c36d2dc 100644 --- a/public/posts/summer_2023_projects/index.html +++ b/public/posts/summer_2023_projects/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact
+ @@ -47,7 +48,37 @@

My Little Techy Projects Summer 2023

#switch -
+
+

Not gonna lie I had an extremely baller summer and I’m sad that the 21st is coming soon to take it away from me. Regardless, here is a quick summary of what I was able to accomplish:

@@ -58,7 +89,7 @@

My Little Techy Projects Summer 2023

Switch hacks

I hacked my day 1 Switch with a piece of literal tinfoil.

Some boring skippable personal info

-

For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, many well known members of the community having been outed for sexual misconduct around this time and the ensuing aftermath was a further deterrent from ever wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend’s place.

+

For some reason, while everyone doubled down on gaming extra during the COVID years, I stopped almost entirely. I used to play smash bros competitively as a kid, almost exclusively to any other game and when COVID happened I was no longer able to attend tournaments. This coupled with getting sick of the Nintendo Switch online service and I was no longer having fun playing. Additionally, wider community controversy and its ensuing aftermath gave me a more negative view of the scene which deterred me from wanting to return. Pretty much quit after that, and since I was not really into any other kinds of games I stopped gaming for a couple of years unless I was at a friend’s place.

Actual Switch hacks

I know that the switch modding scene has had the past 6-7 years to mature but I did not expect it to be this easy. Of course, I reccommend following a written guide that’s constantly updated (such as the rentry guide) to avoid bricking your device, but it really wasn’t that complicated (Unknown 2021). The basics of the hack are to short two pins in the right joycon rail and presing the + and power button to put the device in recovery mode (RCM), which I did using a literal peice of tinfoil, though there are RCM jig devices on amazon that are easier to use. Burned onto the Tegra bootROM on all early Switches has a buffer overflow vulnerability that allows hackers to slip by the bootloader signature check, allowing unsigned payloads to be pushed to the device (Qyriad 2018).

So far I’ve installed Atmosphere and Android on the switch with the extra microSD storage that I added, and allowing some old nintendo DS emulation as well. As an aside, BW and B2W2 were the peak of the entire franchise, with HGSS being a close second, anyone who disagrees with me here is wrong by every objective measure. Also, by complete coincidence the new Zelda game leaked the next day. I also just so happened to beat the final boss day of launch which I also started to play day of launch. Hmmmm… curious.

diff --git a/public/posts/thingstocome/index.html b/public/posts/thingstocome/index.html index c6a4e5d..e9fb8d5 100644 --- a/public/posts/thingstocome/index.html +++ b/public/posts/thingstocome/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact
+ @@ -41,7 +42,8 @@

Hugo and other site changes

#updates -
+
+

I recreated my site using ox-hugo to generate tags and the site’s rss feed much more easily as it was a pain before. Every time I’ve wanted to make a post it’s been friction getting it to work with pure org mode + elisp and I don’t want to fight this site just to post something or else I won’t post anything at all. Embarrassingly, it seems that I was using a non-web-safe font for quite some time, meaning some browsers weren’t supported, I appologize to any MacOS users viewing my site who had to deal with my terrible choice of typography. I’m also tired of the long url name so I’ve mirrored my site on github pages with custom domain jordanherzstein.xyz (I know microsoft is evil sue me). I’ve already been selfhosting stuff locally for a while though I’m not bothering with anything public if unless I proxy my site as to not reveal my ip address. Neocities will stay for now, I have no explicit plans to leave, though if I ever add javascript to this site I will be saying goodbye.

diff --git a/public/sitemap.xml b/public/sitemap.xml index 0281c24..c51205b 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -18,10 +18,10 @@ 2024-02-11T00:00:00+00:00 /tags/technology/ - 2024-02-11T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 / - 2024-02-11T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /tags/github/ 2024-02-09T00:00:00+00:00 @@ -37,9 +37,6 @@ /mysetup/ 2024-02-06T00:00:00+00:00 - - /setup/ - 2024-02-06T00:00:00+00:00 /tags/anime/ 2023-10-07T00:00:00+00:00 @@ -54,19 +51,19 @@ 2023-10-07T00:00:00+00:00 /posts/summer_2023_projects/ - 2023-09-20T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /tags/openwrt/ - 2023-09-20T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /tags/personal/ - 2023-09-20T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /tags/qubes-os/ - 2023-09-20T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /tags/switch/ - 2023-09-20T00:00:00+00:00 + 2024-02-18T14:37:19-05:00 /posts/ 2023-02-01T00:00:00+00:00 diff --git a/public/tags/anime/index.html b/public/tags/anime/index.html index 4db2c62..06e2770 100644 --- a/public/tags/anime/index.html +++ b/public/tags/anime/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact
+ diff --git a/public/tags/clown-moment/index.html b/public/tags/clown-moment/index.html index f2a9728..03d39f7 100644 --- a/public/tags/clown-moment/index.html +++ b/public/tags/clown-moment/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/emacs/index.html b/public/tags/emacs/index.html index b9d2614..5cf1838 100644 --- a/public/tags/emacs/index.html +++ b/public/tags/emacs/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/email/index.html b/public/tags/email/index.html index 916c1fe..041fb9d 100644 --- a/public/tags/email/index.html +++ b/public/tags/email/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/github/index.html b/public/tags/github/index.html index d552825..eb2a230 100644 --- a/public/tags/github/index.html +++ b/public/tags/github/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/hugo/index.html b/public/tags/hugo/index.html index 406c30d..db004ec 100644 --- a/public/tags/hugo/index.html +++ b/public/tags/hugo/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/index.html b/public/tags/index.html index 1fd6ce6..ca169c8 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/manga/index.html b/public/tags/manga/index.html index 4d48572..3855c80 100644 --- a/public/tags/manga/index.html +++ b/public/tags/manga/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/openwrt/index.html b/public/tags/openwrt/index.html index ca2ccfa..8d84db7 100644 --- a/public/tags/openwrt/index.html +++ b/public/tags/openwrt/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/personal/index.html b/public/tags/personal/index.html index c06a699..0ab9670 100644 --- a/public/tags/personal/index.html +++ b/public/tags/personal/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/projects/index.html b/public/tags/projects/index.html index 24c11f4..d18fbdd 100644 --- a/public/tags/projects/index.html +++ b/public/tags/projects/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/proton/index.html b/public/tags/proton/index.html index 7b5fdcf..dfad6c4 100644 --- a/public/tags/proton/index.html +++ b/public/tags/proton/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/qubes-os/index.html b/public/tags/qubes-os/index.html index 37d42bf..4fec537 100644 --- a/public/tags/qubes-os/index.html +++ b/public/tags/qubes-os/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/skiff/index.html b/public/tags/skiff/index.html index 4a60202..0a9bf07 100644 --- a/public/tags/skiff/index.html +++ b/public/tags/skiff/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/switch/index.html b/public/tags/switch/index.html index 0209062..28e7919 100644 --- a/public/tags/switch/index.html +++ b/public/tags/switch/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/technology/index.html b/public/tags/technology/index.html index 5f453c6..20da8fc 100644 --- a/public/tags/technology/index.html +++ b/public/tags/technology/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/tutorial/index.html b/public/tags/tutorial/index.html index 6509cfe..9087153 100644 --- a/public/tags/tutorial/index.html +++ b/public/tags/tutorial/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/updates/index.html b/public/tags/updates/index.html index 05f744e..dc9b15e 100644 --- a/public/tags/updates/index.html +++ b/public/tags/updates/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/public/tags/x11/index.html b/public/tags/x11/index.html index 0195582..d44ec86 100644 --- a/public/tags/x11/index.html +++ b/public/tags/x11/index.html @@ -16,11 +16,12 @@

Jordan Herzstein

setup - projects - - + - contact + diff --git a/themes/jugo/layouts/index.html b/themes/jugo/layouts/index.html index c346e42..357e979 100644 --- a/themes/jugo/layouts/index.html +++ b/themes/jugo/layouts/index.html @@ -1,4 +1,5 @@ {{ define "main" }} +

{{ .Title }}

{{ .Content }} {{ end }} diff --git a/themes/jugo/layouts/partials/header.html b/themes/jugo/layouts/partials/header.html index 1ac4a1f..92a78b6 100644 --- a/themes/jugo/layouts/partials/header.html +++ b/themes/jugo/layouts/partials/header.html @@ -9,8 +9,20 @@ setup - projects - - + - contact + diff --git a/themes/jugo/layouts/partials/toc.html b/themes/jugo/layouts/partials/toc.html new file mode 100644 index 0000000..efdeefe --- /dev/null +++ b/themes/jugo/layouts/partials/toc.html @@ -0,0 +1,99 @@ +{{- $headers := findRE "(.|\n])+?" .Content -}} +{{- $has_headers := ge (len $headers) 1 -}} +{{- if $has_headers -}} +
+
+
+ + {{- i18n "toc" | default "Table of Contents" }} + + +
+ {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} + {{- $largest := 6 -}} + {{- range $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + {{- if lt $headerLevel $largest -}} + {{- $largest = $headerLevel -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} + + {{- $.Scratch.Set "bareul" slice -}} +
    + {{- range seq (sub $firstHeaderLevel $largest) -}} +
      + {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}} + {{- end -}} + {{- range $i, $header := $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + + {{/* get id="xyz" */}} + {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }} + + {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}} + {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }} + {{- $header := replaceRE "((.|\n])+?)" "$1" $header -}} + + {{- if ne $i 0 -}} + {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}} + {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}} + {{- if gt $headerLevel $prevHeaderLevel -}} + {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}} +
        + {{/* the first should not be recorded */}} + {{- if ne $prevHeaderLevel . -}} + {{- $.Scratch.Add "bareul" . -}} + {{- end -}} + {{- end -}} + {{- else -}} + + {{- if lt $headerLevel $prevHeaderLevel -}} + {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}} + {{- if in ($.Scratch.Get "bareul") . -}} +
      + {{/* manually do pop item */}} + {{- $tmp := $.Scratch.Get "bareul" -}} + {{- $.Scratch.Delete "bareul" -}} + {{- $.Scratch.Set "bareul" slice}} + {{- range seq (sub (len $tmp) 1) -}} + {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}} + {{- end -}} + {{- else -}} +
    + + {{- end -}} + {{- end -}} + {{- end -}} + {{- end }} +
  • + {{- $header | safeHTML -}} + {{- else }} +
  • + {{- $header | safeHTML -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := $largest }} + {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} +
  • + {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} + {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} +
+ {{- else }} + + + {{- end -}} + {{- end }} + + {{- end }} +
+
+
+
+{{- end }} diff --git a/themes/jugo/layouts/posts/single.html b/themes/jugo/layouts/posts/single.html index 1a50446..ce98d8a 100644 --- a/themes/jugo/layouts/posts/single.html +++ b/themes/jugo/layouts/posts/single.html @@ -13,6 +13,8 @@

{{ .Title | markdownify }}

{{- end -}} {{- end -}} +
+ {{- partial "toc.html" . -}}
{{ .Content }}
diff --git a/themes/jugo/static/css/style.css b/themes/jugo/static/css/style.css index 19ad1ef..d2551d5 100644 --- a/themes/jugo/static/css/style.css +++ b/themes/jugo/static/css/style.css @@ -3,11 +3,11 @@ html{ color:#dcdfe4; margin: auto; } + body { - font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } - .menu-container{ text-align: center; font-size: 1.2em; @@ -17,6 +17,19 @@ body { background-color: #282c34; } +.menu-nav ul { + display: flex; + flex-wrap: wrap; + list-style: none; + flex-row: row wrap; + justify-content: flex-start; + margin: auto var(--gap); +} + +.nav { + line-height: var(--header-height); +} + .page{ max-width: 750px; width: 90%; @@ -81,7 +94,7 @@ h4 { .content__body > p:first-of-type::first-letter { - font-size: 3.15em; + font-size: 3.0em; margin-right: 0.05em; font-weight: bold; float: left; @@ -98,9 +111,6 @@ h4 { text-decoration: underline; } -.tag { -} - pre { border: 1px solid ; background-color: #282c34; @@ -159,6 +169,20 @@ br { font-size: 0.9em; } + + +.ox-hugo-toc{ + font-size: 0.9em; + background-color: #21252B; + border: 1px solid ; + border-radius: .35em; + box-shadow: 4px 4px #dcdfe4; +} + +.ox-hugo-toc.toc{ + padding: .575em; +} + .tags{ background-color: #21252B; color: #61afef;