From fbf2c64af1e39b9c7156de358cae88038ec8c7eb Mon Sep 17 00:00:00 2001 From: shadinaif Date: Wed, 19 Mar 2025 15:54:36 +0300 Subject: [PATCH 1/3] docs: theme designer JSON structure --- theme_v2_json_structure.py | 351 +++++++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 theme_v2_json_structure.py diff --git a/theme_v2_json_structure.py b/theme_v2_json_structure.py new file mode 100644 index 00000000..87798cd5 --- /dev/null +++ b/theme_v2_json_structure.py @@ -0,0 +1,351 @@ +all = { + "pages": { + "home": { # API key: pages_home GET values key=pages_home + "title": { + "ar": "الرئيسية", + "en": "home" + }, + # //{atom name}_{section}_{index} + "sections": [ + { + "key": "hero_home_1", + #-- the key is mandatory + "type": "hero", + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "image": { + "ar":"url", + "en":"url" + } + }, + { + "key": "two_columns_home_1", + #-- the key is mandatory + "type": "two_columns", + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "columns_Section": [ + #--first column + { + "key": "first_column",#-- the key is mandatory + "title": { + "ar": "عربي", + "en": "Our Vision" + }, + "description": { + "ar": "عربي", + "en": "Our Vision description" + }, + "content_alignment": "start", + #-- 'start'|'end', + "icon": "checkmark", + #--#-- other icon names might be set here + }, + #--second column + { + "key": "second_column",#-- the key is mandatory + "title": { + "ar": "عربي", + "en": "Our mission" + }, + "description": { + "ar": "عربي", + "en": "Our mission description" + }, + "content_alignment": "start", + #-- 'start'|'end', + "icon": "checkmark", + #--#-- other icon names might be set here + } + ], + }, + { + "key": "featured_courses_home_1", + "type": "featured_courses", + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "grid_type": "9" #-- accept 3 | 6 | 9 | all + }, + { + "key": "static_metrics_section_home_1", + "type": "static_metrics_section", + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "alignment": "center", + #-- start | end | center + "list_of_static_metrics": [ + { + "key": "metric_1", + "title": { + "ar": "4 ملايين", + "en": "4M+" + }, + "description": { + "ar": "4 ملايين", + "en": "4M+" + }, + }, + { + "key": "metric_2", + "title": { + "ar": "4 ملايين", + "en": "4M+" + }, + "description": { + "ar": "4 ملايين", + "en": "4M+" + }, + }, + { + "key": "metric_3", + "title": { + "ar": "4 ملايين", + "en": "4M+" + }, + "description": { + "ar": "4 ملايين", + "en": "4M+" + }, + } + ] + }, + { + "key": "live_metrics_section_home_1", + "type": "live_metrics_section", + "options": [ + { + "key": "courses", + "is_checked": True, + #-- the value is boolen + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + }, + { + "key": "learners", + "is_checked": True, + #-- the value is boolen + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + }, + { + "key": "instructors", + "is_checked": True, + #-- the value is boolen + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + } + ] + }, + ] + }, + "courses": { + #--#-- API key: pages_courses + }, + "about_us": { + #--#-- API key: pages_about_us + }, + "terms": { + #--#-- API key: pages_terms + }, + "contact_us": { + #--#-- API key: pages_contact_us + }, + "pages_custom_page_1": { + #--#-- API key: pages_custom_page_1 + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, # .... the rest of the properties + #--#-- other details similar to home + }, + "pages_custom_page_2": { + #--#-- API key: pages_custom_page_2 + "title": { + "ar": "عربي2", + "en": "something2" + }, # .... the rest of the properties + }, + "pages_custom_page_3": { #-- API key: pages_custom_page_3 + "title": { + "ar": "عربي3", + "en": "something3" + }, # .... the rest of the properties + }, + + "pages_custom_page_4": {}, #-- API key: pages_custom_page_4 + + "pages_custom_page_5": {}, #-- API key: pages_custom_page_5 + + "pages_custom_page_6": {}, #-- API key: pages_custom_page_6 + # ....... to pages_custom_page_50 + }, + + "custom_pages": [ #--#-- API key: custom_pages + "pages_custom_page_1", + "pages_custom_page_2", + "pages_custom_page_5" + ], + + + "visual_identity": { + "colors": { + "primary_color: "#00ff00", #-- API key: colors_primary_color + "secondery_color: "#00ff00", #-- API key: colors_secondery_color + }, + "fonts": { + "headind": { #-- API key: fonts_heading + "ar":"", + "en":"" + }, + "text": { #-- API key: fonts_text + "ar":"", + "en":"" + } + } + }, + + "platform_settings": { #-- API key: platform_settings + "site_name": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "subtitle": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "favicon": ' url', + "thumbnail": ' url', + "social_media_image": ' url', + "meta_description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + }, + + "footer": { + "sections": [ #-- API key: footer_sections + { + "key": "option_1", + "link_title": { + "ar": "", + "en": "" + }, + "page": "courses", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + { + "key": "option_2", + "link_title": { + "ar": "", + "en": "" + }, + "page": "about_us", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + { + "key": "option_3", + "link_title": { + "ar": "", + "en": "" + }, + "page": "pages_custom_page_1", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + ], + "social_media_links": [ #-- API key: footer_social_media_links + { + "provider": "facebook", + "value": "url" + }, + { + "provider": "x", + "value": "url" + } + ] + }, + + "header": { + "sections": [ #-- API key: header_sections + { + "key": "option_1", + "link_title": { + "ar": "", + "en": "" + }, + "page": "courses", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + { + "key": "option_2", + "link_title": { + "ar": "", + "en": "" + }, + "page": "about_us", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + { + "key": "option_3", + "link_title": { + "ar": "", + "en": "" + }, + "page": "pages_custom_page_1", # or home, about_us, pages_custom_page_1, ... or https:// + #-- Display one of the list of pages, + "new_tab": True, + }, + ], + "logo": { #-- API key: header_logo + "ar": "url", + "en": "url" + }, + "combined_login": True, #-- API key: header_combined_login + }, +} From 1c5b177b6d6bc9c5e31cdd77f5da50bd7f1f181c Mon Sep 17 00:00:00 2001 From: shadinaif Date: Mon, 24 Mar 2025 14:48:34 +0300 Subject: [PATCH 2/3] docs: updates after review --- theme_v2_json_structure.py | 120 ++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/theme_v2_json_structure.py b/theme_v2_json_structure.py index 87798cd5..4ef9eba8 100644 --- a/theme_v2_json_structure.py +++ b/theme_v2_json_structure.py @@ -1,16 +1,15 @@ -all = { +theme_v2 = { "pages": { "home": { # API key: pages_home GET values key=pages_home - "title": { - "ar": "الرئيسية", - "en": "home" - }, + "slug": "unique-custom-slug", + # //{atom name}_{section}_{index} "sections": [ { "key": "hero_home_1", #-- the key is mandatory - "type": "hero", + "type": "hero_v1", + "visible": True, "title": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -19,15 +18,13 @@ "ar": "المعهد العقاري", "en": "SREI excellence" }, - "image": { - "ar":"url", - "en":"url" - } + "image": "url" }, { "key": "two_columns_home_1", #-- the key is mandatory - "type": "two_columns", + "type": "two_columns_v1", + "visible": True, "title": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -36,7 +33,7 @@ "ar": "المعهد العقاري", "en": "SREI excellence" }, - "columns_Section": [ + "columns_section": [ #--first column { "key": "first_column",#-- the key is mandatory @@ -49,8 +46,8 @@ "en": "Our Vision description" }, "content_alignment": "start", - #-- 'start'|'end', - "icon": "checkmark", + #-- 'start'| 'center' | 'end', + "icon": "fa-check", #--#-- other icon names might be set here }, #--second column @@ -65,15 +62,16 @@ "en": "Our mission description" }, "content_alignment": "start", - #-- 'start'|'end', - "icon": "checkmark", + #-- 'start'| 'center' | 'end', + "icon": "fa-check", #--#-- other icon names might be set here } ], }, { "key": "featured_courses_home_1", - "type": "featured_courses", + "type": "featured_courses_v1", + "visible": True, "title": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -82,11 +80,12 @@ "ar": "المعهد العقاري", "en": "SREI excellence" }, - "grid_type": "9" #-- accept 3 | 6 | 9 | all + "grid_type": "max-9" #-- accept max-3 | max-6 | max-9 | all | categorised }, { "key": "static_metrics_section_home_1", - "type": "static_metrics_section", + "type": "static_metrics_section_v1", + "visible": True, "title": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -135,16 +134,13 @@ }, { "key": "live_metrics_section_home_1", - "type": "live_metrics_section", + "type": "live_metrics_section_v1", + "visible": True, "options": [ { "key": "courses", "is_checked": True, - #-- the value is boolen - "title": { - "ar": "المعهد العقاري", - "en": "SREI excellence" - }, + #-- the value is boolean "description": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -153,11 +149,7 @@ { "key": "learners", "is_checked": True, - #-- the value is boolen - "title": { - "ar": "المعهد العقاري", - "en": "SREI excellence" - }, + #-- the value is boolean "description": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -166,11 +158,7 @@ { "key": "instructors", "is_checked": True, - #-- the value is boolen - "title": { - "ar": "المعهد العقاري", - "en": "SREI excellence" - }, + #-- the value is boolean "description": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -194,48 +182,53 @@ }, "pages_custom_page_1": { #--#-- API key: pages_custom_page_1 - "title": { - "ar": "المعهد العقاري", - "en": "SREI excellence" - }, # .... the rest of the properties + "sections": [ + # .... the rest of the properties + ], #--#-- other details similar to home }, "pages_custom_page_2": { #--#-- API key: pages_custom_page_2 - "title": { - "ar": "عربي2", - "en": "something2" - }, # .... the rest of the properties + "slug": "unique-custom-slug", + + "sections": [ + # .... the rest of the properties + ], + #--#-- other details similar to home }, "pages_custom_page_3": { #-- API key: pages_custom_page_3 - "title": { - "ar": "عربي3", - "en": "something3" - }, # .... the rest of the properties + "slug": "unique-custom-slug", + + "sections": [ + # .... the rest of the properties + ], + #--#-- other details similar to home }, "pages_custom_page_4": {}, #-- API key: pages_custom_page_4 "pages_custom_page_5": {}, #-- API key: pages_custom_page_5 - "pages_custom_page_6": {}, #-- API key: pages_custom_page_6 - # ....... to pages_custom_page_50 + "pages_custom_page_6": {}, # -- API key: pages_custom_page_6 + + "pages_custom_page_7": {}, #-- API key: pages_custom_page_7 + + "pages_custom_page_8": {}, #-- API key: pages_custom_page_8 }, - "custom_pages": [ #--#-- API key: custom_pages + "custom_pages": [ #--#-- API key: custom_pages, maximum 8 pages "pages_custom_page_1", "pages_custom_page_2", "pages_custom_page_5" ], - "visual_identity": { "colors": { "primary_color: "#00ff00", #-- API key: colors_primary_color - "secondery_color: "#00ff00", #-- API key: colors_secondery_color + "secondary_color: "#00ff00", #-- API key: colors_secondary_color }, "fonts": { - "headind": { #-- API key: fonts_heading + "heading": { #-- API key: fonts_heading "ar":"", "en":"" }, @@ -247,6 +240,12 @@ }, "platform_settings": { #-- API key: platform_settings + "language": { #-- API key: platform_settings_language + "languages": [ + "ar", "en", "fr" + ], + "default_language": "ar", + }, "site_name": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -255,9 +254,9 @@ "ar": "المعهد العقاري", "en": "SREI excellence" }, - "favicon": ' url', - "thumbnail": ' url', - "social_media_image": ' url', + "favicon": "url", + "thumbnail": "url", + "social_media_image": "url", "meta_description": { "ar": "المعهد العقاري", "en": "SREI excellence" @@ -342,10 +341,11 @@ "new_tab": True, }, ], - "logo": { #-- API key: header_logo - "ar": "url", - "en": "url" - }, "combined_login": True, #-- API key: header_combined_login }, } + +root_settings = { + "logo_image_url": "url", #-- API key: logo_url + "PLATFORM_NAME": "", #-- API key: platform_name +} From a36b8bdd7fbb09a57fb50267bfb271df420bd4f7 Mon Sep 17 00:00:00 2001 From: shadinaif Date: Tue, 25 Mar 2025 16:19:03 +0300 Subject: [PATCH 3/3] docs: added sections --- theme_v2_json_structure.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/theme_v2_json_structure.py b/theme_v2_json_structure.py index 4ef9eba8..aeb352f4 100644 --- a/theme_v2_json_structure.py +++ b/theme_v2_json_structure.py @@ -6,7 +6,7 @@ # //{atom name}_{section}_{index} "sections": [ { - "key": "hero_home_1", + "key": "hero_v1_home_1", #-- the key is mandatory "type": "hero_v1", "visible": True, @@ -21,7 +21,7 @@ "image": "url" }, { - "key": "two_columns_home_1", + "key": "two_columns_v1_home_1", #-- the key is mandatory "type": "two_columns_v1", "visible": True, @@ -69,7 +69,22 @@ ], }, { - "key": "featured_courses_home_1", + "key": "side_image_v1_home_1", + "type": "side_image_v1", + "visible": True, + "title": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "description": { + "ar": "المعهد العقاري", + "en": "SREI excellence" + }, + "image": "url", + "reversed": False, #-- False: flex: row | True: flex: row-reverse + }, + { + "key": "featured_courses_v1_home_1", "type": "featured_courses_v1", "visible": True, "title": { @@ -83,7 +98,7 @@ "grid_type": "max-9" #-- accept max-3 | max-6 | max-9 | all | categorised }, { - "key": "static_metrics_section_home_1", + "key": "static_metrics_section_v1_home_1", "type": "static_metrics_section_v1", "visible": True, "title": { @@ -133,7 +148,7 @@ ] }, { - "key": "live_metrics_section_home_1", + "key": "live_metrics_section_v1_home_1", "type": "live_metrics_section_v1", "visible": True, "options": [