diff --git a/.gitignore b/.gitignore index 1d16fc08..5a936225 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ dumper/*.json htmlcov/ db.sql db.sqlite +db.sqlite3 +.rodney/ initial_data.json ve graph.* diff --git a/.pr-screenshots/after-course.png b/.pr-screenshots/after-course.png new file mode 100644 index 00000000..614f20c4 Binary files /dev/null and b/.pr-screenshots/after-course.png differ diff --git a/.pr-screenshots/after-manage-mods.png b/.pr-screenshots/after-manage-mods.png new file mode 100644 index 00000000..dc5d97ee Binary files /dev/null and b/.pr-screenshots/after-manage-mods.png differ diff --git a/.pr-screenshots/after-mod-home.png b/.pr-screenshots/after-mod-home.png new file mode 100644 index 00000000..ea9677e8 Binary files /dev/null and b/.pr-screenshots/after-mod-home.png differ diff --git a/.pr-screenshots/after-rep-request-rejected.png b/.pr-screenshots/after-rep-request-rejected.png new file mode 100644 index 00000000..df344ec3 Binary files /dev/null and b/.pr-screenshots/after-rep-request-rejected.png differ diff --git a/.pr-screenshots/after-upload.png b/.pr-screenshots/after-upload.png new file mode 100644 index 00000000..102ff3f4 Binary files /dev/null and b/.pr-screenshots/after-upload.png differ diff --git a/.pr-screenshots/after-viewer.png b/.pr-screenshots/after-viewer.png new file mode 100644 index 00000000..410f9f8b Binary files /dev/null and b/.pr-screenshots/after-viewer.png differ diff --git a/.pr-screenshots/before-course.png b/.pr-screenshots/before-course.png new file mode 100644 index 00000000..614f20c4 Binary files /dev/null and b/.pr-screenshots/before-course.png differ diff --git a/.pr-screenshots/before-manage-mods.png b/.pr-screenshots/before-manage-mods.png new file mode 100644 index 00000000..42dd8814 Binary files /dev/null and b/.pr-screenshots/before-manage-mods.png differ diff --git a/.pr-screenshots/before-mod-home.png b/.pr-screenshots/before-mod-home.png new file mode 100644 index 00000000..389a81fa Binary files /dev/null and b/.pr-screenshots/before-mod-home.png differ diff --git a/.pr-screenshots/before-upload.png b/.pr-screenshots/before-upload.png new file mode 100644 index 00000000..3e4d6be6 Binary files /dev/null and b/.pr-screenshots/before-upload.png differ diff --git a/.pr-screenshots/before-viewer.png b/.pr-screenshots/before-viewer.png new file mode 100644 index 00000000..410f9f8b Binary files /dev/null and b/.pr-screenshots/before-viewer.png differ diff --git a/CLAUDE.md b/CLAUDE.md index 8221bdad..aaf7b027 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,6 +27,27 @@ JS libs only when necessary - Follow Django naming: models in PascalCase, fields/methods in snake_case - Use `blank=True, default=""` for optional text fields +## Icons +All icons are Bootstrap Icons stored as Django template includes in `www/templates/icons/`. +Use them with `{% include %}` — never write inline SVGs directly in templates. + +```html +{% include "icons/bi-download.html" %} +{% include "icons/bi-download.html" with size=20 %} +{% include "icons/bi-star-fill.html" with class="text-warning hover-spin" %} +{% include "icons/bi-exclamation-triangle-fill.html" with size=22 style="color: #ef4444;" %} +{% include "icons/bi-check-circle.html" with fill="green" %} +``` + +Parameters (all optional): +- `size` — width and height in px, default `16` +- `class` — extra CSS classes appended after the base `bi bi-*` class +- `style` — inline style string +- `fill` — SVG fill value, default `currentColor` (inherits from text color) +- `title` — accessible title attribute (used on `bi-patch-check-fill` for "Staff pick") + +To add a new icon, create `www/templates/icons/bi-.html` following the same pattern as existing files. + ## Text Tone & User-Facing Content The application uses a **friendly, informal, student-to-student tone** in all user-facing text: diff --git a/catalog/templates/catalog/course.html b/catalog/templates/catalog/course.html index 17c5bcb8..e06aa3c7 100644 --- a/catalog/templates/catalog/course.html +++ b/catalog/templates/catalog/course.html @@ -8,11 +8,7 @@

{% if course.is_archive %} - - - + {% include "icons/bi-archive-fill.html" with size=32 %} {% endif %} {{ course.slug|upper }} {{ course.name }}

@@ -22,13 +18,7 @@

{% endif %} - - - - + {% include "icons/bi-file-earmark-plus.html" %} Partager un document {% if following %} @@ -37,11 +27,7 @@

{% csrf_token %} @@ -52,12 +38,7 @@

{% csrf_token %} @@ -81,12 +62,7 @@

>
@@ -132,22 +108,11 @@

{% if document.hidden %} - - - - + {% include "icons/bi-eye-slash-fill.html" %} {% endif %} {{ document.name|capfirst }} {% if document.staff_pick %} - - - + {% include "icons/bi-patch-check-fill.html" with class="text-primary" title="Staff pick" %} {% endif %}
@@ -174,33 +139,17 @@

{% if document.upvotes > document.downvotes %} {{ document.upvotes }} - - - + {% include "icons/bi-hand-thumbs-up.html" %} {% elif document.upvotes < document.downvotes %} {{ document.downvotes }} - - - + {% include "icons/bi-hand-thumbs-down.html" %} {% else %} {% if document.upvotes %} {{ document.upvotes }} - - - + {% include "icons/bi-hand-thumbs-up.html" %} {{ document.downvotes }} - - - + {% include "icons/bi-hand-thumbs-down.html" %} {% endif %} {% endif %}
@@ -208,24 +157,13 @@

- - - + {% include "icons/bi-pencil.html" %} {% endif %} - - - - + {% include "icons/bi-download.html" %}

@@ -249,7 +187,7 @@

regarde dans les archives !

-

Il n’y a encore rien dans ce cours…

+

Il n'y a encore rien dans ce cours…

Les documents que tu trouves sur DocHub ont été partagés par des étudiants comme toi et nous. N'hésite pas à partager tes notes, des questions d'examens ou même juste un scan des questions du dernier TP. C'est grâce à des petits gestes comme ça que diff --git a/catalog/templates/catalog/finder.html b/catalog/templates/catalog/finder.html index 2460d919..b727e9fb 100644 --- a/catalog/templates/catalog/finder.html +++ b/catalog/templates/catalog/finder.html @@ -44,11 +44,7 @@

{% if forloop.last and not forloop.first %} {% endif %} @@ -60,13 +56,7 @@
{% if type.grouper != "OTHE" %}
  • - - - - + {% include "icons/bi-mortarboard.html" %}
    {{ type.grouper }}{{ type.list|pluralize }}
  • @@ -93,12 +83,7 @@
    class="text-body text-decoration-none">
    - - - + {% include "icons/bi-folder.html" %}
    {{ course.name }} diff --git a/documents/templates/documents/document_bulk.html b/documents/templates/documents/document_bulk.html index 66176983..ca282102 100644 --- a/documents/templates/documents/document_bulk.html +++ b/documents/templates/documents/document_bulk.html @@ -5,22 +5,11 @@ {% block content %} - - - + {% include "icons/bi-arrow-left.html" with size=20 class="hover-translate" %} {{ course.slug|upper }} {{ course.name }}
    diff --git a/documents/templates/documents/document_upload.html b/documents/templates/documents/document_upload.html index 13969a71..f9b7b99b 100644 --- a/documents/templates/documents/document_upload.html +++ b/documents/templates/documents/document_upload.html @@ -32,12 +32,7 @@ {% endif %} - - - + {% include "icons/bi-arrow-left.html" with size=20 class="hover-translate" %} {{ course.slug|upper }} {{ course.name }} {% if course.is_archive %} @@ -61,58 +56,18 @@ doc(x), ppt(x), odt, et bien plus encore.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {% include "icons/bi-check-circle.html" with fill="green" %} + {% include "icons/bi-file-earmark-pdf.html" with size=20 %} + {% include "icons/bi-file-earmark-word.html" with size=20 %} + {% include "icons/bi-file-earmark-richtext.html" with size=20 %} + {% include "icons/bi-file-earmark-slides.html" with size=20 %} + {% include "icons/bi-file-earmark-image.html" with size=20 %} + {% include "icons/bi-file-earmark-plus.html" with size=20 %}

    - N'oublie pas que ce qui est uploadé sur DocHub est soumis au droit d’auteur, + N'oublie pas que ce qui est uploadé sur DocHub est soumis au droit d'auteur, et que tu dois donc avoir l'autorisation de son auteur pour l'y ajouter sur DocHub.

    @@ -141,13 +96,7 @@
    - - - - + {% include "icons/bi-cloud-arrow-up.html" with size=32 %} Drag & drop ou clic pour ajouter un document
    @@ -179,11 +128,7 @@
    @@ -198,9 +143,7 @@ {% if bulk_form.url.errors %} @@ -208,13 +151,7 @@