jsparrow.uk

AstraGal – Frontend Overhaul
12 October 2019

AstraGal – Frontend Overhaul

Hello Again! In the last post I discussed how I built the backend of AstraGal, and in this one I’ll show you how I’ve spruced up the frontend. First off, I’ve redesigned the homepage to include an about me section and a similar display to the featured images, but this one for recent posts (this has been in the database and backend for a while but I didn’t get to actually implementing it on the frontend until now).

The same sort of styling has also been used for the all posts and all albums page, although this required the use of CSS grid instead of Flexbox, as I wanted the posts to be displayed in a grid like fashion:

These pages also have pagination now when the number of items per page reaches a certain level, which will be useful when this website is actually in use. Another page that was overhauled was the album single page, which shows the description of an album along with the posts within it (also paginated):

All of these pages are responsive and look good on mobile devices. The side menu becomes a popup menu with a burger icon in the corner and all the elements scale well. Overall, I’m quite pleased how this design turned out, it works well on all screen sizes and feels very clean and professional IMO.

Another feature I’ve been working on in the past month is the search functionality, which I’m quite pleased with. I’ve managed to make it so it searches for both posts and albums and is able to display them in a clear manner by separating the search into two sections. This page is also paginated and responsive like all the others.

There is still work left to do however. I need to make sure all of the queries I am using to fetch data from the database are secure and not vulnerable to SQL injections. I’m thinking of using PDO for this, and I will need to go through all the code and modify how it is connecting to the database (which is quite a few times, so this might take a while). In the future I’m definitely going to do this from the beginning.