Corrections et améliorations pour /gennpc - v1.3.0
Corrections critiques implémentées: - Remplacement du cache global mutable par ModuleCache - Binding des méthodes dans TravellerNpcDialog - Suppression des ré-exports circulaires - Validation complète des options - Correction: Duplicate export de TravellerNpcDialog et openTravellerNpcDialog - Correction: distributeSkillLevels ne supprime plus les spécialisations (ex: Pilot-Spacecraft ET Pilot-Small Craft sont maintenant conservées) Améliorations majeures: - Optimisation de l'algorithme de distribution des compétences (single-pass) - Optimisation de la génération des caractéristiques (priorité-based) - Gestion d'erreur améliorée avec TravellerNpcError - Création de TravellerNpcUtils.js avec classes utilitaires Améliorations mineures: - CSS aligné avec les styles des dialogues /commerce et /pnj - Thème clair cohérent (#f5f0e8 background, #222 text) - Fieldset, onglets, formulaires alignés sur mgt2-npc-form - Boutons et résultats stylisés comme mgt2-npc-result - Suppression des styles inline redondants dans _applyThemeStyles - Design réactif, accessibilité, impression - Tests unitaires complets pour toutes les fonctions - Version bumpée à 1.3.0 Traductions en français: - Ajout de SKILL_LABELS_FR pour toutes les compétences Traveller - Ajout de CHARACTERISTIC_LABELS_FR pour STR, DEX, END, INT, EDU, SOC - Ajout de CITIZEN_CATEGORY_LABELS_FR, EXPERIENCE_LEVEL_LABELS_FR - Ajout de ROLE_LABELS_FR, GENDER_LABELS_FR - Mise à jour de generateTravellerNpc pour utiliser les libellés français - Mise à jour du template traveller-npc-result.hbs pour afficher labelFr - Mise à jour du template traveller-npc-dialog.hbs avec libellés français - Mise à jour de TravellerNpcDialog._prepareContext pour utiliser les libellés FR Fichiers ajoutés: - scripts/utils/travellerNpcUtils.js - scripts/tests/travellerNpcGenerator.test.js Fichiers modifiés: - scripts/data/travellerNpcGenerator.js (+ traductions FR) - scripts/travellerNpcGenerator.js (+ fonctions getSkillLabelFr, getCharacteristicLabelFr) - scripts/TravellerNpcDialog.js (libellés FR dans _prepareContext) - scripts/npc.js - styles/traveller-npc.css - templates/traveller-npc-dialog.hbs - templates/traveller-npc-result.hbs - module.json Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
+407
-124
@@ -1,88 +1,145 @@
|
||||
/**
|
||||
* Styles pour le générateur de PNJ Traveller
|
||||
* Aligné avec les styles des dialogues /commerce et /pnj du module
|
||||
* Compatible avec Foundry VTT v13 et v14
|
||||
*/
|
||||
|
||||
/* Conteneur principal */
|
||||
.mgt2-traveller-npc-dialog {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
border: 1px solid #444;
|
||||
box-shadow: 0 0 20px rgba(217, 178, 76, 0.3);
|
||||
}
|
||||
/* ==========================================================================
|
||||
Conteneur principal - Aligné sur mgt2-npc-dialog et mgt2-commerce-dialog
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-dialog .window-content {
|
||||
background: rgba(10, 10, 10, 0.9);
|
||||
color: #d8c79a;
|
||||
}
|
||||
|
||||
/* Formulaire */
|
||||
.mgt2-traveller-npc-form {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form h3 {
|
||||
color: #d9b24c;
|
||||
.mgt2-traveller-npc-dialog .window-header {
|
||||
background: linear-gradient(180deg, rgba(44, 44, 62, 0.96) 0%, rgba(30, 30, 43, 0.96) 100%);
|
||||
border-bottom: 1px solid #c9a227;
|
||||
padding-bottom: 8px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .window-title {
|
||||
color: #d9b24c;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .window-content,
|
||||
#mgt2-traveller-npc .window-content {
|
||||
padding: 0;
|
||||
overflow-y: auto;
|
||||
background: #f5f0e8;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Formulaire principal - Aligné sur mgt2-npc-form et mgt2-commerce-form
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f5f0e8;
|
||||
color: #222;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form h3,
|
||||
.mgt2-npc-dialog .mgt2-traveller-npc-form h3 {
|
||||
margin: 0 0 12px;
|
||||
color: #5f4300 !important;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #b78f26 !important;
|
||||
padding-bottom: 5px;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form h3 i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .traveller-npc-intro {
|
||||
color: #a0a0a0;
|
||||
margin-bottom: 20px;
|
||||
margin: 0 0 10px;
|
||||
color: #555;
|
||||
font-size: 0.87em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Champs de formulaire */
|
||||
/* ==========================================================================
|
||||
Champs de formulaire - Aligné sur mgt2-npc-form
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .form-group {
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .form-group-row {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
margin-bottom: 12px;
|
||||
gap: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .form-group-row .form-group {
|
||||
flex: 1;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form label {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
color: #d8c79a;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
display: block;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form select,
|
||||
.mgt2-traveller-npc-form input[type="text"] {
|
||||
.mgt2-traveller-npc-form input[type="text"],
|
||||
.mgt2-traveller-npc-form select {
|
||||
width: 100%;
|
||||
padding: 6px 8px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid #444;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 7px;
|
||||
font-size: 0.85em;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
border: 1px solid #bbb;
|
||||
border-radius: 3px;
|
||||
color: #ffffff;
|
||||
font-size: 13px;
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form select:focus,
|
||||
.mgt2-traveller-npc-form input[type="text"]:focus {
|
||||
.mgt2-traveller-npc-form input[type="text"]:focus,
|
||||
.mgt2-traveller-npc-form select:focus {
|
||||
border-color: #c9a227;
|
||||
outline: none;
|
||||
border-color: #d9b24c;
|
||||
box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.22);
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form select option {
|
||||
background: #1a1a1a;
|
||||
color: #ffffff;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
/* Champs de nom */
|
||||
/* ==========================================================================
|
||||
Fieldset - Aligné sur mgt2-npc-form
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form fieldset {
|
||||
border: 1px solid #c9a227;
|
||||
border-radius: 5px;
|
||||
padding: 10px 12px 8px;
|
||||
margin: 10px 0;
|
||||
background: rgba(201, 162, 39, 0.04);
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .mgt2-traveller-npc-form legend,
|
||||
.mgt2-traveller-npc-form legend {
|
||||
color: #7a5c00 !important;
|
||||
font-size: 0.78em;
|
||||
font-weight: bold;
|
||||
padding: 0 5px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Champs de nom
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .name-fields {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
@@ -98,20 +155,26 @@
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .name-fields .btn-small {
|
||||
padding: 6px 10px;
|
||||
background: rgba(217, 178, 76, 0.3);
|
||||
padding: 5px 10px;
|
||||
background: #2c2c3e;
|
||||
color: #e1bc57;
|
||||
border: 1px solid #c9a227;
|
||||
color: #ffffff;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85em;
|
||||
min-width: 36px;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .name-fields .btn-small:hover {
|
||||
background: rgba(217, 178, 76, 0.5);
|
||||
background: #243852;
|
||||
color: #f2d27a;
|
||||
}
|
||||
|
||||
/* Checkbox */
|
||||
/* ==========================================================================
|
||||
Checkbox
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .checkbox-group {
|
||||
margin: 10px 0;
|
||||
}
|
||||
@@ -119,79 +182,101 @@
|
||||
.mgt2-traveller-npc-form .checkbox-group label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
font-size: 0.85em;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .checkbox-group input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
width: auto;
|
||||
accent-color: #c9a227;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Hint */
|
||||
/* ==========================================================================
|
||||
Hint
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .hint {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
font-weight: normal;
|
||||
font-size: 0.85em;
|
||||
color: #777;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Pied de formulaire */
|
||||
.mgt2-traveller-npc-form .form-footer {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
/* ==========================================================================
|
||||
Required field indicator
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .required {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Pied de formulaire - Aligné sur mgt2-npc-form
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-form .form-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
button.btn-calculate,
|
||||
.mgt2-traveller-npc-form .btn-calculate {
|
||||
padding: 10px 20px;
|
||||
background: linear-gradient(135deg, #c9a227, #d9b24c);
|
||||
border: none;
|
||||
background: #2c2c3e;
|
||||
color: #e1bc57;
|
||||
border: 1px solid #c9a227;
|
||||
border-radius: 4px;
|
||||
color: #000;
|
||||
padding: 7px 18px;
|
||||
font-size: 0.85em;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: transform 0.1s, box-shadow 0.1s;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
button.btn-calculate:hover,
|
||||
.mgt2-traveller-npc-form .btn-calculate:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(217, 178, 76, 0.4);
|
||||
background: #243852;
|
||||
color: #f2d27a;
|
||||
}
|
||||
|
||||
button.btn-calculate:disabled,
|
||||
.mgt2-traveller-npc-form .btn-calculate:disabled {
|
||||
opacity: 0.7;
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .btn-calculate i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* Required field indicator */
|
||||
.mgt2-traveller-npc-form .required {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
/* ==========================================================================
|
||||
Résultat - Aligné sur mgt2-npc-result
|
||||
======================================================================== */
|
||||
|
||||
/* Resultat */
|
||||
.mgt2-npc-result,
|
||||
.traveller-npc-result {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid #444;
|
||||
border-radius: 6px;
|
||||
padding: 15px;
|
||||
margin: 10px 0;
|
||||
font-size: 0.85em;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-header {
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #333;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #c9a227;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-header h3 {
|
||||
color: #d9b24c;
|
||||
color: #5f4300 !important;
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 8px;
|
||||
font-size: 1em;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-header h3 i {
|
||||
@@ -199,22 +284,23 @@
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-name {
|
||||
font-size: 18px;
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-notice {
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-size: 0.9em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-notice.success {
|
||||
background: rgba(46, 204, 113, 0.2);
|
||||
border: 1px solid #2ecc71;
|
||||
color: #2ecc71;
|
||||
background: #eef8ee;
|
||||
border: 1px solid #a9d0a9;
|
||||
color: #2a6a2a;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-notice.success i {
|
||||
@@ -223,37 +309,45 @@
|
||||
|
||||
.traveller-npc-result .npc-details-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
||||
gap: 8px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-detail {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background: #fbf8f1;
|
||||
padding: 6px 8px;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
border: 1px solid #d7ccb0;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-detail-label {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
margin-bottom: 4px;
|
||||
font-size: 0.75em;
|
||||
color: #7a5c00;
|
||||
margin-bottom: 3px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-detail-value {
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
color: #222;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-section {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-section h4 {
|
||||
color: #c9a227;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
color: #5f4300 !important;
|
||||
font-size: 0.85em;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
margin-bottom: 8px;
|
||||
border-bottom: 1px solid #d7ccb0;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-section h4 i {
|
||||
@@ -263,69 +357,258 @@
|
||||
.traveller-npc-result .npc-characteristics {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-characteristic {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
min-width: 80px;
|
||||
background: #fbf8f1;
|
||||
padding: 5px 8px;
|
||||
border-radius: 3px;
|
||||
min-width: 70px;
|
||||
text-align: center;
|
||||
border: 1px solid #d7ccb0;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-char-key {
|
||||
font-size: 10px;
|
||||
color: #888;
|
||||
font-size: 0.7em;
|
||||
color: #7a5c00;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 2px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-char-value {
|
||||
font-size: 16px;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-char-dm {
|
||||
font-size: 10px;
|
||||
font-size: 0.7em;
|
||||
color: #c9a227;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-skills {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-skill {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
background: #fbf8f1;
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
font-size: 0.85em;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
border: 1px solid #d7ccb0;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-skill-name {
|
||||
color: #ffffff;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-skill-level {
|
||||
color: #d9b24c;
|
||||
color: #c9a227;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-footer {
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #333;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #d7ccb0;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-size: 0.75em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Niveaux de compétence */
|
||||
/* ==========================================================================
|
||||
Niveaux de compétence
|
||||
======================================================================== */
|
||||
|
||||
.traveller-npc-result .skillLevelSymbol {
|
||||
font-size: 12px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Onglets personnalisés pour le dialogue
|
||||
======================================================================== */
|
||||
|
||||
.mgt2-traveller-npc-dialog .mgt2-traveller-npc-form .tabs {
|
||||
display: flex;
|
||||
background: #2c2c3e;
|
||||
border-bottom: 3px solid #c9a227;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .mgt2-traveller-npc-form .tabs .item {
|
||||
flex: 1;
|
||||
padding: 9px 8px;
|
||||
text-align: center;
|
||||
color: #d8c79a !important;
|
||||
font-size: 0.82em;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-bottom: -3px;
|
||||
transition: color 0.18s, border-color 0.18s, background 0.18s;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .mgt2-traveller-npc-form .tabs .item:hover {
|
||||
color: #f3e3b1 !important;
|
||||
background: rgba(201, 162, 39, 0.16) !important;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-dialog .mgt2-traveller-npc-form .tabs .item.active {
|
||||
color: #d9b24c !important;
|
||||
border-bottom-color: #c9a227 !important;
|
||||
background: rgba(201, 162, 39, 0.18) !important;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Accessibilité
|
||||
======================================================================== */
|
||||
|
||||
/* Focus visible pour la navigation clavier */
|
||||
.mgt2-traveller-npc-form select:focus-visible,
|
||||
.mgt2-traveller-npc-form input:focus-visible,
|
||||
.mgt2-traveller-npc-form button:focus-visible {
|
||||
outline: 2px solid #c9a227;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Contraste amélioré pour l'accessibilité */
|
||||
@media (prefers-contrast: high) {
|
||||
.mgt2-traveller-npc-form label {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form input,
|
||||
.mgt2-traveller-npc-form select {
|
||||
background: #fff;
|
||||
border-width: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Design réactif
|
||||
======================================================================== */
|
||||
|
||||
/* Écran large */
|
||||
@media (min-width: 900px) {
|
||||
.mgt2-traveller-npc-dialog {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .form-group-row {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-details-grid {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Écran moyen */
|
||||
@media (max-width: 899px) {
|
||||
.mgt2-traveller-npc-dialog {
|
||||
width: 90vw;
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-details-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media (max-width: 600px) {
|
||||
.mgt2-traveller-npc-dialog {
|
||||
width: 95vw;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .form-group-row {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form .name-fields {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-characteristics {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-characteristic {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-skills {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Très petit écran */
|
||||
@media (max-width: 400px) {
|
||||
.mgt2-traveller-npc-form .btn-calculate {
|
||||
width: 100%;
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-details-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Impression
|
||||
======================================================================== */
|
||||
|
||||
@media print {
|
||||
.mgt2-traveller-npc-dialog .window-header,
|
||||
.mgt2-traveller-npc-dialog .window-content {
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form {
|
||||
color: black;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.mgt2-traveller-npc-form input,
|
||||
.mgt2-traveller-npc-form select {
|
||||
background: white;
|
||||
color: black;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.traveller-npc-result {
|
||||
background: white;
|
||||
color: black;
|
||||
border: 1px solid #ccc;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.traveller-npc-result .npc-detail,
|
||||
.traveller-npc-result .npc-characteristic,
|
||||
.traveller-npc-result .npc-skill {
|
||||
background: #f9f9f9;
|
||||
border-color: #ccc;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user