This code is intended to be used mostly in the 'index' pages (Pages and
Archive). These pages are mostly going to act as a back-up for when the
Meilisearch service goes down or if the user has a poor internet
connection. This filtering behaviour allows the user to filter the entries in
the Index they are viewing (Pages or Archive). There are no images and no
repeated calls back to the server. Each index lists just the text (Titles,
publish info. Etc.) and from there the viewer can filter the results on the
page by entering text into the text box in the Index-base HTML templates.
From Nic's point-of-view, these Index pages will not be included in the
nav. menu but if the Meilisearch service goes down (at this site is still
operational), she can swap out the 'search' page for these (really it's just the
Archive Index) so people can still have some form of search/filtering ability
whilst viewing the website.
This defroute doesn't change anything relevant in the Meilisearch DB so it
doesn't need updating. I've left a comment (mostly for future me) to remind me
not to think I've missed a defroute and try to integrate the Meilisearch stuff
into it.
The defroute to update the thumbnail doesn't need to change but I added a
comment to make it clear in the future -- I can see me forgetting it doesn't
need updating and try to add code which doesn't need to exist.
I, also, did a bit of updating to the layout of the code is parts -- mostly when
setting the alert message.
The re-direct to /search when the user has set /search as the site's home page
is part of a list of other hard-coded re-directs in this site's '/' defroute.
The site now deletes the Archive Entry from the Meilisearch database alongside
the files in the /storage directory and the nera database.
These functions are helper functions to manage the Meiliseach database from
a Common Lisp perspective. The intention is to work them into the website's
back-end so the user can reset or re-populate the database from the website
without me (or someone else) having to SSH into the VM and do fix/restore things
manually. For now, they allow you to manage the database from SLIME.
This change is so the refinements on the seach page shows the month names
instead of thier numbers. This is because most people tend to work with month
names and not numbers in this context.
This is a helper function to convert '1' to 'January', for example. The intended
use for this is to work alongside the local-time package when generating the
month number from a timestamp.
This commit makes the header (site's name and logo) a link which points back to
the site's "/" (I.E. Home page/route). It, also, centralises the header and the
navigation menu (in the header). This is so the header doesn't look weird when
viewed on a mobile phone.
I removed the <hr> at the bottom of the file because the site has enough styling
applied to it to make the <hr> look out of place now. I can clearly
denote/identify where the site's (front-end) header and footer stops and starts.
I didn't realise the local-time system set 'Sunday' to '0' in its
timestamp-day-of-week function. I thought it was '7'. This commit changes the
check for '7' to '0' and adds a few comments to help identify which days the cond
form is checking against.
These files are provided by the Meilisearch project. This commit is larger than
usual because of this. The CSS files are copied over from my personal website's
repository so they will need modifying going forward. I've added them here as a
starting point.
This page is populated in this commit but is broken because it requires several
JavaScript files which have not be committed to the repository as of yet. This
commit is in preparation of adding those files.
The site now populates the Meilisearch database when the user creates an archive
entry. The Meilisearch needs to be set-up manually at this moment in time so
expect this to break easily if you haven't got Meilisearch working.
I copied most of this over from my personal website's repository. So, there are
bits of code which look a bit out of place in this context. With that said, the
code does run and just needs to be integrated in the defroutes in web.lisp.
I've removed the 'extends' blocks and built a completely seperated template from
the rest of the website. The template was not rendering properly because certain
parts of the website had not been set-up yet so the complete isolated template
was/is required.
I've, also, added extra options for the user to set during this first run
process which will be processed by the back-end. I've not put much work into
adding validation checks because it is a one-time thing (this page). You'll need
access to the server anyway -- at this point -- so a bit of manual correction of
mistakes will be easy to achieve. Deleting the database will be enough to
trigger the first run process again.
The conditions are added to the 'Site Logo' and 'Favicon'
sections/defroutes. The checks are to make sure a user doesn't try to set an MP4
file as the site's favicon or site's logo.
This update seperates the form previous version of the template (for updating
the user's display name and password) into two. This is because of a change in
the back-end defroutes. It's makes it easier on the back-end to update the
password and display name seperately with different HTTP POST requests (and HTML
form data).