GuglielmoTor commited on
Commit
a3e7d7f
Β·
verified Β·
1 Parent(s): 5b6c5f3

Update ui/okr_ui_generator.py

Browse files
Files changed (1) hide show
  1. ui/okr_ui_generator.py +33 -8
ui/okr_ui_generator.py CHANGED
@@ -32,20 +32,38 @@ def create_enhanced_okr_tab():
32
  .okr-header {
33
  text-align: center;
34
  margin-bottom: 3rem;
35
- color: white;
36
  }
37
 
38
  .okr-title {
39
  font-size: 2.5rem;
40
  font-weight: 700;
41
  margin-bottom: 0.5rem;
 
 
 
 
 
 
 
 
 
 
42
  background: linear-gradient(45deg, #ffffff, #e0e7ff);
43
  -webkit-background-clip: text;
44
  -webkit-text-fill-color: transparent;
45
  background-clip: text;
46
- text-shadow: 0 2px 4px rgba(0,0,0,0.1);
47
  }
48
 
 
 
 
 
 
 
 
 
 
49
  .okr-subtitle {
50
  font-size: 1.2rem;
51
  opacity: 0.9;
@@ -420,7 +438,10 @@ def get_initial_okr_display() -> str:
420
  return """
421
  <div class="okr-container">
422
  <div class="okr-header">
423
- <div class="okr-title">🎯 AI-Generated OKRs & Strategic Tasks</div>
 
 
 
424
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
425
  </div>
426
 
@@ -463,7 +484,7 @@ def format_okrs_for_enhanced_display(reconstruction_cache: dict) -> str:
463
 
464
  Args:
465
  reconstruction_cache (dict): The reconstruction cache containing reconstructed data.
466
- Expected to contain report data with 'actionable_okrs' key.
467
 
468
  Returns:
469
  str: A comprehensive HTML string representing the OKRs, or an empty state HTML.
@@ -488,8 +509,6 @@ def format_okrs_for_enhanced_display(reconstruction_cache: dict) -> str:
488
  logger.info("No OKRs found in 'actionable_okrs' list.")
489
  return get_empty_okr_state()
490
 
491
- # Rest of the function remains the same...
492
-
493
  # Calculate statistics for the stats bar
494
  total_objectives = len(okrs_list)
495
  total_key_results = sum(len(okr.get('key_results', [])) for okr in okrs_list)
@@ -509,7 +528,10 @@ def format_okrs_for_enhanced_display(reconstruction_cache: dict) -> str:
509
  html_parts = [f"""
510
  <div class="okr-container">
511
  <div class="okr-header">
512
- <div class="okr-title">🎯 AI-Generated OKRs & Strategic Tasks</div>
 
 
 
513
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
514
  </div>
515
 
@@ -703,7 +725,10 @@ def get_empty_okr_state() -> str:
703
  return """
704
  <div class="okr-container">
705
  <div class="okr-header">
706
- <div class="okr-title">🎯 AI-Generated OKRs & Strategic Tasks</div>
 
 
 
707
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
708
  </div>
709
 
 
32
  .okr-header {
33
  text-align: center;
34
  margin-bottom: 3rem;
35
+ color: white; /* Keep general header text white */
36
  }
37
 
38
  .okr-title {
39
  font-size: 2.5rem;
40
  font-weight: 700;
41
  margin-bottom: 0.5rem;
42
+ /* Removed background-clip and text-fill-color from here */
43
+ text-shadow: 0 2px 4px rgba(0,0,0,0.1);
44
+ display: flex; /* Use flexbox to align emoji and text */
45
+ justify-content: center;
46
+ align-items: center;
47
+ gap: 0.75rem; /* Space between emoji and text */
48
+ }
49
+
50
+ /* New class for the text content within the title */
51
+ .okr-title-content {
52
  background: linear-gradient(45deg, #ffffff, #e0e7ff);
53
  -webkit-background-clip: text;
54
  -webkit-text-fill-color: transparent;
55
  background-clip: text;
 
56
  }
57
 
58
+ /* Ensure emoji maintains its default color */
59
+ .okr-title-emoji {
60
+ font-size: 2.5rem; /* Match title font size for consistent sizing */
61
+ color: initial; /* Reset color to browser default for emoji */
62
+ -webkit-text-fill-color: initial; /* Reset text fill for emoji */
63
+ background-clip: initial; /* Reset background clip for emoji */
64
+ }
65
+
66
+
67
  .okr-subtitle {
68
  font-size: 1.2rem;
69
  opacity: 0.9;
 
438
  return """
439
  <div class="okr-container">
440
  <div class="okr-header">
441
+ <div class="okr-title">
442
+ <span class="okr-title-emoji">🎯</span>
443
+ <span class="okr-title-content">AI-Generated OKRs & Strategic Tasks</span>
444
+ </div>
445
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
446
  </div>
447
 
 
484
 
485
  Args:
486
  reconstruction_cache (dict): The reconstruction cache containing reconstructed data.
487
+ Expected to contain report data with 'actionable_okrs' key.
488
 
489
  Returns:
490
  str: A comprehensive HTML string representing the OKRs, or an empty state HTML.
 
509
  logger.info("No OKRs found in 'actionable_okrs' list.")
510
  return get_empty_okr_state()
511
 
 
 
512
  # Calculate statistics for the stats bar
513
  total_objectives = len(okrs_list)
514
  total_key_results = sum(len(okr.get('key_results', [])) for okr in okrs_list)
 
528
  html_parts = [f"""
529
  <div class="okr-container">
530
  <div class="okr-header">
531
+ <div class="okr-title">
532
+ <span class="okr-title-emoji">🎯</span>
533
+ <span class="okr-title-content">AI-Generated OKRs & Strategic Tasks</span>
534
+ </div>
535
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
536
  </div>
537
 
 
725
  return """
726
  <div class="okr-container">
727
  <div class="okr-header">
728
+ <div class="okr-title">
729
+ <span class="okr-title-emoji">🎯</span>
730
+ <span class="okr-title-content">AI-Generated OKRs & Strategic Tasks</span>
731
+ </div>
732
  <div class="okr-subtitle">Intelligent objectives and key results based on your LinkedIn analytics</div>
733
  </div>
734