Skip to main content

Search

Items tagged with: Dev


Oh, that? That’s just me writing the Windows section of the Kitten¹ installation instructions for the upcoming web site.

¹ https://codeberg.org/kitten/app

#Microsoft #Windows #Recall #BigTech #Kitten #SmallWeb #SmallTech #privacy #security #tech #web #dev


🎉 New Kitten feature: Markdown pages

You can now create .page.md files and use front matter to specify a layout template as well as any other props you want to pass to your layout.

(I’m working on the Kitten web site with docs, etc., so I thought I’d bite the bullet and add this feature this morning to make my life easier. Should make it easier to make this sort of site with Kitten in the future for everyone.)

https://codeberg.org/kitten/app

:kitten: 💕

#Kitten #Markdown #SmallWeb #web #dev #NodeJS


Here's a pure CSS char by char text reveal on scroll!

@codepen demo https://codepen.io/thebabydino/pen/MWPeLmp

No splitting text into individual characters!

Inspired by an old Toblerone Story page, except that used JS (reasonable for cross-browser support) and was splitting the text into individual characters (yikes! 😱)

cc @bramus

#CSS #pureCSS #noJS #scroll #scrollAnimation #text #textEffect #revealEffect #code #coding #frontend #webDev #web #webDevelopment #dev


I do love that buffer.subarray() returns a – checks notes – Buffer instance, not an array, in Node.js. 👀

#namingThingsIsHard #NodeJS #Buffer #Array #dev


Note that when you’re working with Kitten, your apps do not have a build process.

You write HTML, CSS, JavaScript and, optionally, extend using first-class support for htmx and alpine.js as well as Kitten’s own Streaming HTML workflow¹. There’s also no scaffolding or generating a project with hundreds of files or anything. You just write the code for your app.

¹ https://ar.al/2024/03/08/streaming-html/

#SmallWeb #Kitten #StreamingHTML #web #dev #NodeJS #JavaScript #HTML #CSS


So Kitten’s build process (i.e., the time it takes to build Kitten itself) takes ~0.7 seconds on my ~1 year old desktop (Ryzen 7 5700G 3.8Ghz) vs ~1.4 seconds on my ~3-year-old Starlabs LabTop (renamed to the Starbook thanks to a suggestion by yours truly but sadly, not quickly enough).

So, in summary, it’s bloody fast for something that results in a ~9MB bundle.

(And that’s all thanks to esbuild.)

https://codeberg.org/kitten/app

#Kitten #SmallWeb #build #performance #web #dev


I still prefer the Kitten version ;)

(That’s _all_ the code for a _persisted_ counter.) :)

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

#Kitten #SmallWeb #web #dev #html #css #javascript #NodeJS


Looking forward to presenting my computer science colloquium on Small Web at the University of Groningen, Netherlands, on 11th of June, 2024 at 4PM.

https://www.rug.nl/research/bernoulli/calendar/colloquia/computer-science-oriented/2024/20240611-aral-balkan

There might be space for a few people from outside the university to attend so if you want to drop by, make some noise and I’ll have a chat with the university.

Thanking @mirela for organising this and looking forward to hopefully meeting some of you in the Netherlands soon.

#SmallWeb #groningen #netherlands #web #dev


:kitten: 💕

New Kitten update!

Mostly housekeeping:

• Runtime is now Node 22 (22.1.0 as 22.2.0 has a bug that can crash on deprecation warnings). This might be a breaking change for your code (e.g., import…assert is now import…with, etc.) Remember, Kitten is pre-release/not API-versioned yet.

• Applied all semver-compatible dependency version upgrades.

• Fixed tests & coverage. Tests are still woefully inadequate but will improve.

https://codeberg.org/kitten/app

#Kitten #SmallWeb #NodeJS #web #dev


#tinySVGtip Better gooey effect with no matrix filter!

Each particle can get its own CSS blur filter with a value that may be any unit (SVG doesn't support this).

The assembly containing them gets an SVG filter as below.

Heavily commented on @codepen: https://codepen.io/thebabydino/pen/NWVdKaG

#CSS #SVG #filter #cssFilter #svgFilter #goo #gooey #blob #blobby #blur #alpha #code #coding #frontend #webDev #web #dev #webDevelopment


7⃣ 545 ❤️ Cycling gradient glow - no text duplication https://codepen.io/thebabydino/pen/rNPOpJK

A simple #SVG filter trick.

We create the gradient text.

The filter creates a blurred copy of it and places it underneath.

We then animate the gradient stops... magic! 🪄✨

#css #svgFilter #filter #filterEffect #glow #text #textEffect #textGlow #cssGradient #code #coding #frontend #web #webDev #dev #webDevelopment


6⃣ 688 ❤️ Pure #CSS 1 div card patterns (no SVG, no images other than CSS gradients) https://codepen.io/thebabydino/pen/NWxBzRv

A variation on the pure CSS halftone technique https://mastodon.social/@anatudor/112401133442879091

#halftone #pattern #gradient #cssGradient #blendMode #blending #fliter #cssFilter #code #coding #frontend #web #webDev #dev #webDevelopment


5⃣ 723 ❤️ No SVG, no image fluid slider with input[type=range] https://codepen.io/thebabydino/pen/qByGqOm

JS used only for
a) feature support detection
b) updating slider value in a --val

Uses only
1 × input[type=range] for actual slider
1 × output for current value display
1 × datalist for ruler

#css #slider #code #coding #frontend #control #web #webDev #dev #webDevelopment


4⃣ 736 ❤️ Pure #CSS Möbius 6hedrons https://codepen.io/thebabydino/pen/mJojKd

The how behind I live coded it in 30 minutes https://css-tricks.com/how-i-live-coded-my-most-hearted-codepen-demo/

Could be improved with CSS variables nowadays, see https://css-tricks.com/simplifying-css-cubes-custom-properties/ as well as by using CSS trigonometric functions.

#3D #transform #css3D #code #coding #looping #animation #cssAnimation #frontend #web #webDev #dev #webDevelopment


3⃣ 747 ❤️ no sprite, no JS twitter 🤍 animation https://codepen.io/thebabydino/pen/RRRRZE

Behind demo https://css-tricks.com/recreating-the-twitter-heart-animation/

Now twitter uses an SVG heart 👍 (that path data though 😵) and upon clicking, inserts a div with the sparks. There are better ways to do it... still better than sprites!

#css #svg #code #coding #frontend #web #webDev #webDevelopment #dev


2⃣ 841 ❤️ neon hex https://codepen.io/thebabydino/pen/zGmdep

Most people know my CSS stuff, but this was my most hearted Pen for some three quarters of a decade... and it's a #canvas one! The JS feels dated nowadays, but oh, well... still my favourite out of this top 3.

#js #javascript #code #coding #frontend #web #dev #webDev #webDevelopment


I turn 12 on @codepen in less than a month, so here are my most hearted demos ever:

1️⃣ 955 ❤️ Pure CSS gravity button https://codepen.io/thebabydino/pen/bGzeQrv

My only demo to ever pass 850 ❤️ - a bit mixed about it, it was just an exercise in getting a certain result - please don't use it in the wild!

#css #pureCSS #gravity #button #code #coding #frontend #web #dev #webDevelopment #webDev


8⃣ 496 ❤️ Pure #CSS 3D toggle with only input[type=checkbox] + label https://codepen.io/thebabydino/pen/ajpqYW

(awfully hacky, but cool-looking result... which nowadays I'd probably try to get with an SVG filter 🤔)

#3d #toggle #checkbox #css3D #code #coding #frontend #web #webDev #webDevelopment #dev


Kitten bugfix release:

Please upgrade to the latest release that fixes a regression introduced into sessions object with the latest JSDB¹/JSDF² upgrade:

https://codeberg.org/kitten/app/issues/177

Persisting arbitrary objects to sessions is a supported workflow and this regression broke that.

e.g., See the Kitten Count Sessions example: https://codeberg.org/kitten/app/src/branch/main/examples/kitten-count-sessions/index.page.js

:kitten:💕

¹ https://codeberg.org/small-tech/jsdb#javascript-database-jsdb
² https://codeberg.org/small-tech/jsdb#javascript-data-format-jsdf

#Kitten #SmallWeb #web #dev #sessions #JSDB #JavaScript #database #regression


New Video – Kitten features introduced this week:

• Interactive Shell (REPL)
• Multi-page Settings
• Backup and restore (data portability)

With examples that cover components and Kitten’s built-in JavaScript database (JSDB).

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

:kitten:💕

#Kitten #SmallWeb #SmallTech #web #dev #JavaScript #HTML #database #JSDB #components #settings #dataPortability #REPL


So! Many! Kittens!

(Going to record a demo of the new interactive shell – REPL to some – and multi-page Settings this afternoon, just planning it out now.)

Oh and is that me creating and calling web routes interactively in the REPL on a live server? Why yes, yes it is.

:kitten:💕

#Kitten #SmallWeb #web #dev #HTML #CSS #JavaScript #NodeJS


:kitten: Kitten’s interactive shell (REPL) now saves session history scoped to your app so it will still be there when you next serve the same app.

https://codeberg.org/kitten/app#kitten-s-interactive-shell

I think I’m done with the REPL feature now.

Going to take a little break, step away from the computer, and make a plan for the next week of work on Kitten and Domain¹.

¹ https://codeberg.org/domain/app

#Kitten #SmallWeb #REPL #shell #JavaScript #NodeJS #web #dev #SmallTech


Small update on Kitten’s new interactive shell (REPL). You can now access Kitten’s router via:

kitten.app.router

Also updated the section in the tutorial to fix typos in some of the code examples and use the new router key path:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

:kitten:💕

#Kitten #SmallWeb #REPL #shell #NodeJS #web #dev #router


:kitten: 🎉

Kitten now has a lovely new multi-page Settings screen and… *drumroll*… a new 🐢 interactive shell (REPL) for you to play with the running state of your Small Web site/app/place and debug your app, inspect/manipulate its database, etc.

I plan on recording demos of each of them tomorrow but you can play with them now.

And here’s a little tutorial to get you started with the shell:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

💕

#Kitten #SmallWeb #SmallTech #NodeJS #REPL #JavaScript #HTML #CSS #web #dev


The new and improved Settings section for Kitten (Small Web/peer-to-peer web) apps is coming along nicely.

Should be live this week.

#Kitten #SmallWeb #Settings #SmallTech #p2p #peerToPeer #web #dev


Here’s a niche gotcha with the clipboard API’s `navigator.clipboard.writeText()` method that’s unique to Safari:

If you access a function from a module within your gesture handler (e.g., click handler), you will get a permission error.

The (sadly hacky and not as robust) workaround is to set a global variable from your module instead.

Full gist:

https://codeberg.org/aral/gists/src/branch/main/clipboard-writetext-permission-error-when-using-modules-in-safari.md

#Safari #clipboardAPI #JavaScript #ESModules #web #dev #gist


The Evergreen Web section in Kitten’s¹ settings now has its own page too (and uses Kitten’s new Streaming HTML² workflow).

If you have the previous version of your site up somewhere, you can use the 404-to-307 technique³ to forward missing pages to your old site so as not to break the Web.

I’ll add local static archive support later.

¹ https://codeberg.org/kitten/app
² https://ar.al/2024/03/08/streaming-html/
³ https://4042307.org

#Kitten #SmallWeb #EvergreenWeb #StreamingHTML #web #dev #NodeJS #JavaScript


Lots to do yet but the new Kitten¹ settings section (that’s common to all Kitten apps / Small Web places) is coming along nicely. (With the general style/layout borrowed from Domain².)

(It’s currently a single page and I’m breaking it up into multiple ones because it’s time.)

Once I’m done with this I should really record a screencast of Kitten’s new backup and restore feature/data portability.

¹ https://codeberg.org/kitten/app
² https://codeberg.org/domain/app

#SmallWeb #Kitten #Domain #SmallTech #web #dev


:kitten: Meow! New Kitten just dropped:

• Uploads are now listed in the Small Web Place Settings (/💕/settings) of all Kitten apps.

#Kitten #SmallWeb #SmallTech #uploads #settings #web #dev


… JSDB, by the way, is short for JavaScript Database, which is, umm, a JavaScript database.

It’s an in-process, in-memory database for Node.js for Small Web use that persists to an append-only JavaScript – not JSON, JavaScript – transaction log.

JSDB’s very easy to work with because you just use native JavaScript objects and they just automatically get persisted for you.

e.g., Here’s a quick 6-line Kitten app that persists a counter:

https://codeberg.org/kitten/app#using-javascript-database-jsdb-a-not-so-scary-database

#JSDB #Kitten #SmallWeb #web #dev