It's a real pain to work an a light theme in the dark....š
Previously, I wrote about my idea to use the GitHub API to create a photo blog with its content completely in Git commits. Later, I tweaked the idea to replace the API with CI/CD actions. Since then, I have tried many things that didnāt work. I finally declared it done for now, though. If you want to check out the code behind JWS Pictures, it is all available on GitHub.
What worked
I started the process with three goals:
The design meets those three goals, but I had to figure out what would be a bridge too far for the APIs.
There are six static data files:
There is a āphotosā folder in the project, and separate year sub-folders are inside of that. When you commit an image file into a year sub-folder, it starts a GitHub Actions (just a CI/CD Pipeline) workflow that:
The workflow has limitations. You can only commit and push one image file at a time and canāt batch them.
The Interface
When I wrote the site, I used Vue.js because āwhy not?ā and PrimeVue because I hadnāt used it before. It uses ādark modeā or ālight mode,ā depending on the userās system preferences. I also made it a Progressive Web App (PWA), so you can install it onto your device. The large images are 80% of the original, the medium-sized photos are 25% of the original, and the small image images are 10% of the original. The image displayed at the top of the page uses one of the three depending on the size of the userās device.
I used Leaflet (a pretty cool library for generating mobile-friendly interactive maps) for the map at the bottom of the page. Iāll need to do a dedicated post about it at some point.
What didnāt work
A lot of things didnāt work. I tried using web mentions to allow people to comment on images. I attempted to use createWebHistory() to get rid of the # in the URL but had to use a hack with the 404 handler to do it. I tried to use a fediverse account and a Blusky account using Bridgy to auto-post photos, but I couldnāt get the bridge to work.
Some of these issues are due how I am hosting the site and some of it is due to the fact that Iām trying to use GoToSocial with it.
What do I want to do with it next?
I built this to have reasonably good APIs, so I have a few plans for it.
Have any questions, comments, etc? Please feel free to drop a comment.
#74: But itās soup
After a long hiatus, the whole gang is back! @javajuneau @dhinojosa @ianhlavats and @kito99@mastadon.social are joined by pilot and #OSS contributor, lprimak@mastodon.social. They discuss #microprofile, #htmlx, @devoxx Genie, #IntelliJ #AI Assistant, #Apache #Shiro, #Arquillian, #PrimeVue, #PrimeNG, #Angular, #BDD, #Jsoup, #JBake, #TestContainers, and much more! https://www.pubhouse.net/2024/10/stackd74-but-its-soup.html
#74: But itās soup
After a long hiatus, the whole gang is back! @javajuneau @dhinojosa @ianhlavats and @kito99 are joined by pilot and #OSS contributor, @lprimak. They discuss #microprofile, #htmlx, @devoxx Genie, #IntelliJ #AI Assistant, #Apache #Shiro, #Arquillian, #PrimeVue, #PrimeNG, #Angular, #BDD, #Jsoup, #JBake, #TestContainers, and much more! https://www.pubhouse.net/2024/10/stackd74-but-its-soup.html
Last month, I wrote about an idea that I got to use GitHub Pages as the canonical home for my photos. Over the years, I have hosted pictures on Flickr, Blogger, Pixelfed, Instagram, 500px, and Twitter. At one point, I even primarily hosted them here on this blog. Every solution had one issue or another. In the previous post, I talked about using the GitHub API. After some thought, I decided to use GitHub Actions instead to handle the image processing and generation of static JSON files. That eliminates the need for that API.
I created the site at https://jws.pictures and hosted it with GitHub Pages. I am using Vue, PrimeVue, and Leaflet. Adding a new image is still simply a matter of committing an image to the GitHub repository. The image description and physical location come from the commit message.
The remainder of the data on the website comes from the imageās EXIF data.
Now that JWS Pictures exists, I need to add photos. Do you have any questions, comments, etc.? Please comment below.
Did you know: it helps if you include <router-view /> if you want the Vue router to render your content?! That's all I was missing.
Now I'm going to get into the styling of the rest of the pages.
I might make use of the PrimeVue InPlace type and make text areas that you can click to edit, and send those back to the HTTP PATCH operation on the backend. That's the whole point of that REST operation.
I'm testing out PrimeVue for my Vue demo project and I finally discovered (figured out) that if you want to use the PrimeVue elements, you need to name them on import and use those names in the HTML tags.
Vue also complains if you don't use unique names since you're not allowed to overwrite the existing HTML elements because of course you can't. This makes a ton of sense and I'm glad I figured it out now while I'm working to get all the pieces of my app in place.
The code ends up looking like this a lot and I'm using pv* for my prefix:
import pvbutton from 'primevue/button'
app.component('pvbutton', pvbutton)
then in HTML, you use:
<pvbutton ....></pvbutton>