Skip to content

Commit

Permalink
Small docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-Flath committed Jan 30, 2025
1 parent c9677f3 commit c7ab98c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
7 changes: 4 additions & 3 deletions docs/api_reference/api_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,14 @@ def ex_other():
CodeBlock("#This is a CodeBlock element\n\ndef add(a,b): return a+b"))

docs_typography = create_doc_section(
H3("High Level Options"),
H5("Ready to go semantic options that cover most of what you need based on the HTML spec"),
P("Ready to go semantic options that cover most of what you need based on the HTML spec"),
fn2code_string(ex_headings),
fn2code_string(ex_semantic_elements),
fn2code_string(ex_other),
H5("Styling text is possibly the most common style thing to do, so we have a couple of helpers for discoverability inside python. `TextPresetsT` is intended to be combinations are are widely applicable and used often, where `TextT` is intended to be more flexible options for you to combine together yourself."),
P("Styling text is possibly the most common style thing to do, so we have a couple of helpers for discoverability inside python. `TextPresetsT` is intended to be combinations are are widely applicable and used often, where `TextT` is intended to be more flexible options for you to combine together yourself."),
H5("TextPresets.*"),
fn2code_string(ex_textpresets),
H5("TextT.*"),
fn2code_string(ex_textt),
H3("API Reference"),
TextPresets,
Expand Down
15 changes: 0 additions & 15 deletions docs/examples/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,7 @@

app, rt = fast_app(hdrs=Theme.blue.headers(daisy=True))

def TopNav():
return NavBar(
H3("Help Desk", cls="text-xl font-bold"),
NavBarRSide(
Button(UkIcon("bell"), cls=ButtonT.ghost),
Button(UkIcon("settings"), cls=ButtonT.ghost),
DiceBearAvatar("admin", 8, 8)))

def TicketSteps(step):
steps = [
("Submitted", 0, "📝"),
("In Review", 1, "🔎"),
("Processing", 2, "⚙️"),
("Resolved", 3, "✅")
]
return Steps(
LiStep("Submitted", data_content="📝",
cls=StepT.success if step > 0 else StepT.primary if step == 0 else StepT.neutral),
Expand Down Expand Up @@ -93,7 +79,6 @@ def index():
]

return Title("Help Desk Dashboard"), Container(
TopNav(),
Section(
DivFullySpaced(
H2("Active Tickets"),
Expand Down
16 changes: 8 additions & 8 deletions docs/guides/Layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@
" DiceBearAvatar(\"user\"), \n",
" # DivVStacked stacks things vertically together and centers it with flex\n",
" DivVStacked(\n",
" PLarge(\"John Doe\"),\n",
" PMuted(\"[email protected]\"), \n",
" PMuted(\"+1-123-456-7890\"), cls=''))"
" P(\"John Doe\", cls=TextT.lg),\n",
" P(\"[email protected]\", cls=TextT.muted), \n",
" P(\"+1-123-456-7890\"), cls=TextT.muted))"
]
},
{
Expand Down Expand Up @@ -339,7 +339,7 @@
" DivVStacked( # Center and veritcally stack the plan name and price\n",
" H2(plan),\n",
" H3(price, cls='text-primary'),\n",
" PMuted('per month'),\n",
" P('per month',cls=TextT.muted),\n",
" cls='space-y-1'),\n",
" # DivHStacked makes green check and feature Li show up on same row instead of newline\n",
" Ul(*[DivHStacked(UkIcon('check', cls='text-green-500 mr-2'), Li(feature)) for feature in features], \n",
Expand Down Expand Up @@ -430,7 +430,7 @@
" FooterLinkGroup(\"Resources\", resource),\n",
" FooterLinkGroup(\"Legal\", legal)), \n",
" DividerLine(),\n",
" PSmall(\"© 2024 Company Name. All rights reserved.\", cls=TextT.lead),\n",
" P(\"© 2024 Company Name. All rights reserved.\", cls=TextT.lead+TextT.sm),\n",
" cls='space-y-8 p-8'))"
]
},
Expand Down Expand Up @@ -466,7 +466,7 @@
" # Page header\n",
" DivVStacked( # Stacks vertically and centers the title/subtitle\n",
" H2(\"Welcome back, Isaac!\"),\n",
" PMuted(\"Here's what's happening with your projects today.\")),\n",
" P(\"Here's what's happening with your projects today.\",cls=TextT.muted)),\n",
"\n",
" # DivHStacked puts all the stats cards on the same row\n",
" DivHStacked(*(StatsCard(label, value, change)\n",
Expand Down Expand Up @@ -555,7 +555,7 @@
" DivCentered(cls='mt-8')(\n",
" P(\"\"\"Duis aute irure dolor in reprehenderit in voluptate velit esse \n",
" cillum dolore eu fugiat nulla pariatur.\"\"\", \n",
" cls=(TextT.large, TextT.bold, TextT.center, TextT.italic, \"text-primary\"))),\n",
" cls=(TextT.lg, TextT.bold, TextT.center, TextT.italic, \"text-primary\"))),\n",
"\n",
" P(\"\"\"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui \n",
" officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde \n",
Expand Down Expand Up @@ -583,7 +583,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/Spacing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c7ab98c

Please sign in to comment.