From: Radek Czajka Date: Thu, 14 May 2026 09:38:41 +0000 (+0200) Subject: Minor layout fixes X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/refs/heads/master?ds=inline;hp=0636415d54e414aa9ddff61bed92f72f9ee03a21 Minor layout fixes --- diff --git a/Dockerfile b/Dockerfile index ed113fe3b..b23530b9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,13 +37,37 @@ WORKDIR /app/src RUN mkdir /app/.ipython + + + FROM base AS dev #RUN pip install --no-cache-dir coverage + + FROM base AS prod +USER root + RUN pip install --no-cache-dir gunicorn +USER app + COPY src /app/src + + + + +FROM prod AS static-builder + +RUN python manage.py collectstatic --noinput + + + +FROM nginx:alpine AS nginx + +# COPY nginx.conf conf.d/... + +COPY --from=static-builder /app/var/static /app/var/static diff --git a/Makefile b/Makefile index 98a68987c..59e222af6 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ build: UID=$(UID) GID=$(GID) docker compose build shell: - UID=$(UID) GID=$(GID) docker compose run --rm web bash + UID=$(UID) GID=$(GID) docker compose exec web bash logs: docker compose logs -f diff --git a/docker-compose.yml b/docker-compose.yml index b6515098d..bda15bb40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,16 +7,21 @@ x-app-base: &app-base GID: ${GID:-1000} env_file: - .env + environment: + DEBUG: "True" volumes: - ./src:/app/src + - ./scripts:/app/scripts - ./var/media:/app/var/media - ./var/static:/app/var/static - ./var/counters/:/app/var/counters + - ${LIBRARIAN:-/nonexistent}:/${LIBRARIAN:+edita}ble/librarian - ipython:/app/.ipython depends_on: - db - redis - memcached + entrypoint: /app/scripts/entrypoint.sh services: web: @@ -31,7 +36,6 @@ services: db: image: postgres:18 - container_name: db env_file: - .env volumes: diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh new file mode 100755 index 000000000..7d809ef83 --- /dev/null +++ b/scripts/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# For use in development only. +# Installs in editable mode any libs mounted under /editable/ +# This way, we can easily work on e.g. librarian. + +for lib in /editable/* +do + [ -d "$lib" ] || continue + pip install -e $lib +done + +exec "$@" diff --git a/src/wolnelektury/settings/basic.py b/src/wolnelektury/settings/basic.py index 5c86787f8..84503ed5f 100644 --- a/src/wolnelektury/settings/basic.py +++ b/src/wolnelektury/settings/basic.py @@ -3,7 +3,7 @@ # import os -DEBUG = True +DEBUG = os.environ.get('DEBUG', '') ADMINS = [ # ('Your Name', 'your_email@domain.com'), diff --git a/src/wolnelektury/static/2022/styles/layout/_annoy.scss b/src/wolnelektury/static/2022/styles/layout/_annoy.scss index 18c8df847..d66cb165e 100644 --- a/src/wolnelektury/static/2022/styles/layout/_annoy.scss +++ b/src/wolnelektury/static/2022/styles/layout/_annoy.scss @@ -433,7 +433,7 @@ } p { - margin: 1em 0; + margin: 0 0 1em 0; } .l-button { display: inline-block; diff --git a/src/wolnelektury/static/2022/styles/layout/_books.scss b/src/wolnelektury/static/2022/styles/layout/_books.scss index c983b3876..e14adbfac 100644 --- a/src/wolnelektury/static/2022/styles/layout/_books.scss +++ b/src/wolnelektury/static/2022/styles/layout/_books.scss @@ -108,9 +108,6 @@ img { width: 100%; - @include rwd($break3) { - width: 173px; - } } } diff --git a/src/wolnelektury/static/2022/styles/layout/_checkout.scss b/src/wolnelektury/static/2022/styles/layout/_checkout.scss index 135c65310..a1ea7b4f3 100644 --- a/src/wolnelektury/static/2022/styles/layout/_checkout.scss +++ b/src/wolnelektury/static/2022/styles/layout/_checkout.scss @@ -111,20 +111,21 @@ letter-spacing: -0.02em; color: #92BD39; margin: 0; + margin-bottom: 23px; } p { font-weight: normal; font-size: 18px; line-height: 150%; - margin-top: 8px; + margin-top: 0; + margin-bottom: 8px; &:first-of-type { font-weight: 600; font-size: 21.5px; line-height: 140%; letter-spacing: -0.01em; - margin-top: 23px; } } } diff --git a/src/wolnelektury/templates/account/base.html b/src/wolnelektury/templates/account/base.html index 40c1de9e7..093fcb2a6 100644 --- a/src/wolnelektury/templates/account/base.html +++ b/src/wolnelektury/templates/account/base.html @@ -1,7 +1,7 @@ {% extends "base_simple.html" %} {% block body %} -
+
{% block content %}{% endblock %}
{% endblock %} diff --git a/src/wolnelektury/templates/socialaccount/connections.html b/src/wolnelektury/templates/socialaccount/connections.html index dcee6ff87..fd4110389 100644 --- a/src/wolnelektury/templates/socialaccount/connections.html +++ b/src/wolnelektury/templates/socialaccount/connections.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Połączone konta" %}{% endblock %} {% block body %} -
+

{% trans "Połączone konta" %}

diff --git a/src/wolnelektury/templates/socialaccount/login_cancelled.html b/src/wolnelektury/templates/socialaccount/login_cancelled.html index 3e95773c9..98da1308b 100644 --- a/src/wolnelektury/templates/socialaccount/login_cancelled.html +++ b/src/wolnelektury/templates/socialaccount/login_cancelled.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Logowanie anulowane" %}{% endblock %} {% block body %} -
+

{% trans "Logowanie anulowane" %}

diff --git a/src/wolnelektury/templates/user.html b/src/wolnelektury/templates/user.html index e9a504781..42078df59 100644 --- a/src/wolnelektury/templates/user.html +++ b/src/wolnelektury/templates/user.html @@ -20,7 +20,6 @@ {% if request.user.membership %}

{% trans "Wspierasz Wolne Lektury, dziękujemy!" %}

{% endif %} -

{% trans "Zewnętrzne konta" %}

{% trans "Wyloguj się" %}

{% endblock %}