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>
122 lines
3.2 KiB
Sass
122 lines
3.2 KiB
Sass
@import "../utilities/mixins"
|
|
|
|
$panel-margin: $block-spacing !default
|
|
$panel-item-border: 1px solid $border-light !default
|
|
$panel-radius: $radius-large !default
|
|
$panel-shadow: $shadow !default
|
|
|
|
$panel-heading-background-color: $border-light !default
|
|
$panel-heading-color: $text-strong !default
|
|
$panel-heading-line-height: 1.25 !default
|
|
$panel-heading-padding: 0.75em 1em !default
|
|
$panel-heading-radius: $radius !default
|
|
$panel-heading-size: 1.25em !default
|
|
$panel-heading-weight: $weight-bold !default
|
|
|
|
$panel-tabs-font-size: 0.875em !default
|
|
$panel-tab-border-bottom: 1px solid $border !default
|
|
$panel-tab-active-border-bottom-color: $link-active-border !default
|
|
$panel-tab-active-color: $link-active !default
|
|
|
|
$panel-list-item-color: $text !default
|
|
$panel-list-item-hover-color: $link !default
|
|
|
|
$panel-block-color: $text-strong !default
|
|
$panel-block-hover-background-color: $background !default
|
|
$panel-block-active-border-left-color: $link !default
|
|
$panel-block-active-color: $link-active !default
|
|
$panel-block-active-icon-color: $link !default
|
|
|
|
$panel-icon-color: $text-light !default
|
|
$panel-colors: $colors !default
|
|
|
|
.panel
|
|
border-radius: $panel-radius
|
|
box-shadow: $panel-shadow
|
|
font-size: $size-normal
|
|
&:not(:last-child)
|
|
margin-bottom: $panel-margin
|
|
// Colors
|
|
@each $name, $components in $panel-colors
|
|
$color: nth($components, 1)
|
|
$color-invert: nth($components, 2)
|
|
&.is-#{$name}
|
|
.panel-heading
|
|
background-color: $color
|
|
color: $color-invert
|
|
.panel-tabs a.is-active
|
|
border-bottom-color: $color
|
|
.panel-block.is-active .panel-icon
|
|
color: $color
|
|
|
|
.panel-tabs,
|
|
.panel-block
|
|
&:not(:last-child)
|
|
border-bottom: $panel-item-border
|
|
|
|
.panel-heading
|
|
background-color: $panel-heading-background-color
|
|
border-radius: $panel-radius $panel-radius 0 0
|
|
color: $panel-heading-color
|
|
font-size: $panel-heading-size
|
|
font-weight: $panel-heading-weight
|
|
line-height: $panel-heading-line-height
|
|
padding: $panel-heading-padding
|
|
|
|
.panel-tabs
|
|
align-items: flex-end
|
|
display: flex
|
|
font-size: $panel-tabs-font-size
|
|
justify-content: center
|
|
a
|
|
border-bottom: $panel-tab-border-bottom
|
|
margin-bottom: -1px
|
|
padding: 0.5em
|
|
// Modifiers
|
|
&.is-active
|
|
border-bottom-color: $panel-tab-active-border-bottom-color
|
|
color: $panel-tab-active-color
|
|
|
|
.panel-list
|
|
a
|
|
color: $panel-list-item-color
|
|
&:hover
|
|
color: $panel-list-item-hover-color
|
|
|
|
.panel-block
|
|
align-items: center
|
|
color: $panel-block-color
|
|
display: flex
|
|
justify-content: flex-start
|
|
padding: 0.5em 0.75em
|
|
input[type="checkbox"]
|
|
+ltr-property("margin", 0.75em)
|
|
& > .control
|
|
flex-grow: 1
|
|
flex-shrink: 1
|
|
width: 100%
|
|
&.is-wrapped
|
|
flex-wrap: wrap
|
|
&.is-active
|
|
border-left-color: $panel-block-active-border-left-color
|
|
color: $panel-block-active-color
|
|
.panel-icon
|
|
color: $panel-block-active-icon-color
|
|
&:last-child
|
|
border-bottom-left-radius: $panel-radius
|
|
border-bottom-right-radius: $panel-radius
|
|
|
|
a.panel-block,
|
|
label.panel-block
|
|
cursor: pointer
|
|
&:hover
|
|
background-color: $panel-block-hover-background-color
|
|
|
|
.panel-icon
|
|
+fa(14px, 1em)
|
|
color: $panel-icon-color
|
|
+ltr-property("margin", 0.75em)
|
|
.fa
|
|
font-size: inherit
|
|
line-height: inherit
|