Merge branch 'main' into prettier-trailing-comma

This commit is contained in:
Jascha Ezra Urbach 2023-10-17 19:31:24 +02:00 committed by GitHub
commit 4d352faae3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 14 deletions

View file

@ -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();
} }

View file

@ -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>

View file

@ -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' %}

View 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"
}

View file

@ -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"),

View file

@ -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
View file

@ -0,0 +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