Commit Graph

167 Commits

Author SHA1 Message Date
Pontoporeia
73fdda4a7f fix repertoire AP/OR/FI columns and main scroll containment
- repertoire-index.php: add $colHasMatches per-column guard.
  Entries in a column are only faded when that column has at least one
  matched entry in the current result set. When a dimension has no
  matched entries (e.g. no thesis has orientation_id set yet), the
  entire column stays fully interactive — all values remain clickable.
  This fixes: empty columns, forced single-select, cascade fading.

- Database.php: revert allAp/allOr/allFi to full lookup-table queries
  so all known values are always shown (not just ones linked to theses).

- common.css: body is now a flex column; main gets flex:1 + min-height:0;
  header-search-wrap gets flex-shrink:0; duplicate html/body blocks merged.
- public.css: removed redundant top-level main block; home-main gets min-height:0.
- repertoire.css: search-main gets min-height:0 for proper flex scroll.
2026-04-24 23:03:49 +02:00
Pontoporeia
78449afe64 some css changes 2026-04-24 23:01:25 +02:00
Pontoporeia
1b02ccb1d5 fix: mark languages as required, add required-field visual indicators on both forms
- checkbox-list.php: support $required prop → adds required + aria-required on fieldset
- add.php: languages checkbox now marked required (matches server-side validation)
- partage/index.php: same for student form
- admin.css: dashed border on required inputs, bold labels, red asterisk via :has(), "Champs obligatoires" note
- Both forms now show "* Champs obligatoires" note at top

Server-side required fields = titre, auteurice, synopsis, année, orientation, ap, finality, languages (≥1), access_type_id, confirmation_email. All now have required attribute + visual asterisk.
2026-04-20 16:19:55 +02:00
Pontoporeia
e21a4d81a2 refine: required confirmation_email field on both student forms, StudentEmail uses it directly
- Add dedicated 'confirmation_email' (type=email, required) field
  to student form at end of submission (partage + admin).
- ThesisCreateController now validates it is present and a valid
  email; form is rejected if missing/invalid.
- Autofocus mapping for confirmation_email errors.
- StudentEmail uses confirmation_email directly (removed extractEmail
  hack that mined email from free-form contact field).
2026-04-20 15:47:55 +02:00
Pontoporeia
fa75ca4a65 fix: inline getDatabasePath into Database.php, delete config/config.php
- Remove require_once for config/config.php (file was never deployed — outside app/)
- Inline DB path resolution directly in Database::determineDatabasePath()
- Uses APP_ROOT when defined (bootstrap already loaded), falls back to __DIR__/../
- DB_ENV=test|prod env-var override preserved for tests
- php -S cli-server -> test.db, nginx/fpm -> posterg.db
2026-04-20 14:23:30 +02:00
Pontoporeia
de2e7a61ee feat: single entry point routing — convert to front controller pattern
- Create app/public/index.php as front controller (bootstrap + Dispatcher)
- Rewrite app/router.php for PHP dev server → all non-asset requests to index.php
- Update Dispatcher to render full page layouts (head+header+view+footer)
- Move public view templates into templates/public/ (home, search, tfe, about, repertoire)
- Delete dead direct-access public/*.php files (apropos, search, tfe, licence, repertoire)
- Add clean URL routes to Dispatcher (/search, /tfe, /repertoire, /apropos, /licence, /media)
- Remove .php extensions from all internal links (header, views, templates, URLs)
- Update OG tags in controllers to use clean URLs
- Update nginx posterg.conf → front-controller try_files pattern, block direct .php access
- Update header.php and search-bar.php form actions to clean URLs
- Switch AboutController nav key from 'nav' to 'currentNav' for consistency
2026-04-20 12:42:15 +02:00
Pontoporeia
75f808bee4 feat: extract MediaController, wire into Dispatcher, delete media.php 2026-04-20 12:32:00 +02:00
Pontoporeia
b03be51b92 feat: migrate admin system page to HTMX with tab-based navigation and log viewer 2026-04-16 15:03:40 +02:00
Pontoporeia
bf30aab0b3 migrate apropos data from config/apropos.php to SQLite
- Create apropos_contents table via migration 010
- Add Database methods: getAproposContent(), saveAproposContent(), getAllAproposContents()
- Replace admin/pages.php with admin/contenus.php (renamed header from 'Pages statiques' to 'Contenus')
- Replace admin/pages-edit.php with admin/contenus-edit.php (support editing pages + apropos contents)
- Create admin/actions/apropos.php for saving apropos data (contacts, credits, erg_url)
- Update public/apropos.php to read contacts/credits/erg_url from DB
- Delete config/apropos.php
2026-04-16 14:22:41 +02:00
Pontoporeia
e70a65ffb6 fix: session boot on POST path, consolidate rate limiter via checkKey() 2026-04-16 13:07:16 +02:00
Pontoporeia
a6df3c8c0e fix: /partage/<slug> routing (regex delimiter + nginx location) 2026-04-16 13:07:16 +02:00
Pontoporeia
b7be93e30b Security: rate limiting and flash messaging for partage share links
- Add rate limiting (5 submissions per IP per 10 min, per share link)
  to prevent abuse of shared submission endpoints
- Replace all plain die() error responses with styled flash messages
  and redirects (invalid slug, disabled link, expired link, wrong password,
  rate limit exceeded, CSRF failure)
- Add dedicated error page renderer for disabled/expired links with
  home page link
- Password gate now uses flash message via session redirect instead
  of inline error variable
2026-04-16 13:07:16 +02:00
Pontoporeia
150099dc3c admin: replace header 'Ajouter un TFE' nav link with toolbar button 2026-04-16 13:07:16 +02:00
Pontoporeia
f4aba500e6 feat: student mode support for thanks page (admin-auth only)
- add hidden student_mode field in add.php form
- pass mode=student through redirect to thanks.php in formulaire.php
- thanks.php renders clean student thank-you page (no header, centered button)
- add CSS for .thanks-student-page, .btn-new-form, .thanks-success, .thanks-error
- admin auth always required; student mode is purely UI variant on the physical machine
2026-04-15 14:24:44 +02:00
Pontoporeia
150b5b1dac admin/add: add ?mode=student toggle — hides admin header, keeps auth 2026-04-15 14:24:44 +02:00
Pontoporeia
0eb2e310f4 admin/parametres: cleanup page — remove card syntax, use semantic HTML (checkboxes/fieldsets), move delete-all-TFE danger zone into maintenance 2026-04-15 14:24:44 +02:00
Pontoporeia
fd4fb5ce4a Add delete/batch-delete and sortable columns to admin list
- Database: add deleteThesis() and bulkDeleteTheses() methods with file cleanup
- Database: add SORT_MAP + buildOrderBy() for safe column sorting
- Database: getThesesList() now respects sort/dir filter params
- New action: actions/delete.php (single + batch delete with CSRF)
- Admin index: delete button per row with confirmation dialog
- Admin index: batch 'Supprimer' button in bulk actions bar
- Admin index: sortable column headers (ID, Titre, Année, Orientation, AP, Statut)
- Admin index: sort state preserved in pagination links
- CSS: admin-btn-delete (red muted), admin-sort-link styles
2026-04-15 14:24:44 +02:00
Pontoporeia
0cb4451218 formulaire: default interne, unpublished, contact toggle, settings section 2026-04-15 14:24:44 +02:00
Pontoporeia
67a4aaac26 Fix nginx deduplication: remove nginx/scripts/ entirely, fix README typos and dead references 2026-04-15 14:24:44 +02:00
Pontoporeia
507f3eb704 Consolidate nginx docs and scripts, update paths 2026-04-15 14:24:44 +02:00
Pontoporeia
a13e73aed3 Replace random HSL gradients in homepage cards with header gradient 2026-04-09 14:29:17 +02:00
Pontoporeia
424f79c819 typography: switch display font from Combined to Ductus 2026-04-08 18:09:35 +02:00
Pontoporeia
a333a5fdad Rebrand: replace PostErg with XAMXAM in admin header link, default title, and OG site_name 2026-04-08 18:04:35 +02:00
Pontoporeia
18045af243 favicon: replace SVG placeholder with full PNG/ICO set from assets/favicon/ 2026-04-08 18:01:41 +02:00
Pontoporeia
d68645f1b1 style: retheme system page to site light palette — remove dark --sys-* tokens 2026-04-08 17:49:50 +02:00
Pontoporeia
df414346e9 fix: SystemController php-fpm detection — probe phpX.Y-fpm from running PHP version first 2026-04-08 17:46:42 +02:00
Pontoporeia
7117934d07 fix: replace mb_strlen/mb_substr with strlen/substr — mbstring not available on prod 2026-04-08 17:42:01 +02:00
Pontoporeia
4199b206db Move CSV import to inline dialog on list page 2026-04-08 15:16:10 +02:00
Pontoporeia
603af07b68 Add Paramètres page: consolidate maintenance + account settings 2026-04-08 15:06:51 +02:00
Pontoporeia
ba135f0cb5 fix: replace 'Xamxam' with 'Posterg' in public nav header 2026-04-08 14:14:37 +02:00
Pontoporeia
f6977384b9 migrate to utopia fluid type and space scales across all CSS 2026-04-08 14:14:37 +02:00
Pontoporeia
ad06bbbcaf bump all font-size values ~10% across all CSS files 2026-04-08 14:14:37 +02:00
Pontoporeia
0c2276d5ad Split search into search.php; repertoire.php is index-only 2026-04-08 14:14:37 +02:00
Pontoporeia
e96ec572be tfe: hyperlink metadata values to repertoire.php with correct filter params 2026-04-08 14:14:37 +02:00
Pontoporeia
55c6ac21b8 fix tfe page: scope common.css header to body>header, fix grid width collapse, remove overflow-y clip 2026-04-08 14:14:37 +02:00
Pontoporeia
3a1cd5b43e tfe page: author above title, interne/externe jury split, rounded images, strip contact protocol 2026-04-08 14:14:37 +02:00
Pontoporeia
11a665e096 Improve À propos page layout: sticky TOC nav, bordered contact rows, credits dl grid 2026-04-08 14:14:37 +02:00
Pontoporeia
dddfc8554b fonts: add --font-body/--font-display vars, use them everywhere 2026-04-08 14:14:37 +02:00
Pontoporeia
797eaf87d1 Apply correct fonts: Combined for titles, BBBDMSans for body text 2026-04-08 14:14:37 +02:00
Pontoporeia
572ef75a1e répertoire: rename search.php, 6-column layout, HTMX filter, faded entries disabled, URL-shareable 2026-04-08 14:14:37 +02:00
Pontoporeia
088324cb80 Match Accueil.png mockup: nav layout, full-width search, section label 2026-04-08 14:14:37 +02:00
Pontoporeia
8b27acec27 fix homepage card grid styling: gaps, borders, rounded corners, gradient aspect-ratio 2026-04-08 14:14:37 +02:00
Pontoporeia
0bfb24723f fix(font): rebuild Combinedd.otf with sorted kern pairs to fix browser discard 2026-04-08 14:14:37 +02:00
Pontoporeia
b8e94f1b6b fix(css): add format hint + descriptors to @font-face for police1/Combinedd.otf 2026-04-08 14:14:37 +02:00
Pontoporeia
b45e6c50cc fix: admin CSP allow inline scripts
script-src 'self' 'unsafe-inline' added to admin Content-Security-Policy.
default-src 'self' was blocking OverType editor init block and
the dev live-reload poller. Admin section is auth-gated so
unsafe-inline is acceptable.
2026-04-08 14:14:37 +02:00
Pontoporeia
756ddb5765 fix: RateLimit graceful degradation on permission denied
Silence mkdir() with @ operator; guard file_put_contents with
is_writable() check. When storage/cache/rate_limit is not writable
by php-fpm, requests are allowed through instead of throwing
warnings that flood the nginx error log.
2026-04-06 16:40:55 +02:00
Pontoporeia
6a1b41ac93 css: remove dark mode, unify token system, eliminate all hardcoded colors
- Remove @media (prefers-color-scheme: dark) block from variables.css
- Delete colors.css (dead reference doc, never loaded)
- Add semantic tokens to variables.css:
    --header-gradient-fade, --header-shadow-strong/soft, --header-nav-active-border
    --search-error-bg/border/color
    --sys-bg-surface/deep/panel, --sys-border/border-deep/border-hover
    --sys-text-dim/bright/body, --sys-overlay, --sys-syntax-* (7 highlight tokens)
    --success/warning/error/blue/yellow/green -muted-bg/border/hover alpha overlays
    --danger-border-muted
- Replace all hardcoded hex/rgba in common.css, main.css, search.css, admin.css, system.css
- Fix --border-color typo -> --border-primary in search.css
- Fix view-toggle__btn active color: --text-primary -> --accent-foreground
- Admin and public share identical token set, no separate admin theme
- Update README.md
2026-04-06 16:16:11 +02:00
Pontoporeia
9a9dfd2b9e fix(apropos): replace straight apostrophe in l'ERG role string (parse error) 2026-04-06 15:34:06 +02:00
Pontoporeia
480451aa2b replace EasyMDE (333KB) with OverType (118KB) in pages-edit.php
- Remove easymde.min.js (320KB) and easymde.min.css (13KB)
- Vendor overtype.min.js (118KB, v2.3.5)
- Replace <textarea name=content> + 60-line toolbar/SVG init with:
  - <input type=hidden name=content> for form submission
  - <div id=editor> as OverType mount target
  - 6-line init: value from hidden input, onChange syncs it back
- Net saving: ~215KB assets, ~54 lines of inline JS
2026-04-06 15:33:08 +02:00
Pontoporeia
d51cd62088 Extract last inline style from header.php into admin.css
The SVG icon in the admin nav's public-site link had two inline styles:
  style="vertical-align:middle;margin-right:0.4em"

Moved to a new CSS rule:
  .admin-body header nav > a svg { vertical-align: middle; margin-right: 0.4em; }

templates/header.php now contains zero style= attributes.
The only remaining inline styles project-wide are:
  - dynamic gradient (hsl computed from $item['id']) in public/index.php — legitimately dynamic
  - --disk-pct/--disk-color custom properties in system.php — carry PHP runtime values
2026-04-06 15:33:08 +02:00