wagtail-cjkcms 24.3.1__py2.py3-none-any.whl → 25.1.6__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. cjkcms/.DS_Store +0 -0
  2. cjkcms/__init__.py +1 -1
  3. cjkcms/blocks/__init__.py +4 -0
  4. cjkcms/blocks/content/countdown.py +116 -0
  5. cjkcms/blocks/content_blocks.py +46 -9
  6. cjkcms/migrations/0018_layoutsettings_search_format.py +10 -5
  7. cjkcms/migrations/0019_layoutsettings_searchbox_input_class_and_more.py +28 -11
  8. cjkcms/migrations/0020_socialmediasettings_github_and_more.py +18 -11
  9. cjkcms/migrations/0021_remove_layoutsettings_navbar_color_scheme_and_more.py +85 -0
  10. cjkcms/migrations/0022_cjkcmspage_breadcrumb_label_and_more.py +23 -0
  11. cjkcms/migrations/0023_alter_navbar_language.py +18 -0
  12. cjkcms/models/admin_sidebar.py +0 -28
  13. cjkcms/models/page_models.py +33 -0
  14. cjkcms/models/snippet_models.py +22 -7
  15. cjkcms/models/wagtailsettings_models.py +40 -21
  16. cjkcms/settings.py +96 -64
  17. cjkcms/static/.DS_Store +0 -0
  18. cjkcms/static/cjkcms/css/cjkcms-custom-theme-disabled.css +73 -0
  19. cjkcms/static/cjkcms/css/cjkcms-front.css +41 -5
  20. cjkcms/static/cjkcms/js/cjkcms-front.js +2 -2
  21. cjkcms/static/vendor/.DS_Store +0 -0
  22. cjkcms/static/vendor/mdb/.DS_Store +0 -0
  23. cjkcms/static/vendor/mdb/css/.DS_Store +0 -0
  24. cjkcms/static/vendor/mdb/css/mdb.min.css +18 -0
  25. cjkcms/static/vendor/mdb/css/mdb.min.css.map +1 -0
  26. cjkcms/static/vendor/mdb/js/.DS_Store +0 -0
  27. cjkcms/static/vendor/mdb/js/mdb.umd.min.js +21 -0
  28. cjkcms/static/vendor/mdb/js/mdb.umd.min.js.map +1 -0
  29. cjkcms/static/vendor/simplycountdown/css/circle.css +73 -0
  30. cjkcms/static/vendor/simplycountdown/css/cyber.css +155 -0
  31. cjkcms/static/vendor/simplycountdown/css/dark.css +85 -0
  32. cjkcms/static/vendor/simplycountdown/css/light.css +85 -0
  33. cjkcms/static/vendor/simplycountdown/css/losange.css +83 -0
  34. cjkcms/static/vendor/simplycountdown/js/simplyCountdown.umd.js +2 -0
  35. cjkcms/static/vendor/simplycountdown/js/simplyCountdown.umd.js.map +1 -0
  36. cjkcms/templates/.DS_Store +0 -0
  37. cjkcms/templates/404.html +72 -104
  38. cjkcms/templates/cjkcms/.DS_Store +0 -0
  39. cjkcms/templates/cjkcms/blocks/base_link_block.html +48 -51
  40. cjkcms/templates/cjkcms/blocks/button_block.html +2 -2
  41. cjkcms/templates/cjkcms/blocks/card_landing1.html +2 -2
  42. cjkcms/templates/cjkcms/blocks/card_landing2.html +3 -3
  43. cjkcms/templates/cjkcms/blocks/countdown.html +24 -0
  44. cjkcms/templates/cjkcms/blocks/highlight_block.html +21 -0
  45. cjkcms/templates/cjkcms/blocks/pricelistitem_block.html +9 -5
  46. cjkcms/templates/cjkcms/pages/base.html +3 -3
  47. cjkcms/templates/cjkcms/pages/page.mini.html +1 -1
  48. cjkcms/templates/cjkcms/pages/search.html +10 -1
  49. cjkcms/templates/cjkcms/robots.txt +0 -4
  50. cjkcms/templates/cjkcms/snippets/breadcrumbs.html +2 -2
  51. cjkcms/templates/cjkcms/snippets/frontend_assets.html +8 -0
  52. cjkcms/templates/cjkcms/snippets/navbar.html +12 -9
  53. cjkcms/templates/cjkcms/snippets/navbar_search.html +6 -35
  54. cjkcms/templates/cjkcms/snippets/navbar_search_modal.html +34 -0
  55. cjkcms/templatetags/cjkcms_tags.py +80 -17
  56. cjkcms/tests/test_countdown_block.py +100 -0
  57. cjkcms/tests/test_search_blocks.py +10 -10
  58. cjkcms/tests/test_templatetags.py +19 -1
  59. cjkcms/tests/test_urls.py +8 -6
  60. cjkcms/urls.py +3 -0
  61. cjkcms/views.py +80 -78
  62. cjkcms/wagtail_hooks.py +37 -5
  63. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/METADATA +6 -6
  64. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/RECORD +70 -42
  65. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/WHEEL +1 -1
  66. /cjkcms/tests/media/images/{test_d8sVYy7.original.png → test_O3GLriA.original.png} +0 -0
  67. /cjkcms/tests/media/original_images/{test_d8sVYy7.png → test_O3GLriA.png} +0 -0
  68. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/LICENSE +0 -0
  69. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/entry_points.txt +0 -0
  70. {wagtail_cjkcms-24.3.1.dist-info → wagtail_cjkcms-25.1.6.dist-info}/top_level.txt +0 -0
cjkcms/templates/404.html CHANGED
@@ -1,94 +1,56 @@
1
1
  {% extends "cjkcms/pages/web_page_notitle.html" %}
2
2
 
3
3
  {% block custom_assets %}
4
- <style>
5
- body {
6
- background-color: #FFFFFF;
7
- }
8
- svg {
9
- position: absolute;
10
- top: 50%;
11
- left: 50%;
12
- margin-top: -250px;
13
- margin-left: -400px;
14
- }
15
- .message-box {
16
- height: 200px;
17
- width: 380px;
18
- position: absolute;
19
- top: 50%;
20
- left: 50%;
21
- margin-top: -100px;
22
- margin-left: 50px;
23
- color: #333;
24
- font-family: Roboto;
25
- font-weight: 300;
26
- }
27
- .message-box h1 {
28
- font-size: 60px;
29
- line-height: 46px;
30
- margin-bottom: 40px;
31
- }
32
- .buttons-con .action-link-wrap {
33
- margin-top: 40px;
34
- }
35
- .buttons-con .action-link-wrap a {
36
- background: #68c950;
37
- padding: 8px 25px;
38
- border-radius: 4px;
39
- color: #333;
40
- font-weight: bold;
41
- font-size: 14px;
42
- transition: all 0.3s linear;
43
- cursor: pointer;
44
- text-decoration: none;
45
- margin-right: 10px
46
- }
47
- .buttons-con .action-link-wrap a:hover {
48
- background: #5A5C6C;
49
- color: #333;
50
- }
51
-
52
- #Polygon-1 , #Polygon-2 , #Polygon-3 , #Polygon-4 , #Polygon-4, #Polygon-5 {
53
- animation: float 1s infinite ease-in-out alternate;
54
- }
55
- #Polygon-2 {
56
- animation-delay: .2s;
57
- }
58
- #Polygon-3 {
59
- animation-delay: .4s;
60
- }
61
- #Polygon-4 {
62
- animation-delay: .6s;
63
- }
64
- #Polygon-5 {
65
- animation-delay: .8s;
66
- }
67
-
68
- @keyframes float {
69
- 100% {
70
- transform: translateY(20px);
71
- }
72
- }
73
- @media (max-width: 450px) {
74
- svg {
75
- position: absolute;
76
- top: 50%;
77
- left: 50%;
78
- margin-top: -250px;
79
- margin-left: -190px;
80
- width: 190px;
81
- height: 250px;
82
- }
83
- .message-box {
84
- top: 50%;
85
- left: 50%;
86
- margin-top: -100px;
87
- margin-left: -190px;
88
- text-align: center;
89
- }
90
- }
91
- </style>
4
+ <style>
5
+ body {
6
+ background-color: #FFFFFF;
7
+ }
8
+ .message-box h1 {
9
+ font-size: 60px;
10
+ line-height: 46px;
11
+ margin-bottom: 40px;
12
+ }
13
+ .buttons-con .action-link-wrap {
14
+ margin-top: 40px;
15
+ }
16
+ .buttons-con .action-link-wrap a {
17
+ background: #68c950;
18
+ padding: 8px 25px;
19
+ border-radius: 4px;
20
+ color: #333;
21
+ font-weight: bold;
22
+ font-size: 14px;
23
+ transition: all 0.3s linear;
24
+ cursor: pointer;
25
+ text-decoration: none;
26
+ margin-right: 10px
27
+ }
28
+ .buttons-con .action-link-wrap a:hover {
29
+ background: #5A5C6C;
30
+ color: #333;
31
+ }
32
+ #Polygon-1 , #Polygon-2 , #Polygon-3 , #Polygon-4 , #Polygon-4, #Polygon-5 {
33
+ animation: float 1s infinite ease-in-out alternate;
34
+ }
35
+ #Polygon-2 {
36
+ animation-delay: .2s;
37
+ }
38
+ #Polygon-3 {
39
+ animation-delay: .4s;
40
+ }
41
+ #Polygon-4 {
42
+ animation-delay: .6s;
43
+ }
44
+ #Polygon-5 {
45
+ animation-delay: .8s;
46
+ }
47
+ @keyframes float {
48
+ 100% {
49
+ transform: translateY(20px);
50
+ }
51
+ }
52
+
53
+ </style>
92
54
  {% endblock %}
93
55
 
94
56
  {% block title %}Page not found{% endblock %}
@@ -96,22 +58,28 @@
96
58
  {% block body_class %}404{% endblock %}
97
59
 
98
60
  {% block content_body %}
99
- <svg width="380px" height="500px" viewBox="0 0 837 1045" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
100
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
101
- <path d="M353,9 L626.664028,170 L626.664028,487 L353,642 L79.3359724,487 L79.3359724,170 L353,9 Z" id="Polygon-1" stroke="#007FB2" stroke-width="6" sketch:type="MSShapeGroup"></path>
102
- <path d="M78.5,529 L147,569.186414 L147,648.311216 L78.5,687 L10,648.311216 L10,569.186414 L78.5,529 Z" id="Polygon-2" stroke="#EF4A5B" stroke-width="6" sketch:type="MSShapeGroup"></path>
103
- <path d="M773,186 L827,217.538705 L827,279.636651 L773,310 L719,279.636651 L719,217.538705 L773,186 Z" id="Polygon-3" stroke="#795D9C" stroke-width="6" sketch:type="MSShapeGroup"></path>
104
- <path d="M639,529 L773,607.846761 L773,763.091627 L639,839 L505,763.091627 L505,607.846761 L639,529 Z" id="Polygon-4" stroke="#F2773F" stroke-width="6" sketch:type="MSShapeGroup"></path>
105
- <path d="M281,801 L383,861.025276 L383,979.21169 L281,1037 L179,979.21169 L179,861.025276 L281,801 Z" id="Polygon-5" stroke="#36B455" stroke-width="6" sketch:type="MSShapeGroup"></path>
106
- </g>
107
- </svg>
108
- <div class="message-box">
109
- <h1>404</h1>
110
- <p>Page not found</p>
111
- <div class="buttons-con">
112
- <div class="action-link-wrap">
113
- <a onclick="history.back(-1)" class="link-button link-back-button">Go Back</a>
114
- <a href="/" class="link-button">Go to Home Page</a>
61
+ <div class="container d-flex justify-content-center align-items-center">
62
+ <div class="row">
63
+ <div class="col-md-6 d-flex justify-content-center">
64
+ <svg width="380px" height="500px" viewBox="0 0 837 1045" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
65
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
66
+ <path d="M353,9 L626.664028,170 L626.664028,487 L353,642 L79.3359724,487 L79.3359724,170 L353,9 Z" id="Polygon-1" stroke="#007FB2" stroke-width="6" sketch:type="MSShapeGroup"></path>
67
+ <path d="M78.5,529 L147,569.186414 L147,648.311216 L78.5,687 L10,648.311216 L10,569.186414 L78.5,529 Z" id="Polygon-2" stroke="#EF4A5B" stroke-width="6" sketch:type="MSShapeGroup"></path>
68
+ <path d="M773,186 L827,217.538705 L827,279.636651 L773,310 L719,279.636651 L719,217.538705 L773,186 Z" id="Polygon-3" stroke="#795D9C" stroke-width="6" sketch:type="MSShapeGroup"></path>
69
+ <path d="M639,529 L773,607.846761 L773,763.091627 L639,839 L505,763.091627 L505,607.846761 L639,529 Z" id="Polygon-4" stroke="#F2773F" stroke-width="6" sketch:type="MSShapeGroup"></path>
70
+ <path d="M281,801 L383,861.025276 L383,979.21169 L281,1037 L179,979.21169 L179,861.025276 L281,801 Z" id="Polygon-5" stroke="#36B455" stroke-width="6" sketch:type="MSShapeGroup"></path>
71
+ </g>
72
+ </svg>
73
+ </div>
74
+ <div class="col-md-6 d-flex flex-column justify-content-center align-items-start">
75
+ <h1>404</h1>
76
+ <p>Page not found</p>
77
+ <div class="buttons-con">
78
+ <div class="action-link-wrap">
79
+ <a onclick="history.back(-1)" class="link-button link-back-button">Go Back</a>
80
+ <a href="/" class="link-button">Go to Home Page</a>
81
+ </div>
82
+ </div>
115
83
  </div>
116
84
  </div>
117
85
  </div>
Binary file
@@ -1,59 +1,56 @@
1
1
  {% load cjkcms_tags wagtailcore_tags wagtailimages_tags %}
2
2
 
3
3
  {% block menu_item %}
4
- {% can_show_item value.visible_for as csi %}
5
- {% if csi %}
6
- {% if value.page.live or value.link or value.document %}
7
- {% is_menu_item_dropdown value as has_dropdown %}
8
- <li class="{{liclass}} {% if has_dropdown %}dropdown{% endif %}">
9
- {% is_active_page page value.page as is_active_url %}
10
- <a href="{% block url %}#{% endblock %}"
11
- {% if value.settings.custom_id %}id="{{value.settings.custom_id}}"{% endif %}
12
- class="{{aclass}} {% if has_dropdown %}dropdown-toggle{% endif %}
13
- {% if is_active_url %}active{% endif %}
14
- {{value.settings.custom_css_class}}"
15
- {% if has_dropdown %}data-bs-toggle="dropdown" data-mdb-toggle="dropdown"
16
- role="button"
17
- aria-haspopup="true"
18
- aria-expanded="false"
4
+ {% if value.page.live or value.link or value.document %}
5
+ {% is_menu_item_dropdown value as has_dropdown %}
6
+ <li class="{{liclass}} {% if has_dropdown %}dropdown{% endif %}">
7
+ {% is_active_page page value.page as is_active_url %}
8
+ <a href="{% block url %}#{% endblock %}"
9
+ {% if value.settings.custom_id %}id="{{value.settings.custom_id}}"{% endif %}
10
+ class="{{aclass}} {% if has_dropdown %}dropdown-toggle{% endif %}
11
+ {% if is_active_url %}active{% endif %}
12
+ {{value.settings.custom_css_class}}"
13
+ {% if has_dropdown %}data-bs-toggle="dropdown"
14
+ data-mdb-dropdown-init
15
+ data-mdb-ripple-init
16
+ role="button"
17
+ aria-haspopup="true"
18
+ aria-expanded="false"
19
+ {% endif %}
20
+ {% if ga_event_label %}
21
+ data-ga-event-label="{{ ga_event_label }}"
22
+ {% endif %}
23
+ {% if ga_event_category %}
24
+ data-ga-event-category="{{ ga_event_category }}"
25
+ {% endif %}
26
+ >
27
+ {% if value.image %}
28
+ {% image value.image max-200x200 as img %}
29
+ <img src="{{img.url}}" class="w-100" alt="{{img.image.title}}"/>
30
+ {% elif value.display_text %}
31
+ {% link_display value.display_text as dt %}
32
+ {{dt|safe}}
33
+ {% elif value.page %}
34
+ {{value.page.title}}
35
+ {% elif value.document %}
36
+ {{value.document.title}}
19
37
  {% endif %}
20
- {% if ga_event_label %}
21
- data-ga-event-label="{{ ga_event_label }}"
22
- {% endif %}
23
- {% if ga_event_category %}
24
- data-ga-event-category="{{ ga_event_category }}"
25
- {% endif %}
26
- >
27
- {% if value.image %}
28
- {% image value.image max-200x200 as img %}
29
- <img src="{{img.url}}" class="w-100" alt="{{img.image.title}}"/>
30
- {% elif value.display_text %}
31
- {% link_display value.display_text as dt %}
32
- {{dt|safe}}
33
- {% elif value.page %}
34
- {{value.page.title}}
35
- {% elif value.document %}
36
- {{value.document.title}}
37
- {% endif %}
38
- </a>
38
+ </a>
39
39
 
40
40
 
41
- {% if has_dropdown %}
42
- <ul class="dropdown-menu">
43
- {% for sub_link in value.sub_links %}
44
- {% include_block sub_link with liclass="" aclass="dropdown-item" %}
41
+ {% if has_dropdown %}
42
+ <ul class="dropdown-menu">
43
+ {% for sub_link in value.sub_links %}
44
+ {% include_block sub_link with liclass="" aclass="dropdown-item" %}
45
+ {% endfor %}
46
+ {% if value.show_child_links %}
47
+ {% for child in value.page.specific.get_index_children %}
48
+ {% is_active_page page child as is_active_child %}
49
+ <li><a class="dropdown-item {% if is_active_child %}active{% endif %}" href="{% pageurl child %}">{{child.title}}</a></li>
45
50
  {% endfor %}
46
- {% if value.show_child_links %}
47
- {% for child in value.page.specific.get_index_children %}
48
- {% is_active_page page child as is_active_child %}
49
- <li><a class="dropdown-item {% if is_active_child %}active{% endif %}" href="{% pageurl child %}">{{child.title}}</a></li>
50
- {% endfor %}
51
- {% endif %}
52
- </ul>
53
- {% endif %} {# has_dropdown #}
54
- </li>
55
- {% endif %} {# value.page.live or value.link or value.document #}
56
- {% else %} {# csi #}
57
- {# NO SHOW #}
58
- {% endif %} {# csi #}
51
+ {% endif %}
52
+ </ul>
53
+ {% endif %} {# has_dropdown #}
54
+ </li>
55
+ {% endif %} {# value.page.live or value.link or value.document #}
59
56
  {% endblock %}
@@ -1,8 +1,8 @@
1
- {% load cjkcms_tags %}
1
+ {% load cjkcms_tags wagtailcore_tags %}
2
2
 
3
3
  {% can_show_item value.visible_for as csi %}
4
4
  {% if csi %}
5
- <a href="{{self.url}}"
5
+ <a href="{% if request.LANGUAGE_CODE and request.LANGUAGE_CODE|not_starts_with:'en' %}/{{ request.LANGUAGE_CODE }}{% endif %}{{ self.url }}"
6
6
  {% if settings.cjkcms.AnalyticsSettings.ga_track_button_clicks %}
7
7
  data-ga-event-category='{{self.settings.ga_tracking_event_category|default:"Button"}}'
8
8
  data-ga-event-label='{{self.settings.ga_tracking_event_label|default:self.button_title}}'
@@ -1,7 +1,7 @@
1
1
  {% load wagtailcore_tags wagtailimages_tags static txtutils_tags %}
2
2
 
3
3
  <!-- Section: Landing 1 Card -->
4
- <section class="mb-8">
4
+ <section>
5
5
 
6
6
  <style>
7
7
  .page-header {
@@ -32,7 +32,7 @@
32
32
  }
33
33
  </style>
34
34
 
35
- <div class="page-header {{self.settings.custom_css_class}}" style="min-height: 45vh;" {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}>
35
+ <div class="mb-2 pb-2 page-header {{self.settings.custom_css_class}}" style="min-height: 45vh;" {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}>
36
36
  <div class="oblique position-absolute top-0 h-100 d-md-block d-none gradient-custom-10">
37
37
  {% if self.image %}
38
38
  {% image self.image fill-900x600 as card_img %}
@@ -1,7 +1,7 @@
1
1
  {% load wagtailcore_tags wagtailimages_tags static txtutils_tags %}
2
2
 
3
3
  <!-- Section: Landing Card Type 2 -->
4
- <section class="mb-10 text-center text-md-start {{self.settings.custom_css_class}}" {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}>
4
+ <section class="mb-2 pb-2 text-center text-md-start {{self.settings.custom_css_class}}" {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}>
5
5
  {% if page.cover_image %}
6
6
  {% image page.cover_image width-1920 as card_img %}
7
7
  {% assign card_img.url as img_url %}
@@ -43,7 +43,7 @@
43
43
  </div>
44
44
  <div class="col-8 col-lg-9 col-xl-10 text-center text-md-start">
45
45
  {% if self.title %}
46
- <h1 class="fw-bold" style="color:#FF7600;">
46
+ <h1 class="fw-bold" style="color:#FFFFFF; position: relative; z-index: 1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);">
47
47
  {{self.title}}
48
48
  </h1>
49
49
  {% endif %}
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  <div class="row d-flex justify-content-center align-items-center">
58
58
  <div class="col-12" style="z-index:1">
59
- <div class="fs-5">
59
+ <div>
60
60
  {{self.description | richtext}}
61
61
  </div>
62
62
  {% if self.links %}
@@ -0,0 +1,24 @@
1
+ {% load wagtailcore_tags static %}
2
+
3
+ {% block block_render %}
4
+ {% with 'vendor/simplycountdown/css/'|add:self.theme|add:'.css' as theme_css %}
5
+ <link rel="stylesheet" href="{% static theme_css %}">
6
+ {% endwith %}
7
+ {% if self.url %}<a href="{{self.url}}" class="text-decoration-none">{% endif %}
8
+ <div class="simply-countdown-{{self.theme}} {%if self.settings.custom_css_class%}{{self.settings.custom_css_class}}{% endif %}" id="mycountdown">
9
+ {% if self.title %}<h3 class="w-100 text-center">{{ self.title }}</h3>{% endif %}
10
+ </div>
11
+ {% if self.url %}</a>{% endif %}
12
+ <script src="{% static 'vendor/simplycountdown/js/simplyCountdown.umd.js' %}"></script>
13
+ <script>
14
+ simplyCountdown("#mycountdown", {
15
+ year: {{ year }},
16
+ month: {{ month }},
17
+ day: {{ day }},
18
+ hours: {{ hour }},
19
+ minutes: {{ minute }},
20
+ seconds: {{ second }},
21
+ enableUtc: true,
22
+ });
23
+ </script>
24
+ {% endblock %}
@@ -0,0 +1,21 @@
1
+ {% load wagtailadmin_tags wagtailcore_tags wagtailimages_tags %}
2
+
3
+ <div class="card mb-3 {% if self.border_color %} border border-2 border-{{ self.border_color }}{% endif %} text-bg-{{ self.background_color }}
4
+ text-{{ self.text_color }}
5
+ {{self.settings.custom_css_class}}"
6
+ {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %}>
7
+ <div class="card-body">
8
+ <div class="d-flex justify-content-between p-md-1">
9
+ <div class="d-flex flex-row">
10
+ {% if self.icon %}
11
+ <div class="align-self-start">
12
+ <i class="{{self.icon}} fa-5x me-4"></i>
13
+ </div>
14
+ {% endif %}
15
+ <div>
16
+ {{ self.text }}
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </div>
@@ -1,16 +1,20 @@
1
1
  {% load wagtailimages_tags %}
2
2
 
3
- <div class="row">
3
+ <div class="row {%if self.settings.custom_css_class%}{{self.settings.custom_css_class}}{% endif %}">
4
4
  {% if self.image %}
5
5
  <div class="col-md-4">
6
6
  {% image self.image original as imagedata %}
7
7
  <img src="{{imagedata.url}}" alt="Photo of {{self.name}}" class="w-100" />
8
8
  </div>
9
- <div class="col-md-8" style="overflow-x: hidden;">
9
+ <div class="col-md-8">
10
10
  {% else %}
11
- <div class="col-md-12" style="overflow-x: hidden;">
11
+ <div class="col-md-12">
12
12
  {% endif %}
13
- <strong class="leaders"><span>{{self.name}}</span><span>{{self.price}}</span></strong>
14
- <div>{{self.description}}</div>
13
+ <div class="d-flex">
14
+ <span class="flex-shrink-1 fs-5">{{self.name}}</span>
15
+ <span class="leaders-dots flex-grow-1"></span>
16
+ <span class="flex-shrink-1 fs-5 text-end">{{self.price}}</span>
17
+ </div>
18
+ <div><em>{{self.description}}</em></div>
15
19
  </div>
16
20
  </div>
@@ -1,11 +1,11 @@
1
1
  {% spaceless %}
2
2
  {% load i18n static friendly_loader cjkcms_tags wagtailcore_tags wagtailimages_tags wagtailsettings_tags wagtailuserbar %}
3
3
  {% get_settings %}{% get_current_language as LANGUAGE_CODE %}
4
- {% if settings.cjkcms.LayoutSettings.frontend_theme %}{% friendly_load webpack_loader static %}{% endif %}
4
+ {% if settings.cjkcms.LayoutSettings.frontend_theme == 'python-webpack' %}{% friendly_load webpack_loader static %}{% endif %}
5
5
  {% wagtail_site as site %}
6
6
  <!doctype html>
7
7
  {% endspaceless %}
8
- <html prefix="og: http://ogp.me/ns#" lang="{{ LANGUAGE_CODE }}" >
8
+ <html prefix="og: http://ogp.me/ns#" lang="{{ LANGUAGE_CODE }}" data-mdb-theme="{{ settings.cjkcms.LayoutSettings.color_scheme }}">
9
9
  {% block base_head %}
10
10
  <head>
11
11
  <script>{# Pass in CMS variables to JavaScript #}
@@ -92,7 +92,7 @@
92
92
  {% endif %}
93
93
  {% endblock %}
94
94
 
95
- {% if settings.cjkcms.LayoutSettings.breadcrumbs %}
95
+ {% if settings.cjkcms.LayoutSettings.breadcrumbs and page.breadcrumbs_visible %}
96
96
  {% block breadcrumbs %}{% endblock %}
97
97
  {% endif %}
98
98
 
@@ -7,6 +7,6 @@
7
7
  <div class="card-body">
8
8
  <h5 class="card-title">{{page.title}}</h5>
9
9
  <p class="card-text">{{page.body_preview}}</p>
10
- <a class="card-link" href="{% pageurl page %}" title="{{page.title}}">Read more</a>
10
+ <a class="card-link stretched-link" href="{% pageurl page %}" title="{{page.title}}">Read more</a>
11
11
  </div>
12
12
  </div>
@@ -59,9 +59,18 @@
59
59
  {% if results_paginated.object_list %}
60
60
  {% for page in results_paginated %}
61
61
  <div class="mb-5">
62
+ {% if results_paginated.object_list %}
63
+ {% if page|is_not_page %}
64
+ {% include page.search_template %}
65
+ {% endif %}
62
66
  {% with page=page.specific %}
63
- {% include page.search_template %}
67
+ {% if page.search_template %}
68
+ {% include page.search_template %}
69
+ {% else %}
70
+ {% include "cjkcms/pages/search_result.html" %}
71
+ {% endif %}
64
72
  {% endwith %}
73
+ {% endif %}
65
74
  </div>
66
75
  {% endfor %}
67
76
  {% include "cjkcms/includes/pagination.html" with items=results_paginated %}
@@ -1,10 +1,6 @@
1
1
  User-agent: *
2
2
  Disallow: /backend/
3
-
4
- User-agent: *
5
3
  Disallow: /django-backend/
6
-
7
- User-agent: *
8
4
  Allow: /
9
5
 
10
6
  Sitemap: /sitemap.xml
@@ -10,7 +10,7 @@
10
10
  <li class="none">
11
11
  <object type="image/svg+xml" data="{% static 'cjkcms/images/icons/'|add:settings.cjkcms.LayoutSettings.breadcrumb_icon|add:'.svg' %}"
12
12
  class="opacity-75" style="margin-bottom:-2px;"></object>
13
- <a href="{{ p.url }}">{{ p.title }}</a>
13
+ <a href="{{ p.url }}">{{ p.specific.breadcrumb_title }}</a>
14
14
  </li>
15
15
 
16
16
  {% endif %}
@@ -18,7 +18,7 @@
18
18
  <li class="breadcrumb-item active ms-1" aria-current="page">
19
19
  <object type="image/svg+xml" data="{% static 'cjkcms/images/icons/'|add:settings.cjkcms.LayoutSettings.breadcrumb_icon|add:'.svg' %}"
20
20
  class="opacity-75" style="margin-bottom:-2px;"></object>
21
- {{ page.title }}</li>
21
+ {{ page.breadcrumb_title }}</li>
22
22
  {% endblock %}
23
23
  </ol>
24
24
  </nav>
@@ -9,6 +9,14 @@
9
9
  rel="stylesheet"
10
10
  crossorigin="anonymous">
11
11
  {% endif %}
12
+
13
+ {% if settings.cjkcms.LayoutSettings.color_scheme == 'custom' %}
14
+ <!-- Load local css variables sheet to override default colors etc -->
15
+ <link
16
+ href="{% static 'cjkcms/css/cjkcms-custom-theme.css' %}"
17
+ rel="stylesheet">
18
+ {% endif %}
19
+
12
20
  {% if settings.cjkcms.LayoutSettings.bootstrap_icons %}
13
21
  <!-- Bootstrap icons (local) -->
14
22
  <link
@@ -24,7 +24,14 @@
24
24
  {% endif %}
25
25
  </a>
26
26
 
27
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-mdb-target="#navbar" data-mdb-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
27
+ <button
28
+ class="navbar-toggler"
29
+ type="button"
30
+ data-mdb-collapse-init
31
+ data-bs-toggle="collapse"
32
+ data-mdb-target="#navbar"
33
+ data-bs-target="#navbar"
34
+ aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
28
35
  <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
29
36
  </button>
30
37
 
@@ -62,11 +69,7 @@
62
69
  </div><!-- /.container -->
63
70
  {% endif %}
64
71
 
65
- {# Navbar offset #}
66
- {% if settings.cjkcms.LayoutSettings.navbar_fixed %}
67
- {% if settings.cjkcms.LayoutSettings.logo %}
68
- <div class="{{settings.cjkcms.LayoutSettings.navbar_format}}-fixed-img-offset {{settings.cjkcms.LayoutSettings.navbar_collapse_mode}}"></div>
69
- {% else %}
70
- <div class="{{settings.cjkcms.LayoutSettings.navbar_format}}-fixed-offset {{settings.cjkcms.LayoutSettings.navbar_collapse_mode}}"></div>
71
- {% endif %}
72
- {% endif %}
72
+ {# Search Modal must be injected outside of the nav, because if the nav is fixed/sticky it breaks the modal #}
73
+ {% if settings.cjkcms.LayoutSettings.navbar_search and "popup" in settings.cjkcms.LayoutSettings.search_format %}
74
+ {% include "cjkcms/snippets/navbar_search_modal.html" %}
75
+ {% endif %}
@@ -1,47 +1,18 @@
1
1
  {% load wagtailcore_tags cjkcms_tags django_bootstrap5 i18n %}
2
- <form action="{% url 'cjkcms_search' %}" method="GET" class="row row-cols-lg-auto g-3 align-items-center">
3
- {% csrf_token %}
4
- {% get_searchform request as form %}
5
- {% bootstrap_form_errors form type='non_fields' %}
2
+ <form action="{% url 'cjkcms_search' %}" method="GET" class="row row-cols-lg-auto g-3 align-items-center">
3
+ {% csrf_token %}
4
+ {% get_searchform request as form %}
5
+ {% bootstrap_form_errors form type='non_fields' %}
6
6
  {% if settings.cjkcms.LayoutSettings.search_format == "" or settings.cjkcms.LayoutSettings.search_format|slice:":3" == "box" %}
7
7
  {% bootstrap_field form.s layout='inline' show_label=False %}
8
8
  {% endif %}
9
9
  {% if "button" in settings.cjkcms.LayoutSettings.search_format %}
10
10
  <button type="button" class="{{ settings.cjkcms.LayoutSettings.searchbutton_class }}"
11
11
  {% if 'popup' in settings.cjkcms.LayoutSettings.search_format %}
12
- data-mdb-toggle="modal" data-bs-toggle="modal"
13
- data-bs-target="#search-modal" data-mdb-target="#search-modal"
14
- onclick="focusInputField()"
12
+ data-mdb-ripple-init data-mdb-modal-init data-mdb-target="#searchModal"
13
+ data-bs-toggle="modal" data-bs-target="#searchModal"
15
14
  {% endif %}
16
15
  >{{ settings.cjkcms.LayoutSettings.searchbutton_label | richtext }}</button>
17
16
  {% endif %}
18
17
 
19
- {% if "popup" in settings.cjkcms.LayoutSettings.search_format %}
20
- <div id="search-modal" class="modal" style="display: none;">
21
- <div class="modal-dialog">
22
- <div class="modal-content">
23
- <div class="modal-header">
24
- <h5 class="modal-title">Search</h5>
25
- <button type="button" class="btn-close" data-bs-dismiss="modal" data-mdb-dismiss="modal" aria-label="Close"></button>
26
- </div>
27
- <div class="modal-body">
28
- {% bootstrap_form form layout='inline' %}
29
- </div>
30
- <div class="modal-footer">
31
- <button type="submit" class="{{ settings.cjkcms.LayoutSettings.searchbutton_class }}">
32
- {{ settings.cjkcms.LayoutSettings.searchbutton_label | richtext }}
33
- </button>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- <script>
39
- function focusInputField() {
40
- var inputField = document.querySelector('#search-modal input[type="text"]');
41
- if (inputField) {
42
- inputField.focus();
43
- }
44
- }
45
- </script>
46
- {% endif %}
47
18
  </form>