diff --git a/data/db-json/blog_posts.json b/data/db-json/blog_posts.json index 92e4adf..ae379a5 100644 --- a/data/db-json/blog_posts.json +++ b/data/db-json/blog_posts.json @@ -250,5 +250,17 @@ "title": "Kenya Math Camp January 2023", "updated_at": 1699918216023, "updated_by_id": 1 + }, + { + "created_at": 1711381248634, + "created_by_id": 2, + "date_written": "2024-03-25", + "id": 24, + "published_at": 1711381251725, + "slug": "transforming-learning-environments", + "summary": "Reflections from Happy Classrooms Initiative Project in Kenya", + "title": "Transforming Learning Environments", + "updated_at": 1711382641337, + "updated_by_id": 2 } ] diff --git a/data/db-json/blog_posts_components.json b/data/db-json/blog_posts_components.json index af1559c..db3f221 100644 --- a/data/db-json/blog_posts_components.json +++ b/data/db-json/blog_posts_components.json @@ -294,5 +294,29 @@ "field": "ContentBlocks", "id": 114, "order": 3 + }, + { + "component_id": 40, + "component_type": "common.html", + "entity_id": 24, + "field": "ContentBlocks", + "id": 121, + "order": 1 + }, + { + "component_id": 16, + "component_type": "common.image", + "entity_id": 24, + "field": "ContentBlocks", + "id": 122, + "order": 2 + }, + { + "component_id": 41, + "component_type": "common.html", + "entity_id": 24, + "field": "ContentBlocks", + "id": 123, + "order": 3 } ] diff --git a/data/db-json/components_common_htmls.json b/data/db-json/components_common_htmls.json index a02d810..ae5390d 100644 --- a/data/db-json/components_common_htmls.json +++ b/data/db-json/components_common_htmls.json @@ -4,7 +4,7 @@ "id": 1 }, { - "html": "

Summer 2024 Update

We are in the process of finalising camp locations for 2024. See the image below for a list of countries where we have previously facilitated Maths Camps.

", + "html": "

Summer 2024 Update

This summer, camps are currently being planned in:

Rwanda, Kenya, Ethiopia, Ghana, Uganda, Togo (French-speaking) and Benin (French-speaking).

", "id": 2 }, { @@ -150,5 +150,13 @@ { "html": "

The Digital Communities Initiative uses technology to support across diverse areas including schools, agriculture and women in enterprise.

In 2016 SAMI applied for a small grant from the Economist Charitable Trust to pilot a new project aimed at using technology to improve livelihoods across a community.

We initially started with a set of 20 android tablets that were taken out to the Kitale region of Western Kenya. We’ve been hard at work to find innovative and effective ways that the technology can be used to support people, with an initial focus on schools, agriculture and enterprising women.

Since then the project has expanded to include more than 60 devices, and we are working with organisations and institutions around the world to provide real impact, with costs involved kept to a minimum. You can see the first update report published by the DCI team below:

Updates May 2017

 

 

Future Plans

We have been incredibly excited to see the huge impact seen through DCI, and are currently looking for ways to extend the project through 2017-2018.

", "id": 39 + }, + { + "html": "

Have you ever heard of the concept of \"talking walls\" in classrooms? Imagine a learning environment where visual elements play a crucial role in enhancing the educational experience for both teachers and students. This is exactly what the Happy Classroom project aims to achieve - a transformation in schools through innovative pedagogy and engaging instructional materials.

“I've come to realize the significance of what teachers now affectionately call the \"talking walls.\" Following our Happy classroom project, our visits to the schools have become a regular part of our routine. What struck me in 2024 was the noticeable difference from our previous visits, which I attribute to the lessons learned and the ongoing process of reflection.”

The Happy Classrooms Initiative is a program aimed at transforming learning environments in schools by implementing a structured pedagogy approach. This involves enhancing instructional materials to create visually engaging classrooms and offering Teacher’s Guides with scope and sequence, training, and continuous support to teachers through a community of practice. In the 2023/2024 phase, the project expanded to 13 new classrooms in 7 schools across 5 counties in Kenya, benefiting 664 additional students (456 boys and 208 girls) and 26 teachers. This blog highlights recent visits to these new schools, which are part of the program's expansion into four new counties (Kisumu, Busia, Siaya, and Migori) in Kenya, broadening its impact and promoting educational equity in underserved communities.


 

“The resources make students arrive early so that they can just read the sounds and alphabetical letters. We used charts before but the walls do more talking compared to the previous times. The classes are now beautiful and the walls speak louder. Grade 3 students wish to go back to grade 2 just for them to use the resources painted on the walls.”

Fig: Happy Classroom Projects in Kenyahttps://www.google.com/maps/d/viewer?mid=1Or0rw0JCcreKLETazKulmNuFWQwYZH1N&hl=en&usp=sharing


 

As we reflect on our journey with the Happy Classroom initiative, it becomes evident how small changes can make a significant difference. Visiting schools as part of our routine, the year 2024 brought about noticeable improvements compared to previous visits. These positive changes are a result of the lessons learned and our commitment to continuous reflection and growth.


 

The follow up sessions aimed to:

  1. Establish a community of practice among teachers to foster collaboration and shared learning.
  2. Encourage teachers to journal their reflections, promoting self-assessment and professional development.
  3. Conduct small group sessions with students to enhance engagement and participation.
  4. Reinforce the importance of the activities displayed on the walls, creating a visually stimulating learning environment.


 

“It was a joy to witness students engaging with the walls, reading independently, and actively participating in discussions with their peers. What stood out was not just the culture of receiving positive feedback, but the meaningful insights shared that will continuously improve the project. Teachers, too, were visibly motivated by the impact on their classes. They appreciated the reduced time spent preparing charts and the accessibility of learning materials for their students at all times.” added Owen


 

The project aims to attain high-quality learning outcomes and establish a replicable model applicable to all educational settings in Kenya, fostering the principles of the Competency-Based Curriculum. With the expansion to more counties, the project brings about enhanced access to updated learning materials aligned with both national and international educational standards. These resources are designed to facilitate innovative teaching and learning methods, fostering creativity, communication skills, problem-solving abilities, and analytical thinking among teachers and students. This initiative heralds the commencement of personalized learning feedback for each student, leading to improved learning outcomes, heightened learner engagement, and increased attendance rates.


 

“We look forward to actively engaging teachers in regular feedback sessions to track learners' progress, providing targeted attention to those who require additional time, and ensuring full transparency in their classrooms to support formative assessment. This approach aims to increase learning speed and enhance teachers' understanding of their students. Additionally, we are committed to addressing research gaps concerning classroom environments, including the impact of happy classrooms on foundational numeracy.”


 

Fig: Illustration depicting the pathway of the Happy Classrooms Project.


 

“The project has reduced absenteeism among the learners, they just want to come and use the resources in their walls. It has made students self-driven, they learn on their own when the teacher is not in class. Students grasp content very fast, especially the one covered in their talking walls. The resources build a good foundation for the learners. The resources have made learning very fast, and syllabus coverage is timely.


 

Students in grade 1 and 2 now own their classes, they cannot allow other students to interfere with the resources painted. They use a pointer, not fingers, just to maintain the walls. Grade 2 for example have 2 streams with 70 Students each, therefore they use rotational learning to allow all learners to use the talking walls. 

Students can now see and read, especially the alphabetical letters, numbers. Parents are very happy, parents with children in the neighboring schools are now transferring the kids to their school just to interact with the talking walls, and the population of the school is shooting up. Font used on the walls is large, therefore very visible.”


 

Fig: Image of a Grade 2 classroom before, with termites occupying a corner, constructing their habitat during the holiday.

Figures: Grade 2 classroom before and after with students in Happy Classroom at St. John Sibembe Primary School - Busia County.

 


 

", + "id": 40 + }, + { + "html": "

The importance of providing teachers with support in utilizing a variety of resources beyond visual aids clearly pointed to the teachers need for guidance on making the Competency-Based Curriculum (CBC) implementation not only manageable but also enjoyable for students. This highlighted the crucial role of our community of practice in supporting teachers through this process.


 

The Happy Classroom initiative is not just about transforming physical spaces; it's about creating a supportive and engaging learning environment where both teachers and students thrive. Through collaboration, reflection, and a commitment to continuous improvement, we are witnessing the positive impact of this innovative project on education.


 

“The school at large appreciates the work done. The resources are very useful in teaching. Teachers now spend less time in lesson preparation. It's a good transformation of the classes (the walls were very dirty before, it has made the school to paint the other classes at least for uniformity). Learners are now fully engaged (they can read and learn when the teacher is not around). Talking walls cut costs for resource acquisition, especially the charts. Colors used are attractive, making learners interact with the resources even more. Used charts before (gets torn out easily), walls do more of talking compared to previous times. The resources create interests in learning for the students, one student leads the others in using the resources.”

Fig: Picture of Grade 3 students in their brilliantly painted, normal classroom environment.

Fig: Pictures showing Grade 1 classrooms before and after, with learners in their happy classroom



 

“I learned a valuable lesson when I saw how much assistance the teachers required in order to use a variety of resources outside of just painting materials. They looked for advice on how to make the Competency-Based Curriculum (CBC) implementation for the students not only manageable but also pleasant. This demonstrated how crucial our community of practice is to supporting this process.” - Owen


 

Join us on this journey of transformation and discovery as we continue to enhance classrooms and empower educators to create inspiring learning experiences for the next generation. Together, we can make a difference in education and shape a brighter future for all.


 

“The one-week follow-up visit reaffirmed the enduring impact of resourceful walls on teaching and learning. As we move forward, it is imperative to build on these successes and address emerging challenges collaboratively. The sustainability of this initiative is a testament to the transformative power of intentional and visually stimulating learning environments. Our commitment remains unwavering: to continually refine and expand this model, ensuring that every classroom becomes a vibrant space that transcends chalk-and-talk conventions, fostering a love for learning among students.” 

 

Author: Samuel Okoth Ogalo

Samuel Okoth is an experienced Educator and passionate advocate for innovative teaching methodologies, with expertise in Science Education and Mathematics.

Contact: +254708876462

Email: kogallohsamuel@gmail.com


 

", + "id": 41 } ] diff --git a/data/db-json/components_common_images.json b/data/db-json/components_common_images.json index 9d840e3..9a20ac8 100644 --- a/data/db-json/components_common_images.json +++ b/data/db-json/components_common_images.json @@ -88,5 +88,11 @@ "caption": "The Digital Communities Initiative uses technology to support across diverse areas including schools, agriculture and women in enterprise.", "class_names": "max-w-md mx-auto", "id": 15 + }, + { + "alt_text": null, + "caption": "Grade 2 classroom before and after with students in Happy Classroom at St. John Sibembe Primary School - Busia County.", + "class_names": null, + "id": 16 } ] diff --git a/data/db-json/components_home_impact_numbers.json b/data/db-json/components_home_impact_numbers.json index 67d7abd..5aade6d 100644 --- a/data/db-json/components_home_impact_numbers.json +++ b/data/db-json/components_home_impact_numbers.json @@ -1,17 +1,22 @@ [ { "id": 2, - "number": "560+", - "title": "Volunteers" + "number": "168", + "title": "Schools supported" }, { "id": 3, - "number": "80", - "title": "Schools" + "number": "8", + "title": "Maths Camps run" }, { "id": 4, - "number": "9", - "title": "Universities" + "number": "20,000+", + "title": "Students impacted" + }, + { + "id": 5, + "number": "214", + "title": "Teachers supported" } ] diff --git a/data/db-json/components_home_impact_sections.json b/data/db-json/components_home_impact_sections.json index 604bcbe..fc5ae17 100644 --- a/data/db-json/components_home_impact_sections.json +++ b/data/db-json/components_home_impact_sections.json @@ -1,6 +1,6 @@ [ { "id": 1, - "statement": "Initiatives we supported have improved maths education for over 3,500 young people" + "statement": "Since inception in 2016 we have worked with thousands of teachers, schools and volunteers.\n\nSee our 2023 impact numbers below." } ] diff --git a/data/db-json/components_home_impact_sections_components.json b/data/db-json/components_home_impact_sections_components.json index 05ad610..3ed0280 100644 --- a/data/db-json/components_home_impact_sections_components.json +++ b/data/db-json/components_home_impact_sections_components.json @@ -13,7 +13,7 @@ "entity_id": 1, "field": "ImpactNumbers", "id": 11, - "order": 2 + "order": 3 }, { "component_id": 4, @@ -21,6 +21,14 @@ "entity_id": 1, "field": "ImpactNumbers", "id": 12, - "order": 3 + "order": 4 + }, + { + "component_id": 5, + "component_type": "home.impact-numbers", + "entity_id": 1, + "field": "ImpactNumbers", + "id": 23, + "order": 2 } ] diff --git a/data/db-json/files.json b/data/db-json/files.json index 73b9934..eaf9c37 100644 --- a/data/db-json/files.json +++ b/data/db-json/files.json @@ -2066,5 +2066,49 @@ "updated_by_id": 1, "url": "/uploads/DCI_c29bc1b654.webp", "width": 874 + }, + { + "alternative_text": null, + "caption": null, + "created_at": 1711381359231, + "created_by_id": 2, + "ext": ".png", + "folder_path": "/5", + "formats": "{\"thumbnail\":{\"name\":\"thumbnail_Screenshot 2024-02-21 12.45.59 PM.png\",\"hash\":\"thumbnail_Screenshot_2024_02_21_12_45_59_PM_6ee435eceb\",\"ext\":\".png\",\"mime\":\"image/png\",\"path\":null,\"width\":128,\"height\":156,\"size\":37.06,\"url\":\"/uploads/thumbnail_Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png\"}}", + "hash": "Screenshot_2024_02_21_12_45_59_PM_6ee435eceb", + "height": 878, + "id": 130, + "mime": "image/png", + "name": "Screenshot 2024-02-21 12.45.59 PM.png", + "preview_url": null, + "provider": "local", + "provider_metadata": null, + "size": 626.14, + "updated_at": 1711381359231, + "updated_by_id": 2, + "url": "/uploads/Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png", + "width": 718 + }, + { + "alternative_text": null, + "caption": " Grade 2 classroom before and after with students in Happy Classroom at St. John Sibembe Primary School - Busia County.", + "created_at": 1711382193798, + "created_by_id": 2, + "ext": ".png", + "folder_path": "/5/16", + "formats": "{\"thumbnail\":{\"name\":\"thumbnail__p5-3522Kx9CmBW-wqfIr23o2qsBLwTypyK9HG1R-3DR6rY2fgnuB8WtSOC4ppdn0W1E5T1PGgZLrx5-62alm1-Mh_odLhldS5uqa-IWLvg0PBrgSlvqjtJpXY463GkThsP36vJoJRE17F6QPSAjb2g\",\"hash\":\"thumbnail_p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a\",\"ext\":\".png\",\"mime\":\"image/png\",\"path\":null,\"width\":186,\"height\":156,\"size\":78.58,\"url\":\"/uploads/thumbnail_p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png\"}}", + "hash": "p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a", + "height": 788, + "id": 131, + "mime": "image/png", + "name": " Grade 2", + "preview_url": null, + "provider": "local", + "provider_metadata": null, + "size": 1773.16, + "updated_at": 1711382361556, + "updated_by_id": 2, + "url": "/uploads/p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png", + "width": 940 } ] diff --git a/data/db-json/files_folder_links.json b/data/db-json/files_folder_links.json index bc163ed..c766dc5 100644 --- a/data/db-json/files_folder_links.json +++ b/data/db-json/files_folder_links.json @@ -556,5 +556,17 @@ "file_order": 1, "folder_id": 16, "id": 106 + }, + { + "file_id": 130, + "file_order": 21, + "folder_id": 6, + "id": 109 + }, + { + "file_id": 131, + "file_order": 1, + "folder_id": 17, + "id": 110 } ] diff --git a/data/db-json/files_related_morphs.json b/data/db-json/files_related_morphs.json index df09b54..2eaf066 100644 --- a/data/db-json/files_related_morphs.json +++ b/data/db-json/files_related_morphs.json @@ -58,7 +58,7 @@ { "field": "Image", "file_id": 37, - "id": 237, + "id": 362, "order": 1, "related_id": 1, "related_type": "home.hero-image" @@ -322,7 +322,7 @@ { "field": "Image", "file_id": 68, - "id": 238, + "id": 363, "order": 1, "related_id": 1, "related_type": "home.mission-statement" @@ -362,7 +362,7 @@ { "field": "Image", "file_id": 73, - "id": 239, + "id": 364, "order": 1, "related_id": 1, "related_type": "home.project-summary" @@ -370,7 +370,7 @@ { "field": "Image", "file_id": 74, - "id": 240, + "id": 365, "order": 1, "related_id": 1, "related_type": "home.get-involved" @@ -618,7 +618,7 @@ { "field": "Media", "file_id": 107, - "id": 221, + "id": 366, "order": 1, "related_id": 12, "related_type": "common.image" @@ -838,5 +838,21 @@ "order": 1, "related_id": 15, "related_type": "common.image" + }, + { + "field": "FeatureImage", + "file_id": 130, + "id": 345, + "order": 1, + "related_id": 24, + "related_type": "api::blog-post.blog-post" + }, + { + "field": "Media", + "file_id": 131, + "id": 344, + "order": 1, + "related_id": 16, + "related_type": "common.image" } ] diff --git a/data/db-json/home_contents.json b/data/db-json/home_contents.json index d8dccb5..4da5442 100644 --- a/data/db-json/home_contents.json +++ b/data/db-json/home_contents.json @@ -4,7 +4,7 @@ "created_by_id": 1, "id": 1, "published_at": 1665275572254, - "updated_at": 1710392529487, + "updated_at": 1711383925937, "updated_by_id": 1 } ] diff --git a/data/db-json/resources.json b/data/db-json/resources.json index 3dd745d..81e3d98 100644 --- a/data/db-json/resources.json +++ b/data/db-json/resources.json @@ -48,5 +48,15 @@ "title": "Maths Club App", "updated_at": 1699918691859, "updated_by_id": 1 + }, + { + "created_at": 1711380641898, + "created_by_id": 2, + "description": "This is the link...", + "id": 7, + "published_at": null, + "title": "Maths Game Handbook", + "updated_at": 1711380938748, + "updated_by_id": 2 } ] diff --git a/data/db-json/sqlite_sequence.json b/data/db-json/sqlite_sequence.json index b529bd5..8f079d0 100644 --- a/data/db-json/sqlite_sequence.json +++ b/data/db-json/sqlite_sequence.json @@ -13,11 +13,11 @@ }, { "name": "blog_posts", - "seq": 23 + "seq": 24 }, { "name": "blog_posts_components", - "seq": 114 + "seq": 123 }, { "name": "components_common_action_buttons", @@ -25,11 +25,11 @@ }, { "name": "components_common_htmls", - "seq": 39 + "seq": 41 }, { "name": "components_common_images", - "seq": 15 + "seq": 16 }, { "name": "components_common_text_blocks", @@ -41,7 +41,7 @@ }, { "name": "components_home_get_involveds_components", - "seq": 11 + "seq": 21 }, { "name": "components_home_hero_images", @@ -49,11 +49,11 @@ }, { "name": "components_home_hero_images_components", - "seq": 23 + "seq": 33 }, { "name": "components_home_impact_numbers", - "seq": 4 + "seq": 5 }, { "name": "components_home_impact_sections", @@ -61,7 +61,7 @@ }, { "name": "components_home_impact_sections_components", - "seq": 15 + "seq": 33 }, { "name": "components_home_mission_statements", @@ -69,7 +69,7 @@ }, { "name": "components_home_mission_statements_components", - "seq": 11 + "seq": 16 }, { "name": "components_home_project_summaries", @@ -77,7 +77,7 @@ }, { "name": "components_home_project_summaries_components", - "seq": 28 + "seq": 33 }, { "name": "donate_contents", @@ -105,15 +105,15 @@ }, { "name": "files", - "seq": 127 + "seq": 132 }, { "name": "files_folder_links", - "seq": 106 + "seq": 110 }, { "name": "files_related_morphs", - "seq": 335 + "seq": 366 }, { "name": "home_contents", @@ -121,7 +121,7 @@ }, { "name": "home_contents_components", - "seq": 42 + "seq": 67 }, { "name": "members", @@ -141,7 +141,7 @@ }, { "name": "resources", - "seq": 6 + "seq": 7 }, { "name": "resources_components", @@ -153,11 +153,11 @@ }, { "name": "upload_folders", - "seq": 16 + "seq": 17 }, { "name": "upload_folders_parent_links", - "seq": 3 + "seq": 4 }, { "name": "volunteer_contents", @@ -165,7 +165,7 @@ }, { "name": "volunteer_contents_components", - "seq": 92 + "seq": 98 }, { "name": "volunteer_contents_faqs_links", diff --git a/data/db-json/upload_folders.json b/data/db-json/upload_folders.json index 04f99f5..1af4670 100644 --- a/data/db-json/upload_folders.json +++ b/data/db-json/upload_folders.json @@ -148,5 +148,15 @@ "path_id": 15, "updated_at": 1711246253618, "updated_by_id": 1 + }, + { + "created_at": 1711382028811, + "created_by_id": 2, + "id": 17, + "name": "Transforming Learning Environments", + "path": "/5/16", + "path_id": 16, + "updated_at": 1711382028811, + "updated_by_id": 2 } ] diff --git a/data/db-json/upload_folders_parent_links.json b/data/db-json/upload_folders_parent_links.json index 537aefe..ebf0ea3 100644 --- a/data/db-json/upload_folders_parent_links.json +++ b/data/db-json/upload_folders_parent_links.json @@ -16,5 +16,11 @@ "folder_order": 2, "id": 3, "inv_folder_id": 8 + }, + { + "folder_id": 17, + "folder_order": 2, + "id": 4, + "inv_folder_id": 6 } ] diff --git a/data/db-json/volunteer_contents.json b/data/db-json/volunteer_contents.json index fd1f97a..a83914d 100644 --- a/data/db-json/volunteer_contents.json +++ b/data/db-json/volunteer_contents.json @@ -4,7 +4,7 @@ "created_by_id": 1, "id": 1, "published_at": 1675740333721, - "updated_at": 1709705183466, + "updated_at": 1713212056661, "updated_by_id": 1 } ] diff --git a/data/db-json/volunteer_contents_components.json b/data/db-json/volunteer_contents_components.json index f9206e0..f353f58 100644 --- a/data/db-json/volunteer_contents_components.json +++ b/data/db-json/volunteer_contents_components.json @@ -4,7 +4,7 @@ "component_type": "common.html", "entity_id": 1, "field": "Content", - "id": 87, + "id": 93, "order": 1 }, { @@ -12,7 +12,7 @@ "component_type": "common.html", "entity_id": 1, "field": "Content", - "id": 88, + "id": 94, "order": 2 }, { @@ -20,7 +20,7 @@ "component_type": "common.image", "entity_id": 1, "field": "Content", - "id": 89, + "id": 95, "order": 3 }, { @@ -28,7 +28,7 @@ "component_type": "common.html", "entity_id": 1, "field": "Content", - "id": 90, + "id": 96, "order": 4 }, { @@ -36,7 +36,7 @@ "component_type": "common.html", "entity_id": 1, "field": "Content", - "id": 91, + "id": 97, "order": 5 }, { @@ -44,7 +44,7 @@ "component_type": "common.action-button", "entity_id": 1, "field": "Content", - "id": 92, + "id": 98, "order": 6 } ] diff --git a/data/public/uploads/Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png b/data/public/uploads/Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png new file mode 100644 index 0000000..fc286bc Binary files /dev/null and b/data/public/uploads/Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png differ diff --git a/data/public/uploads/p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png b/data/public/uploads/p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png new file mode 100644 index 0000000..c55033b Binary files /dev/null and b/data/public/uploads/p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png differ diff --git a/data/public/uploads/thumbnail_Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png b/data/public/uploads/thumbnail_Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png new file mode 100644 index 0000000..440fb41 Binary files /dev/null and b/data/public/uploads/thumbnail_Screenshot_2024_02_21_12_45_59_PM_6ee435eceb.png differ diff --git a/data/public/uploads/thumbnail_p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png b/data/public/uploads/thumbnail_p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png new file mode 100644 index 0000000..e874c23 Binary files /dev/null and b/data/public/uploads/thumbnail_p5_3522_Kx9_Cm_BW_wqf_Ir23o2qs_B_Lw_Typy_K9_HG_1_R_3_DR_6r_Y2fgnu_B8_Wt_SOC_4ppdn0_W1_E5_T1_P_Gg_Z_Lrx5_62alm1_Mh_od_Lhld_S5uqa_IW_Lvg0_P_Brg_Slvqjt_Jp_XY_463_Gk_Ths_P36v_Jo_JRE_17_F6_QPS_Ajb2g_6a62300f0a.png differ diff --git a/docs/deployment.md b/docs/deployment.md index 0612082..86a2e41 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -4,16 +4,20 @@ The main website is setup to build and export as a static site, so that it can be hosted on any hosting platform without need for additional server infrastructure (e.g. Database, Cloud Functions) -First, any content from the staging site should be imported locally +Then there is e a single script that handles the process of generating static content, (optionally) preview locally, and upload to Vercel hosting platform + +First you may wish to replicate current production data into local environment ```sh -yarn scripts strapi import +yarn scripts strapi export --environment docker +yarn scripts strapi import --environment development + ``` -Then there is e a single script that handles the process of generating static content, (optionally) preview locally, and upload to Vercel hosting platform +Then build can be initiated by ```sh -yarn build +yarn scripts cli build --environment development --no-export ``` ## Staging Site diff --git a/frontend/components/common/htmlContent.tsx b/frontend/components/common/htmlContent.tsx index ab58e62..3abfd6d 100644 --- a/frontend/components/common/htmlContent.tsx +++ b/frontend/components/common/htmlContent.tsx @@ -1,6 +1,39 @@ export const HTMLContent = ({ children, className = "" }) => (
); + +function cleanHTML(html: string) { + try { + html = stripStyles(html); + html = replaceEmptyLines(html); + } finally { + return html; + } +} + +/** + * Remove any hardcoded color, background or font-family styling + * These are commonly populated if content copy-pasted from a google doc + */ +function stripStyles(html: string) { + const removedStyles = ["background-color", "color", "background", "font-family"]; + const styleRegex = /style="([^"]*)"/gi; + return html.replace(styleRegex, (s, ...args) => { + const inlineStyle: string = args[0]; + const cleanedStyles = inlineStyle + .split(";") + .filter((s) => { + const [key] = s.split(":").map((v) => v.trim()); + return !removedStyles.includes(key); + }) + .join(";"); + return cleanedStyles ? `style="${cleanedStyles}"` : ""; + }); +} + +function replaceEmptyLines(html: string) { + return html.replace(/

(
)* <\/p>/gi, ""); +} diff --git a/frontend/components/content/blog-post/post.tsx b/frontend/components/content/blog-post/post.tsx index 8d7adea..0aeb8ec 100644 --- a/frontend/components/content/blog-post/post.tsx +++ b/frontend/components/content/blog-post/post.tsx @@ -15,7 +15,7 @@ export const BlogPostComponent: React.FC<{ blogPost: IBlogPost }> = ({ blogPost const url = window.location.href; const contentBlocks = blogPost.ContentBlocks || []; return ( - <> +

{blogPost.Title}

{dayjs(blogPost.DateWritten).format("MMM D, YYYY")} @@ -27,7 +27,6 @@ export const BlogPostComponent: React.FC<{ blogPost: IBlogPost }> = ({ blogPost ))} */}
-
Share this Blog with your community:
@@ -57,6 +56,6 @@ export const BlogPostComponent: React.FC<{ blogPost: IBlogPost }> = ({ blogPost
- + ); }; diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index ea88231..d92ed21 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "ES2015", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, diff --git a/package.json b/package.json index fee19cf..2b81a20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sami-website", - "version": "1.4.0", + "version": "1.5.0", "license": "see license.md", "workspaces": [ "backend", diff --git a/scripts/src/commands/cli/build-deploy-ssg.ts b/scripts/src/commands/cli/build-deploy-ssg.ts index e94fff9..0b6d003 100644 --- a/scripts/src/commands/cli/build-deploy-ssg.ts +++ b/scripts/src/commands/cli/build-deploy-ssg.ts @@ -82,7 +82,7 @@ class BuildCmd { // Ensure data exported if (shouldExport === undefined) { - shouldExport = await promptConfirm("Would you like to export local data first?", false); + shouldExport = await promptConfirm("Would you like to export data first?", false); } if (shouldExport) { console.log(chalk.gray("Ensuring data exported")); @@ -153,11 +153,9 @@ class BuildCmd { if (NEXT_CONFIG_MODE === "export") { buildScript = `yarn next build && yarn next-export-optimize-images`; } - // Standalone builder calls vercel - // NOTE - this will require vercel.json having correct `nextJS` framework assigned - // It also produces files with symlinks that fail to upload on windows + // If building for standalone deployment will still need to call `yarn vercel build` later if (NEXT_CONFIG_MODE === "standalone") { - buildScript = `yarn next build && yarn vercel build`; + buildScript = `yarn next build`; } return { name: "nextjs",