diff --git a/README.md b/README.md index 9785335e..748ac4fa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Python Web [![Python](https://img.shields.io/badge/Python-3.11+-yellow?style=for-the-badge&logo=python&logoColor=white&labelColor=101010)](https://python.org) -[![Reflex](https://img.shields.io/badge/Reflex-0.4.4+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev) +[![Reflex](https://img.shields.io/badge/Reflex-0.4.5+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev) ## Curso de 6 horas en vídeo para aprender desarrollo web frontend con Python puro y Reflex desde cero. diff --git a/link_bio/README.md b/link_bio/README.md index 0db2f178..46d45362 100644 --- a/link_bio/README.md +++ b/link_bio/README.md @@ -1,7 +1,7 @@ # Web de links de MoureDev [![Python](https://img.shields.io/badge/Python-3.11+-yellow?style=for-the-badge&logo=python&logoColor=white&labelColor=101010)](https://python.org) -[![FastAPI](https://img.shields.io/badge/Reflex-0.4.4+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://fastapi.tiangolo.com) +[![FastAPI](https://img.shields.io/badge/Reflex-0.4.5+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://fastapi.tiangolo.com) ## Proyecto desarrollado con [Python](https://www.python.org/) y [Reflex](https://reflex.dev/) que representa un sitio web personal estilo "[link in bio](https://moure.dev/)" diff --git a/link_bio/link_bio/components/newsletter.py b/link_bio/link_bio/components/newsletter.py new file mode 100644 index 00000000..f1d2e6dd --- /dev/null +++ b/link_bio/link_bio/components/newsletter.py @@ -0,0 +1,24 @@ +import reflex as rx +import link_bio.constants as const +from link_bio.components.link_button import link_button +from link_bio.styles.colors import Color +from link_bio.styles.styles import Spacing + + +def newsletter() -> rx.Component: + return rx.vstack( + link_button( + "mouredev.log", + "La newsletter de la comunidad para mantenerse al día", + "/icons/news.svg", + const.NEWSLETTER_URL + ), + rx.chakra.box( + element="iframe", + src="https://embeds.beehiiv.com/c9c3f7b7-7ed9-428a-a58f-cb53577fa352?slim=true", + height="74px", + width="100%" + ), + spacing=Spacing.DEFAULT.value, + width="100%" + ) diff --git a/link_bio/link_bio/views/courses_links.py b/link_bio/link_bio/views/courses_links.py index 059c8ebe..46db70e5 100644 --- a/link_bio/link_bio/views/courses_links.py +++ b/link_bio/link_bio/views/courses_links.py @@ -2,7 +2,8 @@ import link_bio.constants as const from link_bio.components.link_button import link_button from link_bio.components.title import title -from link_bio.styles.styles import Size, Color, Spacing +from link_bio.components.newsletter import newsletter +from link_bio.styles.styles import Color, Spacing def courses_links() -> rx.Component: @@ -53,18 +54,13 @@ def courses_links() -> rx.Component: "/icons/youtube.svg", const.YOUTUBE_URL ), - link_button( - "mouredev.log", - "La newsletter de la comunidad para mantenerse al día", - "/icons/news.svg", - const.NEWSLETTER_URL - ), link_button( "YouTube [canal secundario]", "Emisiones en directo destacadas", "/icons/youtube.svg", const.YOUTUBE_SECONDARY_URL ), + newsletter(), width="100%", spacing=Spacing.DEFAULT.value, ) diff --git a/link_bio/link_bio/views/index_links.py b/link_bio/link_bio/views/index_links.py index b0cd925f..a2d77886 100644 --- a/link_bio/link_bio/views/index_links.py +++ b/link_bio/link_bio/views/index_links.py @@ -1,6 +1,6 @@ import reflex as rx import link_bio.constants as const -import link_bio.styles.styles as styles +from link_bio.components.newsletter import newsletter from link_bio.components.featured_link import featured_link from link_bio.routes import Route from link_bio.components.link_button import link_button @@ -45,15 +45,6 @@ def index_links() -> rx.Component: const.YOUTUBE_SECONDARY_URL ), - title("Newsletter"), - link_button( - "mouredev.log", - "La newsletter de la comunidad para mantenerse al día", - "/icons/news.svg", - const.NEWSLETTER_URL, - highlight_color=Color.SECONDARY.value - ), - rx.cond( PageState.featured_info, rx.vstack( @@ -115,6 +106,9 @@ def index_links() -> rx.Component: "/icons/email.svg", f"mailto:{const.EMAIL}" ), + + title("Newsletter"), + newsletter(), width="100%", spacing=Spacing.DEFAULT.value, on_mount=PageState.featured_links diff --git a/link_bio/requirements.txt b/link_bio/requirements.txt index 9e370490..5c9be972 100644 --- a/link_bio/requirements.txt +++ b/link_bio/requirements.txt @@ -1,5 +1,5 @@ pip==24.0 -reflex==0.4.4 +reflex==0.4.5 python-dotenv==1.0.1 supabase==2.3.5 configcat-client==9.0.2