Redesign UI to match target design images

- Flat purple-gradient nav bar with POSTERG/RÉPERTOIRE/À PROPOS links
- Full-width search bar with icon, bottom-border only, below nav
- Home: white bg, media card grid (thumbnail + author/title label below)
- Répertoire: 4-column index (Années/Catégories/Étudiantes/Mots-clés)
- TFE: 2-column layout (large text left, media right)
- À Propos: 2-column, large monospace text, new apropos.php page
- Admin: dark theme (#1a1a1a), purple gradient nav, bottom-border inputs
- New shared partials: templates/nav.php, templates/search-bar.php
- Rewrote all CSS: common, main, search, tfe, apropos, admin
This commit is contained in:
Pontoporeia
2026-02-24 23:34:16 +01:00
parent eaad740574
commit 2110d2b916
22 changed files with 2459 additions and 3043 deletions

View File

@@ -1,304 +1,473 @@
/* ============================================================
ADMIN SECTION
============================================================ */
:root {
--background-body: #3c856bff;
--background: #161f27;
--background-alt: #1a242f;
--selection: #1c76c5;
--text-main: #dbdbdb;
--text-bright: #fff;
--text-muted: #a9b1ba;
--links: #41adff;
--focus: #0096bfab;
--border: ;
--code: #ffbe85;
--animation-duration: 0.1s;
--button-base: #0c151c;
--button-hover: #040a0f;
--scrollbar-thumb: var(--button-hover);
--scrollbar-thumb-hover: color-mod(var(--scrollbar-thumb) lightness(-30%));
--form-placeholder: #a9a9a9;
--form-text: #fff;
--variable: #d941e2;
--highlight: #efdb43;
--select-arrow: svg-load("./assets/select-arrow.svg", fill: #efefef);
--admin-bg: #1a1a1a;
--admin-bg-alt: #242424;
--admin-border: #333;
--admin-text: #e8e8e8;
--admin-text-muted: #888;
--admin-purple: #9557b5;
--admin-input-bg: transparent;
}
/* @media (prefers-color-scheme: dark) { */
/* --background-body: #202b38; */
/* --background: #161f27; */
/* --background-alt: #1a242f; */
/* --selection: #1c76c5; */
/* --text-main: #dbdbdb; */
/* --text-bright: #fff; */
/* --text-muted: #a9b1ba; */
/* --links: #41adff; */
/* --focus: #0096bfab; */
/* --border: #526980; */
/* --code: #ffbe85; */
/* --animation-duration: 0.1s; */
/* --button-base: #0c151c; */
/* --button-hover: #040a0f; */
/* --scrollbar-thumb: var(--button-hover); */
/* --scrollbar-thumb-hover: color-mod(var(--scrollbar-thumb) lightness(-30%)); */
/* --form-placeholder: #a9a9a9; */
/* --form-text: #fff; */
/* --variable: #d941e2; */
/* --highlight: #efdb43; */
/* --select-arrow: svg-load("./assets/select-arrow.svg", fill: #efefef); */
/* } */
/* Base Styles */
body {
margin: auto;
padding: 0;
background-color: var(--background-body);
color: var(--text-main);
font-size: 1.2em;
}
header, main, footer {
margin: auto 2ch;
}
header, footer {
text-align: center;
}
main {
padding: 2ch;
max-width: 80vw;
margin: auto 1.2rem;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
position: relative;
}
table {
table-layout: auto;
margin: auto;
width: 95vw;
margin-left: calc(50% - 45vw);
/* margin: auto; */
}
table {
width: max-content;
min-width: 95vw; /* optional fallback */
table-layout: auto;
}
/* https://stackoverflow.com/questions/3084261/alternate-table-row-color-using-css */
tr:nth-child(even) {
background-color: #204639;
}
tr:nth-child(odd) {
background-color: #2f6a55;
}
nav {
margin-top: 1rem;
}
fieldset {
border: 1px solid;
border-radius: 6px;
html, body {
margin: 0;
margin-bottom: 12px;
padding: 1em;
padding: 0;
height: 100%;
}
legend {
font-size: 0.9em;
.admin-body {
display: flex;
flex-direction: column;
min-height: 100vh;
background: var(--admin-bg);
color: var(--admin-text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
}
/* Admin nav (dark version of site-nav) */
.admin-nav {
background: linear-gradient(to bottom, var(--admin-purple) 0%, rgba(149, 87, 181, 0.0) 100%);
padding: 0.55rem 1.5rem;
display: flex;
align-items: center;
gap: 2.5rem;
flex-shrink: 0;
}
.admin-nav__logo {
font-size: 0.88rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
font-weight: 400;
}
.admin-nav__link {
font-size: 0.85rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.9);
text-decoration: none;
font-weight: 400;
transition: opacity 0.15s;
}
.admin-nav__link:hover,
.admin-nav__link.active {
opacity: 1;
color: var(--white);
}
/* Main content area */
.admin-main {
flex: 1;
padding: 2.5rem 2rem 4rem;
max-width: 1100px;
width: 100%;
}
.admin-page-title {
font-size: 1.8rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--admin-text);
margin: 0 0 2.5rem 0;
}
label {
vertical-align: middle;
margin-bottom: 1em;
display: inline-block;
/* ---- Forms ---- */
.admin-form {
display: flex;
flex-direction: column;
gap: 0;
}
button,
select,
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="checkbox"],
input[type="range"],
input[type="radio"] {
.admin-form-row {
display: grid;
grid-template-columns: 260px 1fr;
align-items: start;
border-top: 1px solid var(--admin-border);
padding: 0.75rem 0;
gap: 1rem;
}
.admin-form-row:last-of-type {
border-bottom: 1px solid var(--admin-border);
}
.admin-label {
font-size: 0.92rem;
color: var(--admin-text);
padding-top: 0.5rem;
font-weight: 400;
}
.admin-input,
.admin-select,
.admin-textarea {
width: 100%;
background: var(--admin-input-bg);
border: none;
border-bottom: 1px solid var(--admin-border);
color: var(--admin-text);
font-size: 0.92rem;
font-family: inherit;
padding: 0.4rem 0;
outline: none;
border-radius: 0;
transition: border-color 0.15s;
-webkit-appearance: none;
appearance: none;
}
.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
border-bottom-color: var(--admin-purple);
}
.admin-input::placeholder,
.admin-textarea::placeholder {
color: var(--admin-text-muted);
font-size: 0.88rem;
}
.admin-textarea {
resize: vertical;
min-height: 100px;
line-height: 1.5;
}
/* Select custom arrow */
.admin-select {
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0 center;
padding-right: 1.2rem;
}
.admin-select option {
background: var(--admin-bg);
color: var(--admin-text);
}
/* File inputs */
.admin-file-input {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.admin-file-input input[type="file"] {
font-size: 0.85rem;
color: var(--admin-text-muted);
background: transparent;
border: 1px dashed var(--admin-border);
padding: 0.4rem 0.6rem;
border-radius: 3px;
cursor: pointer;
font-family: inherit;
}
.admin-file-input input[type="file"]:hover {
border-color: var(--admin-purple);
}
.admin-hint {
font-size: 0.78rem;
color: var(--admin-text-muted);
margin-top: 0.15rem;
}
/* Checkboxes & radios */
.admin-checkbox-list {
display: flex;
flex-direction: column;
gap: 0.35rem;
padding-top: 0.3rem;
}
.admin-checkbox-label {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.9rem;
color: var(--admin-text);
cursor: pointer;
}
input,
select {
display: block;
.admin-checkbox-label input[type="checkbox"] {
accent-color: var(--admin-purple);
width: 14px;
height: 14px;
cursor: pointer;
}
input,
button,
textarea,
select {
color: var(--form-text);
background-color: var(--background);
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
/* Submit button */
.admin-submit-wrap {
margin-top: 2rem;
padding-top: 1.5rem;
}
.admin-btn {
padding: 0.65rem 2.5rem;
background: var(--admin-purple);
color: #fff;
border: none;
border-radius: 6px;
outline: none;
border-radius: 3px;
font-size: 0.92rem;
font-family: inherit;
cursor: pointer;
letter-spacing: 0.04em;
transition: background 0.15s;
}
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
background-color: var(--button-base);
padding-right: 30px;
padding-left: 30px;
.admin-btn:hover {
background: #7b3fa0;
}
/* Alert Messages */
.error-message,
.alert-error {
background: #fee;
border: 2px solid #c00;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
color: #c00;
.admin-btn-secondary {
padding: 0.5rem 1.5rem;
background: transparent;
color: var(--admin-text-muted);
border: 1px solid var(--admin-border);
border-radius: 3px;
font-size: 0.88rem;
font-family: inherit;
cursor: pointer;
letter-spacing: 0.04em;
text-decoration: none;
display: inline-block;
transition: all 0.15s;
}
.success-message,
.alert-success {
background: #efe;
border: 2px solid #0a0;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
color: #0a0;
.admin-btn-secondary:hover {
border-color: var(--admin-text-muted);
color: var(--admin-text);
}
.info-message {
background: #f5f5f5;
padding: 1rem;
border-radius: 4px;
max-height: 400px;
overflow-y: auto;
/* ---- Alert Messages ---- */
.admin-alert {
padding: 0.75rem 1rem;
border-radius: 3px;
font-size: 0.9rem;
margin-bottom: 1.5rem;
border-left: 3px solid;
}
.info-message pre {
margin: 0;
font-size: 0.9em;
.admin-alert--error {
background: rgba(200, 0, 0, 0.1);
border-color: #c00;
color: #ff6b6b;
}
/* Lists */
/* ul.no-style { */
/* list-style: none; */
/* } */
/* Filters */
.filters {
padding: 1rem;
margin-bottom: 2rem;
border-radius: 4px;
.admin-alert--success {
background: rgba(0, 150, 80, 0.1);
border-color: #0a0;
color: #4caf50;
}
.filters form {
/* ---- Stats cards ---- */
.admin-stats {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
align-items: end;
}
.filters fieldset {
margin: 0;
padding: 0;
.admin-stat {
background: var(--admin-bg-alt);
border: 1px solid var(--admin-border);
border-radius: 4px;
padding: 1rem 1.5rem;
min-width: 140px;
}
.admin-stat__number {
font-size: 2rem;
font-weight: 700;
color: var(--admin-purple);
line-height: 1;
}
.admin-stat__label {
font-size: 0.82rem;
color: var(--admin-text-muted);
margin-top: 0.25rem;
}
/* ---- Filters bar ---- */
.admin-filters {
display: flex;
gap: 0.75rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
align-items: flex-end;
}
.admin-filters input[type="text"],
.admin-filters select {
background: var(--admin-bg-alt);
border: 1px solid var(--admin-border);
border-radius: 3px;
color: var(--admin-text);
font-size: 0.88rem;
font-family: inherit;
padding: 0.45rem 0.75rem;
outline: none;
cursor: pointer;
}
.admin-filters input[type="text"]:focus,
.admin-filters select:focus {
border-color: var(--admin-purple);
}
.admin-filters-btn {
padding: 0.45rem 1rem;
background: var(--admin-purple);
color: #fff;
border: none;
min-width: 200px;
border-radius: 3px;
font-size: 0.88rem;
font-family: inherit;
cursor: pointer;
}
/* Tables */
.thesis-table {
.admin-filters-reset {
font-size: 0.88rem;
color: var(--admin-text-muted);
text-decoration: underline;
cursor: pointer;
}
/* ---- Table ---- */
.admin-table {
width: 100%;
border-collapse: collapse;
font-size: 0.88rem;
}
.thesis-table th,
.thesis-table td {
padding: 0.75rem;
.admin-table th {
text-align: left;
font-size: 0.75rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--admin-text-muted);
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--admin-border);
font-weight: 400;
white-space: nowrap;
}
.thesis-table th {
font-weight: bold;
.admin-table td {
padding: 0.65rem 0.75rem;
border-bottom: 1px solid var(--admin-border);
color: var(--admin-text);
vertical-align: top;
}
.thesis-title {
font-weight: bold;
.admin-table tr:hover td {
background: var(--admin-bg-alt);
}
.thesis-subtitle {
.admin-table .thesis-title {
font-weight: 500;
color: var(--admin-text);
}
.admin-table .thesis-subtitle {
font-size: 0.82rem;
color: var(--admin-text-muted);
font-style: italic;
color: #666;
font-size: 0.9em;
}
/* Status Badges */
/* Status badges */
.status-badge {
display: inline-block;
padding: 0.25rem 0.5rem;
padding: 0.2rem 0.5rem;
border-radius: 3px;
font-size: 0.85em;
}
.status-pending {
background: #ffd700;
color: #000;
font-size: 0.78rem;
font-weight: 500;
letter-spacing: 0.04em;
}
.status-published {
background: #90ee90;
color: #000;
background: rgba(0, 150, 80, 0.15);
color: #4caf50;
}
/* Buttons */
.actions {
.status-pending {
background: rgba(255, 200, 0, 0.12);
color: #ffc107;
}
/* Action buttons in table */
.admin-actions {
display: flex;
gap: 0.5rem;
gap: 0.4rem;
flex-wrap: wrap;
}
.btn {
padding: 0.35rem 0.75rem;
.admin-btn-sm {
padding: 0.25rem 0.6rem;
border-radius: 3px;
font-size: 0.78rem;
font-family: inherit;
cursor: pointer;
text-decoration: none;
font-size: 0.9em;
display: inline-block;
border: 1px solid transparent;
transition: all 0.15s;
white-space: nowrap;
}
.btn-view {
background: #4a90e2;
color: white;
.admin-btn-view {
background: rgba(65, 173, 255, 0.15);
color: #41adff;
border-color: rgba(65, 173, 255, 0.3);
}
.btn-edit {
background: #f39c12;
color: white;
.admin-btn-view:hover {
background: rgba(65, 173, 255, 0.25);
}
.btn-publish {
background: #27ae60;
color: white;
border: none;
cursor: pointer;
.admin-btn-edit {
background: rgba(243, 156, 18, 0.15);
color: #f39c12;
border-color: rgba(243, 156, 18, 0.3);
}
.btn-unpublish {
background: #95a5a6;
color: white;
border: none;
cursor: pointer;
.admin-btn-edit:hover {
background: rgba(243, 156, 18, 0.25);
}
.admin-btn-publish {
background: rgba(0, 150, 80, 0.15);
color: #4caf50;
border-color: rgba(0, 150, 80, 0.3);
border: 1px solid rgba(0, 150, 80, 0.3);
}
.admin-btn-publish:hover {
background: rgba(0, 150, 80, 0.25);
}
.admin-btn-unpublish {
background: rgba(149, 165, 166, 0.15);
color: #95a5a6;
border-color: rgba(149, 165, 166, 0.3);
border: 1px solid rgba(149, 165, 166, 0.3);
}
.admin-btn-unpublish:hover {
background: rgba(149, 165, 166, 0.25);
}
.publish-form {
@@ -306,162 +475,112 @@ input[type="button"] {
margin: 0;
}
/* Statistics */
.stats {
display: flex;
gap: 2rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.stat-card {
background: darkslateblue;
padding: 1rem;
border-radius: 4px;
min-width: 150px;
}
.stat-number {
font-size: 2em;
font-weight: bold;
}
.stat-label {
font-size: 0.9em;
}
/* Bulk Actions */
.bulk-actions {
background: #f5f5f5;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
display: flex;
gap: 1rem;
/* Bulk actions */
.admin-bulk-actions {
display: none;
align-items: center;
gap: 1rem;
padding: 0.6rem 1rem;
background: var(--admin-bg-alt);
border: 1px solid var(--admin-border);
border-radius: 4px;
margin-bottom: 1rem;
font-size: 0.88rem;
}
.bulk-actions-buttons {
.admin-bulk-btns {
display: flex;
gap: 0.5rem;
}
.btn-bulk-publish {
background: #27ae60;
color: white;
border: none;
cursor: pointer;
padding: 0.5rem 1rem;
border-radius: 3px;
}
.btn-bulk-unpublish {
background: #95a5a6;
color: white;
border: none;
cursor: pointer;
padding: 0.5rem 1rem;
border-radius: 3px;
}
.select-checkbox {
cursor: pointer;
}
.select-all-checkbox {
cursor: pointer;
}
#bulk-actions {
display: none;
}
#bulk-form {
display: none;
}
/* Thesis Info (Thanks page) */
.thesis-info {
/* background: #f5f5f5; */
border: 1px white solid;
padding: 2rem;
border-radius: 8px;
margin: 2rem 0;
}
.thesis-info h2 {
margin-top: 0;
border-bottom: 2px solid #333;
padding-bottom: 0.5rem;
}
.thesis-info h3 {
margin-top: 2rem;
margin-bottom: 1rem;
/* color: #555; */
}
.thesis-info dl {
display: grid;
grid-template-columns: 200px 1fr;
gap: 0.5rem 1rem;
/* Thesis info (thanks page) */
.admin-thesis-info {
border: 1px solid var(--admin-border);
border-radius: 6px;
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.thesis-info dt {
font-weight: bold;
/* color: #666; */
.admin-thesis-info h2 {
margin: 0 0 1rem;
font-size: 1.2rem;
border-bottom: 1px solid var(--admin-border);
padding-bottom: 0.5rem;
}
.thesis-info dd {
.admin-thesis-info dl {
display: grid;
grid-template-columns: 180px 1fr;
gap: 0.4rem 1rem;
}
.admin-thesis-info dt {
font-weight: 600;
font-size: 0.88rem;
color: var(--admin-text-muted);
}
.admin-thesis-info dd {
margin: 0;
font-size: 0.9rem;
}
.thesis-info table {
width: 100%;
margin-top: 1rem;
/* Info/error messages */
.info-message {
background: var(--admin-bg-alt);
border: 1px solid var(--admin-border);
border-radius: 4px;
padding: 1rem;
font-size: 0.9rem;
}
.thesis-info table th {
text-align: left;
background: #ddd;
padding: 0.5rem;
.info-message pre {
margin: 0;
font-size: 0.85rem;
white-space: pre-wrap;
word-break: break-word;
}
.thesis-info table td {
padding: 0.5rem;
border-bottom: 1px solid #ddd;
}
.submitted-date {
margin-top: 2rem;
font-style: italic;
color: #666;
}
.error {
background: #fee;
border: 2px solid #c00;
padding: 1.5rem;
border-radius: 8px;
color: #c00;
}
/* Form Elements */
label.checkbox-label {
/* Login page */
.admin-login-wrap {
display: flex;
align-items: center;
gap: 0.5rem;
justify-content: center;
min-height: calc(100vh - 60px);
}
/* Responsive */
@media (max-width: 768px) {
.thesis-info dl {
grid-template-columns: 1fr;
gap: 0.25rem;
}
.thesis-info dt {
margin-top: 1rem;
}
.admin-login-box {
background: var(--admin-bg-alt);
border: 1px solid var(--admin-border);
border-radius: 6px;
padding: 2rem;
width: 100%;
max-width: 380px;
}
.admin-login-box h2 {
margin: 0 0 1.5rem;
font-size: 1.1rem;
font-weight: 500;
text-align: center;
}
.admin-login-box .admin-form-row {
grid-template-columns: 1fr;
border: none;
padding: 0.4rem 0;
}
.admin-login-box .admin-label {
font-size: 0.82rem;
color: var(--admin-text-muted);
padding: 0;
margin-bottom: 0.2rem;
}
/* Import page */
.admin-import-area {
display: flex;
flex-direction: column;
gap: 1.5rem;
}