Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/jqzdee/wp-includes/functions.php on line 6121
jaffa – Page 2 – jqzdee.com

Important Things I Learnt Building my Show Hide

There were a few important things

.addEventListener()

The function that you want to add needs to be assigned with an arrow function. Otherwise it just gets executed rather than being mapped to the event. Took me a while to figure out.

Also adding a toggle as the event can backfire on you if the function toggles itself. Self explanatory I guess but I threw myself for a few loops that were not necessary.

.preventDefault()

<details> and <summary> tags have a default action. If you have a text input field within them, you find that the spacebar will toggle the details. The onKeyUp event and the .key function helped me get around this. (I had to do a bit of wrangling to get it to work in the WordPress block but I got there)

I Like JetBrainsMono

Its a fun font and I may try and implement it on this site at some point

I Don’t Fully Understand How Gutenberg Blocks Store Boolean Values

I just don’t.


Onward to my simple table of contents.

Published
Categorized as General

One Final Example

First Default Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Second Default Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Third Default Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Third Super Group

Patagosaurus Leptorhynchos Manospondylus Bakesaurus Leshansaurus Saltasaurus Yuanmousaurus Kazaklambia Wamweracaudia Hulsanpes Tornieria Osmakasaurus Barapasaurus Liassaurus Tsintaosaurus.

First Nested Default

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Second Nested Default, open by Default

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Third Nested Super

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Fourth Nested Super, open by Default

This may never show open by default?

Fifth Nested Not Auto Close

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Sixth Nested Not Auto and Default Open

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Spare ribs drumstick ham hock chuck filet mignon short loin biltong shank leberkas frankfurter burgdoggen ball tip. Ham hock shank ribeye, tenderloin filet mignon hamburger beef ribs prosciutto. Strip steak ribeye ham hock drumstick. Cow corned beef leberkas, sirloin strip steak picanha chuck shoulder shank ham hock biltong rump fatback pork chop. Meatloaf sirloin ball tip pastrami andouille.

First Super Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Second Super Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duo enim genera quae erant, fecit tria. Dic in quovis conventu te omnia facere, ne doleas. Ne in odium veniam, si amicum destitero tueri. Minime vero istorum quidem, inquit. Hoc non est positum in nostra actione.

Seventh and New!

Sure, let’s put a little summint here

Published
Categorized as General

All Hail the Server’s Return

Thanks to the quick thinking actions of my beautiful wife, my server has survived the freak hailstorm that flooded the server room. There were some issues rebooting but we are back up and running thanks to https://shiztastic.com/

Published
Categorized as General

I Guess We Just Love Moving

Yep, moved again. This time the software stayed where it was but I moved the physical server and got a new static IP. Let’s hope I can remember how to plumb it all back in.

Published
Categorized as General

Moved House (Again)

Had a whole bunch of problems with my little Pi. Moved to something a little more sturdy. (It can actually compile shit.)

Things I’ve learned in the move:

  • I thought I wanted to use a flashy new web server. (Nginx, Caddy.) I was wrong
  • Raspberry Pi’s get really touchy if you use a shitty power supply
  • Powerlevel 10k makes me feel special

I still have a few bits to do, but I’m getting there.

Published
Categorized as General

Shipping Fees Not Included

I’ve set up a new dev environment using a docker version of WordPress. This is because my poor little pi cannot cope with everything needed for creating a new block.

It’s time for a whole new world.

Published
Categorized as General

Fixed the Permalinks

Finally made it work! The constant fuck up was due to me not adding

        <Directory /var/www/jqzdee>
        AllowOverride all
        </Directory>

I’ve done all the other bits but didn’t sort out this basic part.

Published
Categorized as General