Skip to content

Commit

Permalink
the template cards should have the full reflex command
Browse files Browse the repository at this point in the history
  • Loading branch information
ElijahAhianyo committed Nov 21, 2024
1 parent 7c49d71 commit cd4324c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
54 changes: 31 additions & 23 deletions pcweb/components/code_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,42 +89,50 @@ def gallery_app_card(app: dict) -> rx.Component:
),
rx.box(
rx.box(
rx.hstack(
rx.el.h6(
app["title"],
class_name="font-smbold text-slate-12 truncate",
),
rx.el.button(
get_icon(icon="copy", class_name="p-[5px]"),
on_click=rx.set_clipboard(app["title"]),
class_name="border-slate-5 bg-slate-1 hover:bg-slate-3 shadow-small border rounded-md text-slate-9 hover:!text-slate-9 no-underline transition-bg cursor-pointer",
),
rx.el.h6(
app["title"],
class_name="font-smbold text-slate-12 truncate",
),
rx.text(
app["description"],
class_name="text-slate-10 font-small truncate text-pretty",
),
rx.box(
rx.cond(
"Reflex" in app["author"],
rx.vstack(
rx.box(
rx.text(
"by",
class_name="text-slate-9 font-small",
rx.hstack(
install_command(f"reflex init --template {app['title']}"),
rx.hstack(
repo(app["demo"]),
justify="start",

),
),

),
rx.cond(
"Reflex" in app["author"],
rx.box(
rx.text(
"by",
class_name="text-slate-9 font-small",
),
get_icon(icon="badge_logo"),
rx.text(
app["author"],
class_name="text-slate-9 font-small",
),
class_name="flex flex-row items-start gap-1",
),
get_icon(icon="badge_logo"),
rx.text(
app["author"],
f"by {app['author']}",
class_name="text-slate-9 font-small",
),
class_name="flex flex-row items-center gap-1",
),
rx.text(
f"by {app['author']}",
class_name="text-slate-9 font-small",
),
align_items="start",
class_name="brother-john"
),
repo(app["demo"]),


class_name="flex flex-row items-center gap-[6px] justify-between w-full",
),
Expand Down
2 changes: 1 addition & 1 deletion pcweb/pages/gallery/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def gallery_heading() -> rx.Component:
class_name="font-md text-balance text-slate-9 -mt-4",
),
rx.text.span(
"Copy the template name and use it during ",
"Copy the template command and use it during ",
rx.code("reflex init"),
class_name="font-sm text-balance text-slate-9",
),
Expand Down

0 comments on commit cd4324c

Please sign in to comment.