Skip to content

Commit

Permalink
Newsletter
Browse files Browse the repository at this point in the history
  • Loading branch information
mouredev committed Mar 21, 2024
1 parent 234611a commit 5d647dd
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion link_bio/README.md
Original file line number Diff line number Diff line change
@@ -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/)"

Expand Down
24 changes: 24 additions & 0 deletions link_bio/link_bio/components/newsletter.py
Original file line number Diff line number Diff line change
@@ -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%"
)
10 changes: 3 additions & 7 deletions link_bio/link_bio/views/courses_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
)
14 changes: 4 additions & 10 deletions link_bio/link_bio/views/index_links.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion link_bio/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5d647dd

Please sign in to comment.