Mise en ligne de la version 0.2.0
This commit is contained in:
100
web/src/styles/_buttons.scss
Normal file
100
web/src/styles/_buttons.scss
Normal file
@@ -0,0 +1,100 @@
|
||||
// ==========================================================================
|
||||
// Boutons partagés
|
||||
// --------------------------------------------------------------------------
|
||||
// Style canonique utilisé par TOUS les écrans "create" et "edit" (formulaires).
|
||||
// Extrait ici pour éliminer la duplication qui existait dans 16+ composants.
|
||||
//
|
||||
// Usage standard (formulaire plein pot) :
|
||||
// <button class="btn-primary">Sauvegarder</button>
|
||||
//
|
||||
// Variante compacte (headers avec juste 2 boutons alignés) :
|
||||
// <button class="btn-primary btn-sm">Modifier</button>
|
||||
//
|
||||
// Bouton avec icône Lucide :
|
||||
// <button class="btn-primary btn-icon">...</button>
|
||||
// ==========================================================================
|
||||
|
||||
.btn-primary {
|
||||
padding: 0.85rem 1.5rem;
|
||||
background: #6c63ff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover:not(:disabled) { background: #5b52e0; }
|
||||
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
padding: 0.85rem 1.5rem;
|
||||
background: #1f2937;
|
||||
color: #d1d5db;
|
||||
border: 1px solid #374151;
|
||||
border-radius: 8px;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover:not(:disabled) { background: #374151; }
|
||||
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
padding: 0.85rem 1.25rem;
|
||||
background: transparent;
|
||||
color: #ef4444;
|
||||
border: 1px solid #7f1d1d;
|
||||
border-radius: 8px;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s, color 0.2s;
|
||||
|
||||
&:hover:not(:disabled) { background: #7f1d1d; color: white; }
|
||||
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
}
|
||||
|
||||
// Bouton "Assistant IA" des headers — tonalité violette, cohérent avec le drawer.
|
||||
// Variante `.active` appliquée quand le drawer est ouvert (feedback visuel).
|
||||
.btn-ai {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.6rem 1.1rem;
|
||||
background: transparent;
|
||||
color: #a5b4fc;
|
||||
border: 1px solid #374151;
|
||||
border-radius: 8px;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, color 0.15s;
|
||||
|
||||
&:hover:not(:disabled) { background: #1f2937; }
|
||||
&:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
&.active {
|
||||
background: #1f2937;
|
||||
border-color: #6c63ff;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Modificateurs combinables
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Variante compacte pour les barres d'actions de header (détail, edit inline).
|
||||
.btn-sm {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
// Alignement flex pour boutons qui contiennent un `<lucide-icon>` + texte.
|
||||
.btn-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
89
web/src/styles/_forms.scss
Normal file
89
web/src/styles/_forms.scss
Normal file
@@ -0,0 +1,89 @@
|
||||
// ==========================================================================
|
||||
// Champs de formulaire partagés
|
||||
// --------------------------------------------------------------------------
|
||||
// Style canonique pour tous les couples label + input / textarea / select.
|
||||
// Extrait ici pour éliminer la duplication dans 14+ composants.
|
||||
//
|
||||
// Usage :
|
||||
// <div class="field">
|
||||
// <label>Nom</label>
|
||||
// <input type="text" [(ngModel)]="name" />
|
||||
// </div>
|
||||
//
|
||||
// Astuce visuelle (texte gris italique sous un champ) :
|
||||
// <p class="field-hint">Optionnel. Facilite les recherches.</p>
|
||||
// ==========================================================================
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
color: #d1d5db;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
background: #1f2937;
|
||||
border: 1px solid #374151;
|
||||
border-radius: 8px;
|
||||
padding: 0.75rem 1rem;
|
||||
color: white;
|
||||
font-size: 0.9rem;
|
||||
outline: none;
|
||||
font-family: inherit;
|
||||
transition: border-color 0.2s;
|
||||
|
||||
&::placeholder { color: #4b5563; }
|
||||
&:focus { border-color: #6c63ff; }
|
||||
&.invalid, &.ng-invalid.ng-touched { border-color: #ef4444; }
|
||||
}
|
||||
|
||||
textarea { resize: vertical; min-height: 4rem; }
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
color: #6b7280;
|
||||
font-size: 0.75rem;
|
||||
font-style: italic;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
// Grille 2 colonnes pour aligner 2 champs côte à côte.
|
||||
.field-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Header de page "create" / "edit" (titre + éventuel sous-titre)
|
||||
// --------------------------------------------------------------------------
|
||||
.page-header {
|
||||
margin-bottom: 2rem;
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin: 0 0 0.35rem 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #6b7280;
|
||||
font-size: 0.85rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Barre d'actions en bas d'un formulaire (Sauvegarder / Annuler / Supprimer).
|
||||
.form-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding-top: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
150
web/src/styles/_view.scss
Normal file
150
web/src/styles/_view.scss
Normal file
@@ -0,0 +1,150 @@
|
||||
// ==========================================================================
|
||||
// Style "fiche de jeu" — mode consultation (lecture seule).
|
||||
// ==========================================================================
|
||||
// Responsabilité : afficher une entité (Page, Arc, Chapter, Scene) sous forme
|
||||
// d'une belle fiche où chaque champ est un bloc titré, visible d'un bloc,
|
||||
// SANS scrollbar interne — le contenu texte s'étend verticalement selon sa
|
||||
// taille réelle grâce à `white-space: pre-wrap` sur un élément natif
|
||||
// (pas de textarea). L'utilisateur fait défiler la page avec la molette.
|
||||
//
|
||||
// Utilisé par : page-view, arc-view, chapter-view, scene-view.
|
||||
// Principe DRY : les 4 composants partagent ces sélecteurs globaux.
|
||||
|
||||
.view-page {
|
||||
padding: 2rem 3rem;
|
||||
max-width: 1000px;
|
||||
|
||||
// En-tête : titre + sous-titre + boutons d'action (Modifier, Supprimer...)
|
||||
.view-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
h1 {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin: 0 0 0.3rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.view-subtitle {
|
||||
color: #9ca3af;
|
||||
font-size: 0.85rem;
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.view-actions {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Bloc de contenu : une section = un champ (titre + corps)
|
||||
.view-section {
|
||||
padding: 1.25rem 0;
|
||||
border-top: 1px solid #1e1e3a;
|
||||
|
||||
&:first-of-type {
|
||||
border-top: none;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.view-section-title {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
color: #a5b4fc; // violet discret, cohérent avec .btn-ai
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
margin: 0 0 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
|
||||
.view-section-icon {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Corps texte — c'est ici que la magie "pas de scrollbar" opère :
|
||||
// `white-space: pre-wrap` conserve les sauts de ligne du textarea d'origine
|
||||
// et le texte se hauteur-adapte naturellement (element = bloc HTML classique).
|
||||
.view-section-body {
|
||||
color: #e0e0e0;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// État vide : champ non renseigné, on l'indique discrètement.
|
||||
.view-section-empty {
|
||||
color: #4b5563;
|
||||
font-style: italic;
|
||||
font-size: 0.88rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Variante "privé MJ" — fond rouge discret pour les notes secrètes
|
||||
// (gmNotes, gmSecretNotes). Cohérent avec expandable-section variant="private".
|
||||
.view-section--private {
|
||||
background: rgba(127, 29, 29, 0.08);
|
||||
border-left: 3px solid #7f1d1d;
|
||||
padding-left: 1rem;
|
||||
margin-left: -1rem;
|
||||
border-radius: 0 4px 4px 0;
|
||||
|
||||
.view-section-title { color: #fca5a5; }
|
||||
}
|
||||
|
||||
// Affichage 2 colonnes pour des champs courts côte-à-côte (location/timing...).
|
||||
.view-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 2rem;
|
||||
|
||||
.view-section {
|
||||
border-top: none;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Chips (tags et pages liées en lecture seule)
|
||||
.view-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem;
|
||||
margin: 0;
|
||||
|
||||
.view-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
padding: 0.3rem 0.7rem;
|
||||
background: #1a1a2e;
|
||||
border: 1px solid #2a2a3d;
|
||||
border-radius: 999px;
|
||||
color: #d1d5db;
|
||||
font-size: 0.82rem;
|
||||
text-decoration: none;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
|
||||
&[href]:hover {
|
||||
border-color: #6c63ff;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.view-chip--tag {
|
||||
background: #1e1b4b;
|
||||
border-color: #312e81;
|
||||
color: #c4b5fd;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user