Met en place les fondations du template Bulma décrit dans regles/FORGE_ENGINE_TEMPLATE_BULMA.md : palette orange/ambre Forge (--accent:#ff5f2e/--accent-2:#ffb020), typographie, rayons — appliqués en recompilant Bulma lui-même plutôt qu'en le surchargeant après coup en CSS, pour recolorer automatiquement ses composants internes (tags, notifications, dropdowns...) sans avoir à les surcharger un par un. - Bulma 0.9.4 vendoré en local (styles/bulma/, source Sass classique $variable + @import) — PAS 1.0.2 (la version jusqu'ici en CDN) : 1.0.2 utilise le nouveau système de modules @use/@forward, que libsass (choisi pour rester 100% Python, sans Node/npm) ne sait pas compiler (testé : il ignore silencieusement le @use au lieu de le traiter). 0.9.4 est la dernière version compatible avec libsass et couvre à l'identique tous les composants utilisés ici (boutons, tableaux, onglets, modales, formulaires, navbar). - requirements.txt : +libsass (pip pur, aucun binaire/Node.js). - styles/forge-theme.scss (nouveau, point d'entrée) : variables Sass Bulma ($primary, $radius...) posées avant l'import, tokens Forge exposés en :root (--forge-bg, --accent, --gradient, --status-*...) avec des alias vers les noms de variables déjà utilisés par tout le CSS custom existant (--bg/--panel/--border/--text/--danger...) — pas besoin de renommer les ~600 lignes de règles déjà écrites, seules leurs VALEURS changent. - styles/forge-custom.scss : ancien static/style.css, structurellement inchangé — seuls les hex/rgba en dur qui échappaient aux variables (ancien accent bleu #5b8cff, danger #e2685f, couleurs de types de nœuds du graphe de logique, fond du QR code recovery...) sont remplacés par les tokens de la charte. - build_css.py (nouveau) : compile styles/forge-theme.scss en static/style.css via libsass — un seul fichier, un seul <link> inchangé dans les templates, à relancer manuellement après toute modification sous styles/. - base.html/play.html : suppression du <link> CDN Bulma (auto-hébergé désormais), ajout d'un favicon (absent jusqu'ici) et du vrai logo Forge dans la navbar (assets/*.svg copiés dans static/branding/, seul dossier réellement servi par Flask). 197 tests toujours verts (aucune assertion sur des valeurs CSS). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
118 lines
2.9 KiB
Sass
118 lines
2.9 KiB
Sass
@import "../utilities/mixins"
|
|
|
|
$modal-z: 40 !default
|
|
|
|
$modal-background-background-color: bulmaRgba($scheme-invert, 0.86) !default
|
|
|
|
$modal-content-width: 640px !default
|
|
$modal-content-margin-mobile: 20px !default
|
|
$modal-content-spacing-mobile: 160px !default
|
|
$modal-content-spacing-tablet: 40px !default
|
|
|
|
$modal-close-dimensions: 40px !default
|
|
$modal-close-right: 20px !default
|
|
$modal-close-top: 20px !default
|
|
|
|
$modal-card-spacing: 40px !default
|
|
|
|
$modal-card-head-background-color: $background !default
|
|
$modal-card-head-border-bottom: 1px solid $border !default
|
|
$modal-card-head-padding: 20px !default
|
|
$modal-card-head-radius: $radius-large !default
|
|
|
|
$modal-card-title-color: $text-strong !default
|
|
$modal-card-title-line-height: 1 !default
|
|
$modal-card-title-size: $size-4 !default
|
|
|
|
$modal-card-foot-radius: $radius-large !default
|
|
$modal-card-foot-border-top: 1px solid $border !default
|
|
|
|
$modal-card-body-background-color: $scheme-main !default
|
|
$modal-card-body-padding: 20px !default
|
|
|
|
$modal-breakpoint: $tablet !default
|
|
|
|
.modal
|
|
@extend %overlay
|
|
align-items: center
|
|
display: none
|
|
flex-direction: column
|
|
justify-content: center
|
|
overflow: hidden
|
|
position: fixed
|
|
z-index: $modal-z
|
|
// Modifiers
|
|
&.is-active
|
|
display: flex
|
|
|
|
.modal-background
|
|
@extend %overlay
|
|
background-color: $modal-background-background-color
|
|
|
|
.modal-content,
|
|
.modal-card
|
|
margin: 0 $modal-content-margin-mobile
|
|
max-height: calc(100vh - #{$modal-content-spacing-mobile})
|
|
overflow: auto
|
|
position: relative
|
|
width: 100%
|
|
// Responsiveness
|
|
+from($modal-breakpoint)
|
|
margin: 0 auto
|
|
max-height: calc(100vh - #{$modal-content-spacing-tablet})
|
|
width: $modal-content-width
|
|
|
|
.modal-close
|
|
@extend %delete
|
|
background: none
|
|
height: $modal-close-dimensions
|
|
position: fixed
|
|
+ltr-position($modal-close-right)
|
|
top: $modal-close-top
|
|
width: $modal-close-dimensions
|
|
|
|
.modal-card
|
|
display: flex
|
|
flex-direction: column
|
|
max-height: calc(100vh - #{$modal-card-spacing})
|
|
overflow: hidden
|
|
-ms-overflow-y: visible
|
|
|
|
.modal-card-head,
|
|
.modal-card-foot
|
|
align-items: center
|
|
background-color: $modal-card-head-background-color
|
|
display: flex
|
|
flex-shrink: 0
|
|
justify-content: flex-start
|
|
padding: $modal-card-head-padding
|
|
position: relative
|
|
|
|
.modal-card-head
|
|
border-bottom: $modal-card-head-border-bottom
|
|
border-top-left-radius: $modal-card-head-radius
|
|
border-top-right-radius: $modal-card-head-radius
|
|
|
|
.modal-card-title
|
|
color: $modal-card-title-color
|
|
flex-grow: 1
|
|
flex-shrink: 0
|
|
font-size: $modal-card-title-size
|
|
line-height: $modal-card-title-line-height
|
|
|
|
.modal-card-foot
|
|
border-bottom-left-radius: $modal-card-foot-radius
|
|
border-bottom-right-radius: $modal-card-foot-radius
|
|
border-top: $modal-card-foot-border-top
|
|
.button
|
|
&:not(:last-child)
|
|
+ltr-property("margin", 0.5em)
|
|
|
|
.modal-card-body
|
|
+overflow-touch
|
|
background-color: $modal-card-body-background-color
|
|
flex-grow: 1
|
|
flex-shrink: 1
|
|
overflow: auto
|
|
padding: $modal-card-body-padding
|