Spaces:
Sleeping
Sleeping
neologix-p03
commited on
Commit
Β·
d194ad3
1
Parent(s):
08fb681
ciimit
Browse files
app.py
CHANGED
|
@@ -125,7 +125,7 @@ def collect_missing_data(profile):
|
|
| 125 |
return profile
|
| 126 |
|
| 127 |
def display_success_message(inserted_id, frontend_url):
|
| 128 |
-
"""Displays a focused success message highlighting
|
| 129 |
|
| 130 |
st.balloons() # Add some celebration!
|
| 131 |
|
|
@@ -133,38 +133,30 @@ def display_success_message(inserted_id, frontend_url):
|
|
| 133 |
st.markdown("""
|
| 134 |
<style>
|
| 135 |
.portfolio-container {
|
| 136 |
-
display:
|
| 137 |
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 138 |
gap: 20px;
|
| 139 |
margin: 30px 0;
|
|
|
|
| 140 |
}
|
| 141 |
.portfolio-card {
|
|
|
|
|
|
|
| 142 |
background-color: rgba(255, 255, 255, 0.05);
|
| 143 |
border: 1px solid rgba(150, 150, 150, 0.2);
|
| 144 |
border-radius: 10px;
|
| 145 |
padding: 20px;
|
| 146 |
text-align: center;
|
| 147 |
-
height: 100%;
|
| 148 |
-
display: flex;
|
| 149 |
-
flex-direction: column;
|
| 150 |
}
|
| 151 |
.portfolio-title {
|
| 152 |
font-size: 1.5rem;
|
| 153 |
-
margin-bottom: 5px;
|
| 154 |
-
color: inherit;
|
| 155 |
-
}
|
| 156 |
-
.portfolio-category {
|
| 157 |
-
font-size: 0.9rem;
|
| 158 |
margin-bottom: 10px;
|
| 159 |
-
color:
|
| 160 |
-
text-transform: uppercase;
|
| 161 |
}
|
| 162 |
.portfolio-desc {
|
| 163 |
font-size: 0.9rem;
|
| 164 |
margin-bottom: 20px;
|
| 165 |
color: inherit;
|
| 166 |
opacity: 0.8;
|
| 167 |
-
flex-grow: 1;
|
| 168 |
}
|
| 169 |
.portfolio-link {
|
| 170 |
display: inline-block;
|
|
@@ -177,16 +169,6 @@ def display_success_message(inserted_id, frontend_url):
|
|
| 177 |
font-weight: bold;
|
| 178 |
font-size: 1.1rem;
|
| 179 |
}
|
| 180 |
-
.premium-badge {
|
| 181 |
-
background-color: gold;
|
| 182 |
-
color: black;
|
| 183 |
-
font-size: 0.8rem;
|
| 184 |
-
padding: 3px 8px;
|
| 185 |
-
border-radius: 10px;
|
| 186 |
-
display: inline-block;
|
| 187 |
-
margin-left: 5px;
|
| 188 |
-
font-weight: bold;
|
| 189 |
-
}
|
| 190 |
.share-grid {
|
| 191 |
display: grid;
|
| 192 |
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
@@ -209,98 +191,39 @@ def display_success_message(inserted_id, frontend_url):
|
|
| 209 |
</style>
|
| 210 |
""", unsafe_allow_html=True)
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
# Success header
|
| 213 |
st.markdown("""
|
| 214 |
<div style="text-align: center; margin-bottom: 30px;">
|
| 215 |
<h1 style="color: #28a745;">π Your Portfolio is Ready!</h1>
|
| 216 |
-
<p style="color: inherit;">Choose from
|
| 217 |
</div>
|
| 218 |
""", unsafe_allow_html=True)
|
| 219 |
|
| 220 |
-
# Define templates
|
| 221 |
-
templates = [
|
| 222 |
-
{
|
| 223 |
-
"id": 1,
|
| 224 |
-
"name": "Clean Portfolio",
|
| 225 |
-
"category": "professional",
|
| 226 |
-
"url": f"https://v0-recreate-figma-ui-dua1ta.vercel.app/{inserted_id}",
|
| 227 |
-
"isPremium": False,
|
| 228 |
-
"description": "Professional and clean design perfect for corporate settings"
|
| 229 |
-
},
|
| 230 |
-
{
|
| 231 |
-
"id": 2,
|
| 232 |
-
"name": "Creative Designer",
|
| 233 |
-
"category": "creative",
|
| 234 |
-
"url": f"https://v0-recreate-figma-ui-f7.vercel.app/{inserted_id}",
|
| 235 |
-
"isPremium": True,
|
| 236 |
-
"description": "Showcase your creative work with this artistic portfolio design"
|
| 237 |
-
},
|
| 238 |
-
{
|
| 239 |
-
"id": 3,
|
| 240 |
-
"name": "iPortfo",
|
| 241 |
-
"category": "tech",
|
| 242 |
-
"url": f"https://iportfo.netlify.app/{inserted_id}",
|
| 243 |
-
"isPremium": False,
|
| 244 |
-
"description": "Tech-focused portfolio with clean information layout"
|
| 245 |
-
},
|
| 246 |
-
{
|
| 247 |
-
"id": 4,
|
| 248 |
-
"name": "Modern Portfolio",
|
| 249 |
-
"category": "professional",
|
| 250 |
-
"url": f"https://v0-modern-portfolio-react.vercel.app/{inserted_id}",
|
| 251 |
-
"isPremium": False,
|
| 252 |
-
"description": "Contemporary and sleek design with enhanced visual elements"
|
| 253 |
-
},
|
| 254 |
-
{
|
| 255 |
-
"id": 5,
|
| 256 |
-
"name": "Data Science Portfolio",
|
| 257 |
-
"category": "tech",
|
| 258 |
-
"url": f"https://v0-portfolio-web-application.vercel.app/{inserted_id}",
|
| 259 |
-
"isPremium": False,
|
| 260 |
-
"description": "Specialized for data scientists to showcase projects and analysis"
|
| 261 |
-
},
|
| 262 |
-
{
|
| 263 |
-
"id": 6,
|
| 264 |
-
"name": "VimFolio Portfolio",
|
| 265 |
-
"category": "Special",
|
| 266 |
-
"url": f"https://v0-dynamic-portfolio-app.vercel.app/sample/{inserted_id}",
|
| 267 |
-
"isPremium": True,
|
| 268 |
-
"description": "Unique terminal-inspired design for developers"
|
| 269 |
-
},
|
| 270 |
-
{
|
| 271 |
-
"id": 7,
|
| 272 |
-
"name": "AI Portfolio",
|
| 273 |
-
"category": "Special",
|
| 274 |
-
"url": f"https://v0-portfolio-data-integration.vercel.app/{inserted_id}",
|
| 275 |
-
"isPremium": True,
|
| 276 |
-
"description": "Advanced AI-driven portfolio with interactive elements"
|
| 277 |
-
}
|
| 278 |
-
]
|
| 279 |
-
|
| 280 |
# Portfolio cards
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
for template in templates:
|
| 284 |
-
premium_badge = '<span class="premium-badge">PREMIUM</span>' if template["isPremium"] else ''
|
| 285 |
-
|
| 286 |
-
cards_html += f"""
|
| 287 |
<div class="portfolio-card">
|
| 288 |
-
<h2 class="portfolio-title"
|
| 289 |
-
<
|
| 290 |
-
<
|
| 291 |
-
|
| 292 |
-
View Design π
|
| 293 |
</a>
|
| 294 |
</div>
|
| 295 |
-
""
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
|
|
|
| 303 |
|
|
|
|
| 304 |
st.subheader("π€ Share Your Portfolio")
|
| 305 |
|
| 306 |
# Define share messages
|
|
@@ -309,9 +232,9 @@ def display_success_message(inserted_id, frontend_url):
|
|
| 309 |
whatsapp_msg = "Hi! I wanted to share my professional portfolio with you. Take a look!"
|
| 310 |
|
| 311 |
# Create share URLs
|
| 312 |
-
linkedin_share_url = f"https://www.linkedin.com/sharing/share-offsite/?url={
|
| 313 |
-
twitter_share_url = f"https://twitter.com/intent/tweet?text={twitter_msg}&url={
|
| 314 |
-
whatsapp_share_url = f"https://wa.me/?text={whatsapp_msg}%20{
|
| 315 |
|
| 316 |
# Share buttons
|
| 317 |
st.markdown(f"""
|
|
@@ -340,12 +263,13 @@ def display_success_message(inserted_id, frontend_url):
|
|
| 340 |
</div>
|
| 341 |
""", unsafe_allow_html=True)
|
| 342 |
|
| 343 |
-
# Portfolio
|
| 344 |
st.markdown(f"""
|
| 345 |
<div style="margin-top: 30px; text-align: center;">
|
| 346 |
<p style="color: inherit;">Your Portfolio ID: <code>{inserted_id}</code></p>
|
| 347 |
</div>
|
| 348 |
""", unsafe_allow_html=True)
|
|
|
|
| 349 |
def education_editor(profile):
|
| 350 |
education_data = []
|
| 351 |
|
|
|
|
| 125 |
return profile
|
| 126 |
|
| 127 |
def display_success_message(inserted_id, frontend_url):
|
| 128 |
+
"""Displays a focused success message highlighting both portfolio options"""
|
| 129 |
|
| 130 |
st.balloons() # Add some celebration!
|
| 131 |
|
|
|
|
| 133 |
st.markdown("""
|
| 134 |
<style>
|
| 135 |
.portfolio-container {
|
| 136 |
+
display: flex;
|
|
|
|
| 137 |
gap: 20px;
|
| 138 |
margin: 30px 0;
|
| 139 |
+
flex-wrap: wrap;
|
| 140 |
}
|
| 141 |
.portfolio-card {
|
| 142 |
+
flex: 1;
|
| 143 |
+
min-width: 300px;
|
| 144 |
background-color: rgba(255, 255, 255, 0.05);
|
| 145 |
border: 1px solid rgba(150, 150, 150, 0.2);
|
| 146 |
border-radius: 10px;
|
| 147 |
padding: 20px;
|
| 148 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
| 149 |
}
|
| 150 |
.portfolio-title {
|
| 151 |
font-size: 1.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
margin-bottom: 10px;
|
| 153 |
+
color: inherit;
|
|
|
|
| 154 |
}
|
| 155 |
.portfolio-desc {
|
| 156 |
font-size: 0.9rem;
|
| 157 |
margin-bottom: 20px;
|
| 158 |
color: inherit;
|
| 159 |
opacity: 0.8;
|
|
|
|
| 160 |
}
|
| 161 |
.portfolio-link {
|
| 162 |
display: inline-block;
|
|
|
|
| 169 |
font-weight: bold;
|
| 170 |
font-size: 1.1rem;
|
| 171 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
.share-grid {
|
| 173 |
display: grid;
|
| 174 |
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
|
|
| 191 |
</style>
|
| 192 |
""", unsafe_allow_html=True)
|
| 193 |
|
| 194 |
+
# Define portfolio URLs
|
| 195 |
+
classic_url = f"https://iportfo.netlify.app/{inserted_id}"
|
| 196 |
+
modern_url = f"https://v0-modern-portfolio-react.vercel.app/{inserted_id}"
|
| 197 |
+
|
| 198 |
# Success header
|
| 199 |
st.markdown("""
|
| 200 |
<div style="text-align: center; margin-bottom: 30px;">
|
| 201 |
<h1 style="color: #28a745;">π Your Portfolio is Ready!</h1>
|
| 202 |
+
<p style="color: inherit;">Choose from two beautiful portfolio designs</p>
|
| 203 |
</div>
|
| 204 |
""", unsafe_allow_html=True)
|
| 205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
# Portfolio cards
|
| 207 |
+
st.markdown(f"""
|
| 208 |
+
<div class="portfolio-container">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
<div class="portfolio-card">
|
| 210 |
+
<h2 class="portfolio-title">π¨ Classic Portfolio</h2>
|
| 211 |
+
<p class="portfolio-desc">Clean and professional design showcasing your experience in a traditional layout</p>
|
| 212 |
+
<a href="{classic_url}" target="_blank" class="portfolio-link">
|
| 213 |
+
View Classic Design π
|
|
|
|
| 214 |
</a>
|
| 215 |
</div>
|
| 216 |
+
<div class="portfolio-card">
|
| 217 |
+
<h2 class="portfolio-title">β¨ Modern Portfolio (Beta)</h2>
|
| 218 |
+
<p class="portfolio-desc">Contemporary and dynamic design with enhanced visual elements</p>
|
| 219 |
+
<a href="{modern_url}" target="_blank" class="portfolio-link">
|
| 220 |
+
Try Modern Design π―
|
| 221 |
+
</a>
|
| 222 |
+
</div>
|
| 223 |
+
</div>
|
| 224 |
+
""", unsafe_allow_html=True)
|
| 225 |
|
| 226 |
+
# Share section
|
| 227 |
st.subheader("π€ Share Your Portfolio")
|
| 228 |
|
| 229 |
# Define share messages
|
|
|
|
| 232 |
whatsapp_msg = "Hi! I wanted to share my professional portfolio with you. Take a look!"
|
| 233 |
|
| 234 |
# Create share URLs
|
| 235 |
+
linkedin_share_url = f"https://www.linkedin.com/sharing/share-offsite/?url={classic_url}&summary={linkedin_msg}"
|
| 236 |
+
twitter_share_url = f"https://twitter.com/intent/tweet?text={twitter_msg}&url={classic_url}"
|
| 237 |
+
whatsapp_share_url = f"https://wa.me/?text={whatsapp_msg}%20{classic_url}"
|
| 238 |
|
| 239 |
# Share buttons
|
| 240 |
st.markdown(f"""
|
|
|
|
| 263 |
</div>
|
| 264 |
""", unsafe_allow_html=True)
|
| 265 |
|
| 266 |
+
# Portfolio IDs
|
| 267 |
st.markdown(f"""
|
| 268 |
<div style="margin-top: 30px; text-align: center;">
|
| 269 |
<p style="color: inherit;">Your Portfolio ID: <code>{inserted_id}</code></p>
|
| 270 |
</div>
|
| 271 |
""", unsafe_allow_html=True)
|
| 272 |
+
|
| 273 |
def education_editor(profile):
|
| 274 |
education_data = []
|
| 275 |
|