extensive refactor push to continue to liberate applets from dashboard; new _applets.html & .gear.html template partials for use across all -board views; all applets.html sections have been liberated into their own _applet-<applet-name>.html template partials in their respective templates/apps/*board/_partials/ dirs; gameboard.html & home.html greatly simplified; .gear-btn describes gear menu now, #id_<*board nickname>*gear IDs abandoned; as such, .gear-btn styling moved from _dashboard.scss to _base.scss; new applets.js file contains related initGearMenus scripts, which no longer waits for window reload; new apps.applets.utils file manages applet_context() fn; new gameboard.js file but currently empty (false start); updates across all sorts of ITs & dash- & gameboard FTs
This commit is contained in:
27
src/templates/apps/gameboard/_partials/_applet-game-kit.html
Normal file
27
src/templates/apps/gameboard/_partials/_applet-game-kit.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<section
|
||||
id="id_applet_game_kit"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<button
|
||||
id="id_game_kit_btn"
|
||||
onclick="document.getElementById('id_game_kit').style.display='block'"
|
||||
>
|
||||
Game Kit
|
||||
</button>
|
||||
<div id="id_game_kit" style="display: none;">
|
||||
{% if coin %}
|
||||
<div id="id_kit_coin_on_a_string" class="token">
|
||||
<i class="fa-solid fa-clover"></i>
|
||||
<span class="token-tooltip">{{ coin.tooltip_text }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for token in free_tokens %}
|
||||
<div id="id_kit_free_token_{{ forloop.counter0 }}" class="token">
|
||||
<i class="fa-solid fa-coins"></i>
|
||||
<span class="token-tooltip">{{ token.tooltip_text }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div id="id_kit_card_deck" class="kit-item"><i class="fa-regular fa-id-badge"></i></div>
|
||||
<div id="id_kit_dice_set" class="kit-item"><i class="fa-solid fa-dice"></i></div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,9 @@
|
||||
<section
|
||||
id="id_applet_my_games"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2>My Games</h2>
|
||||
<ul class="game-list">
|
||||
<small>[feature forthcoming]</small>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -0,0 +1,9 @@
|
||||
<section
|
||||
id="id_applet_new_game"
|
||||
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
|
||||
>
|
||||
<h2>New Game</h2>
|
||||
<ul class="game-type">
|
||||
<small>[feature forthcoming]</small>
|
||||
</ul>
|
||||
</section>
|
||||
27
src/templates/apps/gameboard/_partials/_applets.html
Normal file
27
src/templates/apps/gameboard/_partials/_applets.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div id="id_game_applets_container">
|
||||
<div id="id_game_applet_menu" style="display:none;">
|
||||
<form
|
||||
hx-post="{% url "toggle_game_applets" %}"
|
||||
hx-target="#id_game_applets_container"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{% csrf_token %}
|
||||
{% for entry in applets %}
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="applets"
|
||||
value="{{ entry.applet.slug }}"
|
||||
{% if entry.visible %}checked{% endif %}
|
||||
>
|
||||
{{ entry.applet.name }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
<div class="menu-btns">
|
||||
<button type="submit" class="btn btn-confirm">OK</button>
|
||||
<button type="button" id="id_game_applet_menu_cancel" class="btn btn-cancel applet-menu-cancel">NVM</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% include "apps/applets/_partials/_applets.html" %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user