burtenshaw commited on
Commit
e4ebc1b
Β·
1 Parent(s): 8dad4fa

add button and logo separation

Browse files
app.py CHANGED
@@ -61,7 +61,7 @@ def on_user_logged_in(token: gr.OAuthToken | None):
61
  <div style="text-align: center; padding: 20px; border: 2px dashed #ccc;">
62
  <h3>🎯 Complete the Quiz to Unlock</h3>
63
  <p>Pass the quiz to add your certificate to LinkedIn!</p>
64
- <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/linkedin_logo.png" alt="LinkedIn Add to Profile" style="width: 200px; height: 53px; opacity: 0.5;">
65
  </div>
66
  """,
67
  ), # linkedin_btn - now visible with explanatory text
@@ -84,7 +84,7 @@ def on_user_logged_in(token: gr.OAuthToken | None):
84
  value="""
85
  <div style="text-align: center; padding: 20px; border: 2px dashed #ccc; border-radius: 10px; margin-top: 20px;">
86
  <h3>πŸ”’ Login Required</h3>
87
- <p>Please log in with your Hugging Face account to access the quiz and earn your LinkedIn certificate!</p>
88
  </div>
89
  """,
90
  ), # linkedin_btn - visible with login prompt
@@ -142,7 +142,7 @@ def create_linkedin_button(username: str, cert_url: str | None) -> str:
142
 
143
  message = f"""
144
  <a href="{button_url}" target="_blank" style="display: block; margin-top: 20px; text-align: center;">
145
- <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/linkedin_logo.png"
146
  alt="LinkedIn Add to Profile button" style="width: 300px; height: 80px;">
147
  </a>
148
  """
@@ -317,7 +317,7 @@ def handle_quiz(
317
  <div style="text-align: center; padding: 20px; border: 2px dashed #4CAF50;">
318
  <h3>πŸŽ‰ Ready for LinkedIn!</h3>
319
  <p>Great! Click "Get your certificate" above to unlock the LinkedIn button.</p>
320
- <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/linkedin_logo.png" alt="LinkedIn Add to Profile" style="width: 200px; height: 53px; opacity: 0.7;">
321
  </div>
322
  """
323
  if has_passed
 
61
  <div style="text-align: center; padding: 20px; border: 2px dashed #ccc;">
62
  <h3>🎯 Complete the Quiz to Unlock</h3>
63
  <p>Pass the quiz to add your certificate to LinkedIn!</p>
64
+ <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/li_logo.webp" alt="LinkedIn Add to Profile" style="width: 200px; height: 53px; text-align: center;">
65
  </div>
66
  """,
67
  ), # linkedin_btn - now visible with explanatory text
 
84
  value="""
85
  <div style="text-align: center; padding: 20px; border: 2px dashed #ccc; border-radius: 10px; margin-top: 20px;">
86
  <h3>πŸ”’ Login Required</h3>
87
+ <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/li_logo.webp" alt="LinkedIn Add to Profile" style="width: 200px; height: 53px; text-align: center;">
88
  </div>
89
  """,
90
  ), # linkedin_btn - visible with login prompt
 
142
 
143
  message = f"""
144
  <a href="{button_url}" target="_blank" style="display: block; margin-top: 20px; text-align: center;">
145
+ <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/li_button.png"
146
  alt="LinkedIn Add to Profile button" style="width: 300px; height: 80px;">
147
  </a>
148
  """
 
317
  <div style="text-align: center; padding: 20px; border: 2px dashed #4CAF50;">
318
  <h3>πŸŽ‰ Ready for LinkedIn!</h3>
319
  <p>Great! Click "Get your certificate" above to unlock the LinkedIn button.</p>
320
+ <img src="https://huggingface.co/spaces/mcp-course/unit_1_quiz/resolve/main/li_logo.webp" alt="LinkedIn Add to Profile" style="width: 200px; height: 53px; text-align: center;">
321
  </div>
322
  """
323
  if has_passed
linkedin_logo.png β†’ li_button.png RENAMED
File without changes
li_logo.webp ADDED