~sircmpwn/core.sr.ht

correct a.btn-link border to match regular links

Currently, regular <a> links have a border which disappears on hover.
Elements which use <a class="btn-link"> have the opposite behaviour. I corrected
the latter elements to have the same behaviour as the former.

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
Add strikethrough support to SrhtRenderer
srht/scss: set $font_family_monospace to monospace

This allows users to override the default monospace font in a browser
configuration.
icons: add gift.svg & file-invoice.svg
srht/graphql: Add GraphQLOperation class

Add a new GraphQLOperation class which supports the GraphQL multipart
request spec [1].

[1]: https://github.com/jaydenseric/graphql-multipart-request-spec
Whitelist elements: details, summary, abbr, dfn

<details> + <summary> are a handy pair for having collapsible elements
that have a variety of real world use cases. As a bonus, this does not
require JavaScript.

<abbr> + <dfn> are useful for accessibility and glossaries
core.sr.ht: markdown.py: add <br> to ALLOWED_TAGS

The <br> element is a useful element for the structure of the text where
a newline is wanted, but not the empty line you'd get with <p>.
Fix bleach sanitizing imports

Bleach changed the way CSS is sanitized in 5.0.0 in a non
retro-compatible manner, removing previous imports and adding a new way
to sanitize CSS.

The ALLOWED_STYLES list was empty, so there is no attribute to copy from
it. We merely use a CSSSanitizer which is the new way to specify how CSS
must be sanitized.
Revert "Fix bleach sanitizing imports"

This is not compatible with prior versions of bleach.

This reverts commit 066835900f6439d2d215d05a1ed745c4c32f7848.
Fix bleach sanitizing imports

Bleach changed the way CSS is sanitized in 5.0.0 in a non
retro-compatible manner, removing previous imports and adding a new way
to sanitize CSS.

The ALLOWED_STYLES list was empty, so there is no attribute to copy from
it. We merely use a CSSSanitizer which is the new way to specify how CSS
must be sanitized.
Require celery in setup.py

We import some celery functions. celery needs to be installed for
core.sr.ht to find its imports.
all: fix jinja2 regressions

Shoutout to jinja2 for shipping breaking changes without bumping the
major version number.
graphql.gql_time: trim nanos
srht.graphql: fix date format
srht/graphql: Allow using exec_gql outside of request context

Previously, using exec_gql outside of a request context would fail due
to the reference to request.access_route for the X-Forwarded-For header.
Fix by only adding the X-Forwarded-For header if a request context is
available.
build: switch to alpine 3.15
Rework module path detection

uWSGI has a weirdish importing system, where it populates __file__ but
not __path__, so try using that if __file__ isn't found on the module.
Also throw an exception if neither way works, since without the path the
application will not work correctly anyways, and throw even more cryptic
errors.
Re-enable the jinja template cache

>From local testing this saves ~50ms on git.sr.ht log endpoint, and
similar amounts on other endpoints, depending on how complex templates
are and how many template files it requires to render.
layout.html: Remove theme-color meta element

By hard coding this to #ffffff (white), dark mode doesn't look right in
certain browsers. Remove the tag so that the browser can determine what
color to use in these situations.
Add Libre.js header to {codemirror,simple}.js
Next