Last updated on

Adding my first Action

Why Action?

So why a post about this?

Well, although I am currently developing the kaleidoscope page, this is taking me on to the section I have planned for climate.

I fully intended this section to include live current data for CO2 and methane. The display, I think, will be via a component, and this should be tied in with the container queries. As this all looks like a bit of a ‘journey,’ I thought it best to document as I go…

So here goes!

Update for December 2024: Well, although a long way from finished, the kaleidoscope page is looking good. In the end, I went for a masonry grid. This is working fine, and after a few issues with layout in different screen sizes, it now seems to be on the way.

There is, however, a ton of cosmetic work to do, plus all the missing content. But as I seemed to have achieved a lot and reached one of my own milestones, I figured it was a good place to update this page, the kaleidoscope blog page, and do a build.

So next…

First the components needed

Change of plan: Start with a new title component… Basic title component now complete, and there is so much more to add to really make it pop (15/11/2024).

Next step: Putting together the basic UI for the CO2 component. Thank goodness for Copilot! Loads of issues loading and displaying the JSON results from the API call, but thanks to Copilot, I managed to get the results. Next, it’s formatting and displaying in the different formats.

So as of (01/12/2024), things have moved on. I have a component that will download CO2 and methane levels for the current day. As the live island action is not in place yet, this is just updated on build, not refresh. Further development is awaiting the release of Astro v5.0.

Building the first Action

Note above: Still waiting to upgrade to v5.0 before moving on this. However, see the kaleidoscope section to see the progress made in other areas.