Skip to content

Commit

Permalink
it's 2025 (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 authored Jan 29, 2025
1 parent 27c4754 commit f801a6e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 3 additions & 1 deletion pcweb/pages/customers/views/footer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
import reflex as rx
from pcweb.components.icons import get_icon
from pcweb.components.button import button
Expand Down Expand Up @@ -116,6 +117,7 @@ def news_letter() -> rx.Component:
),
)


@rx.memo
def footer() -> rx.Component:
return rx.el.footer(
Expand Down Expand Up @@ -153,7 +155,7 @@ def footer() -> rx.Component:
# Socials
rx.box(
rx.text(
"Copyright © 2024 Pynecone, Inc.",
f"Copyright © {datetime.now().year} Pynecone, Inc.",
class_name="font-small text-slate-9",
),
menu_socials(),
Expand Down
3 changes: 2 additions & 1 deletion pcweb/pages/index/views/footer_index.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
import reflex as rx
from pcweb.components.icons import get_icon
from pcweb.components.button import button
Expand Down Expand Up @@ -158,7 +159,7 @@ def footer_index() -> rx.Component:
# Socials
rx.box(
rx.text(
"Copyright © 2024 Pynecone, Inc.",
f"Copyright © {datetime.now().year} Pynecone, Inc.",
class_name="font-small text-slate-9",
),
menu_socials(),
Expand Down
8 changes: 6 additions & 2 deletions pcweb/templates/docpage/docpage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Template for documentation pages."""

from datetime import datetime
from typing import Callable

import reflex as rx
Expand All @@ -14,6 +15,7 @@
from pcweb.components.button import button
from reflex.utils.format import to_title_case, to_snake_case


def footer_link(text: str, href: str):
return rx.link(
text,
Expand Down Expand Up @@ -230,7 +232,7 @@ def docpage_footer(path: str):
),
rx.box(
rx.text(
"Copyright © 2024 Pynecone, Inc.",
f"Copyright © {datetime.now().year} Pynecone, Inc.",
class_name="font-small text-slate-9",
),
menu_socials(),
Expand Down Expand Up @@ -287,6 +289,7 @@ def breadcrumb(path: str, nav_sidebar: rx.Component):
)
)
from pcweb.components.hosting_banner import HostingBannerState

# Return the list of breadcrumb items with separators
return rx.box(
docs_sidebar_drawer(
Expand All @@ -303,7 +306,8 @@ def breadcrumb(path: str, nav_sidebar: rx.Component):
rx.icon(tag="chevron-down", size=14, class_name="!text-slate-9"),
class_name="p-[0.563rem] mobile-only",
),
class_name="relative z-10 flex flex-row justify-between items-center gap-4 lg:gap-0 border-slate-4 bg-slate-1 mt-12 mb-6 lg:mb-12 p-[0.5rem_1rem_0.5rem_1rem] lg:p-0 border-b lg:border-none w-full" + rx.cond(
class_name="relative z-10 flex flex-row justify-between items-center gap-4 lg:gap-0 border-slate-4 bg-slate-1 mt-12 mb-6 lg:mb-12 p-[0.5rem_1rem_0.5rem_1rem] lg:p-0 border-b lg:border-none w-full"
+ rx.cond(
HostingBannerState.show_banner,
" lg:mt-[175px]",
" lg:mt-[119px]",
Expand Down
15 changes: 12 additions & 3 deletions pcweb/views/footer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
import reflex as rx
from pcweb.components.icons.icons import get_icon
from pcweb.pages.gallery import gallery
Expand Down Expand Up @@ -52,8 +53,16 @@ def menu_socials() -> rx.Component:
return rx.box(
rx.box(
social_menu_item("github", GITHUB_URL),
social_menu_item("twitter", TWITTER_URL, class_name="border-l border-slate-5 border-solid border-y-0 border-r-0"),
social_menu_item("forum", FORUM_URL, class_name="!border-l !border-r border-slate-5 border-solid border-y-0"),
social_menu_item(
"twitter",
TWITTER_URL,
class_name="border-l border-slate-5 border-solid border-y-0 border-r-0",
),
social_menu_item(
"forum",
FORUM_URL,
class_name="!border-l !border-r border-slate-5 border-solid border-y-0",
),
social_menu_item("discord", DISCORD_URL),
class_name="flex flex-row h-full align-center divide-x divide-slate-5 border-solid",
),
Expand Down Expand Up @@ -126,7 +135,7 @@ def footer() -> rx.Component:
rx.box(
menu_socials(),
rx.text(
2024 Pynecone, Inc.",
f{datetime.now().year} Pynecone, Inc.",
class_name="font-small text-slate-9",
),
class_name="flex flex-col justify-between items-start gap-4 self-stretch",
Expand Down

0 comments on commit f801a6e

Please sign in to comment.