This is mostly just rearranging, but a couple of functional changes:
* The "preview blocks" can now be clicked to switch themes, instead of
using the dropdown menu.
* Click events should be disabled in the fake posts, so we don't need to
worry about voting/labels/etc.
Previously, error messages were only shown inside <form> elements. If a
button hit an error (such as a 403 when trying to vote on a comment that
was deleted after page load), the button simply wouldn't work with no
indication of why.
This adds the error message into the <menu> containing the buttons, and
involved some reworking of the relevant JS and CSS.
If an AJAX request ends up hitting some sort of error that hasn't been
handled properly in the code yet, it often gets a full HTML page back as
a response, instead of just a text error message. Previously, this would
end up with Intercooler putting the full text of the HTML into the error
element, which is really ugly and confusing.
Now, it will just put an "Unknown error" message, and the actual error
should still end up getting reported to me through Sentry to be able to
investigate.
Since a 413 error (Payload Too Large) is returned from nginx and doesn't
even reach the app, we need to handle this in the javascript instead of
the normal method of returning a custom error response.
This follows the REUSE practices to add license and copyright info to
all source files: https://reuse.software/practices/2.0/
In addition, LICENSE.md was switched to a plaintext LICENSE file, to
support the tag-value header as recommended.
Note that files that are closer to configuration than code did not have
headers added. This includes all Salt files, Alembic files, and Python
files such as most __init__.py files that only import other files, since
those are similar to header files which are not considered
copyrightable.