Skip to content

Commit c475295

Browse files
committed
chore: improve modal typography
1 parent 8b148bd commit c475295

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

static/css/app.css

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,9 @@
24242424
.w-6 {
24252425
width: calc(var(--spacing) * 6);
24262426
}
2427+
.w-11 {
2428+
width: calc(var(--spacing) * 11);
2429+
}
24272430
.w-11\/12 {
24282431
width: calc(11 / 12 * 100%);
24292432
}
@@ -2679,9 +2682,6 @@
26792682
.gap-2 {
26802683
gap: calc(var(--spacing) * 2);
26812684
}
2682-
.gap-2\.5 {
2683-
gap: calc(var(--spacing) * 2.5);
2684-
}
26852685
.gap-3 {
26862686
gap: calc(var(--spacing) * 3);
26872687
}
@@ -2989,9 +2989,6 @@
29892989
.py-2 {
29902990
padding-block: calc(var(--spacing) * 2);
29912991
}
2992-
.py-2\.5 {
2993-
padding-block: calc(var(--spacing) * 2.5);
2994-
}
29952992
.py-3 {
29962993
padding-block: calc(var(--spacing) * 3);
29972994
}
@@ -3425,11 +3422,6 @@
34253422
justify-content: flex-start;
34263423
}
34273424
}
3428-
.sm\:gap-2 {
3429-
@media (width >= 40rem) {
3430-
gap: calc(var(--spacing) * 2);
3431-
}
3432-
}
34333425
.sm\:gap-4 {
34343426
@media (width >= 40rem) {
34353427
gap: calc(var(--spacing) * 4);
@@ -3824,6 +3816,12 @@
38243816
padding-bottom: 100px;
38253817
}
38263818
}
3819+
.\[\&_h1\]\:text-2xl {
3820+
& h1 {
3821+
font-size: var(--text-2xl);
3822+
line-height: var(--tw-leading, var(--text-2xl--line-height));
3823+
}
3824+
}
38273825
.\[\&_h1\]\:text-lg {
38283826
& h1 {
38293827
font-size: var(--text-lg);
@@ -3836,6 +3834,28 @@
38363834
line-height: var(--tw-leading, var(--text-base--line-height));
38373835
}
38383836
}
3837+
.\[\&_h2\]\:text-xl {
3838+
& h2 {
3839+
font-size: var(--text-xl);
3840+
line-height: var(--tw-leading, var(--text-xl--line-height));
3841+
}
3842+
}
3843+
.\[\&_p\]\:pb-4 {
3844+
& p {
3845+
padding-bottom: calc(var(--spacing) * 4);
3846+
}
3847+
}
3848+
.\[\&_p\]\:pb-10 {
3849+
& p {
3850+
padding-bottom: calc(var(--spacing) * 10);
3851+
}
3852+
}
3853+
.\[\&_p\]\:text-lg {
3854+
& p {
3855+
font-size: var(--text-lg);
3856+
line-height: var(--tw-leading, var(--text-lg--line-height));
3857+
}
3858+
}
38393859
.\[\&_p\]\:text-sm {
38403860
& p {
38413861
font-size: var(--text-sm);

templates/includes/announcement_modal.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<form method="dialog" class="absolute right-4 top-4">
1010
<button class="text-2xl cursor-pointer hover:opacity-70"></button>
1111
</form>
12-
<h3 class="font-bold text-3xl mb-4">📢 {{ latest_announcement.title }}</h3>
13-
<div class="py-4 text-sm prose prose-sm max-w-none [&_p]:text-sm [&_h1]:text-lg [&_h2]:text-base">
12+
<h3 class="font-bold text-2xl mb-4">📢 {{ latest_announcement.title }}</h3>
13+
<div class="py-4 prose prose-sm max-w-none [&_p]:text-lg [&_p]:pb-4 [&_h1]:text-lg [&_h2]:text-xl">
1414
{{ latest_announcement.content|safe }}
1515
</div>
1616
</div>
@@ -22,7 +22,7 @@ <h3 class="font-bold text-3xl mb-4">📢 {{ latest_announcement.title }}</h3>
2222
<script>
2323
document.addEventListener('DOMContentLoaded', function() {
2424
const modal = document.getElementById('announcement-modal');
25-
const dismissKey = 'announcement-dismissed-{{ latest_announcement.id }}';
25+
const dismissKey = 'announcement-dismissed-{{ latest_announcement.id }}-{{ latest_announcement.updated_at.timestamp }}';
2626

2727
// Check if user has dismissed this announcement
2828
if (sessionStorage.getItem(dismissKey)) {

0 commit comments

Comments
 (0)