bparrino commited on
Commit
e560afe
·
verified ·
1 Parent(s): 2ebdd88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -655
app.py CHANGED
@@ -659,665 +659,27 @@ with col_fun3:
659
  </div>
660
  """, unsafe_allow_html=True)
661
 
662
- import streamlit as st
663
- import json
664
- import time
665
- import random
666
- import datetime
667
-
668
- # Set page config
669
- st.set_page_config(
670
- page_title="L&D Buzzword Dictionary",
671
- page_icon="📚",
672
- layout="wide",
673
- initial_sidebar_state="collapsed"
674
- )
675
-
676
- # Custom CSS
677
- st.markdown("""
678
- <style>
679
- .main .block-container {
680
- padding-top: 2rem;
681
- padding-bottom: 2rem;
682
- max-width: 1200px;
683
- margin: 0 auto;
684
- }
685
- .stApp {
686
- background-color: #f8f9fa;
687
- }
688
- .title-area {
689
- text-align: center;
690
- margin-bottom: 2rem;
691
- }
692
- .custom-subheader {
693
- background-color: #f0f2f6;
694
- padding: 10px;
695
- border-radius: 5px;
696
- margin-bottom: 10px;
697
- font-weight: 600;
698
- }
699
- .buzzword-card {
700
- border: 1px solid #e0e0e0;
701
- border-radius: 8px;
702
- padding: 20px;
703
- margin-bottom: 15px;
704
- background-color: white;
705
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
706
- }
707
- .buzzword-title {
708
- font-size: 1.4rem;
709
- font-weight: 700;
710
- color: #2c3e50;
711
- margin-bottom: 8px;
712
- }
713
- .buzzword-category {
714
- background-color: #e8f4fd;
715
- color: #2980b9;
716
- padding: 4px 12px;
717
- border-radius: 20px;
718
- font-size: 0.8rem;
719
- font-weight: 600;
720
- display: inline-block;
721
- margin-bottom: 10px;
722
- }
723
- .buzzword-definition {
724
- color: #34495e;
725
- font-size: 1.1rem;
726
- line-height: 1.6;
727
- margin-bottom: 15px;
728
- }
729
- .plain-english {
730
- background-color: #f8f9fa;
731
- border-left: 4px solid #27ae60;
732
- padding: 15px;
733
- margin: 15px 0;
734
- border-radius: 4px;
735
- }
736
- .plain-english-label {
737
- font-weight: 600;
738
- color: #27ae60;
739
- font-size: 0.9rem;
740
- margin-bottom: 8px;
741
- }
742
- .real-world-example {
743
- background-color: #fff5e6;
744
- border-left: 4px solid #f39c12;
745
- padding: 15px;
746
- margin: 15px 0;
747
- border-radius: 4px;
748
- }
749
- .example-label {
750
- font-weight: 600;
751
- color: #f39c12;
752
- font-size: 0.9rem;
753
- margin-bottom: 8px;
754
- }
755
- .daily-buzzword {
756
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
757
- color: white;
758
- padding: 25px;
759
- border-radius: 10px;
760
- margin-bottom: 25px;
761
- text-align: center;
762
- }
763
- .daily-buzzword h2 {
764
- margin-bottom: 10px;
765
- font-size: 1.8rem;
766
- }
767
- .daily-buzzword-term {
768
- font-size: 2.2rem;
769
- font-weight: 700;
770
- margin: 15px 0;
771
- text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
772
- }
773
- .search-box {
774
- background-color: white;
775
- padding: 20px;
776
- border-radius: 10px;
777
- margin-bottom: 20px;
778
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
779
- }
780
- .category-filter {
781
- background-color: white;
782
- padding: 15px;
783
- border-radius: 8px;
784
- margin-bottom: 20px;
785
- }
786
- .warning-box {
787
- background-color: #ffeaa7;
788
- border-left: 4px solid #fdcb6e;
789
- padding: 15px;
790
- margin: 15px 0;
791
- border-radius: 4px;
792
- }
793
- .warning-label {
794
- font-weight: 600;
795
- color: #e17055;
796
- font-size: 0.9rem;
797
- margin-bottom: 8px;
798
- }
799
- .stats-container {
800
- background-color: white;
801
- padding: 20px;
802
- border-radius: 10px;
803
- margin-bottom: 20px;
804
- text-align: center;
805
- }
806
- .stat-number {
807
- font-size: 2rem;
808
- font-weight: 700;
809
- color: #3498db;
810
- }
811
- .stat-label {
812
- color: #7f8c8d;
813
- font-size: 0.9rem;
814
- }
815
- .footer-note {
816
- font-size: 0.85rem;
817
- color: #6c757d;
818
- margin-top: 3rem;
819
- text-align: center;
820
- font-style: italic;
821
- }
822
- .contribution-box {
823
- background-color: #e8f5e8;
824
- border: 1px solid #c3e6c3;
825
- border-radius: 8px;
826
- padding: 20px;
827
- margin: 20px 0;
828
- text-align: center;
829
- }
830
- .buzzword-highlight {
831
- background-color: #fff3cd;
832
- border-left: 4px solid #ffc107;
833
- padding: 10px;
834
- margin: 10px 0;
835
- border-radius: 4px;
836
- }
837
- </style>
838
- """, unsafe_allow_html=True)
839
-
840
- # L&D Buzzwords Database
841
- LD_BUZZWORDS = {
842
- "microlearning": {
843
- "term": "Microlearning",
844
- "category": "Content Strategy",
845
- "definition": "A training approach that delivers content in small, focused chunks that can be consumed in 5-10 minutes.",
846
- "plain_english": "Instead of sitting through a 2-hour training session, you learn one specific skill in bite-sized pieces during your coffee break.",
847
- "real_world_example": "A daily 3-minute video showing one Excel tip, rather than a full-day Excel workshop.",
848
- "warning": "Often overused to describe any short content, even if it lacks proper learning design.",
849
- "synonyms": ["Bite-sized learning", "Nugget learning", "Just-in-time learning"]
850
- },
851
- "gamification": {
852
- "term": "Gamification",
853
- "category": "Engagement",
854
- "definition": "The application of game design elements and principles in non-game contexts to increase engagement and motivation.",
855
- "plain_english": "Adding points, badges, leaderboards, or challenges to make training feel more like playing a game.",
856
- "real_world_example": "Earning points for completing training modules and competing with colleagues on a leaderboard.",
857
- "warning": "Simply adding badges doesn't automatically make learning effective or engaging.",
858
- "synonyms": ["Game-based learning", "Serious games", "Learning games"]
859
- },
860
- "adaptive_learning": {
861
- "term": "Adaptive Learning",
862
- "category": "Technology",
863
- "definition": "Educational technology that automatically adjusts the learning experience based on individual learner performance and needs.",
864
- "plain_english": "Like having a personal tutor that notices what you struggle with and gives you more practice in those areas.",
865
- "real_world_example": "A compliance course that gives extra examples on topics you got wrong, while skipping sections you've mastered.",
866
- "warning": "True adaptive learning requires sophisticated algorithms; many platforms just offer basic branching.",
867
- "synonyms": ["Personalized learning", "Intelligent tutoring", "Responsive learning"]
868
- },
869
- "blended_learning": {
870
- "term": "Blended Learning",
871
- "category": "Delivery Method",
872
- "definition": "A formal education program that combines online digital media with traditional face-to-face classroom methods.",
873
- "plain_english": "Mixing in-person training with online components - like watching videos before a workshop.",
874
- "real_world_example": "Completing pre-work online, attending a facilitated workshop, then following up with virtual coaching sessions.",
875
- "warning": "Not just adding random online elements to classroom training - requires intentional design.",
876
- "synonyms": ["Hybrid learning", "Mixed-mode learning", "Flexible learning"]
877
- },
878
- "social_learning": {
879
- "term": "Social Learning",
880
- "category": "Learning Theory",
881
- "definition": "Learning that occurs through observation, imitation, and interaction with others in social contexts.",
882
- "plain_english": "Learning from watching and talking with colleagues, rather than just from formal training materials.",
883
- "real_world_example": "New employees learning by shadowing experienced team members or participating in discussion forums.",
884
- "warning": "Often confused with just using social media tools in training.",
885
- "synonyms": ["Collaborative learning", "Peer learning", "Community-based learning"]
886
- },
887
- "learning_analytics": {
888
- "term": "Learning Analytics",
889
- "category": "Data & Measurement",
890
- "definition": "The measurement, collection, analysis, and reporting of data about learners and their contexts for understanding and optimizing learning.",
891
- "plain_english": "Using data to understand how people learn and improve training programs - like Google Analytics for learning.",
892
- "real_world_example": "Tracking which modules take longest to complete to identify content that needs simplification.",
893
- "warning": "Data without actionable insights is just expensive reporting.",
894
- "synonyms": ["Learning data", "Educational data mining", "Learning intelligence"]
895
- },
896
- "xapi": {
897
- "term": "xAPI (Tin Can API)",
898
- "category": "Technology",
899
- "definition": "A technical specification that allows learning content and systems to communicate with each other and track learning experiences.",
900
- "plain_english": "A way for different learning tools to talk to each other and share information about what people learned.",
901
- "real_world_example": "Your mobile learning app telling your LMS that you completed a safety video while on-site.",
902
- "warning": "The technology is only as good as what you do with the data it collects.",
903
- "synonyms": ["Experience API", "Tin Can API", "Learning record API"]
904
- },
905
- "competency_based": {
906
- "term": "Competency-Based Learning",
907
- "category": "Learning Design",
908
- "definition": "An approach that focuses on demonstrating specific skills and knowledge rather than spending time in training.",
909
- "plain_english": "You advance when you can prove you've mastered the skill, not after sitting through a certain number of hours.",
910
- "real_world_example": "Testing out of a software training course by demonstrating you can already perform the required tasks.",
911
- "warning": "Requires clear performance standards and reliable assessment methods.",
912
- "synonyms": ["Skills-based learning", "Mastery learning", "Outcome-based learning"]
913
- },
914
- "learner_experience": {
915
- "term": "Learner Experience (LX)",
916
- "category": "Design Philosophy",
917
- "definition": "The holistic experience a learner has when interacting with learning content, systems, and environments.",
918
- "plain_english": "How easy, enjoyable, and effective the entire learning journey feels from the learner's perspective.",
919
- "real_world_example": "Ensuring training is mobile-friendly, visually appealing, and fits into busy work schedules.",
920
- "warning": "Often treated as just making things look pretty rather than truly learner-centered design.",
921
- "synonyms": ["User experience for learning", "Learning design", "Learner-centered design"]
922
- },
923
- "learning_in_the_flow": {
924
- "term": "Learning in the Flow of Work",
925
- "category": "Integration Strategy",
926
- "definition": "Embedding learning opportunities directly into daily work processes and tools.",
927
- "plain_english": "Getting help and learning new things right when and where you need them, without leaving your work.",
928
- "real_world_example": "Pop-up tips in your CRM system teaching you about new features as you use them.",
929
- "warning": "Can become disruptive if not carefully designed to match workflow.",
930
- "synonyms": ["Workflow learning", "Contextual learning", "Just-in-time learning"]
931
- },
932
- "continuous_learning": {
933
- "term": "Continuous Learning",
934
- "category": "Cultural Mindset",
935
- "definition": "An ongoing process of acquiring new skills and knowledge throughout one's career and life.",
936
- "plain_english": "Making learning a regular habit rather than something that only happens in formal training programs.",
937
- "real_world_example": "Setting aside 30 minutes each week to learn something new related to your job.",
938
- "warning": "Can become meaningless without clear goals and organizational support.",
939
- "synonyms": ["Lifelong learning", "Ongoing development", "Self-directed learning"]
940
- },
941
- "learning_culture": {
942
- "term": "Learning Culture",
943
- "category": "Organizational Strategy",
944
- "definition": "An organizational environment that encourages, supports, and rewards learning and knowledge sharing.",
945
- "plain_english": "A workplace where people feel safe to experiment, make mistakes, ask questions, and share what they know.",
946
- "real_world_example": "Managers regularly asking 'What did you learn today?' rather than just 'What did you accomplish?'",
947
- "warning": "Cannot be created through training programs alone - requires leadership commitment.",
948
- "synonyms": ["Learning organization", "Growth mindset culture", "Knowledge sharing culture"]
949
- },
950
- "curation": {
951
- "term": "Content Curation",
952
- "category": "Content Strategy",
953
- "definition": "The process of finding, organizing, and sharing relevant learning content from various sources.",
954
- "plain_english": "Like being a museum curator for learning content - finding the best stuff and organizing it for others.",
955
- "real_world_example": "Creating a weekly newsletter with the best articles, videos, and resources on project management.",
956
- "warning": "Quality curation requires time and expertise - it's not just bookmarking links.",
957
- "synonyms": ["Learning curation", "Knowledge curation", "Resource aggregation"]
958
- },
959
- "upskilling": {
960
- "term": "Upskilling",
961
- "category": "Workforce Development",
962
- "definition": "Teaching employees new skills that enhance their current role or prepare them for advancement.",
963
- "plain_english": "Learning new skills to get better at your current job or prepare for a promotion.",
964
- "real_world_example": "A marketing coordinator learning data analysis to become a marketing analyst.",
965
- "warning": "Often used interchangeably with reskilling, but they serve different purposes.",
966
- "synonyms": ["Skill enhancement", "Professional development", "Capability building"]
967
- },
968
- "reskilling": {
969
- "term": "Reskilling",
970
- "category": "Workforce Development",
971
- "definition": "Training employees in completely new skills for different roles, often due to technological changes.",
972
- "plain_english": "Learning entirely new skills to move into a different type of job, usually because your old job is changing or disappearing.",
973
- "real_world_example": "A bank teller learning programming to become a software developer as branches close.",
974
- "warning": "Requires significant time investment and organizational commitment to be successful.",
975
- "synonyms": ["Career transition training", "Job retraining", "Role transformation"]
976
- },
977
- "performance_support": {
978
- "term": "Performance Support",
979
- "category": "Learning Design",
980
- "definition": "Providing tools, resources, and guidance at the moment someone needs to perform a task.",
981
- "plain_english": "Getting help exactly when you need it to complete a task, rather than having to remember training from months ago.",
982
- "real_world_example": "A step-by-step checklist embedded in your software that guides you through a complex process.",
983
- "warning": "Not a replacement for proper training, but a complement to it.",
984
- "synonyms": ["Job aids", "Performance tools", "Workflow support"]
985
- },
986
- "learning_pathways": {
987
- "term": "Learning Pathways",
988
- "category": "Learning Design",
989
- "definition": "Structured sequences of learning experiences designed to build specific skills or knowledge progressively.",
990
- "plain_english": "A roadmap showing the order and steps needed to develop expertise in a particular area.",
991
- "real_world_example": "A leadership pathway that starts with communication skills, progresses to team management, then strategic thinking.",
992
- "warning": "Often just linear course sequences without considering different starting points or learning styles.",
993
- "synonyms": ["Learning journeys", "Curriculum paths", "Skill tracks"]
994
- },
995
- "informal_learning": {
996
- "term": "Informal Learning",
997
- "category": "Learning Theory",
998
- "definition": "Learning that happens naturally through daily activities, conversations, and experiences, without formal instruction.",
999
- "plain_english": "The learning that happens when you figure things out on your own or learn from casual conversations with colleagues.",
1000
- "real_world_example": "Learning about company culture by observing how meetings are run and how people interact.",
1001
- "warning": "Hard to measure and manage, but represents the majority of workplace learning.",
1002
- "synonyms": ["Experiential learning", "Incidental learning", "Natural learning"]
1003
- },
1004
- "personalization": {
1005
- "term": "Personalized Learning",
1006
- "category": "Learning Design",
1007
- "definition": "Tailoring learning experiences to individual learner needs, preferences, and circumstances.",
1008
- "plain_english": "Making learning feel like it was designed specifically for you and your situation.",
1009
- "real_world_example": "A new manager receiving different content based on whether they're managing remote teams or in-office teams.",
1010
- "warning": "True personalization is complex and expensive; many solutions offer only basic customization.",
1011
- "synonyms": ["Individualized learning", "Customized learning", "Learner-centric design"]
1012
- },
1013
- "scaffolding": {
1014
- "term": "Learning Scaffolding",
1015
- "category": "Learning Design",
1016
- "definition": "Temporary support structures that help learners accomplish tasks they couldn't do independently, gradually removed as competence increases.",
1017
- "plain_english": "Like training wheels on a bike - extra help at the beginning that gets taken away as you improve.",
1018
- "real_world_example": "Providing detailed templates for reports initially, then simpler guides, then just quality checklists.",
1019
- "warning": "Support must be removed at the right time to avoid creating dependency.",
1020
- "synonyms": ["Guided practice", "Progressive support", "Structured assistance"]
1021
- }
1022
- }
1023
-
1024
- # Initialize session state
1025
- if "search_term" not in st.session_state:
1026
- st.session_state["search_term"] = ""
1027
- if "selected_category" not in st.session_state:
1028
- st.session_state["selected_category"] = "All Categories"
1029
- if "daily_buzzword_date" not in st.session_state:
1030
- st.session_state["daily_buzzword_date"] = None
1031
- if "daily_buzzword" not in st.session_state:
1032
- st.session_state["daily_buzzword"] = None
1033
-
1034
- # Function to get daily buzzword
1035
- def get_daily_buzzword():
1036
- today = datetime.date.today()
1037
-
1038
- # Check if we need a new daily buzzword
1039
- if (st.session_state["daily_buzzword_date"] != today or
1040
- st.session_state["daily_buzzword"] is None):
1041
-
1042
- # Use date as seed for consistent daily selection
1043
- random.seed(today.toordinal())
1044
- buzzword_key = random.choice(list(LD_BUZZWORDS.keys()))
1045
-
1046
- st.session_state["daily_buzzword_date"] = today
1047
- st.session_state["daily_buzzword"] = buzzword_key
1048
-
1049
- return st.session_state["daily_buzzword"]
1050
-
1051
- # Function to filter buzzwords
1052
- def filter_buzzwords(search_term, category):
1053
- filtered = {}
1054
-
1055
- for key, buzzword in LD_BUZZWORDS.items():
1056
- # Category filter
1057
- if category != "All Categories" and buzzword["category"] != category:
1058
- continue
1059
-
1060
- # Search filter
1061
- if search_term:
1062
- search_lower = search_term.lower()
1063
- if (search_lower in buzzword["term"].lower() or
1064
- search_lower in buzzword["definition"].lower() or
1065
- search_lower in buzzword["plain_english"].lower() or
1066
- any(search_lower in synonym.lower() for synonym in buzzword.get("synonyms", []))):
1067
- filtered[key] = buzzword
1068
- else:
1069
- filtered[key] = buzzword
1070
-
1071
- return filtered
1072
-
1073
- # Title and description
1074
- st.markdown("""
1075
- <div class="title-area">
1076
- <h1>📚 L&D Buzzword Dictionary</h1>
1077
- <p>Your guide to understanding Learning & Development jargon - with plain English explanations that actually make sense.</p>
1078
  </div>
1079
  """, unsafe_allow_html=True)
1080
 
1081
- # Daily buzzword section
1082
- daily_buzzword_key = get_daily_buzzword()
1083
- daily_buzzword = LD_BUZZWORDS[daily_buzzword_key]
1084
 
1085
- st.markdown(f"""
1086
- <div class="daily-buzzword">
1087
- <h2>🎯 Daily Buzzword</h2>
1088
- <div class="daily-buzzword-term">{daily_buzzword['term']}</div>
1089
- <p><strong>Plain English:</strong> {daily_buzzword['plain_english']}</p>
1090
  </div>
1091
  """, unsafe_allow_html=True)
1092
 
1093
- # Search and filter section
1094
- col1, col2 = st.columns([2, 1])
1095
-
1096
- with col1:
1097
- st.markdown('<div class="search-box">', unsafe_allow_html=True)
1098
- search_term = st.text_input(
1099
- "🔍 Search buzzwords, definitions, or synonyms:",
1100
- value=st.session_state["search_term"],
1101
- placeholder="e.g., microlearning, engagement, adaptive...",
1102
- key="search_input"
1103
- )
1104
- st.session_state["search_term"] = search_term
1105
- st.markdown('</div>', unsafe_allow_html=True)
1106
-
1107
- with col2:
1108
- st.markdown('<div class="category-filter">', unsafe_allow_html=True)
1109
- categories = ["All Categories"] + sorted(list(set(buzzword["category"] for buzzword in LD_BUZZWORDS.values())))
1110
- selected_category = st.selectbox(
1111
- "Filter by category:",
1112
- categories,
1113
- index=categories.index(st.session_state["selected_category"]) if st.session_state["selected_category"] in categories else 0,
1114
- key="category_select"
1115
- )
1116
- st.session_state["selected_category"] = selected_category
1117
- st.markdown('</div>', unsafe_allow_html=True)
1118
-
1119
- # Stats section
1120
- filtered_buzzwords = filter_buzzwords(search_term, selected_category)
1121
- total_buzzwords = len(LD_BUZZWORDS)
1122
- showing_count = len(filtered_buzzwords)
1123
-
1124
- col_stat1, col_stat2, col_stat3 = st.columns(3)
1125
-
1126
- with col_stat1:
1127
- st.markdown(f"""
1128
- <div class="stats-container">
1129
- <div class="stat-number">{total_buzzwords}</div>
1130
- <div class="stat-label">Total Buzzwords</div>
1131
- </div>
1132
- """, unsafe_allow_html=True)
1133
-
1134
- with col_stat2:
1135
- st.markdown(f"""
1136
- <div class="stats-container">
1137
- <div class="stat-number">{showing_count}</div>
1138
- <div class="stat-label">Showing</div>
1139
- </div>
1140
- """, unsafe_allow_html=True)
1141
-
1142
- with col_stat3:
1143
- st.markdown(f"""
1144
- <div class="stats-container">
1145
- <div class="stat-number">{len(categories)-1}</div>
1146
- <div class="stat-label">Categories</div>
1147
- </div>
1148
- """, unsafe_allow_html=True)
1149
-
1150
- # Quick actions
1151
- col_action1, col_action2, col_action3 = st.columns(3)
1152
-
1153
- with col_action1:
1154
- if st.button("🎲 Random Buzzword", use_container_width=True):
1155
- random_key = random.choice(list(LD_BUZZWORDS.keys()))
1156
- st.session_state["search_term"] = LD_BUZZWORDS[random_key]["term"]
1157
- st.rerun()
1158
-
1159
- with col_action2:
1160
- if st.button("🔄 Clear Filters", use_container_width=True):
1161
- st.session_state["search_term"] = ""
1162
- st.session_state["selected_category"] = "All Categories"
1163
- st.rerun()
1164
-
1165
- with col_action3:
1166
- if st.button("📖 Browse All", use_container_width=True):
1167
- st.session_state["search_term"] = ""
1168
- st.session_state["selected_category"] = "All Categories"
1169
- st.rerun()
1170
-
1171
- # Results section
1172
- if not filtered_buzzwords:
1173
- st.markdown("""
1174
- <div class="buzzword-card" style="text-align: center; color: #7f8c8d;">
1175
- <h3>🤔 No buzzwords found</h3>
1176
- <p>Try a different search term or category. Or maybe this is a new buzzword we should add to our dictionary!</p>
1177
- </div>
1178
- """, unsafe_allow_html=True)
1179
- else:
1180
- st.markdown(f"<br><h2>📋 Dictionary ({showing_count} {'term' if showing_count == 1 else 'terms'})</h2>", unsafe_allow_html=True)
1181
-
1182
- # Sort alphabetically
1183
- sorted_buzzwords = sorted(filtered_buzzwords.items(), key=lambda x: x[1]["term"])
1184
-
1185
- for buzzword_key, buzzword in sorted_buzzwords:
1186
- st.markdown('<div class="buzzword-card">', unsafe_allow_html=True)
1187
-
1188
- # Header with term and category
1189
- st.markdown(f"""
1190
- <div class="buzzword-title">{buzzword['term']}</div>
1191
- <div class="buzzword-category">{buzzword['category']}</div>
1192
- """, unsafe_allow_html=True)
1193
-
1194
- # Formal definition
1195
- st.markdown(f'<div class="buzzword-definition">{buzzword["definition"]}</div>', unsafe_allow_html=True)
1196
-
1197
- # Plain English explanation
1198
- st.markdown(f"""
1199
- <div class="plain-english">
1200
- <div class="plain-english-label">💡 Plain English</div>
1201
- {buzzword['plain_english']}
1202
- </div>
1203
- """, unsafe_allow_html=True)
1204
-
1205
- # Real world example
1206
- st.markdown(f"""
1207
- <div class="real-world-example">
1208
- <div class="example-label">🌟 Real-World Example</div>
1209
- {buzzword['real_world_example']}
1210
- </div>
1211
- """, unsafe_allow_html=True)
1212
-
1213
- # Warning if present
1214
- if buzzword.get("warning"):
1215
- st.markdown(f"""
1216
- <div class="warning-box">
1217
- <div class="warning-label">⚠️ Watch Out For</div>
1218
- {buzzword['warning']}
1219
- </div>
1220
- """, unsafe_allow_html=True)
1221
-
1222
- # Synonyms
1223
- if buzzword.get("synonyms"):
1224
- synonyms_text = ", ".join(buzzword["synonyms"])
1225
- st.markdown(f"<p><strong>Also known as:</strong> {synonyms_text}</p>", unsafe_allow_html=True)
1226
-
1227
- st.markdown('</div>', unsafe_allow_html=True)
1228
-
1229
- # Export functionality
1230
- st.markdown("<br><h2>📤 Export & Share</h2>", unsafe_allow_html=True)
1231
-
1232
- col_export1, col_export2 = st.columns(2)
1233
-
1234
- with col_export1:
1235
- # Create a simplified export of current results
1236
- export_data = {
1237
- "export_date": datetime.date.today().isoformat(),
1238
- "search_term": search_term,
1239
- "category": selected_category,
1240
- "total_results": len(filtered_buzzwords),
1241
- "buzzwords": []
1242
- }
1243
-
1244
- for key, buzzword in filtered_buzzwords.items():
1245
- export_data["buzzwords"].append({
1246
- "term": buzzword["term"],
1247
- "category": buzzword["category"],
1248
- "definition": buzzword["definition"],
1249
- "plain_english": buzzword["plain_english"],
1250
- "example": buzzword["real_world_example"]
1251
- })
1252
-
1253
- export_json = json.dumps(export_data, indent=2)
1254
-
1255
- st.download_button(
1256
- label="📁 Download Dictionary (JSON)",
1257
- data=export_json,
1258
- file_name=f"ld_buzzwords_{datetime.date.today().isoformat()}.json",
1259
- mime="application/json",
1260
- use_container_width=True
1261
- )
1262
-
1263
- with col_export2:
1264
- # Create a readable text version
1265
- export_text = f"L&D Buzzword Dictionary Export\n"
1266
- export_text += f"Generated on: {datetime.date.today().isoformat()}\n"
1267
- export_text += f"Search: {search_term or 'All terms'}\n"
1268
- export_text += f"Category: {selected_category}\n"
1269
- export_text += f"Total terms: {len(filtered_buzzwords)}\n"
1270
- export_text += "="*50 + "\n\n"
1271
-
1272
- for key, buzzword in sorted(filtered_buzzwords.items(), key=lambda x: x[1]["term"]):
1273
- export_text += f"{buzzword['term']} ({buzzword['category']})\n"
1274
- export_text += f"Definition: {buzzword['definition']}\n"
1275
- export_text += f"Plain English: {buzzword['plain_english']}\n"
1276
- export_text += f"Example: {buzzword['real_world_example']}\n"
1277
- if buzzword.get("synonyms"):
1278
- export_text += f"Synonyms: {', '.join(buzzword['synonyms'])}\n"
1279
- export_text += "\n" + "-"*30 + "\n\n"
1280
-
1281
- st.download_button(
1282
- label="📄 Download as Text",
1283
- data=export_text,
1284
- file_name=f"ld_buzzwords_{datetime.date.today().isoformat()}.txt",
1285
- mime="text/plain",
1286
- use_container_width=True
1287
- )
1288
-
1289
- # Fun facts section
1290
- st.markdown("<br><h2>🎉 Fun Facts</h2>", unsafe_allow_html=True)
1291
-
1292
- # Calculate some interesting stats
1293
- categories_count = len(set(buzzword["category"] for buzzword in LD_BUZZWORDS.values()))
1294
- avg_synonyms = sum(len(buzzword.get("synonyms", [])) for buzzword in LD_BUZZWORDS.values()) / len(LD_BUZZWORDS)
1295
- longest_term = max(LD_BUZZWORDS.values(), key=lambda x: len(x["term"]))["term"]
1296
-
1297
- col_fun1, col_fun2, col_fun3 = st.columns(3)
1298
-
1299
- with col_fun1:
1300
- st.markdown(f"""
1301
- <div class="stats-container">
1302
- <div class="stat-number">{categories_count}</div>
1303
- <div class="stat-label">Different Categories</div>
1304
- </div>
1305
- """, unsafe_allow_html=True)
1306
-
1307
- with col_fun2:
1308
- st.markdown(f"""
1309
- <div class="stats-container">
1310
- <div class="stat-number">{avg_synonyms:.1f}</div>
1311
- <div class="stat-label">Avg Synonyms per Term</div>
1312
- </div>
1313
- """, unsafe_allow_html=True)
1314
-
1315
- with col_fun3:
1316
- st.markdown(f"""
1317
- <div class="stats-container">
1318
- <div class="stat-number">{len(longest_term)}</div>
1319
- <div class="stat-label">Letters in Longest Term</div>
1320
- </div>
1321
- """, unsafe_allow_html=True)
1322
-
1323
- st.
 
659
  </div>
660
  """, unsafe_allow_html=True)
661
 
662
+ markdown(f"""
663
+ <div class="buzzword-highlight">
664
+ <strong>Longest buzzword:</strong> "{longest_term}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
  </div>
666
  """, unsafe_allow_html=True)
667
 
668
+ # Contribution section
669
+ st.markdown("<br><h2>🤝 Contribute</h2>", unsafe_allow_html=True)
 
670
 
671
+ st.markdown("""
672
+ <div class="contribution-box">
673
+ <h3>Missing a buzzword?</h3>
674
+ <p>Know a buzzword that should be in our dictionary? We'd love to hear about it!</p>
675
+ <p>Email us your suggestions and we'll consider adding them to help fellow L&D professionals.</p>
676
  </div>
677
  """, unsafe_allow_html=True)
678
 
679
+ # Footer
680
+ st.markdown("""
681
+ <div class="footer-note">
682
+ <p>This L&D Buzzword Dictionary is designed to help learning professionals cut through the jargon and focus on what really matters: effective learning experiences.</p>
683
+ <p>Remember: The best learning solution is often the simplest one that actually works.</p>
684
+ </div>
685
+ """, unsafe_allow_html=True)