mirror of
https://github.com/Death916/deathsite.git
synced 2026-04-10 03:04:41 -07:00
url parsing flox ignore
This commit is contained in:
parent
a37f680886
commit
b6ce850055
3 changed files with 5 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -19,3 +19,5 @@ assets*
|
|||
*.log
|
||||
*.logs
|
||||
*log
|
||||
*.flox
|
||||
.flox
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ class State(rx.State):
|
|||
def go_to_page(self, page: str):
|
||||
self.current_page = page
|
||||
|
||||
|
||||
|
||||
@rx.event(background=True)
|
||||
async def update_current_yt_video(self):
|
||||
"""Fetch the current YouTube video in the background."""
|
||||
|
|
|
|||
|
|
@ -38,9 +38,8 @@ def home():
|
|||
rx.heading("Whats New:", size="8", color="#ffffff"),
|
||||
|
||||
rx.html(
|
||||
|
||||
f"""
|
||||
<iframe width="350" height="200" src={rx.cond(State.current_yt_video.contains('v='), f"https://www.youtube.com/embed/{State.current_yt_video.split('v=')[1]}", "about:blank")} title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||
<iframe width="350" height="200" src={rx.cond(State.current_yt_video.contains('v='), f"https://www.youtube.com/embed/{State.current_yt_video.split('v=')[1].split('&')[0]}", "about:blank")} title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||
"""
|
||||
),
|
||||
rx.html(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue