I hard-coded redirects to the pages which can't be deleted into the
site's index ('/' route). This allows them to be set as the home page
in the site's settings.
I, also, updated the data which is passed to
nera:update-nav-menu. This change is part of the Nav. Menu settings in
the site's settings.
The function now loops through the values passes to it and sets the
'enable-nav-menu- column in the database for the currently selected
page in the loop.
The nav. menu section sends a hidden value if a check box isn't
selected. This is in preparation for implementing the back-end part of
this feature.
I, also, removed the if-statements when selecting the home page in the
'Home Page' settings. Again, this in preparation for adjusting the
back-end functionality for this feature.
I'm changing the snippet to be stored as HTML instead of
JavaScript. I'm, also, storing the snippet in /storage/snippets
instead of /static. This makes it easier to hook it up to my Umami
instance in the future if Nic wants to do that.
From an end-user perspective, I don't think Nic will care about the
difference. She'll want the easiest option and uploading a single file
via the multi-upload form -- with no file name input -- is the easiest
way to go about this. I say this without actually speaking to her
about this so I might be wrong on this and need to go back in and
change things.
The code now removes the old thumbnail file, stores the new one and
updates the database entry. I found it easier to keep track of the
changes whilst developing by doing this.
I added a new route to get files from the /archive directory but
needed to expand on the original /storage/view/:slug route so I could
seperate out the two (/storage/media and /storage/archive)
directories.
I added a check to make sure the archive entry
requested (/edit/archive/:slug) exists and return a 404 if it doesn't.
These functions are to help with standardising on the naming formats
when storing files and keywords (for Meilisearch database). The
asciify and slugify functions are not enough. They either leave spaces
in the file names or the file extension gets lost in the standardising
process. Going forward, file names should look like
'this-is-an-example.png' instead of either 'this is an Example.png' or
'this-is-an-example-png'.
I was getting errors when trying to quickload the system because a
custom djula filter (defined in view.lisp) couldn't find one of the
specific ritherdon-archive packages/files. I can't remember which one
because I made the change earlier in the day and didn't commit the
change at the time.
Both templates aim to list out all the archives stored in the
system. The /user/archive.html template, also, includes admin/back-end
features like edit and delete links/controls.
This is part of an end-of-session commit. I'm currently working on the
/create/archive-entry section (most the HTTP POST request). I still
need to start the view archive, edit archive and delete archive
parts. I've not even looked at the Meilisearch stuff. For now, the aim
is to get the website's main database (nera.db) working and then
integrate the Meilisearch stuff in after that.
I still need to write the edit and delete functions (I.E. the 'U' and
'D' in 'CRUD') to have a basic CRUD system in place for this
section. I'm commiting this as an part of an end-of-session commit,
hence the partical amount of work done.
The only intended use for this function is to generate an Id. number
which will be used in the Meilisearch database and linking it to
Nera's database (I.E. this site's main database).
This is a rough sketching out of what the model/data needs to look
like. This model is what will be connecting the site's archive (Nic's
artwork entries) with the Meilisearch service -- running alongside
each other. I don't know how much this model is going to change but
expect it to in future commits.
When uploading a file, a thumbnail is made (if an image, using the
Image Magick program with Bash). This file is not stored in the
database. It is a file-system only thing. The reason for adding this
is some I can create HTML templates/defroutes which show a list of the
images in /storage/media without saturating the viewers bandwidth.