Interactive jQuery Menu

A few days ago I was asked to update the layout of the website for a store I used to work at.

I thought this was a good chance to get to know jQuery animations, so I put together a bunch of stock images as background, edited pictures of frames and put some text in the frames for the icons.

I worked with artboards in Affinity Designer so I could export multiple images to different files, I also worked with groups and a transparent background so I could make .png files of the frames and put them on top of the background images.

That way I used the background-image css property, with display set to block and could superimpose a png with transparency over another image.

With jQuery I selected all images, where each image has a class “RT” and I used the reserved word this to select the particular instance for mouseover and mouseleave events.

With this I managed to make a fun little menu where the frame with the text grows and shrinks according to mouse-events.

The result can be seen here.

Fontstats Plugin

Today I finished a little WordPress plugin I’ve been working on.

It’s a two part plugin, one php script collects data from any Norwegian designer on DaFont by visiting each site, and by the power of Regex-Grayskull it inserts it into a database on my website.

The WordPress plugin then selects the last sampled date and displays it in a HTML-table on any post or page where I insert the registered shortcode.

Here’s the result:

No.DownloadsDesignerDate SampledCountry
1113139854Måns Grebäck2019-11-14Sweden
224144777Pizzadude - Jakob Fischer2019-11-14Denmark
34681245Johan Waldenström2019-11-14Sweden
43641804Carl Krull2019-11-14Denmark
53254457Fontourist - Hans Gerhard Meier2019-11-14Norway
63049758Johan Aakerlund2019-11-14Denmark
72782284Listemageren - Klaus Johansen2019-11-14Denmark
82519381CheapProFonts - Roger S. Nelsson2019-11-14Norway
92070021HENRIavecunK - Henrik2019-11-14Sweden
101302241Flight of the Dragon - Hasan Guven2019-11-14Norway
111138777Christian Munk2019-11-14Denmark
12771870Adam Ericsson2019-11-14Sweden
14719765Your Own Font - Ellinor Rapp2019-11-14Sweden
15562461Vinterstille TypeFaceLab - Klaus Nielsen2019-11-14Denmark
16513980Viktor Hammarberg2019-11-14Sweden
17492987Moonbase Press - Svein Kåre Gunnarson2019-11-14Norway
18410787Espen Morten Kvalheim2019-11-14Norway
19401418Thor Christopher Arisland2019-11-14Norway
20358198Staffan Vilcans2019-11-14Sweden
21347751Martin Holm2019-11-14Norway
22320834Jonas Borneland Hansen2019-11-14Denmark
23290697Lene Arensdorff2019-11-14Denmark
24238240Norwegian Ink / Design for Dough - Frode Nordbø2019-11-14Norway
25211877David Engelby2019-11-14Denmark
26208777Anton - Anton Lundström2019-11-14Sweden
27201019dawnland - Daniel Viberg2019-11-14Sweden
28182070211178 Creative Agency - Morten Talleivsen2019-11-14Norway
29144634Martin Sørensen2019-11-14Denmark
30123184Andreas Larsen2019-11-14Denmark
31115120Nils Kähler2019-11-14Denmark
32100370Bolahool Graphics2019-11-14Sweden
3490925Joaquim Marquès Nielsen2019-11-14Denmark
3590824Anton Bohlin2019-11-14Sweden
3683101Pär Lundkvist2019-11-14Sweden
3776169Digital Flame Studios - sindre små2019-11-14Norway
3971799Carl Enlund2019-11-14Sweden
4065605huskmelk - Rashid Akrim2019-11-14Norway
4160993Kyrre Honohan2019-11-14Norway
4255751Pia Hed Aspell2019-11-14Sweden
4354680Nadia Rosenfeldt2019-11-14Denmark
4452428Linn Mustanoja2019-11-14Sweden
4551369Lars Håhus2019-11-14Sweden
4645422ronjam - Ronja Melcker2019-11-14Sweden
4742983Atle Mo2019-11-14Norway
4837098Erik Jeddere-Fisher2019-11-14Norway
4934760Arman Ay2019-11-14Sweden
5034385benjamin rauber2019-11-14Sweden
5233374Benjamin Blåholtz2019-11-14Sweden
5330160Studio Indigo - Helena Öhman2019-11-14Sweden
5427993Christian Koch2019-11-14Denmark
5527496Mark Lund2019-11-14Norway
5627367Botond Bokor2019-11-14Sweden
5726992Dan Thorup2019-11-14Denmark
5826325Andrew Nordquist2019-11-14Sweden
6025139Aske Ching2019-11-14Denmark
6122155Erik Holm2019-11-14Norway
6321321Henrik Johansson2019-11-14Sweden
6421004Bull - Sandra Madsen2019-11-14Denmark
6520917David Lindecrantz2019-11-14Sweden
6620101Kristian Dalen2019-11-14Norway
6717444Mandy Pandy2019-11-14Sweden
6814178Alexander Rossebø2019-11-14Norway
6912881Johan Brodd2019-11-14Sweden
7011873Viktor Örneland2019-11-14Sweden
7110122Mathias Alvebring2019-11-14Sweden
747766Mathias Rue2019-11-14Denmark
757339Manuela Hardy2019-11-14Norway
767333Gröt Havregrynsson2019-11-14Sweden
786974Sara Lindberg2019-11-14Sweden
796539Mattis Folkestad2019-11-14Norway
806305Oliver Waldemar2019-11-14Sweden
815295Simon Jakobsson2019-11-14Sweden
824470KingDGaming - Elias Eriksson2019-11-14Sweden

Regex 101

Today I received an email from the store I used to work at asking me to make a printer friendly version of an online table of information.

As I learned more about regular expressions from the “INF3331” course I took this fall, solving this problem proved to be way easier than any previous attempts at the likes of it.

At times I’ve thought that regexes are harder to read and debug than ordinary programming languages, but with a good editor like Atom or the regex101 page, it all became a lot less stressful.

As far as editors go, I have to admit that I still use emacs when I’m not using an IDE or GUI-editor.

Note to self about regular expressions.

(.*?) to capture zero or more characters in a non-greedy manner

(?:.*?) for the same grouping without backreferences.

$1 or $[group-number] for backreferences in JavaScript and Atom

\1 or \[group-number] for backreferences in Python, PHP.

Perl and PHP also uses \g1 or \g[group-number] for backreferences.

The following characters need to be escaped in regex:


What week is this?

Today I was a bit impulsive and registered the domain name

Then I made a little php-application showing the day of the week, with the background color calculated using the week number, month and day to create a hex code.

I might even try out some AJAX and jQuery on this page and see if I can make it a little more stylish and interactive.

If you want to check start and end dates of another week number, just add the suffix /[week number] to the URL.

For example, if you want to find information about week number 42, then go to