Fix UIkit tab/switcher list markers showing as squares
All checks were successful
Deploy / deploy (push) Successful in 1m39s
All checks were successful
Deploy / deploy (push) Successful in 1m39s
Add global CSS to remove ::marker pseudo-elements from uk-tab and uk-switcher components. Also clean up tab structure to match MonsterUI idioms (uk-active on Li, use None instead of empty string for cls). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,19 @@ from animaltrack.web.templates.sidebar import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def TabStyles(): # noqa: N802
|
||||||
|
"""CSS styles to fix UIkit tab/switcher list markers."""
|
||||||
|
return Style("""
|
||||||
|
/* Remove list markers from UIkit tabs and switchers */
|
||||||
|
.uk-tab, .uk-tab-alt, .uk-switcher, .uk-switcher > li {
|
||||||
|
list-style: none !important;
|
||||||
|
}
|
||||||
|
.uk-tab > li::marker, .uk-tab-alt > li::marker, .uk-switcher > li::marker {
|
||||||
|
content: none !important;
|
||||||
|
}
|
||||||
|
""")
|
||||||
|
|
||||||
|
|
||||||
def EventSlideOverStyles(): # noqa: N802
|
def EventSlideOverStyles(): # noqa: N802
|
||||||
"""CSS styles for event detail slide-over panel."""
|
"""CSS styles for event detail slide-over panel."""
|
||||||
return Style("""
|
return Style("""
|
||||||
@@ -155,6 +168,7 @@ def page(
|
|||||||
Title(title),
|
Title(title),
|
||||||
BottomNavStyles(),
|
BottomNavStyles(),
|
||||||
SidebarStyles(),
|
SidebarStyles(),
|
||||||
|
TabStyles(),
|
||||||
EventSlideOverStyles(),
|
EventSlideOverStyles(),
|
||||||
SidebarScript(),
|
SidebarScript(),
|
||||||
EventSlideOverScript(),
|
EventSlideOverScript(),
|
||||||
|
|||||||
@@ -52,20 +52,8 @@ def eggs_page(
|
|||||||
H1("Eggs", cls="text-2xl font-bold mb-6"),
|
H1("Eggs", cls="text-2xl font-bold mb-6"),
|
||||||
# Tab navigation
|
# Tab navigation
|
||||||
TabContainer(
|
TabContainer(
|
||||||
Li(
|
Li(A("Harvest", href="#"), cls="uk-active" if harvest_active else None),
|
||||||
A(
|
Li(A("Sell", href="#"), cls=None if harvest_active else "uk-active"),
|
||||||
"Harvest",
|
|
||||||
href="#",
|
|
||||||
cls="uk-active" if harvest_active else "",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Li(
|
|
||||||
A(
|
|
||||||
"Sell",
|
|
||||||
href="#",
|
|
||||||
cls="" if harvest_active else "uk-active",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
uk_switcher="connect: #egg-forms; animation: uk-animation-fade",
|
uk_switcher="connect: #egg-forms; animation: uk-animation-fade",
|
||||||
alt=True,
|
alt=True,
|
||||||
),
|
),
|
||||||
@@ -78,7 +66,7 @@ def eggs_page(
|
|||||||
error=harvest_error,
|
error=harvest_error,
|
||||||
action=harvest_action,
|
action=harvest_action,
|
||||||
),
|
),
|
||||||
cls="uk-active" if harvest_active else "",
|
cls="uk-active" if harvest_active else None,
|
||||||
),
|
),
|
||||||
Li(
|
Li(
|
||||||
sell_form(
|
sell_form(
|
||||||
@@ -87,7 +75,7 @@ def eggs_page(
|
|||||||
error=sell_error,
|
error=sell_error,
|
||||||
action=sell_action,
|
action=sell_action,
|
||||||
),
|
),
|
||||||
cls="" if harvest_active else "uk-active",
|
cls=None if harvest_active else "uk-active",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cls="p-4",
|
cls="p-4",
|
||||||
|
|||||||
@@ -56,20 +56,8 @@ def feed_page(
|
|||||||
H1("Feed", cls="text-2xl font-bold mb-6"),
|
H1("Feed", cls="text-2xl font-bold mb-6"),
|
||||||
# Tab navigation
|
# Tab navigation
|
||||||
TabContainer(
|
TabContainer(
|
||||||
Li(
|
Li(A("Give Feed", href="#"), cls="uk-active" if give_active else None),
|
||||||
A(
|
Li(A("Purchase Feed", href="#"), cls=None if give_active else "uk-active"),
|
||||||
"Give Feed",
|
|
||||||
href="#",
|
|
||||||
cls="uk-active" if give_active else "",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Li(
|
|
||||||
A(
|
|
||||||
"Purchase Feed",
|
|
||||||
href="#",
|
|
||||||
cls="" if give_active else "uk-active",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
uk_switcher="connect: #feed-forms; animation: uk-animation-fade",
|
uk_switcher="connect: #feed-forms; animation: uk-animation-fade",
|
||||||
alt=True,
|
alt=True,
|
||||||
),
|
),
|
||||||
@@ -86,11 +74,11 @@ def feed_page(
|
|||||||
balance_warning=balance_warning,
|
balance_warning=balance_warning,
|
||||||
action=give_action,
|
action=give_action,
|
||||||
),
|
),
|
||||||
cls="uk-active" if give_active else "",
|
cls="uk-active" if give_active else None,
|
||||||
),
|
),
|
||||||
Li(
|
Li(
|
||||||
purchase_feed_form(feed_types, error=purchase_error, action=purchase_action),
|
purchase_feed_form(feed_types, error=purchase_error, action=purchase_action),
|
||||||
cls="" if give_active else "uk-active",
|
cls=None if give_active else "uk-active",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cls="p-4",
|
cls="p-4",
|
||||||
|
|||||||
Reference in New Issue
Block a user