This filter is builds the path for the dashboard profile image. The
path points to a different icon in the /images/icons directory
depending on what time and day it is.
There is no major functionality addition with this code. It just a
little sprinkle of cuteness for the user of the site.
These images are will be displayed alongside the user's display name
on the dashboard. There are several images because different ones will
be displayed at different times of the day and week.
Because the amount of JavaScript I've written, it doesn't make sense
to separate things out into their own files yet. So, I've renamed the
file to main.js and will add the little sprinkles of JavaScript
here. If the amount of JavaScript grows, I will need to move things
out of here but that is a future problem.
This is a multi-file commit because the code is essentially the
same. Each HTML template has either had a 'quicklist' section added or
had links added to it.
'Quicklist' is just a section with a collection of links to other
parts of the website based on the context of the page/user's current
location.
I think I had a version of this route but I deleted it -- can't
remember if it wasn't needed or didn't work as intended at the
time. Anyway, this commit makes it part of the code-base (again).
The function provides the website to use the automatically generated
thumbnails -- when a user uploads the an image to /storage/media --
instead of the full-sized image. This should help reduce download
times if a list of uploaded image are several Mega Bytes and being
viewed at once -- like an index page for example.
These files are generated during the website's first-run process. They
don't need to be a actual hard-coded part of the repository. The way
the site is set-up, the user will either stick with the
defaults (generated on first-run) or upload their own personal files.
The automatically generated thumbnails are no longer stored in the
database. They are created, updated and deleted alongside it's main accompanying
image -- as a file in the /storage/media directory.
The route in web.lisp calls the recently created 'get latest'
functions in the nera package. The code is web should be fine but the
dashboard.html stuff is buggy and so is the back-end routes for
uploading deleting file in the /storage section of the website. This
is an end-of-session commit, though, so the bugs will have to be fixed
at a later time.
These functions haven't not been used much so I don't know how
reliable they are in their current forms. Expect some work needed on
them in the future.
I move the alert section to the /layouts/header.html template because
it was easier to get it to render between the logged-in user's site
header and the site's 'normal' header.
The site's side-menu (for logged-in users) still needs stuff adding to
it -- and tweaking -- but the base style, layout and whatnot is in
place.