new applet structure for apps.billboard, incl. My Scrolls, Contacts & Most Recent applets; completely revamped _billboard.scss, tho some styling inconsistencies persist; ensured #id_billboard_applets_container inherited base styles found in _applets.scss; a pair of new migrations in apps.applets to support new applet models & fields; billboard gets its first ITs, new urls & views; pair of new FT classes in FTs.test_billboard

This commit is contained in:
Disco DeDisco
2026-03-24 16:46:46 -04:00
parent 18898c7a0f
commit 189d329e76
18 changed files with 492 additions and 31 deletions

View File

@@ -0,0 +1,14 @@
<section
id="id_applet_billboard_most_recent"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
>
<h2>Most Recent</h2>
{% if recent_room %}
<a href="{% url 'billboard:scroll' recent_room.id %}" class="most-recent-room-link">{{ recent_room.name }}</a>
{% with events=recent_events %}
{% include "core/_partials/_scroll.html" %}
{% endwith %}
{% else %}
<p><small>No recent activity.</small></p>
{% endif %}
</section>

View File

@@ -0,0 +1,7 @@
<section
id="id_applet_billboard_my_contacts"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
>
<h2>Contacts</h2>
<p><small>Coming soon.</small></p>
</section>

View File

@@ -0,0 +1,15 @@
<section
id="id_applet_billboard_my_scrolls"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
>
<h2>My Scrolls</h2>
<ul class="scroll-list">
{% for room in my_rooms %}
<li>
<a href="{% url 'billboard:scroll' room.id %}">{{ room.name }}</a>
</li>
{% empty %}
<li><small>No scrolls yet.</small></li>
{% endfor %}
</ul>
</section>

View File

@@ -0,0 +1,4 @@
<section id="id_applet_billboard_scroll" class="applet-billboard-scroll">
<h2>{{ room.name }}</h2>
{% include "core/_partials/_scroll.html" %}
</section>

View File

@@ -0,0 +1,27 @@
<div id="id_billboard_applets_container">
<div id="id_billboard_applet_menu" style="display:none;">
<form
hx-post="{% url "billboard:toggle_applets" %}"
hx-target="#id_billboard_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" class="btn btn-cancel applet-menu-cancel">NVM</button>
</div>
</form>
</div>
{% include "apps/applets/_partials/_applets.html" %}
</div>