updated applet seed migration to include default applet sizes; other sundry styling refinements
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Disco DeDisco
2026-03-06 19:14:53 -05:00
parent 42a9049c0a
commit 9aea1ccb56
5 changed files with 43 additions and 10 deletions

View File

@@ -3,8 +3,8 @@ from django.db import migrations
def seed_applets(apps, schema_editor): def seed_applets(apps, schema_editor):
Applet = apps.get_model("dashboard", "Applet") Applet = apps.get_model("dashboard", "Applet")
Applet.objects.get_or_create(slug="username", defaults={"name": "Username"}) Applet.objects.get_or_create(slug="username", defaults={"name": "Username"}, grid_cols=6, grid_rows=3)
Applet.objects.get_or_create(slug="palette", defaults={"name": "Palette"}) Applet.objects.get_or_create(slug="palette", defaults={"name": "Palette"}, grid_cols=6, grid_rows=3)
class Migration(migrations.Migration): class Migration(migrations.Migration):

View File

@@ -60,10 +60,10 @@
} }
&.btn-xl { &.btn-xl {
width: 5rem; width: 3rem;
height: 5rem; height: 3rem;
font-size: 1.2rem; font-size: 1rem;
border-width: 0.3rem; border-width: 0.21rem;
&:hover { &:hover {
text-shadow: text-shadow:

View File

@@ -28,6 +28,14 @@ body.page-dashboard {
font-size: 1.5rem; font-size: 1.5rem;
cursor: pointer; cursor: pointer;
color: rgba(var(--secUser), 0.6); color: rgba(var(--secUser), 0.6);
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 50%;
background-color: rgba(var(--priUser), 0.85);
border: 0.15rem solid rgba(var(--secUser), 0.15);
} }
#id_applet_menu { #id_applet_menu {
@@ -62,3 +70,20 @@ body.page-dashboard {
grid-row: span var(--applet-rows, 3); grid-row: span var(--applet-rows, 3);
} }
} }
@media (max-height: 500px) {
body.page-dashboard {
height: auto;
overflow-y: auto;
.container {
overflow: visible;
}
}
#id_dash_content,
#id_applets_container {
overflow: visible;
flex: none;
}
}

View File

@@ -7,6 +7,13 @@
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
gap: 0.75rem; gap: 0.75rem;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
mask-image: linear-gradient(
to right,
transparent 0%,
black 8%,
black 92%,
transparent 100%
);
} }
.palette-item { .palette-item {
@@ -14,13 +21,13 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
flex: 0 0 calc(100% / 3); flex: 0 0 calc(50% - 0.375rem);
scroll-snap-align: start; scroll-snap-align: start;
} }
.swatch { .swatch {
width: 4rem; width: 100%;
height: 4rem; aspect-ratio: 1;
border-radius: 0.5rem; border-radius: 0.5rem;
background: linear-gradient( background: linear-gradient(
to bottom, to bottom,

View File

@@ -28,7 +28,7 @@
<section <section
id="id_applet_username" id="id_applet_username"
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 }};"
> >
<h1>{{ user|display_name }}</h1> <h1>{{ user|display_name }}</h1>
<div class="form-container"> <div class="form-container">
<form method="POST" action="{% url "set_profile" %}"> <form method="POST" action="{% url "set_profile" %}">
@@ -36,6 +36,7 @@
<input <input
id="id_new_username" id="id_new_username"
name="username" name="username"
class="form-control"
required required
value="{{ user.username|default:'' }}" value="{{ user.username|default:'' }}"
> >