mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-28 20:41:46 +00:00
Merge branch 'main' into prettier-trailing-comma
This commit is contained in:
commit
4d352faae3
7 changed files with 69 additions and 14 deletions
|
@ -47,12 +47,11 @@
|
||||||
.querySelectorAll("[data-remove]")
|
.querySelectorAll("[data-remove]")
|
||||||
.forEach((node) => node.addEventListener("click", removeInput));
|
.forEach((node) => node.addEventListener("click", removeInput));
|
||||||
|
|
||||||
// Get the element, add a keypress listener...
|
// Get element, add a keypress listener...
|
||||||
document.getElementById("subjects").addEventListener("keypress", function (e) {
|
document.getElementById("subjects").addEventListener("keypress", function (e) {
|
||||||
// e.target is the element where it listens!
|
// Linstening to element e.target
|
||||||
// if e.target is input field within the "subjects" div, do stuff
|
// If e.target is an input field within "subjects" div preventDefault()
|
||||||
if (e.target && e.target.nodeName == "INPUT") {
|
if (e.target && e.target.nodeName == "INPUT") {
|
||||||
// Item found, prevent default
|
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<base target="_blank">
|
<base target="_blank">
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
||||||
<link rel="apple-touch-icon" href="{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static "images/logo.png" %}{% endif %}">
|
<link rel="apple-touch-icon" href="{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static "images/logo.png" %}{% endif %}">
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
|
||||||
{% block opengraph %}
|
{% block opengraph %}
|
||||||
{% include 'snippets/opengraph.html' %}
|
{% include 'snippets/opengraph.html' %}
|
||||||
|
|
14
bookwyrm/templates/manifest.json
Normal file
14
bookwyrm/templates/manifest.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{% load static %}
|
||||||
|
{
|
||||||
|
"name": "{{ site.name }}",
|
||||||
|
"description": "{{ site.description }}",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static 'images/logo.png' %}{% endif %}",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "/",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
|
@ -34,6 +34,12 @@ urlpatterns = [
|
||||||
"robots.txt",
|
"robots.txt",
|
||||||
TemplateView.as_view(template_name="robots.txt", content_type="text/plain"),
|
TemplateView.as_view(template_name="robots.txt", content_type="text/plain"),
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
"manifest.json",
|
||||||
|
TemplateView.as_view(
|
||||||
|
template_name="manifest.json", content_type="application/json"
|
||||||
|
),
|
||||||
|
),
|
||||||
# federation endpoints
|
# federation endpoints
|
||||||
re_path(r"^inbox/?$", views.Inbox.as_view(), name="inbox"),
|
re_path(r"^inbox/?$", views.Inbox.as_view(), name="inbox"),
|
||||||
re_path(rf"{LOCAL_USER_PATH}/inbox/?$", views.Inbox.as_view(), name="user_inbox"),
|
re_path(rf"{LOCAL_USER_PATH}/inbox/?$", views.Inbox.as_view(), name="user_inbox"),
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
FROM python:3.9
|
FROM python:3.9
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
|
||||||
|
|
||||||
RUN mkdir /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/
|
ENV PYTHONUNBUFFERED=1
|
||||||
RUN pip install -r requirements.txt
|
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
||||||
|
ENV PIP_ROOT_USER_ACTION=ignore PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl
|
COPY nodejs.sources /etc/apt/sources.list.d/
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
|
COPY package.json requirements.txt .stylelintrc.js .stylelintignore /app/
|
||||||
RUN apt-get install -y nodejs && apt-get clean
|
|
||||||
RUN npm install .
|
RUN apt-get update && \
|
||||||
|
apt-get install -y nodejs && \
|
||||||
|
pip install -r requirements.txt && \
|
||||||
|
npm install .
|
||||||
|
|
34
dev-tools/nodejs.sources
Normal file
34
dev-tools/nodejs.sources
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
Types: deb
|
||||||
|
URIs: https://deb.nodesource.com/node_18.x
|
||||||
|
Suites: nodistro
|
||||||
|
Components: main
|
||||||
|
Signed-By:
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
.
|
||||||
|
mQENBFdDN1ABCADaNd/I3j3tn40deQNgz7hB2NvT+syXe6k4ZmdiEcOfBvFrkS8B
|
||||||
|
hNS67t93etHsxEy7E0qwsZH32bKazMqe9zDwoa3aVImryjh6SHC9lMtW27JPHFeM
|
||||||
|
Srkt9YmH1WMwWcRO6eSY9B3PpazquhnvbammLuUojXRIxkDroy6Fw4UKmUNSRr32
|
||||||
|
9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7rH9RSxgDithXtG6Yg5R1aeBbJaPNXL9wpJ
|
||||||
|
YBJbiMjkAFaz4B95FOqZm3r7oHugiCGsHX0AEQEAAYkBHwQYAQIACQUCV0M3UAIb
|
||||||
|
DAAKCRAvWbX5mxvgtE/OB/0VN88DR3Y3fuqy7lq/dthkn7Dqm9YXdorZl3L152eE
|
||||||
|
IF882aG8FE3qZdaLGjQO4oShAyNWmRfSGuoH0XERXAI9n0r8m4mDMxE6rtP7tHet
|
||||||
|
y/5M8x3CTyuMgx5GLDaEUvBusnTD+/v/fBMwRK/cZ9du5PSG4R50rtst+oYyC2ao
|
||||||
|
x4I2SgjtF/cY7bECsZDplzatN3gv34PkcdIg8SLHAVlL4N5tzumDeizRspcSyoy2
|
||||||
|
K2+hwKU4C4+dekLLTg8rjnRROvplV2KtaEk6rxKtIRFDCoQng8wfJuIMrDNKvqZw
|
||||||
|
FRGt7cbvW5MCnuH8MhItOl9Uxp1wHp6gtav/h8Gp6MBa
|
||||||
|
=MARt
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
Loading…
Reference in a new issue