instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
image: The image of the page.
demo: The demo link of the app.
meta: The meta tags of the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props =... |
from pcweb.pages.framework.views.footer_index import footer_index
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
na... | from pcweb.components.docpage.navbar import navbar |
k of the app.
meta: The meta tags of the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) ->... |
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*chil... | from pcweb.pages.framework.views.footer_index import footer_index |
apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
... |
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*children, **props),
class_name="w-full z-[1] relative flex fl... | from pcweb.views.bottom_section.bottom_section import bottom_section |
from typing import Callable
import reflex as rx
from pcweb.route import Route
def highlight_page(
path: str,
title: str = "",
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A templat... | import functools | |
import functools
|
import reflex as rx
from pcweb.route import Route
def highlight_page(
path: str,
title: str = "",
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the ref... | from typing import Callable |
import functools
from typing import Callable
|
from pcweb.route import Route
def highlight_page(
path: str,
title: str = "",
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.dev site should u... | import reflex as rx |
import functools
from typing import Callable
import reflex as rx
|
def highlight_page(
path: str,
title: str = "",
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.dev site should use.
This template wraps th... | from pcweb.route import Route |
import functools
from typing import Callable
import reflex as rx
from pcweb.route import Route
def highlight_page(
path: str,
title: str = "",
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
... |
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
The templated route.
"""
@functools.wraps(contents)
def wrapper(*children, **props... | props = props or {} |
of the page.
image: The image to use for social media.
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props =... |
from pcweb.pages.customers.views.footer import footer_customer
from pcweb.pages.framework.index_colors import index_colors
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
... | from pcweb.components.docpage.navbar import navbar |
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) ->... |
from pcweb.pages.framework.index_colors import index_colors
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar()... | from pcweb.pages.customers.views.footer import footer_customer |
to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
... |
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*chil... | from pcweb.pages.framework.index_colors import index_colors |
to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Return... |
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*children, **props),
rx.box(class_name="flex-grow"),
... | from pcweb.views.bottom_section.bottom_section import bottom_section |
import reflex as rx
from pcweb.meta.meta import meta_tags
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def mainpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] = meta_tags,
props=Non... | from typing import Callable | |
from typing import Callable
|
from pcweb.meta.meta import meta_tags
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def mainpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] = meta_tags,
props=None,
add_as_page=Tr... | import reflex as rx |
from typing import Callable
import reflex as rx
from pcweb.meta.meta import meta_tags
|
DEFAULT_TITLE = "Web Apps in Pure Python"
def mainpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] = meta_tags,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.de... | from pcweb.route import Route |
from typing import Callable
import reflex as rx
from pcweb.meta.meta import meta_tags
from pcweb.route import Route
|
def mainpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] = meta_tags,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.dev site should use.
This template wraps... | DEFAULT_TITLE = "Web Apps in Pure Python" |
from typing import Callable
import reflex as rx
from pcweb.meta.meta import meta_tags
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def mainpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]]... |
def mainpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
The templated route.
"""
def wrapper(*children, **props) -> rx.Component:
"""... | props = props or {} |
The title of the page.
description: The description of the page.
image: The image of the page.
meta: The meta tags of the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the... |
from pcweb.components.hosting_banner import HostingBannerState
from pcweb.pages.framework.index_colors import index_colors
from pcweb.pages.framework.views.footer_index import footer_index
from pcweb.pages.framework.views.get_started import get_started
# Wra... | from pcweb.components.docpage.navbar import navbar |
the page.
image: The image of the page.
meta: The meta tags of the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def mainpag... |
from pcweb.pages.framework.index_colors import index_colors
from pcweb.pages.framework.views.footer_index import footer_index
from pcweb.pages.framework.views.get_started import get_started
# Wrap the component in the template.
return rx.box(
... | from pcweb.components.hosting_banner import HostingBannerState |
of the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def mainpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a t... |
from pcweb.pages.framework.views.footer_index import footer_index
from pcweb.pages.framework.views.get_started import get_started
# Wrap the component in the template.
return rx.box(
index_colors(),
navbar(),
rx.el.main(
... | from pcweb.pages.framework.index_colors import index_colors |
_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def mainpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to cre... |
from pcweb.pages.framework.views.get_started import get_started
# Wrap the component in the template.
return rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*children, **props),
get_start... | from pcweb.pages.framework.views.footer_index import footer_index |
rapper function that returns the full webpage.
"""
props = props or {}
def mainpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
The templated route.
... |
# Wrap the component in the template.
return rx.box(
index_colors(),
navbar(),
rx.el.main(
contents(*children, **props),
get_started(),
),
footer_index(),
cla... | from pcweb.pages.framework.views.get_started import get_started |
from typing import Callable
import reflex as rx
from pcweb.components.icons.icons import get_icon
from pcweb.pages.framework.index_colors import index_colors
from pcweb.route import Route
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
... | import functools | |
import functools
|
import reflex as rx
from pcweb.components.icons.icons import get_icon
from pcweb.pages.framework.index_colors import index_colors
from pcweb.route import Route
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
rx.icon(
... | from typing import Callable |
import functools
from typing import Callable
|
from pcweb.components.icons.icons import get_icon
from pcweb.pages.framework.index_colors import index_colors
from pcweb.route import Route
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
rx.icon(
tag="chevron-lef... | import reflex as rx |
import functools
from typing import Callable
import reflex as rx
|
from pcweb.pages.framework.index_colors import index_colors
from pcweb.route import Route
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
rx.icon(
tag="chevron-left",
stroke_width="2.25",
... | from pcweb.components.icons.icons import get_icon |
import functools
from typing import Callable
import reflex as rx
from pcweb.components.icons.icons import get_icon
|
from pcweb.route import Route
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
rx.icon(
tag="chevron-left",
stroke_width="2.25",
class_name="size-3.5",
),
rx.t... | from pcweb.pages.framework.index_colors import index_colors |
import functools
from typing import Callable
import reflex as rx
from pcweb.components.icons.icons import get_icon
from pcweb.pages.framework.index_colors import index_colors
|
def hero(company: str, description: str, stats: list[dict[str, str]]) -> rx.Component:
return rx.box(
rx.link(
rx.icon(
tag="chevron-left",
stroke_width="2.25",
class_name="size-3.5",
),
rx.text("Customer stories", class_... | from pcweb.route import Route |
underline="none",
is_external=True,
class_name="flex flex-row items-center gap-1.5 text-slate-12 hover:!text-slate-10 transition-color",
),
# Founded
rx.box(
rx.text("Founded", class_name="text-slate-9 font-small-smbold"),
rx.text(founded, class_n... |
customer_items = list(customer_data.items())
# Filter out the current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# F... | from pcweb.pages.customers.data.customers import customer_data |
ame="flex flex-row items-center gap-1.5 text-slate-12 hover:!text-slate-10 transition-color",
),
# Founded
rx.box(
rx.text("Founded", class_name="text-slate-9 font-small-smbold"),
rx.text(founded, class_name="text-slate-12 font-base truncate"),
class_name="fle... |
# Filter out the current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the current company in the origin... | customer_items = list(customer_data.items()) |
olor",
),
# Founded
rx.box(
rx.text("Founded", class_name="text-slate-9 font-small-smbold"),
rx.text(founded, class_name="text-slate-12 font-base truncate"),
class_name="flex flex-col",
),
# Investors
rx.cond(
investors,
... |
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the current company in the original list
current_index = next(
(
i
for i, (_, doc) in enumerate(customer_items)
if doc.metadata.get("compan... | other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
] |
ll-smbold"),
rx.text(founded, class_name="text-slate-12 font-base truncate"),
class_name="flex flex-col",
),
# Investors
rx.cond(
investors,
rx.box(
rx.text("Investors", class_name="text-slate-9 font-small-smbold"),
... | # Return an empty box if there are no other customers
# Find the index of the current company in the original list
current_index = next(
(
i
for i, (_, doc) in enumerate(customer_items)
if doc.metadata.get("company") == current_customer
),
0,
)
... | if not other_customers:
return rx.box() |
ond(
investors,
rx.box(
rx.text("Investors", class_name="text-slate-9 font-small-smbold"),
rx.text(investors, class_name="text-slate-12 font-base truncate"),
class_name="flex flex-col",
),
),
class_name="flex-col gap-4 w... |
# Get the previous and next customers
prev_index = (current_index - 1) % len(customer_items)
next_index = (current_index + 1) % len(customer_items)
prev_customer = customer_items[prev_index]
next_customer = customer_items[next_index]
# Ensure we're not using the current company
while pre... | current_index = next(
(
i
for i, (_, doc) in enumerate(customer_items)
if doc.metadata.get("company") == current_customer
),
0,
) |
"flex flex-col",
),
),
class_name="flex-col gap-4 w-[13rem] p-8 rounded-[1.125rem] border border-slate-3 bg-slate-2 z-[1] justify-start absolute right-[-6.5rem] top-[12rem] hidden xl:flex",
is_external=True,
)
def more_customers(current_customer: str) -> rx.Component:
from ... |
next_index = (current_index + 1) % len(customer_items)
prev_customer = customer_items[prev_index]
next_customer = customer_items[next_index]
# Ensure we're not using the current company
while prev_customer[1].metadata.get("company") == current_customer:
prev_index = (prev_index - 1) % len... | prev_index = (current_index - 1) % len(customer_items) |
me="flex-col gap-4 w-[13rem] p-8 rounded-[1.125rem] border border-slate-3 bg-slate-2 z-[1] justify-start absolute right-[-6.5rem] top-[12rem] hidden xl:flex",
is_external=True,
)
def more_customers(current_customer: str) -> rx.Component:
from pcweb.pages.customers.data.customers import customer_data
... |
prev_customer = customer_items[prev_index]
next_customer = customer_items[next_index]
# Ensure we're not using the current company
while prev_customer[1].metadata.get("company") == current_customer:
prev_index = (prev_index - 1) % len(customer_items)
prev_customer = customer_items[pre... | next_index = (current_index + 1) % len(customer_items) |
order-slate-3 bg-slate-2 z-[1] justify-start absolute right-[-6.5rem] top-[12rem] hidden xl:flex",
is_external=True,
)
def more_customers(current_customer: str) -> rx.Component:
from pcweb.pages.customers.data.customers import customer_data
customer_items = list(customer_data.items())
# Filt... |
next_customer = customer_items[next_index]
# Ensure we're not using the current company
while prev_customer[1].metadata.get("company") == current_customer:
prev_index = (prev_index - 1) % len(customer_items)
prev_customer = customer_items[prev_index]
while next_customer[1].metadata.ge... | prev_customer = customer_items[prev_index] |
solute right-[-6.5rem] top-[12rem] hidden xl:flex",
is_external=True,
)
def more_customers(current_customer: str) -> rx.Component:
from pcweb.pages.customers.data.customers import customer_data
customer_items = list(customer_data.items())
# Filter out the current company
other_customers ... |
# Ensure we're not using the current company
while prev_customer[1].metadata.get("company") == current_customer:
prev_index = (prev_index - 1) % len(customer_items)
prev_customer = customer_items[prev_index]
while next_customer[1].metadata.get("company") == current_customer:
next_... | next_customer = customer_items[next_index] |
stomers(current_customer: str) -> rx.Component:
from pcweb.pages.customers.data.customers import customer_data
customer_items = list(customer_data.items())
# Filter out the current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
... |
while next_customer[1].metadata.get("company") == current_customer:
next_index = (next_index + 1) % len(customer_items)
next_customer = customer_items[next_index]
customers = [
rx.box(
rx.link(
rx.box(
"Previous",
get... | while prev_customer[1].metadata.get("company") == current_customer:
prev_index = (prev_index - 1) % len(customer_items)
prev_customer = customer_items[prev_index] |
rs.data.customers import customer_data
customer_items = list(customer_data.items())
# Filter out the current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if... |
prev_customer = customer_items[prev_index]
while next_customer[1].metadata.get("company") == current_customer:
next_index = (next_index + 1) % len(customer_items)
next_customer = customer_items[next_index]
customers = [
rx.box(
rx.link(
rx.box(
... | prev_index = (prev_index - 1) % len(customer_items) |
list(customer_data.items())
# Filter out the current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the c... |
while next_customer[1].metadata.get("company") == current_customer:
next_index = (next_index + 1) % len(customer_items)
next_customer = customer_items[next_index]
customers = [
rx.box(
rx.link(
rx.box(
"Previous",
get... | prev_customer = customer_items[prev_index] |
he current company
other_customers = [
c for c in customer_items if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the current company in the original list
current_... |
customers = [
rx.box(
rx.link(
rx.box(
"Previous",
get_icon(icon="arrow_right", class_name="rotate-180"),
class_name="flex flex-row-reverse justify-center lg:justify-start items-center gap-2 rounded-lg w-full self-end"... | while next_customer[1].metadata.get("company") == current_customer:
next_index = (next_index + 1) % len(customer_items)
next_customer = customer_items[next_index] |
if c[1].metadata.get("company") != current_customer
]
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the current company in the original list
current_index = next(
(
i
for i, (_, doc) in enumera... |
next_customer = customer_items[next_index]
customers = [
rx.box(
rx.link(
rx.box(
"Previous",
get_icon(icon="arrow_right", class_name="rotate-180"),
class_name="flex flex-row-reverse justify-center lg:justify-s... | next_index = (next_index + 1) % len(customer_items) |
if not other_customers:
return rx.box() # Return an empty box if there are no other customers
# Find the index of the current company in the original list
current_index = next(
(
i
for i, (_, doc) in enumerate(customer_items)
if doc.metadata.get("company"... |
customers = [
rx.box(
rx.link(
rx.box(
"Previous",
get_icon(icon="arrow_right", class_name="rotate-180"),
class_name="flex flex-row-reverse justify-center lg:justify-start items-center gap-2 rounded-lg w-full self-end"... | next_customer = customer_items[next_index] |
storypage(
path: str,
description: str,
company: str,
domain: str | None = None,
founded: str | None = None,
investors: str | None = None,
stats: list[dict[str, str]] | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A te... |
def storypage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
The templated route.
"""
@functools.wraps(contents)
def wrapper(*children, **pro... | props = props or {} |
stors.
stats: The company stats to show in the hero.
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = p... |
from pcweb.pages.customers.views.footer import footer_customer
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navba... | from pcweb.components.docpage.navbar import navbar |
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def storypage(contents: Callable[[], Route]) ->... |
from pcweb.views.bottom_section.bottom_section import bottom_section
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
company_card(company, founded, investors, domain),... | from pcweb.pages.customers.views.footer import footer_customer |
o apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def storypage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
... |
# Wrap the component in the template.
return rx.box(
rx.box(
index_colors(),
navbar(),
company_card(company, founded, investors, domain),
rx.el.main(
hero(company, descriptio... | from pcweb.views.bottom_section.bottom_section import bottom_section |
from typing import Callable
import reflex as rx
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
ad... | import functools | |
import functools
|
import reflex as rx
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callabl... | from typing import Callable |
import functools
from typing import Callable
|
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template ... | import reflex as rx |
import functools
from typing import Callable
import reflex as rx
|
DEFAULT_TITLE = "Web Apps in Pure Python"
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.d... | from pcweb.route import Route |
import functools
from typing import Callable
import reflex as rx
from pcweb.route import Route
|
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
props=None,
add_as_page=True,
) -> Callable:
"""A template that most pages on the reflex.dev site should use.
This template wrap... | DEFAULT_TITLE = "Web Apps in Pure Python" |
import functools
from typing import Callable
import reflex as rx
from pcweb.route import Route
DEFAULT_TITLE = "Web Apps in Pure Python"
def webpage(
path: str,
title: str = DEFAULT_TITLE,
description: str | None = None,
image: str | None = None,
meta: list[dict[str, str]] | None = None,
pr... |
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
The templated route.
"""
@functools.wraps(contents)
def wrapper(*children, **props... | props = props or {} |
of the page.
image: The image to use for social media.
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props =... |
from pcweb.components.icons.patterns import default_patterns
from pcweb.views.bottom_section.bottom_section import bottom_section
from pcweb.views.footer import footer
# Wrap the component in the template.
return rx.box(
*default_patterns(),
... | from pcweb.components.docpage.navbar import navbar |
meta: Additional meta tags to add to the page.
props: Props to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) ->... |
from pcweb.views.bottom_section.bottom_section import bottom_section
from pcweb.views.footer import footer
# Wrap the component in the template.
return rx.box(
*default_patterns(),
navbar(),
rx.el.main(
... | from pcweb.components.icons.patterns import default_patterns |
ps to apply to the template.
add_as_page: whether to add the route to the app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
... |
from pcweb.views.footer import footer
# Wrap the component in the template.
return rx.box(
*default_patterns(),
navbar(),
rx.el.main(
contents(*children, **props),
rx.box(class_name="flex-grow")... | from pcweb.views.bottom_section.bottom_section import bottom_section |
app pages.
Returns:
A wrapper function that returns the full webpage.
"""
props = props or {}
def webpage(contents: Callable[[], Route]) -> Route:
"""Wrapper to create a templated route.
Args:
contents: The function to create the page route.
Returns:
... |
# Wrap the component in the template.
return rx.box(
*default_patterns(),
navbar(),
rx.el.main(
contents(*children, **props),
rx.box(class_name="flex-grow"),
class_name="w-full z-[1]",
... | from pcweb.views.footer import footer |
"""Template for documentation pages."""
|
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons i... | import functools |
"""Template for documentation pages."""
import functools
|
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.rout... | from datetime import datetime |
"""Template for documentation pages."""
import functools
from datetime import datetime
|
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
fro... | from typing import Callable |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
|
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.co... | import flexdown |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
|
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.colors import c_col... | import mistletoe |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
|
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.colors import c_color
from .blocks imp... | import reflex as rx |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
|
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.colors import c_color
from .blocks import *
from .state import FeedbackState
def right_sidebar_item_hig... | from reflex.components.radix.themes.base import LiteralAccentColor |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
|
from pcweb.components.button import button
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.colors import c_color
from .blocks import *
from .state import FeedbackState
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHig... | from reflex.utils.format import to_snake_case, to_title_case |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
|
from pcweb.components.icons.icons import get_icon
from pcweb.route import Route, get_path
from pcweb.styles.colors import c_color
from .blocks import *
from .state import FeedbackState
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is ful... | from pcweb.components.button import button |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components... |
from pcweb.styles.colors import c_color
from .blocks import *
from .state import FeedbackState
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is fully loaded
setTimeout(() => {
const tocLinks = document.querySelectorAll('#toc-... | from pcweb.route import Route, get_path |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components... |
from .blocks import *
from .state import FeedbackState
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is fully loaded
setTimeout(() => {
const tocLinks = document.querySelectorAll('#toc-navigation a');
const activeClas... | from pcweb.styles.colors import c_color |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components... |
from .state import FeedbackState
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is fully loaded
setTimeout(() => {
const tocLinks = document.querySelectorAll('#toc-navigation a');
const activeClass = 'text-violet-9';
... | from .blocks import * |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components... |
def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is fully loaded
setTimeout(() => {
const tocLinks = document.querySelectorAll('#toc-navigation a');
const activeClass = 'text-violet-9';
const defaultClass = 'text-... | from .state import FeedbackState |
"""Template for documentation pages."""
import functools
from datetime import datetime
from typing import Callable
import flexdown
import mistletoe
import reflex as rx
from reflex.components.radix.themes.base import LiteralAccentColor
from reflex.utils.format import to_snake_case, to_title_case
from pcweb.components... |
def footer_link(text: str, href: str):
return rx.link(
text,
class_name="font-small text-slate-9 hover:!text-slate-11 transition-color",
href=href,
underline="none",
)
def footer_link_flex(heading: str, links):
return rx.box(
rx.el.h4(
heading,
... | def right_sidebar_item_highlight():
return r"""
function setupTableOfContentsHighlight() {
// Delay to ensure DOM is fully loaded
setTimeout(() => {
const tocLinks = document.querySelectorAll('#toc-navigation a');
const activeClass = 'text-violet-9';
const defaultClass = 'text-sla... |
ve(activeClass);
link.classList.add(defaultClass);
});
// Highlight current link
correspondingLink.classList.remove(defaultClass);
correspondingLink.classList.add(activeClass);
... |
def footer_link_flex(heading: str, links):
return rx.box(
rx.el.h4(
heading,
class_name="font-semibold text-slate-12 text-sm tracking-[-0.01313rem]",
),
*links,
class_name="flex flex-col gap-4",
)
def thumb_card(score: int, icon: str) -> rx.Component:... | def footer_link(text: str, href: str):
return rx.link(
text,
class_name="font-small text-slate-9 hover:!text-slate-11 transition-color",
href=href,
underline="none",
) |
remove(defaultClass);
correspondingLink.classList.add(activeClass);
}
}
});
}, observerOptions);
// Observe headers
const headerSelectors = Array.from(tocLinks).map(link =>
new URL(link.href).hash.substring(1)
... |
def thumb_card(score: int, icon: str) -> rx.Component:
return rx.el.button(
rx.icon(
tag=icon,
color=rx.cond(
FeedbackState.score == score, c_color("slate", 11), c_color("slate", 9)
),
size=16,
),
background_color=rx.cond(
... | def footer_link_flex(heading: str, links):
return rx.box(
rx.el.h4(
heading,
class_name="font-semibold text-slate-12 text-sm tracking-[-0.01313rem]",
),
*links,
class_name="flex flex-col gap-4",
) |
ink =>
new URL(link.href).hash.substring(1)
);
headerSelectors.forEach(selector => {
const header = document.getElementById(selector);
if (header) {
observer.observe(header);
}
});
// Initial highlighting
highlight... |
def thumbs_cards() -> rx.Component:
return rx.hstack(
thumb_card(1, "thumbs-up"),
thumb_card(0, "thumbs-down"),
gap="8px",
)
def feedback_content() -> rx.Component:
return rx.box(
rx.box(
rx.text(
"Send feedback",
class_name="f... | def thumb_card(score: int, icon: str) -> rx.Component:
return rx.el.button(
rx.icon(
tag=icon,
color=rx.cond(
FeedbackState.score == score, c_color("slate", 11), c_color("slate", 9)
),
size=16,
),
background_color=rx.cond(
... |
small text-slate-9 hover:!text-slate-11 transition-color",
href=href,
underline="none",
)
def footer_link_flex(heading: str, links):
return rx.box(
rx.el.h4(
heading,
class_name="font-semibold text-slate-12 text-sm tracking-[-0.01313rem]",
),
*li... |
def feedback_content() -> rx.Component:
return rx.box(
rx.box(
rx.text(
"Send feedback",
class_name="font-md text-slate-11",
),
rx.form(
rx.box(
rx.el.textarea(
name="feedback",... | def thumbs_cards() -> rx.Component:
return rx.hstack(
thumb_card(1, "thumbs-up"),
thumb_card(0, "thumbs-down"),
gap="8px",
) |
return rx.box(
rx.el.h4(
heading,
class_name="font-semibold text-slate-12 text-sm tracking-[-0.01313rem]",
),
*links,
class_name="flex flex-col gap-4",
)
def thumb_card(score: int, icon: str) -> rx.Component:
return rx.el.button(
rx.icon(
... |
def feedback_button() -> rx.Component:
thumb_cn = " flex flex-row items-center justify-center gap-2 text-slate-9 whitespace-nowrap border border-slate-5 bg-slate-1 shadow-large cursor-pointer transition-bg hover:bg-slate-3 font-small"
return rx.popover.root(
rx.box(
rx.popover.trigger(
... | def feedback_content() -> rx.Component:
return rx.box(
rx.box(
rx.text(
"Send feedback",
class_name="font-md text-slate-11",
),
rx.form(
rx.box(
rx.el.textarea(
name="feedback",
... |
),
rx.box(
rx.popover.close(
button(
"Send",
type="submit",
)
),
rx.popover.close(
... |
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_name="lg:flex hidden flex-row justify-center items-center gap-2 lg:border-slate-5 bg-slate-3 lg:bg-slate-1 hover:bg-slate-3 shadow-none lg:shadow-large px-3 py-0.5 lg:bord... | def feedback_button() -> rx.Component:
thumb_cn = " flex flex-row items-center justify-center gap-2 text-slate-9 whitespace-nowrap border border-slate-5 bg-slate-1 shadow-large cursor-pointer transition-bg hover:bg-slate-3 font-small"
return rx.popover.root(
rx.box(
rx.popover.trigger(
... |
(
rx.popover.close(
button(
"Send",
type="submit",
)
),
rx.popover.close(
button(
... |
return rx.popover.root(
rx.box(
rx.popover.trigger(
rx.box(
rx.icon(tag="thumbs-up", size=15, class_name="!text-slate-9"),
rx.text(
"Yes",
),
class_name="w-full gap-2 border-r... | thumb_cn = " flex flex-row items-center justify-center gap-2 text-slate-9 whitespace-nowrap border border-slate-5 bg-slate-1 shadow-large cursor-pointer transition-bg hover:bg-slate-3 font-small" |
class_name="w-full gap-2 border-r-0 px-3 py-0.5 rounded-[20px_0_0_20px]"
+ thumb_cn,
),
on_click=FeedbackState.set_score(1),
),
rx.popover.trigger(
rx.box(
rx.icon(tag="thumbs-down", size=15, cla... |
@rx.memo
def docpage_footer(path: str):
from pcweb.constants import FORUM_URL, ROADMAP_URL
from pcweb.pages.blog import blogs
from pcweb.pages.docs import getting_started, hosting
from pcweb.pages.docs.library import library
from pcweb.pages.errors import errors
from pcweb.pages.faq import fa... | def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_name="lg:flex hidden flex-row justify-center items-center gap-2 lg:border-slate-5 bg-slate-3 lg:bg-slate-1 hover:bg-slate-3 shadow-none lg:shadow-large px-3 py-0.5 lg:border ... |
),
on_click=FeedbackState.set_score(0),
),
class_name="w-full lg:w-auto items-center flex flex-row",
),
rx.popover.content(
feedback_content(),
align="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom... |
def breadcrumb(path: str, nav_sidebar: rx.Component):
from pcweb.components.docpage.navbar.buttons.sidebar import docs_sidebar_drawer
# Split the path into segments, removing 'docs' and capitalizing each segment
segments = [
segment.capitalize()
for segment in path.split("/")
if ... | def docpage_footer(path: str):
from pcweb.constants import FORUM_URL, ROADMAP_URL
from pcweb.pages.blog import blogs
from pcweb.pages.docs import getting_started, hosting
from pcweb.pages.docs.library import library
from pcweb.pages.errors import errors
from pcweb.pages.faq import faq
from p... |
=FeedbackState.set_score(0),
),
class_name="w-full lg:w-auto items-center flex flex-row",
),
rx.popover.content(
feedback_content(),
align="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overfl... |
from pcweb.pages.blog import blogs
from pcweb.pages.docs import getting_started, hosting
from pcweb.pages.docs.library import library
from pcweb.pages.errors import errors
from pcweb.pages.faq import faq
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.... | from pcweb.constants import FORUM_URL, ROADMAP_URL |
class_name="w-full lg:w-auto items-center flex flex-row",
),
rx.popover.content(
feedback_content(),
align="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
av... |
from pcweb.pages.docs import getting_started, hosting
from pcweb.pages.docs.library import library
from pcweb.pages.errors import errors
from pcweb.pages.faq import faq
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.gallery import gallery
from pcweb.v... | from pcweb.pages.blog import blogs |
ter flex flex-row",
),
rx.popover.content(
feedback_content(),
align="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
avoid_collisions=True,
),
)
... |
from pcweb.pages.docs.library import library
from pcweb.pages.errors import errors
from pcweb.pages.faq import faq
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.gallery import gallery
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
... | from pcweb.pages.docs import getting_started, hosting |
feedback_content(),
align="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
avoid_collisions=True,
),
)
def link_pill(text: str, href: str) -> rx.Component:
... |
from pcweb.pages.errors import errors
from pcweb.pages.faq import faq
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.gallery import gallery
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
return rx.el.footer(
rx.box(
... | from pcweb.pages.docs.library import library |
n="start",
class_name="border-none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
avoid_collisions=True,
),
)
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
... |
from pcweb.pages.faq import faq
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.gallery import gallery
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
return rx.el.footer(
rx.box(
rx.box(
rx.text(
... | from pcweb.pages.errors import errors |
none left-0 lg:left-[-255px] origin-bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
avoid_collisions=True,
),
)
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_na... |
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
from pcweb.pages.gallery import gallery
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
return rx.el.footer(
rx.box(
rx.box(
rx.text(
"Did you find this usef... | from pcweb.pages.faq import faq |
bottom lg:origin-bottom-right !p-0 overflow-visible !bg-transparent shadow-none",
avoid_collisions=True,
),
)
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_name="lg:flex hidden flex-row justify-... |
from pcweb.pages.gallery import gallery
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
return rx.el.footer(
rx.box(
rx.box(
rx.text(
"Did you find this useful?",
class_name="font-small text-slate-11 lg:text-sla... | from pcweb.pages.framework.views.footer_index import dark_mode_toggle |
-none",
avoid_collisions=True,
),
)
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_name="lg:flex hidden flex-row justify-center items-center gap-2 lg:border-slate-5 bg-slate-3 lg:bg-slate-1 hover... |
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
return rx.el.footer(
rx.box(
rx.box(
rx.text(
"Did you find this useful?",
class_name="font-small text-slate-11 lg:text-slate-9 whitespace-nowrap",
),
... | from pcweb.pages.gallery import gallery |
),
)
def link_pill(text: str, href: str) -> rx.Component:
return rx.link(
text,
href=href,
underline="none",
class_name="lg:flex hidden flex-row justify-center items-center gap-2 lg:border-slate-5 bg-slate-3 lg:bg-slate-1 hover:bg-slate-3 shadow-none lg:shadow-large px-3... |
return rx.el.footer(
rx.box(
rx.box(
rx.text(
"Did you find this useful?",
class_name="font-small text-slate-11 lg:text-slate-9 whitespace-nowrap",
),
feedback_button(),
class_name="flex lg:... | from pcweb.views.footer import menu_socials, newsletter_form, ph_1 |
s", errors.path),
footer_link("Roadmap", ROADMAP_URL),
footer_link("Forum", FORUM_URL),
footer_link("Use Case", "/use-cases"),
],
),
class_name="flex flex-wrap justify-between gap-12 w-full",
... |
def get_headings(comp):
"""Get the strings from markdown component."""
if isinstance(comp, mistletoe.block_token.Heading):
heading_text = "".join(
token.content for token in comp.children if hasattr(token, "content")
)
return [(comp.level, heading_text)]
# Recursively... | def breadcrumb(path: str, nav_sidebar: rx.Component):
from pcweb.components.docpage.navbar.buttons.sidebar import docs_sidebar_drawer
# Split the path into segments, removing 'docs' and capitalizing each segment
segments = [
segment.capitalize()
for segment in path.split("/")
if seg... |
dmap", ROADMAP_URL),
footer_link("Forum", FORUM_URL),
footer_link("Use Case", "/use-cases"),
],
),
class_name="flex flex-wrap justify-between gap-12 w-full",
),
rx.box(
rx.box(
... |
# Split the path into segments, removing 'docs' and capitalizing each segment
segments = [
segment.capitalize()
for segment in path.split("/")
if segment and segment != "docs"
]
# Initialize an empty list to store the breadcrumbs and their separators
breadcrumbs = []
... | from pcweb.components.docpage.navbar.buttons.sidebar import docs_sidebar_drawer |
),
class_name="flex flex-wrap justify-between gap-12 w-full",
),
rx.box(
rx.box(
ph_1(),
rx.text(
f"Copyright © {datetime.now().year} Pynecone, Inc.",
class_name="... |
# Initialize an empty list to store the breadcrumbs and their separators
breadcrumbs = []
# Iteratively build the href for each segment
current_path = "/docs"
for i, segment in enumerate(segments):
current_path += f"/{segment.lower()}"
# Add the breadcrumb item to the list
... | segments = [
segment.capitalize()
for segment in path.split("/")
if segment and segment != "docs"
] |
f"Copyright © {datetime.now().year} Pynecone, Inc.",
class_name="font-small text-slate-9",
),
dark_mode_toggle(),
class_name="flex flex-col gap-6",
),
menu_socials(),
... |
# Iteratively build the href for each segment
current_path = "/docs"
for i, segment in enumerate(segments):
current_path += f"/{segment.lower()}"
# Add the breadcrumb item to the list
breadcrumbs.append(
rx.link(
to_title_case(to_snake_case(segment), se... | breadcrumbs = [] |
,
class_name="font-small text-slate-9",
),
dark_mode_toggle(),
class_name="flex flex-col gap-6",
),
menu_socials(),
class_name="flex flex-row gap-6 justify-between items-end w-full",
... |
for i, segment in enumerate(segments):
current_path += f"/{segment.lower()}"
# Add the breadcrumb item to the list
breadcrumbs.append(
rx.link(
to_title_case(to_snake_case(segment), sep=" "),
class_name="font-small text-slate-9 hover:!text-slate-... | current_path = "/docs" |
lass_name="font-small text-slate-9",
),
dark_mode_toggle(),
class_name="flex flex-col gap-6",
),
menu_socials(),
class_name="flex flex-row gap-6 justify-between items-end w-full",
),
class... |
from pcweb.components.hosting_banner import HostingBannerState
# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden flex",
... | for i, segment in enumerate(segments):
current_path += f"/{segment.lower()}"
# Add the breadcrumb item to the list
breadcrumbs.append(
rx.link(
to_title_case(to_snake_case(segment), sep=" "),
class_name="font-small text-slate-9 hover:!text-slate-11 tr... |
buttons.sidebar import docs_sidebar_drawer
# Split the path into segments, removing 'docs' and capitalizing each segment
segments = [
segment.capitalize()
for segment in path.split("/")
if segment and segment != "docs"
]
# Initialize an empty list to store the breadcrumbs and t... |
from pcweb.components.hosting_banner import HostingBannerState
# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden flex",
... | if i < len(segments) - 1:
breadcrumbs.append(
rx.icon(
tag="chevron-right",
size=14,
class_name="lg:flex hidden !text-slate-8",
),
)
breadcrumbs.append(
rx.text(
... |
for i, segment in enumerate(segments):
current_path += f"/{segment.lower()}"
# Add the breadcrumb item to the list
breadcrumbs.append(
rx.link(
to_title_case(to_snake_case(segment), sep=" "),
class_name="font-small text-slate-9 hover:!text-slate-11 ... |
# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden flex",
),
),
rx.box(
*breadcrumbs,
... | from pcweb.components.hosting_banner import HostingBannerState |
)
)
from pcweb.components.hosting_banner import HostingBannerState
# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden... |
def get_toc(source, href, component_list=None):
from pcweb.flexdown import xd
component_list = component_list or []
component_list = component_list[1:]
# Generate the TOC
# The environment used for execing and evaling code.
env = source.metadata
env["__xd"] = xd
# Get the content o... | def get_headings(comp):
"""Get the strings from markdown component."""
if isinstance(comp, mistletoe.block_token.Heading):
heading_text = "".join(
token.content for token in comp.children if hasattr(token, "content")
)
return [(comp.level, heading_text)]
# Recursively ge... |
State
# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden flex",
),
),
rx.box(
*breadcrumbs,
... |
# Recursively get the strings from the children.
if not hasattr(comp, "children") or comp.children is None:
return []
headings = []
for child in comp.children:
headings.extend(get_headings(child))
return headings
def get_toc(source, href, component_list=None):
from pcweb.fle... | if isinstance(comp, mistletoe.block_token.Heading):
heading_text = "".join(
token.content for token in comp.children if hasattr(token, "content")
)
return [(comp.level, heading_text)] |
tors
return rx.box(
docs_sidebar_drawer(
nav_sidebar,
trigger=rx.box(
class_name="absolute inset-0 bg-transparent z-[1] lg:hidden flex",
),
),
rx.box(
*breadcrumbs,
class_name="flex flex-row items-center gap-[5px] lg... |
return [(comp.level, heading_text)]
# Recursively get the strings from the children.
if not hasattr(comp, "children") or comp.children is None:
return []
headings = []
for child in comp.children:
headings.extend(get_headings(child))
return headings
def get_toc(source, hr... | heading_text = "".join(
token.content for token in comp.children if hasattr(token, "content")
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.