unified header_title template values across dashboard applet destination pages; styled &/ added applet titles across all applets
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-11 14:50:08 -04:00
parent 50ee983e27
commit 8807d31274
12 changed files with 52 additions and 21 deletions

View File

@@ -23,15 +23,22 @@ const initWallet = () => {
const section = addBtn.closest('section'); const section = addBtn.closest('section');
const rowPx = 3 * parseFloat(getComputedStyle(document.documentElement).fontSize); const rowPx = 3 * parseFloat(getComputedStyle(document.documentElement).fontSize);
const updateRows = () => { const updateRows = () => {
const rows = Math.ceil(section.scrollHeight / rowPx) + 1; const sectionTop = section.getBoundingClientRect().top;
let maxBottom = sectionTop;
for (const child of section.children) {
if (child.hidden) continue;
maxBottom = Math.max(maxBottom, child.getBoundingClientRect().bottom);
}
const padBot = parseFloat(getComputedStyle(section).paddingBottom);
const rows = Math.ceil((maxBottom - sectionTop + padBot) / rowPx) + 1;
section.style.setProperty('--applet-rows', String(rows)); section.style.setProperty('--applet-rows', String(rows));
}; };
paymentEl.on('ready', () => { paymentEl.on('ready', () => {
updateRows(); updateRows();
const iframe = document.querySelector('#id_stripe_payment_element iframe'); const stripeContainer = document.getElementById('id_stripe_payment_element');
if (iframe) { if (stripeContainer) {
const obs = new MutationObserver(updateRows); const obs = new ResizeObserver(updateRows);
obs.observe(iframe, { attributes: true, attributeFilter: ['style'] }); obs.observe(stripeContainer);
section._stripeObs = obs; section._stripeObs = obs;
} }
}); });

View File

@@ -16,7 +16,7 @@ class MyNotesPage:
self.test.wait_for( self.test.wait_for(
lambda: self.test.assertIn( lambda: self.test.assertIn(
email, email,
self.test.browser.find_element(By.TAG_NAME, "h2").text.lower(), self.test.browser.find_element(By.CSS_SELECTOR, ".navbar-identity").text.lower(),
) )
) )
return self return self

View File

@@ -105,6 +105,7 @@
inset -0.125rem -0.125rem 0 rgba(var(--ninUser), 0.125), inset -0.125rem -0.125rem 0 rgba(var(--ninUser), 0.125),
inset 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8) inset 0.125rem 0.125rem 0 rgba(0, 0, 0, 0.8)
; ;
background-color: rgba(0, 0, 0, 0.125);
border-radius: 0.75rem; border-radius: 0.75rem;
padding: 1rem; padding: 1rem;
overflow: hidden; overflow: hidden;

View File

@@ -30,16 +30,14 @@ body.page-dashboard {
} }
#id_applets_container { #id_applets_container {
#id_applet_my_lists { #id_applet_my_notes {
padding: 1.25rem 1.5rem; padding: 1.25rem 1.5rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.my-lists-main { h2 { flex-shrink: 0; margin-bottom: 0.25rem; }
font-size: 1.6rem;
}
.my-lists-container { .my-notes-container {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow-y: auto; overflow-y: auto;
@@ -59,6 +57,14 @@ body.page-dashboard {
} }
#id_applet_wallet {
display: flex;
flex-direction: column;
gap: 0.25rem;
h2 { flex-shrink: 0; margin-bottom: 0; }
}
#id_applet_palette { #id_applet_palette {
padding: 0; padding: 0;

View File

@@ -86,11 +86,23 @@ body.page-wallet {
} }
.wallet-tokens { .wallet-tokens {
display: flex;
flex-direction: column;
overflow: visible;
h2 {
flex-shrink: 0;
margin-bottom: 0;
}
.token-row {
flex: 1;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: space-evenly;
overflow: visible; overflow: visible;
}
.token { .token {
font-size: 1.5rem; font-size: 1.5rem;

View File

@@ -2,7 +2,7 @@
id="id_applet_my_notes" id="id_applet_my_notes"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};" style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
> >
<a href="{% url 'my_notes' user.id %}" class="my-notes-main">My notes:</a> <h2><a href="{% url 'my_notes' user.id %}" class="my-notes-main">My notes</a></h2>
<div class="my-notes-container"> <div class="my-notes-container">
<ul> <ul>
{% for note in recent_notes %} {% for note in recent_notes %}

View File

@@ -2,6 +2,6 @@
id="id_applet_wallet" id="id_applet_wallet"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};" style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
> >
<span>Writs: {{ user.wallet.writs }}</span> <h2><a href="{% url "wallet" %}" class="wallet-manage-link">Manage Wallet</a></h2>
<a href="{% url "wallet" %}" class="wallet-manage-link">Manage Wallet</a> <span><i class="fa-solid fa-ticket"></i>: {{ user.wallet.writs }}</span>
</section> </section>

View File

@@ -1,7 +1,8 @@
{% extends "core/base.html" %} {% extends "core/base.html" %}
{% load lyric_extras %} {% load lyric_extras %}
{% block header_text %}{{ user|display_name }}'s notes{% endblock header_text %} {% block title_text %}Dashnotes{% endblock title_text %}
{% block header_text %}<span>Dash</span>notes{% endblock header_text %}
{% block content %} {% block content %}
<h3>{{ owner|display_name }}'s notes</h3> <h3>{{ owner|display_name }}'s notes</h3>

View File

@@ -1,8 +1,8 @@
{% extends "core/base.html" %} {% extends "core/base.html" %}
{% load lyric_extras %} {% load lyric_extras %}
{% block title_text %}Your note{% endblock title_text %} {% block title_text %}Dashnote{% endblock title_text %}
{% block header_text %}Your note{% endblock header_text %} {% block header_text %}<span>Dash</span>note{% endblock header_text %}
{% block extra_header %} {% block extra_header %}

View File

@@ -2,6 +2,7 @@
id="id_wallet_balances" id="id_wallet_balances"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};" style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
> >
<h2>Balances</h2>
<div><i class="fa-solid fa-ticket"></i>: <span id="id_writs_balance">{{ wallet.writs }}</span></div> <div><i class="fa-solid fa-ticket"></i>: <span id="id_writs_balance">{{ wallet.writs }}</span></div>
<div>Esteem: <span id="id_esteem_balance">{{ wallet.esteem }}</span></div> <div>Esteem: <span id="id_esteem_balance">{{ wallet.esteem }}</span></div>
<div id="id_tithe_token_shop"> <div id="id_tithe_token_shop">

View File

@@ -2,7 +2,7 @@
id="id_payment_methods" id="id_payment_methods"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};" style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
> >
<h2>Payment Methods</h2> <h2>Payment methods</h2>
<button id="id_add_payment_method">Add Payment Method</button> <button id="id_add_payment_method">Add Payment Method</button>
<div id="id_stripe_payment_element"></div> <div id="id_stripe_payment_element"></div>
<button id="id_save_payment_method" hidden>Save Card</button> <button id="id_save_payment_method" hidden>Save Card</button>

View File

@@ -2,6 +2,8 @@
class="wallet-tokens" class="wallet-tokens"
style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};" style="--applet-cols: {{ entry.applet.grid_cols }}; --applet-rows: {{ entry.applet.grid_rows }};"
> >
<h2>Tokens</h2>
<div class="token-row">
{% if coin %} {% if coin %}
<div id="id_coin_on_a_string" class="token"> <div id="id_coin_on_a_string" class="token">
<i class="fa-solid fa-clover"></i> <i class="fa-solid fa-clover"></i>
@@ -50,4 +52,5 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div>
</section> </section>