Update to My Eleventy Blog Guide

Last January, I announced the release of a guide I had written for building a simple blog in Eleventy. Now that Eleventy has hit 2.0, I took some time this morning to look at the guide and see what could be updated. The first thing I noticed was that I had a heck of a lot of typos. I fixed those. I then went through the two main versions of the blog (before and after UI was added) and updated the dependencies to the 2.0 release of Eleventy. That being said, I didn’t do anything else. This is not to say that the 2.0 release wasn’t lacking in new features, but as my guide is meant to be as simple as possible, I wasn’t on the lookout to add any new features if it didn’t make... more →
Posted in: JavaScript

Document.elementFromPoint

Reacting to events with JavaScript is the foundation of a dynamic experiences on the web. Whether it’s a click event or another typical action, responding to that action is important. We started with assigning events to specific elements, then moved to event delegation for efficiency, but did you know you can identify elements by position on the page? Let’s look at document.elementFromPoint and document.elementsFromPoint. The document.elementFromPoint method accepts x and y parameters to identify the top-most element at a point: const element = document.elementFromPoint(100, 100); // If you want to know the entire element stack, you can use document.elementsFromPoint: const... more →
Posted in: JavaScript

Lightship Earth

Dutch broadcasting company KRO-NCRV has released an interactive map which visualizes light pollution in the Netherlands. Spaceship Earth allows you to enter any address in the Netherlands to discover how many stars can be seen from that location. The map also explores some of the most (and least) light polluted areas in the country.Spaceship Earth begins with a little scrollytelling tour of the Maps Mania… more →
Posted in: Interactive Maps

CSS ::file-selector-button

We all love beautifully styled form controls but, due to the differences between operating system displays, styling them can be painful. Due to that pain, we’ve created scores of libraries to mock these controls. Unfortunately that sometimes comes at the cost of accessibility, performance, etc. One control that has traditionally been tough to style is the input[type=file] element. Said input variation visually contains a button and text, all being clickable. Bit of a Frankenstein’s monster if you ask me. Can we style the button part though? We can! To style the button button portion of input[type=file], you can use ::file-selector-button: input[type=file]::file-selector-button... more →
Posted in: JavaScript

Southerners Have Poor Credit & Poor Health

Every single person who confuses correlation and causation ends up dying. https://t.co/gPtdUguRYi— Hannah Fry (@FryRsquared) February 13, 2023 I’ve never given a Tweet a standing ovation, but last week I did nearly stand-up and applaud this Hannah Fry’s witty response to a British MP.  However, even though correlation does not imply causation, causal analysis can still try to establish Maps Mania… more →
Posted in: Interactive Maps

Detect XR Support with JavaScript

A few years ago I wrote an article about how to detect VR support with JavaScript. Since that time, a whole lot has changed. “Augmented reality” became a thing and terminology has moved to “XR”, instead of VR or AR. As such, the API has needed to evolve. The presence of navigator.xr signals that the browser supports the WebXR API and XR devices: const supportsXR = 'xr' in window.navigator; I really like using in for feature checking rather than if(navigator.xr), as simply invoking that could cause some initialization to take place. In future posts we’ll explore identifying and connecting to different devices. The post Detect XR Support with JavaScript appeared... more →
Posted in: JavaScript

Twittens, Ginnels and Jitties

In December Mapping Urban Form and Society published a fascinating article exploring how language and mapping intersect in the names people use to refer to a ‘narrow walkway between buildings.’ In the UK these walkways or alleys might also be called a ‘passage’ ‘cut’, ‘entry’, ‘gennel’. ‘ginnel’, ‘jitty’, ‘snicket’ or ‘twitchel’. Which one of these terms is used is normally determined by where Maps Mania… more →
Posted in: Interactive Maps

How to Open a Tor Brave Window from Command Line

I love the Brave web browser for many reasons: ad blocking, Brave rewards, crypto integration, and even a Tor tab feature. I’ll often use the Tor feature but wanted to know how I could automated opening Tor windows from command line. To open a Brave Tor tab, you can use the following command: open -a "Brave Browser" --args --incognito --tor Any time I want to remotely open a Tor tab, I can do so via a shell script. Commands are such an underused but valuable utility for apps! The post How to Open a Tor Brave Window from Command Line appeared first on David Walsh Blog. David Walsh Blog… more →
Posted in: JavaScript
1 78 79 80 81 82 222