Accessing CSS Classes in FastHTML
How to retrieve the CSS classes for a FastHTML FastTag instance.
How to retrieve the CSS classes for a FastHTML FastTag instance.
Now that I have a lot of notebooks, it would be nice to have a more compact index page. I want to see more of my posts from mobile all at once. I'm going to prototype it in Tailwind.
I add a mini-nav to the vanilla non-MonsterUI version of notebook detail pages (used for in-depth CSS experiments). I also now export main.py from within this notebook.
I make a lightweight vanilla InlineNav FT with FastHTML, using the HTML nav element and as minimal styling as I can get away with.
A FastHTML app that converts times to different timezones, and to Discord timestamps.
This is a proof-of-concept of moving MonsterUI's HTML class injection from lxml post-processing to a custom Mistletoe renderer. Looks like we can get 3x faster Markdown rendering using this simple MonsterHTMLRenderer vs. parsing the rendered HTML to inject the classes.
Just little tweaks to make sure the site still works with all the new MonsterUI stuff.
Here I update audrey.feldroy.com with some of the latest MonsterUI text presets.
Here I improve audrey.feldroy.com in small, subtle ways.
Here I clean up the code, back-integrate the manual fixes I've since made, and reduce the steps it takes to export.
My first MonsterUI notebook wasn't rendering correctly. I started to debug it in this notebook, but ended up just using this as a test notebook for the next one.
Here in this Jupyter notebook I rewrite audrey.feldroy.com and use nb_export to export it as my new main.py for arg-blog-fasthtml.
Iterating through the ButtonT enum to show all MonsterUI button types visually.
Can we customize a FastHTML app to set different headers when rendering notebooks with nb2fasthtml, based on what the notebook actually needs for its headers?
Exploring how to make basic SVG animations work with FastHTML.
How to make a website check the user's preferred mode and set the background appropriately.
Demo of adding sounds to a FastHTML app with Tone.js. Sounds make web apps come alive and feel interactive.
FastHTML MonsterUI example app that uses Tone.js to make different alarm clock sounds.
I've made good progress on creating a notebook every day. Now I have so many notebooks that my index page needs an overhaul, including:
In this tutorial we'll look at the simplest routes and route handlers you can create with FastHTML. We'll define the handlers as little functions, and then call them as we would any other Python function. After that, we'll make simple GET requests to a simple index route/handler, a parameterized one, and a parameterized one with a redirect.
I get so lazy about title tags. The point of today's notebook is to make me less lazy, so I actually fix the title of this site. Oh, and to explore Title and Titled in FastHTML.
I just changed my Bluesky to @audrey.feldroy.com. To verify my domain ownership, I added this route handler to my FastHTML website:
FastHTML provides default headers for every page, which are also fully customizable. This notebook explores how this works.
Adding a settings bar with a volume slider and waveform selector to the piano.
In Part 1 we defined piano keys. Now let's improve them with hover effects, mouse events, and JavaScript audio.
My adaptation of https://developer.mozilla.org/en-US/play to FastHTML, with improvements.
I needed a quick note box for the index page of this site, without affecting the CSS of my notebooks that explore weird CSS stuff deeply.
This notebook uses images in every possible way.
When using pico=False and no CSS framework, a FastHTML page doesn't look great. Can we use minimal typography to make it look decent, without dependencies?
I have Jupyter notebooks in nbs/. I want to turn them into cards from the filenames, without having to read the file contents.
## Understand the Problem
Exploring how execnb reads notebooks and nb2fasthtml renders them, to understand the tools I'm building on.
I'm here to learn the new web framework FastHTML by Jeremy Howard, and I'm using Claudette to help me explore it.
Studying https://docs.fastht.ml/tutorials/by_example.html more
My early attempts to figure out auth in FastHTML. Things have likely changed a lot since.
My early exploration of the xtend notebook in FastHTML.
Reading through fastcore's xml.py source to figure out how FastHTML components print and render, and what to_xml and highlight do.
Caution: I’ve learned better patterns since I wrote this. Leaving this here for posterity.