Digital Garden Tweaks

I have made some minor modifications to the Digital Garden template that I wanted to share here. They aren't anything crazy but just a few things that I think improve the usability of the website.

Zoombox

You may have noticed that if you click on an image on my site, it pops up and zooms in so you can see it better. This is not a default behavior and requires a few .css and .js additions.

You will have to add three files in the below directories. The docs layout specific locations to put .css and .js so that it will survive template updates.

Navigate to the Code section of your repo in Github. Place the following snippets in their respective directories and commit the changes. Some of the directories may not exist so you will have to create them first. Once you have added all three, refresh your page and you should have Zoombox!

Hard Refresh in Chrome

Cmd + Shift + R in Chrome will do a hard refresh of a site and clear any site data. If Zoombox doesn't immediately work, try this!

Contact form

Formspree

I wanted to create a contact form for the website. I did this by using Formspree and some simple .css. The benefit of using Formspree is that you don't have to directly expose your email address on the page and subject it to spambots.

First, create an account on Formspree. Once you have an account, create a new form.

Digital_Garden_Tweaks-1spgw2-001.png|300

Once you create a form, it will give you an endpoint url. Copy that as we will need it for the next step.

Digital_Garden_Tweaks-4h2bsp-002.png|500

Contact Page

Create a new note in Obsidian to put your contact form. Insert your Digital Garden frontmatter. Then paste the below html snippet into the body of your note. Make sure to input your endpoint url into the appropriate spot in the first line of the snippet.

Source Mode

Once you paste the html code, it will likely transform from html into an actual form and make it hard to edit the code. If you click the ... menu in the top right of Obsidian and select "source mode" it will show you the bare code so you can edit it.
Digital_Garden_Tweaks-1guobc-003.png|250

Once you have created your note and entered your endpoint url, go ahead and publish it to Digital Garden. Once the page loads, you will notice it's kind of ugly. Let's fix that next.

Make the contact form pretty

Create a new .css file at src/site/styles/user/contact.css

Paste the following snippet in the file and commit the change. Once it's deployed, refresh your page and it will look much better!

Heading Sizes Fix

The theme I am using (Brutalism) doesn't differentiate between heading sizes so H1 is rendered in the same size as H5. Annoying. Here is a simple .css snippet to fix that. I am still trying to perfect the balance between sizes.

It is placed at: src/site/styles/user/headings.css