Files
Forge-Engine/templates/game_dashboard.html
T
william 25a331830b Reskin the whole admin UI (not just game widgets) with Bulma
Loads Bulma 1.0.2 in base.html (data-theme="dark" for its native dark palette) for every page that extends it, plus play.html directly. Converts every admin template — index, game dashboard, screens list, element types, object new/edit, data form/list — to real Bulma markup: navbar, breadcrumb component, box/card, field/control/input/select, table, notification, buttons, and a native Bulma modal for the data-row detail popup. Forge's own style.css keeps only what Bulma doesn't cover (the fixed-viewport builder/object-edit layouts, the element tree, canvas, flow-graph editor) and now acts as a secondary/override layer rather than a competing design system, matching how per-element inline customization already overrides widget defaults.

screen_edit.html (the 3-panel screen builder) gets the same navbar/breadcrumb/button treatment plus its top rename form, but its flow-graph node editor, canvas and element tree keep their existing custom styling — several of their inputs have JS relying on exact DOM sibling structure (e.g. slider oninput reading nextElementSibling) or Bulma's own select/wrapper requirement, and reskinning them without a browser to verify against risked silently breaking the app's most complex feature. Buttons and headings there are still fully converted (safe, purely additive class changes).

Verified: full test suite green, every route smoke-rendered 200 OK via the test client after the change.
2026-08-24 13:19:02 +02:00

82 lines
3.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}{{ game.name }} — Forge Engine{% endblock %}
{% block breadcrumb %}<li class="is-active"><a>{{ game.name }}</a></li>{% endblock %}
{% block content %}
<h1 class="title">{{ game.name }}</h1>
<p class="help mb-4">Base de données : projects/{{ game.slug }}/game.db</p>
<div class="columns">
<div class="column">
<a href="{{ url_for('screens_list', slug=game.slug) }}" class="card" style="height:100%;">
<div class="card-content">
<p class="title is-6">🖥️ Écrans du jeu</p>
<p class="subtitle is-7 has-text-grey">Créer et enchaîner les écrans jouables (accueil, formulaires, scènes...)</p>
</div>
</a>
</div>
<div class="column">
<a href="{{ url_for('element_types', slug=game.slug) }}" class="card" style="height:100%;">
<div class="card-content">
<p class="title is-6">🧩 Éléments de jeu</p>
<p class="subtitle is-7 has-text-grey">Catalogue réutilisable (Personnage, Outil, IA...)</p>
</div>
</a>
</div>
<div class="column">
<a href="{{ url_for('game_play', slug=game.slug) }}" target="_blank" class="card" style="height:100%;">
<div class="card-content">
<p class="title is-6">▶️ Jouer</p>
<p class="subtitle is-7 has-text-grey">Aperçu jouable du jeu</p>
</div>
</a>
</div>
</div>
<a href="{{ url_for('object_new', slug=game.slug) }}" class="card mb-4" style="display:block;">
<div class="card-content">
<p class="title is-6">➕ Définir un nouvel objet</p>
<p class="subtitle is-7 has-text-grey">Comme une table de base de données : un nom, et des champs typés</p>
</div>
</a>
<h2 class="subtitle">Objets définis</h2>
{% if definitions %}
<div class="table-container">
<table class="table is-fullwidth is-hoverable">
<tbody>
{% for d in definitions %}
<tr>
<td class="is-vcentered">
<a href="{{ url_for('object_view', slug=game.slug, definition_id=d.id) }}" class="has-text-weight-semibold">{{ d.name }}</a>
<br><span class="is-size-7 has-text-grey">table SQL : {{ d.table_name }}</span>
</td>
<td class="is-vcentered has-text-right">
<a class="button is-small" href="{{ url_for('object_edit', slug=game.slug, definition_id=d.id) }}" title="Modifier cet objet">✏️</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p class="help">Aucun objet défini pour l'instant — un objet, c'est comme une table de base de données : un nom, et des champs typés.</p>
{% endif %}
<div class="box has-background-danger-dark mt-5">
<h3 class="title is-6 has-text-danger-light">⚠️ Paramètres du jeu</h3>
<form method="post" action="{{ url_for('game_rename', slug=game.slug) }}" class="field has-addons">
<div class="control is-expanded">
<label class="label has-text-danger-light" for="rename">Renommer le jeu</label>
<input class="input" type="text" id="rename" name="game_name" value="{{ game.name }}" required autocomplete="off">
</div>
<div class="control" style="align-self:flex-end;">
<button type="submit" class="button">Renommer</button>
</div>
</form>
<form method="post" action="{{ url_for('game_delete', slug=game.slug) }}" class="mt-4"
onsubmit="return confirm('Supprimer définitivement le jeu « {{ game.name }} », son dossier et sa base de données ? Cette action est irréversible.');">
<button type="submit" class="button is-danger">🗑️ Supprimer ce jeu</button>
</form>
</div>
{% endblock %}