From b8ce8970229c6d1230a386bad05f5a2c54613eaa Mon Sep 17 00:00:00 2001 From: MoureDev Date: Wed, 20 Mar 2024 11:20:51 +0100 Subject: [PATCH] Newsletter --- README.md | 2 +- link_bio/README.md | 2 +- link_bio/assets/icons/news.svg | 1 + link_bio/link_bio/components/featured_link.py | 3 ++- link_bio/link_bio/constants.py | 3 +++ link_bio/link_bio/views/courses_links.py | 6 ++++++ link_bio/link_bio/views/index_links.py | 9 +++++++++ link_bio/requirements.txt | 2 +- 8 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 link_bio/assets/icons/news.svg diff --git a/README.md b/README.md index 8f54ce25..9785335e 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.2+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://reflex.dev) +[![Reflex](https://img.shields.io/badge/Reflex-0.4.4+-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 48350332..0db2f178 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.2+-5646ED?style=for-the-badge&logo=reflex&logoColor=white&labelColor=101010)](https://fastapi.tiangolo.com) +[![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) ## 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/assets/icons/news.svg b/link_bio/assets/icons/news.svg new file mode 100644 index 00000000..d7c31d6f --- /dev/null +++ b/link_bio/assets/icons/news.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/link_bio/link_bio/components/featured_link.py b/link_bio/link_bio/components/featured_link.py index 11b46d0f..b8111ea7 100644 --- a/link_bio/link_bio/components/featured_link.py +++ b/link_bio/link_bio/components/featured_link.py @@ -1,6 +1,6 @@ import reflex as rx import link_bio.styles.styles as styles -from link_bio.styles.styles import Size, Spacing +from link_bio.styles.styles import Size, Spacing, Color from link_bio.model.Featured import Featured @@ -10,6 +10,7 @@ def featured_link(featured: Featured) -> rx.Component: rx.image( src=featured.image, border_radius=Size.DEFAULT.value, + background=Color.CONTENT.value ), rx.text( featured.title, diff --git a/link_bio/link_bio/constants.py b/link_bio/link_bio/constants.py index 9f08417c..8119a7bc 100644 --- a/link_bio/link_bio/constants.py +++ b/link_bio/link_bio/constants.py @@ -15,6 +15,9 @@ YOUTUBE_SECONDARY_URL = "https://youtube.com/@mouredevtv" DISCORD_URL = "https://discord.gg/mouredev" +# Newsletter +NEWSLETTER_URL = "https://newsletter.moure.dev" + # Recursos y más BOOK_URL = "https://mouredev.com/libro-git" BOOKS_URL = "https://amazon.es/shop/mouredev/list/2ZIHJJFJ9AVZ3" diff --git a/link_bio/link_bio/views/courses_links.py b/link_bio/link_bio/views/courses_links.py index 1f132309..059c8ebe 100644 --- a/link_bio/link_bio/views/courses_links.py +++ b/link_bio/link_bio/views/courses_links.py @@ -53,6 +53,12 @@ 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", diff --git a/link_bio/link_bio/views/index_links.py b/link_bio/link_bio/views/index_links.py index 90db16d9..b0cd925f 100644 --- a/link_bio/link_bio/views/index_links.py +++ b/link_bio/link_bio/views/index_links.py @@ -45,6 +45,15 @@ 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( diff --git a/link_bio/requirements.txt b/link_bio/requirements.txt index a7b1ff4d..9e370490 100644 --- a/link_bio/requirements.txt +++ b/link_bio/requirements.txt @@ -1,5 +1,5 @@ pip==24.0 -reflex==0.4.2 +reflex==0.4.4 python-dotenv==1.0.1 supabase==2.3.5 configcat-client==9.0.2