Spaces:
Sleeping
Sleeping
Update testnavbar.py
Browse files- testnavbar.py +10 -15
testnavbar.py
CHANGED
|
@@ -8,12 +8,7 @@ import calendar
|
|
| 8 |
from datetime import datetime
|
| 9 |
|
| 10 |
# Get frankenui and tailwind headers via CDN using Theme.blue.headers()
|
| 11 |
-
hdrs = Theme.blue.headers()
|
| 12 |
-
# Add Google Fonts link
|
| 13 |
-
'<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">',
|
| 14 |
-
# Override body font
|
| 15 |
-
'<style> body { font-family: "Inter", sans-serif; } </style>'
|
| 16 |
-
]
|
| 17 |
|
| 18 |
# fast_app is shadowed by MonsterUI to make it default to no Pico, and add body classes
|
| 19 |
# needed for frankenui theme styling
|
|
@@ -104,6 +99,15 @@ def ProductCard(p):
|
|
| 104 |
cls="shadow-lg rounded-lg overflow-hidden bg-white hover:shadow-xl transition-shadow"
|
| 105 |
)
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
@rt
|
| 108 |
def index():
|
| 109 |
# Titled using a H1 title, sets the page title, and wraps contents in Main(Container(...)) using
|
|
@@ -112,15 +116,6 @@ def index():
|
|
| 112 |
Grid(*[ProductCard(p) for p in products], cols_lg=3, gap=6, cls="p-6")
|
| 113 |
)
|
| 114 |
|
| 115 |
-
example_product_description = Div(
|
| 116 |
-
P("This is a sample detailed description of the {product_name}. "
|
| 117 |
-
"You can see when clicking on the card from the gallery you can:"),
|
| 118 |
-
Ul(
|
| 119 |
-
Li("Have a detailed description of the product on the page"),
|
| 120 |
-
Li("Have an order form to fill out and submit"),
|
| 121 |
-
)
|
| 122 |
-
)
|
| 123 |
-
|
| 124 |
@rt
|
| 125 |
def product_detail(product_name: str):
|
| 126 |
return (
|
|
|
|
| 8 |
from datetime import datetime
|
| 9 |
|
| 10 |
# Get frankenui and tailwind headers via CDN using Theme.blue.headers()
|
| 11 |
+
hdrs = Theme.blue.headers()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# fast_app is shadowed by MonsterUI to make it default to no Pico, and add body classes
|
| 14 |
# needed for frankenui theme styling
|
|
|
|
| 99 |
cls="shadow-lg rounded-lg overflow-hidden bg-white hover:shadow-xl transition-shadow"
|
| 100 |
)
|
| 101 |
|
| 102 |
+
# Define this once, at module level (top of file is best)
|
| 103 |
+
example_product_description = """
|
| 104 |
+
This is a sample detailed description of the {product_name}.
|
| 105 |
+
|
| 106 |
+
- Have a detailed description of the product on the page
|
| 107 |
+
- Have an order form to fill out and submit
|
| 108 |
+
- Anything else you want!
|
| 109 |
+
"""
|
| 110 |
+
|
| 111 |
@rt
|
| 112 |
def index():
|
| 113 |
# Titled using a H1 title, sets the page title, and wraps contents in Main(Container(...)) using
|
|
|
|
| 116 |
Grid(*[ProductCard(p) for p in products], cols_lg=3, gap=6, cls="p-6")
|
| 117 |
)
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
@rt
|
| 120 |
def product_detail(product_name: str):
|
| 121 |
return (
|