Spaces:
Sleeping
Sleeping
| import altair as alt | |
| import numpy as np | |
| import pandas as pd | |
| import streamlit as st | |
| import streamlit as st | |
| # Configure the page | |
| st.set_page_config( | |
| page_title="Happy Birthday - Vintage Manuscript", | |
| page_icon="π", | |
| layout="centered", | |
| initial_sidebar_state="collapsed" | |
| ) | |
| # Password protection | |
| if 'authenticated' not in st.session_state: | |
| st.session_state.authenticated = False | |
| if not st.session_state.authenticated: | |
| st.markdown(""" | |
| <div style="text-align: center; padding: 50px; font-family: 'Cinzel', serif;"> | |
| <h2 style="color: #8B4513; margin-bottom: 30px;">π Enter Password</h2> | |
| </div> | |
| """, unsafe_allow_html=True) | |
| password = st.text_input("Password:", type="password", key="password_input") | |
| if st.button("Enter"): | |
| if password == "0207": | |
| st.session_state.authenticated = True | |
| st.rerun() | |
| else: | |
| st.error("β Incorrect password! Try again.") | |
| st.stop() | |
| # Custom CSS for vintage manuscript styling | |
| st.markdown(""" | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Cinzel+Decorative:wght@700&display=swap'); | |
| /* Hide Streamlit default elements */ | |
| #MainMenu {visibility: hidden;} | |
| footer {visibility: hidden;} | |
| header {visibility: hidden;} | |
| /* Main app styling */ | |
| .stApp { | |
| background: linear-gradient(45deg, #8B4513, #A0522D, #CD853F); | |
| background-size: 400% 400%; | |
| animation: gradientShift 8s ease infinite; | |
| } | |
| @keyframes gradientShift { | |
| 0% { background-position: 0% 50%; } | |
| 50% { background-position: 100% 50%; } | |
| 100% { background-position: 0% 50%; } | |
| } | |
| /* Manuscript container */ | |
| .manuscript { | |
| background: linear-gradient(135deg, #F5E6D3, #E8D5B7, #F0E68C, #E6E6FA, #DDA0DD); | |
| background-image: | |
| radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%), | |
| radial-gradient(circle at 80% 20%, rgba(160, 82, 45, 0.1) 0%, transparent 50%), | |
| radial-gradient(circle at 50% 30%, rgba(230, 230, 250, 0.4) 0%, transparent 60%), | |
| radial-gradient(circle at 30% 60%, rgba(221, 160, 221, 0.3) 0%, transparent 50%), | |
| radial-gradient(circle at 80% 80%, rgba(147, 112, 219, 0.2) 0%, transparent 40%); | |
| border-radius: 20px; | |
| box-shadow: | |
| 0 20px 60px rgba(0, 0, 0, 0.3), | |
| inset 0 0 50px rgba(139, 69, 19, 0.1), | |
| 0 0 0 3px #8B4513, | |
| 0 0 0 6px #DAA520; | |
| padding: 50px 30px; | |
| margin: 20px auto; | |
| max-width: 800px; | |
| text-align: center; | |
| position: relative; | |
| border: 3px double #8B4513; | |
| } | |
| /* Title styling */ | |
| .vintage-title { | |
| font-family: 'Cinzel Decorative', serif; | |
| font-size: 3.5rem; | |
| color: #2F1B0C !important; | |
| text-shadow: 3px 3px 6px rgba(139, 69, 19, 0.6); | |
| margin: 20px 0; | |
| text-align: center; | |
| font-weight: bold; | |
| } | |
| .vintage-title::before, | |
| .vintage-title::after { | |
| content: 'β¦'; | |
| color: #DAA520; | |
| margin: 0 20px; | |
| animation: sparkle 2s ease-in-out infinite alternate; | |
| } | |
| @keyframes sparkle { | |
| 0% { opacity: 0.5; transform: scale(0.8); } | |
| 100% { opacity: 1; transform: scale(1.2); } | |
| } | |
| /* Subtitle styling */ | |
| .vintage-subtitle { | |
| font-family: 'Cinzel', serif; | |
| font-size: 2rem; | |
| color: #2F1B0C !important; | |
| font-weight: bold; | |
| text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.5); | |
| margin: 30px 0; | |
| text-align: center; | |
| } | |
| /* Friends list styling */ | |
| .friends-container { | |
| display: flex; | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| gap: 15px; | |
| margin: 30px 0; | |
| } | |
| .friend-name { | |
| font-family: 'Cinzel', serif; | |
| font-size: 1.6rem; | |
| color: #2F1B0C; | |
| font-weight: bold; | |
| background: linear-gradient(45deg, rgba(218, 165, 32, 0.4), rgba(184, 134, 11, 0.4)); | |
| border: 2px solid #8B4513; | |
| border-radius: 25px; | |
| padding: 12px 25px; | |
| margin: 8px; | |
| display: inline-block; | |
| transition: all 0.3s ease; | |
| box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3); | |
| text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); | |
| } | |
| .friend-name:hover { | |
| background: linear-gradient(45deg, rgba(218, 165, 32, 0.4), rgba(184, 134, 11, 0.4)); | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3); | |
| } | |
| /* Button styling */ | |
| .stButton > button { | |
| font-family: 'Cinzel', serif !important; | |
| font-size: 1.2rem !important; | |
| font-weight: 600 !important; | |
| background: linear-gradient(145deg, #DAA520, #B8860B) !important; | |
| border: 3px solid #8B4513 !important; | |
| border-radius: 15px !important; | |
| padding: 20px 30px !important; | |
| color: #4A2C17 !important; | |
| text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5) !important; | |
| box-shadow: | |
| 0 8px 25px rgba(139, 69, 19, 0.3), | |
| inset 0 1px 3px rgba(255, 255, 255, 0.3) !important; | |
| transition: all 0.4s ease !important; | |
| min-width: 250px !important; | |
| margin: 10px !important; | |
| } | |
| .stButton > button:hover { | |
| background: linear-gradient(145deg, #FFD700, #DAA520) !important; | |
| color: #2F1B0C !important; | |
| transform: translateY(-3px) !important; | |
| box-shadow: | |
| 0 15px 35px rgba(139, 69, 19, 0.4), | |
| inset 0 1px 3px rgba(255, 255, 255, 0.4) !important; | |
| } | |
| .stButton > button:active { | |
| transform: translateY(-1px) !important; | |
| } | |
| /* Responsive design */ | |
| @media (max-width: 768px) { | |
| .manuscript { | |
| padding: 30px 20px; | |
| margin: 10px; | |
| } | |
| .vintage-title { | |
| font-size: 2.2rem; | |
| margin: 15px 0; | |
| } | |
| .vintage-subtitle { | |
| font-size: 1.5rem; | |
| margin: 20px 0; | |
| } | |
| .friend-name { | |
| font-size: 1.3rem; | |
| padding: 10px 20px; | |
| margin: 5px; | |
| } | |
| .friends-container { | |
| gap: 10px; | |
| margin: 25px 0; | |
| } | |
| .stButton > button { | |
| min-width: 200px !important; | |
| font-size: 1.1rem !important; | |
| padding: 15px 20px !important; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .manuscript { | |
| padding: 25px 15px; | |
| margin: 5px; | |
| } | |
| .vintage-title { | |
| font-size: 1.8rem; | |
| margin: 10px 0; | |
| } | |
| .vintage-title::before, | |
| .vintage-title::after { | |
| margin: 0 10px; | |
| font-size: 0.8em; | |
| } | |
| .vintage-subtitle { | |
| font-size: 1.2rem; | |
| margin: 15px 0; | |
| } | |
| .friend-name { | |
| font-size: 1.1rem; | |
| padding: 8px 15px; | |
| margin: 3px; | |
| } | |
| .friends-container { | |
| gap: 8px; | |
| margin: 20px 0; | |
| } | |
| .stButton > button { | |
| min-width: 180px !important; | |
| font-size: 1rem !important; | |
| padding: 12px 18px !important; | |
| margin: 8px !important; | |
| } | |
| } | |
| </style> | |
| """, unsafe_allow_html=True) | |
| # Main content container | |
| st.markdown('<div class="manuscript">', unsafe_allow_html=True) | |
| # Title | |
| st.markdown('<h1 class="vintage-title">Happy Birthday</h1>', unsafe_allow_html=True) | |
| # Subtitle | |
| st.markdown('<div class="vintage-subtitle">To My Bestest Friend</div>', unsafe_allow_html=True) | |
| # Friends names | |
| friends = ["Chondi", "Cookie", "Mastani", "Goldie", "Disha"] | |
| st.markdown('<div class="friends-container">', unsafe_allow_html=True) | |
| friends_html = "" | |
| for friend in friends: | |
| friends_html += f'<span class="friend-name">{friend}</span>' | |
| st.markdown(friends_html, unsafe_allow_html=True) | |
| st.markdown('</div>', unsafe_allow_html=True) | |
| st.markdown('<br><br>', unsafe_allow_html=True) | |
| # Buttons section | |
| col1, col2 = st.columns(2) | |
| with col1: | |
| if st.button("π¬ Bhao + Everything Vid", key="bhao_btn"): | |
| bhao_video_url = "https://drive.google.com/file/d/1xCa-7hLVg8X7I4wSjVKLnJCQmqlQng8c/view?usp=sharing" | |
| st.balloons() | |
| st.success("π Opening Bhao + Everything Video!") | |
| st.markdown(f'<a href="{bhao_video_url}" target="_blank" style="color: #8B4513; font-weight: bold; text-decoration: none; font-size: 1.2rem;">π Click here to watch the video</a>', unsafe_allow_html=True) | |
| with col2: | |
| if st.button("π Meme Vid", key="meme_btn"): | |
| meme_video_url = "https://drive.google.com/file/d/1mby4Frt0JtJTER-RJW6Gc-hgMuAgFWfu/view?usp=sharing" | |
| st.balloons() | |
| st.success("π Opening Meme Video!") | |
| st.markdown(f'<a href="{meme_video_url}" target="_blank" style="color: #8B4513; font-weight: bold; text-decoration: none; font-size: 1.2rem;">π Click here to watch the video</a>', unsafe_allow_html=True) | |
| st.markdown('</div>', unsafe_allow_html=True) |