Image Upload Preview in Alpine.js

So as I’ve said a few times now, I’m on kind of a trend here on rebuilding previous demos in either vanilla (i.e. no framework) JavaScript or my new favorite framework, Alpine.js. In that vein, I’ve got an update to a post I first wrote nearly a decade ago, "Adding a file display list to a multi-file upload HTML control". I followed that up with a Vue version here: "Vue Quick Shot – Image Upload Previews". The idea was to enhance a form that asks for image uploads by adding a simple preview of the image. This helps as it lets the user be sure they’ve selected the right file. Raymond Camden… more →
Posted in: JavaScript

More Awesome Git Aliases

In the last article in this series, Awesome Git Aliases, we took a look at some awesome aliases for Git. However, the true power of Git aliases comes from writing custom scripts. These allow you to build Git commands that can do anything you can imagine. In this article, I’ll show you how you can create script aliases with Git. We’re going to take a look at several awesome scripts you can use for Git that are super useful and will save you a bunch of time. Script Aliases We’ll be using Bash for our scripts. Bash is an ugly language, but it has the benefit of working almost anywhere. For your own scripts, you can use any scripting language you’d like. If you’re not... more →
Posted in: JavaScript

Links For You

A few quick links here to end May. This week has been incredibly difficult for many people, myself included. Please remember that therapy can be life saving, it was for me. If you need help, please sure to reach out and get support. Your mental health is just as important as your physical health. Raymond Camden… more →
Posted in: JavaScript

CSS :optional

A decade ago HTML and CSS added the ability to, at least signal, validation of form fields. The required attribute helped inform users which fields were required, while pattern allowed developers to provide a regular expression to match against an <input‘s value. Targeting required fields and validation values with just CSS and HTML was very useful. Did you know that CSS provides :optional to allow you to style form elements that aren’t required? input:optional, select:optional, textarea:optional { border: 1px solid #eee; } [required] { border: 1px solid red; } In a sense, it feels like :optional represents :not([required]), but :optional is limited to just form fields.... more →
Posted in: JavaScript

Amazing Text Editing Experiences with UltraEdit (Sponsored)

There’s a common saying that adults spend more time with coworkers than family; for us software engineers, we spend more time with our text editor than our families. And why shouldn’t we? They’re our main tool to do a variety of things, and as these editors evolve, they’re capable of doing even more. UltraEdit, a paid text editor, has been around for decades and continues to be immensely powerful! Quick Hits UltraEdit boasts a loyal user base of over 4 million Decades of engineering expertise and stability baked into the editor The UltraEverything Suite includes a Code Editor, a File Finder and Compare tool, and FTP client Available on Mac, Linux, and Windows The entire... more →
Posted in: JavaScript

I Love You, Ringo

Some things happen in your life at exactly the right time. It could be meeting the right person, discovering an open source project you go on to join, or even starting a blog when you’re bored with a job you don’t enjoy. All of those things happened to me at the right time and brought me to where I am today. There’s no real logic in the charmed hallmarks in your life, but they happen and shape what you eventually become. Shortly after my wife and I married, we agreed we wanted a dog. We didn’t have a preference for what we wanted — we knew that when we’d meet the furry friend, we’d “just know” they were right. During our first visit to the dog shelter, we ran into a number... more →
Posted in: JavaScript

Advanced Code Display with Code Detection API (Sponsored)

Web apps are accepting numerous types of inputs, from basic text to code to imagery, files, and more. It’s important that we validate the contents we receive but if you do allow arbitrary text, it’s good to know what exactly has been submitted so you can present it properly. Enter the Code Detection API — an API that allows you to detect code in text! Quick Hits Detects code block inside arbitrary text input Proposes the detected language and formats input accordingly Supports dozens of programming languages Excellent documentation with numerous code examples Helps to format communications between remote employees Start for free! Brought to you by APILayer, the amazing API... more →
Posted in: JavaScript
1 59 60 61 62 63 189