jekyll-theme-centos 2.52.0.beta.84 → 2.52.0.beta.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/_config.yml +1 -8
  3. data/_data/base/calendar_schema.yml +156 -0
  4. data/_data/base/card_schema.yml +10 -2
  5. data/_data/base/event_schema.yml +19 -58
  6. data/_data/base/project_schema.yml +6 -1
  7. data/_includes/base/bits.html.liquid +3 -3
  8. data/_includes/base/calendar-events.html.liquid +49 -0
  9. data/_includes/base/calendar-init.html.liquid +148 -0
  10. data/_includes/base/calendar.html.liquid +70 -0
  11. data/_includes/base/card.html.liquid +2 -2
  12. data/_includes/base/event.html.liquid +57 -2
  13. data/_includes/base/head.html.liquid +8 -1
  14. data/_includes/base/link.html.liquid +8 -0
  15. data/_sass/base/_calendar.scss +204 -0
  16. data/assets/css/base/stylesheet.min.scss +4 -0
  17. data/assets/img/base/page-layout-default.svg +113 -134
  18. data/assets/img/base/page-with-alert.svg +348 -957
  19. data/assets/img/base/page-with-announcement.svg +363 -969
  20. data/assets/img/base/page-with-artwork.svg +327 -997
  21. data/assets/img/base/page-with-backtotop.svg +373 -918
  22. data/assets/img/base/page-with-bits.svg +278 -958
  23. data/assets/img/base/page-with-breadcrumb.svg +265 -958
  24. data/assets/img/base/page-with-breakingnews.svg +352 -969
  25. data/assets/img/base/page-with-calendar.svg +57 -0
  26. data/assets/img/base/page-with-copyright.svg +375 -916
  27. data/assets/img/base/page-with-event.svg +393 -463
  28. data/assets/img/base/page-with-footer.svg +375 -916
  29. data/assets/img/base/page-with-locales.svg +372 -917
  30. data/assets/img/base/page-with-project.svg +397 -599
  31. data/assets/img/base/page-with-shortcut.svg +373 -918
  32. data/assets/img/base/page-with-social.svg +373 -918
  33. data/assets/img/base/page-with-sponsors.svg +373 -918
  34. data/assets/img/base/page-with-title.svg +285 -545
  35. data/assets/img/base/page-with-toc.svg +268 -998
  36. metadata +7 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 448a42486b828fbecd350515f5e057af86a319c9c9c30ccf3a7453987ecede97
4
- data.tar.gz: 4a6cb2d918da78ce6878b9ebf7b1e55247e051165d41e98efba7df40a3798623
3
+ metadata.gz: 6b26c32164c0114ea621d445ceb40c7a569158712db0206f96f07c4aefc038d3
4
+ data.tar.gz: ab2ee634b6635b3f9c0e0ff52087b9256ec4727526b602c75781d213814b0e6e
5
5
  SHA512:
6
- metadata.gz: 46997dc9b5bbf89c184eafa06f6f7200d543426bdb124c2dadfc22a13e33dbe30e7ed30e7c2a0c12f433ee40b46b0451fe5f4168c72d6a888e349f63259e2526
7
- data.tar.gz: 254fd2c07eada323cf5ec6e734651880b55b13f2a8fd6efd4fad8c4b5b0c71870d2e3efbbad00329c90f230af99fc2cda1a8e005013bceec251213f006cac14c
6
+ metadata.gz: d36db093009d770ce36ab9490e8901f36e079d60294b60f922cd8d6ebdbebe49143f72706268b0ba948ad282ebc192be7b7c356a4b14a5ca63a5238a964cca20
7
+ data.tar.gz: 5d29d270aed80d3f1da128db0e1db86b23798f7b70b0a5495133bf16fd103d72b558cc4533f51675752d6a9e2e8cef3e284bb3c61adf635676d5a23e01d9be76
data/_config.yml CHANGED
@@ -40,14 +40,6 @@ baseurl: ""
40
40
  # all you need to build jekyll sites with jekyll-theme-centos.
41
41
  theme: "jekyll-theme-centos"
42
42
 
43
- # site.component_data_dirname - Set the directory name where the navbar data
44
- # files is stored. For example, if the navbar file is at
45
- # `_data/base/navbar.yml', the value you need to provide here is `base'. For
46
- # consistency purposes, the value of this variable is overriden each time the
47
- # pipeline runs using the value of ${CI_PROJECT_NAME##jekyll-theme-centos-}
48
- # variable.
49
- #component_data_dirname: ""
50
-
51
43
  # site.defaults - Set global default values.
52
44
  defaults:
53
45
  # Asset files - prevent from being treated as pages and localized
@@ -79,6 +71,7 @@ defaults:
79
71
  with_project: false
80
72
  with_bits: false
81
73
  with_event: false
74
+ with_calendar: false
82
75
  with_title: true
83
76
  with_preamble: true
84
77
  with_toc: true
@@ -0,0 +1,156 @@
1
+ title: Event Calendar Addon Configuration
2
+ description: >-
3
+ Schema for configuring the external Event Calendar JS library addon
4
+ (@event-calendar/build, formerly vkurko/calendar), used to render
5
+ interactive calendar views (month, week, list) from event data.
6
+ type: object
7
+ properties:
8
+ with_calendar:
9
+ type: boolean
10
+ default: false
11
+ description: >-
12
+ Enables or disables the Event Calendar addon. Set to `true` (default)
13
+ to load the necessary CSS and JavaScript files; set to `false` to
14
+ disable.
15
+ with_calendar_data:
16
+ type: object
17
+ description: >-
18
+ The configuration object containing version, integrity checks, and
19
+ default behavior settings for the Event Calendar library.
20
+ properties:
21
+ version:
22
+ type: string
23
+ default: "5.12.0"
24
+ description: >-
25
+ The @event-calendar/build version to load from jsDelivr
26
+ (e.g., `5.12.0`). This value is sourced from the package's
27
+ [npm releases](https://www.npmjs.com/package/@event-calendar/build).
28
+ css_integrity:
29
+ type: string
30
+ default: "sha384-5OjKEq4IUsR96wC/J0fB3WgMd7ZdsjiPyid1vtIlPlvF/+ejb/2FzrZvaFaBT0mj"
31
+ description: >-
32
+ The Subresource Integrity (SRI) CSS checksum (`sha384-...`) for
33
+ the specific Event Calendar version used. This is essential for
34
+ ensuring the integrity of the loaded CSS resource.
35
+ script_integrity:
36
+ type: string
37
+ default: "sha384-BCmNKxNY/4PzGJZW9hkN1WE25izUyjMcuzOoWcxqgiDD7iSdNxI4PYVYzaTsvDig"
38
+ description: >-
39
+ The Subresource Integrity (SRI) JavaScript checksum (`sha384-...`)
40
+ for the specific Event Calendar version used. This ensures the
41
+ integrity of the loaded JavaScript file.
42
+ view:
43
+ type: string
44
+ default: "dayGridMonth"
45
+ description: >-
46
+ The default calendar view (e.g., `dayGridMonth`, `timeGridWeek`,
47
+ `listWeek`).
48
+ header_toolbar_start:
49
+ type: string
50
+ default: "title"
51
+ description: >-
52
+ Content of the header toolbar's start section. See the Event
53
+ Calendar header toolbar documentation for valid content (view
54
+ names joined by commas, `title`, `today`, `prev`, `next`).
55
+ header_toolbar_center:
56
+ type: string
57
+ default: ""
58
+ description: Content of the header toolbar's center section.
59
+ header_toolbar_end:
60
+ type: string
61
+ default: "dayGridMonth,timeGridWeek,timeGridDay,listMonth today prev,next"
62
+ description: Content of the header toolbar's end section.
63
+ button_text_month:
64
+ type: string
65
+ default: "Month"
66
+ description: Label for the `dayGridMonth` view button.
67
+ button_text_week:
68
+ type: string
69
+ default: "Week"
70
+ description: Label for the `timeGridWeek` view button.
71
+ button_text_day:
72
+ type: string
73
+ default: "Day"
74
+ description: Label for the `timeGridDay` view button.
75
+ button_text_list:
76
+ type: string
77
+ default: "List"
78
+ description: Label for the `listMonth` view button.
79
+ button_text_today:
80
+ type: string
81
+ default: "Today"
82
+ description: Label for the "today" button.
83
+ events:
84
+ type: array
85
+ description: >-
86
+ Optional calendar-specific event data, in the same item shape as
87
+ the event component's `with_event_data` (see
88
+ `src/YAML/event_schema.yml`). Set this to make the calendar
89
+ self-contained — it takes priority over the shared
90
+ `with_event_data`, which the calendar still falls back to when
91
+ this is absent. See the event data contract for the full
92
+ `events` → Event Calendar field mapping (identical either way).
93
+ items:
94
+ type: object
95
+ properties:
96
+ title:
97
+ type: string
98
+ description: The name or title of the event. This field is required.
99
+ description:
100
+ type: string
101
+ default: ""
102
+ description: A brief description of the event. Not used by the calendar view.
103
+ start:
104
+ type: string
105
+ description: >-
106
+ The event start, in ISO 8601 format: `YYYY-MM-DD` for an
107
+ all-day event, or `YYYY-MM-DDTHH:MM` to give it a specific
108
+ start time on that same day. Required.
109
+ end:
110
+ type: string
111
+ default: ""
112
+ description: >-
113
+ The event's inclusive end, in the same ISO 8601 format as
114
+ `start` (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`). Omit for
115
+ single-day events — it defaults to `start`. For a timed
116
+ event, use the same date as `start` with the end clock time.
117
+ location:
118
+ type: string
119
+ default: ""
120
+ description: The city and country where the event takes place. Not used by the calendar view.
121
+ color:
122
+ type: string
123
+ default: secondary
124
+ description: >-
125
+ Sets the calendar pill's color via `var(--bs-<color>)`.
126
+ Defaults to `secondary`.
127
+ enum:
128
+ - primary
129
+ - secondary
130
+ - info
131
+ - warning
132
+ - danger
133
+ - success
134
+ - dark
135
+ - light
136
+ icon:
137
+ type: string
138
+ default: "fa-solid fa-calendar"
139
+ description: Not used by the calendar view.
140
+ link:
141
+ type: string
142
+ format: uri-reference
143
+ default: ""
144
+ description: >-
145
+ The URL the calendar event navigates to on click.
146
+ required:
147
+ - title
148
+ - link
149
+ - start
150
+ additionalProperties: false
151
+ required:
152
+ - version
153
+ - css_integrity
154
+ - script_integrity
155
+ additionalProperties: false
156
+ additionalProperties: false
@@ -113,10 +113,18 @@ properties:
113
113
  type: string
114
114
  default: ""
115
115
  description: Visible label text for the action button.
116
- url:
116
+ link:
117
117
  type: string
118
118
  default: ""
119
- description: Target URL the action button links to.
119
+ description: >-
120
+ The target URL the action button points to. This can be a relative
121
+ path (prefixed by site URL settings), a path using `../` (e.g.,
122
+ `../some-page`), or an absolute URL (e.g., `https://example.com`).
123
+ If omitted, an anchor link is generated from the `name` parameter
124
+ by converting to lowercase, replacing spaces with hyphens, and
125
+ removing the characters `"`, `'`, `?`, `&`, `#`, and `/` (e.g.,
126
+ "Back to Top" becomes "#back-to-top"), enabling in-page navigation
127
+ to section headings.
120
128
  icon:
121
129
  type: string
122
130
  default: ""
@@ -28,29 +28,32 @@ properties:
28
28
  type: string
29
29
  default: ""
30
30
  description: A brief description of the event.
31
- address:
31
+ start:
32
32
  type: string
33
- default: ""
34
- description: The street address of the event venue.
35
- city:
33
+ description: >-
34
+ The event start, in ISO 8601 format: `YYYY-MM-DD` (e.g.
35
+ `2025-09-19`) for an all-day event, or `YYYY-MM-DDTHH:MM` (e.g.
36
+ `2025-09-19T14:00`) to give it a specific start time on that same
37
+ day. Used both to build the displayed date text and, when the
38
+ `calendar` component reads the same `with_event_data`, to place
39
+ the event on the calendar. Required.
40
+ end:
36
41
  type: string
37
42
  default: ""
38
- description: The city where the event takes place.
39
- date:
40
- type: string # Changed from 'date' to 'string' for flexibility
41
- default: ""
42
43
  description: >-
43
- The event start and end date range as a readable string (e.g.,
44
- `September 19 - 20, 2025`).
44
+ The event's inclusive end, in the same ISO 8601 format as
45
+ `start` (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`). For an all-day
46
+ event this is the last day the event runs; omit for single-day
47
+ events — it defaults to `start`. For a timed event, include the
48
+ same date as `start` with the end clock time — see the
49
+ `calendar` component's
50
+ [event data contract](/components/calendar/#event-data-contract)
51
+ for how each case converts to that component's own end
52
+ semantics.
45
53
  location:
46
54
  type: string
47
55
  default: ""
48
56
  description: The city and country where the event takes place (e.g., `Boston, USA`).
49
- image_url:
50
- type: string
51
- format: uri
52
- default: ""
53
- description: The absolute or relative URL of an image related to the event (e.g., a banner or logo).
54
57
  color:
55
58
  type: string
56
59
  default: secondary
@@ -80,51 +83,9 @@ properties:
80
83
  description: >-
81
84
  The URL (relative or absolute) that the "Know more" button
82
85
  will link to, providing additional details about the event.
83
- presentations:
84
- type: array
85
- description: A list of objects detailing the individual talks or sessions associated with this event.
86
- items:
87
- type: object
88
- properties:
89
- name:
90
- type: string
91
- description: The title of the presentation or talk.
92
- summary:
93
- type: string
94
- description: A concise summary or abstract describing what the presentation is about.
95
- author:
96
- type: string
97
- description: The name of the person who created or is delivering the presentation.
98
- author_email:
99
- type: string
100
- format: email
101
- description: The author's email address.
102
- author_webiste:
103
- type: string
104
- format: uri
105
- description: The author's website or profile URL.
106
- date:
107
- type: string
108
- format: date-time
109
- description: The presentation date and time (e.g., ISO 8601 format).
110
- slides_url:
111
- type: string
112
- format: uri
113
- description: The URL to the presentation slides (e.g., PDF or Google Slides link).
114
- video_url:
115
- type: string
116
- format: uri
117
- description: The URL to the presentation video recording.
118
- information_url:
119
- type: string
120
- format: uri
121
- description: A general URL for more information about the presentation.
122
- required:
123
- - name
124
- - author
125
- additionalProperties: false
126
86
  required:
127
87
  - title
128
88
  - link
89
+ - start
129
90
  additionalProperties: false
130
91
  additionalProperties: false
@@ -22,7 +22,12 @@ properties:
22
22
  default: flex-column text-bg-dark bg-project
23
23
  description: >-
24
24
  Custom Bootstrap classes for the main project container, controlling
25
- alignment, background, and text colors (e.g., `padding`, `bg-image`).
25
+ alignment, background, and text colors. The `bg-project` class is required
26
+ — it supplies the responsive background image (see src/SASS/_customization.scss)
27
+ that renders behind the card content; removing it leaves the container with
28
+ no background image, only whatever background color the remaining classes
29
+ (such as `text-bg-dark`) supply. For example, `flex-column` and `text-bg-dark`
30
+ control flex alignment and text/background colors respectively.
26
31
  content_class:
27
32
  type: string
28
33
  default: flex-column align-items-center py-5
@@ -115,7 +115,7 @@ Component Layout:
115
115
  class = ""
116
116
  icon = "fa-solid fa-arrow-right"
117
117
  icon_position = "end"
118
- url = upstream_bit_index_page_url
118
+ link = upstream_bit_index_page_url
119
119
  %}
120
120
  </div>
121
121
  {% endif %}
@@ -127,7 +127,7 @@ Component Layout:
127
127
  {%- for downstream_bit in downstream_bits | limit: 3 %}
128
128
  <div class="card border-{{ upstream_bit_color }}-subtle m-1">
129
129
  <div class="bg-{{ upstream_bit_color }} rounded-top">
130
- <img src="{{ site.url }}{{ site.baseurl }}/assets/img/{{ downstream_bit.screenshot }}" class="card-img-top" alt="{{ downstream_bit.screenshot }}">
130
+ <img src="{{ site.baseurl }}/assets/img/{{ downstream_bit.screenshot }}" class="card-img-top" alt="{{ downstream_bit.screenshot }}">
131
131
  </div>
132
132
  <div class="card-body">
133
133
  <p class="h5 card-title">{{ downstream_bit.name }}</p>
@@ -135,7 +135,7 @@ Component Layout:
135
135
  {% for action in downstream_bit.actions | limit: 1 %}
136
136
  {% include base/link.html.liquid
137
137
  name = action.name
138
- url = action.link
138
+ link = action.link
139
139
  class = upstream_bit_btn_class
140
140
  icon = action.icon
141
141
  icon_position = action.icon_position
@@ -0,0 +1,49 @@
1
+ {% comment %}
2
+ ================================================================================
3
+ Template: Calendar Event Data Bridge
4
+ Purpose: Emits the SAME event data the `event` component reads (with_event_data)
5
+ as a JSON script tag, so a page can populate an Event Calendar instance
6
+ without hand-writing (and duplicating) a separate JS events array. Data
7
+ loading only — mapping this JSON into the Event Calendar library's own event
8
+ shape, and calling EventCalendar.create(), stays the responsibility of
9
+ whatever page or layout uses it (see calendar.html.liquid, which follows the
10
+ same "loading only" split for the library itself).
11
+
12
+ Design Logic:
13
+ - Data bridge only: re-emits with_event_data as JSON, no field mapping or
14
+ rendering — see calendar-init.html.liquid for the mapping/rendering step
15
+ - Shared data source: reuses event.html.liquid's exact fallback chain, so
16
+ both components always agree on the same resolved events
17
+ - JSON script tag output: consumable by inline JS without hand-duplicating
18
+ the events array
19
+ - Multi-instance support: "id" override lets multiple bridges coexist on
20
+ one page
21
+
22
+ Optional Inputs:
23
+ - id: script tag id (default: "centos-calendar-events") — override to run
24
+ more than one instance of this bridge on the same page (see
25
+ calendar-init.html.liquid, which derives a unique id per instance).
26
+
27
+ Data Source Hierarchy (priority) — identical to event.html.liquid, so this
28
+ bridge always reflects whatever with_event_data the page actually resolved:
29
+ 1. include.data
30
+ 2. page.with_event_data
31
+ 3. site.data.event
32
+ 4. site.data.base.event
33
+
34
+ Output: <script type="application/json" id="...">, holding the with_event_data
35
+ array unchanged (title, start, end, color, icon, link, description,
36
+ location) — see the calendar component's event data contract documentation
37
+ for how a page maps these fields into Event Calendar events.
38
+ ================================================================================
39
+ {% endcomment %}
40
+
41
+ {%- assign with_event_data = include.data
42
+ | default: page.with_event_data
43
+ | default: site.data.event
44
+ | default: site.data.base.event
45
+ %}
46
+
47
+ {%- assign calendar_events_id = include.id | default: "centos-calendar-events" %}
48
+
49
+ <script type="application/json" id="{{ calendar_events_id }}">{{ with_event_data | jsonify | replace: '</', '<\/' }}</script>
@@ -0,0 +1,148 @@
1
+ {% comment %}
2
+ ================================================================================
3
+ Template: Calendar Instance Initializer
4
+ Purpose: Renders a ready-to-use Event Calendar instance — the events data
5
+ (via calendar-events.html.liquid), a container element, and the
6
+ initialization script that maps that data into the library's own event
7
+ shape (see the calendar component's event data contract documentation) and
8
+ calls EventCalendar.create(). Configured entirely from with_calendar_data /
9
+ calendar_schema.yml, so customizing view, toolbar, or button labels is a
10
+ front matter change — no script editing required.
11
+
12
+ Design Logic:
13
+ - Composition: wires together the events bridge, a container element, and
14
+ the initialization script — each piece stays a separate, single-purpose
15
+ include
16
+ - Self-contained with graceful fallback: works standalone via
17
+ with_calendar_data.events, or falls back to the event component's
18
+ with_event_data when that's absent (see Event data source, below)
19
+ - Config-driven: view, toolbar, and button labels all come from
20
+ with_calendar_data — no script editing required
21
+ - Multi-instance support: a distinct "id" per include call renders
22
+ independent calendars on one page
23
+ - Security: blocks javascript:/data:/vbscript: URIs before eventClick
24
+ navigation
25
+
26
+ Required Inputs (per event item, from whichever event data source resolves
27
+ below — the init script below reads event.title/event.start directly):
28
+ - title: Event name/title
29
+ - start: Event start (YYYY-MM-DD for an all-day event, or
30
+ YYYY-MM-DDTHH:MM to give it a specific start time on that same day)
31
+
32
+ Optional Inputs:
33
+ - id: container element id (default: "centos-calendar")
34
+ - data: with_calendar_data override
35
+ - event_data: explicit per-instance event array — highest priority, mainly
36
+ for running multiple independent calendars on one page (see below).
37
+ Forwarded to calendar-events.html.liquid's own "data" param.
38
+
39
+ Data Source Hierarchy (priority) — identical to calendar.html.liquid:
40
+ 1. include.data
41
+ 2. page.with_calendar_data
42
+ 3. site.data.calendar
43
+ 4. site.data.base.calendar
44
+
45
+ Event data source (priority) — this is what makes the component
46
+ self-contained: a calendar-only page never has to touch with_event_data,
47
+ but pages that already use the event component keep working unchanged:
48
+ 1. include.event_data — explicit override for this include call.
49
+ 2. with_calendar_data.events — calendar-specific events, resolved above.
50
+ 3. with_event_data — the event component's own data (via
51
+ calendar-events.html.liquid's own fallback chain: include.data (unused
52
+ here) → page.with_event_data → site.data.event → site.data.base.event).
53
+
54
+ Multiple instances per page: pass a distinct id to each include call. The
55
+ events bridge id is derived from it ("<id>-events"), so each instance's
56
+ event data (and the events script tag emitting it) stays independent. Pass
57
+ event_data (or a distinct with_calendar_data.events via data=) alongside a
58
+ distinct id when instances should show different events; omit both to have
59
+ every instance fall back to the same shared event source.
60
+ ================================================================================
61
+ {% endcomment %}
62
+
63
+ {%- assign with_calendar = include.with_calendar
64
+ | default: page.with_calendar
65
+ %}
66
+
67
+ {%- if with_calendar %}
68
+
69
+ {%- assign calendar_id = include.id | default: "centos-calendar" %}
70
+ {%- assign calendar_events_id = calendar_id | append: "-events" %}
71
+
72
+ {%- assign with_calendar_data = include.data
73
+ | default: page.with_calendar_data
74
+ | default: site.data.calendar
75
+ | default: site.data.base.calendar
76
+ %}
77
+
78
+ {%- assign with_calendar_schema = site.data.base.calendar_schema.properties.with_calendar_data.properties %}
79
+
80
+ {%- comment %} --- Defaults --- {% endcomment %}
81
+ {%- assign calendar_view = with_calendar_data.view | default: with_calendar_schema.view.default %}
82
+ {%- assign calendar_toolbar_start = with_calendar_data.header_toolbar_start | default: with_calendar_schema.header_toolbar_start.default %}
83
+ {%- assign calendar_toolbar_center = with_calendar_data.header_toolbar_center | default: with_calendar_schema.header_toolbar_center.default %}
84
+ {%- assign calendar_toolbar_end = with_calendar_data.header_toolbar_end | default: with_calendar_schema.header_toolbar_end.default %}
85
+ {%- assign calendar_btn_month = with_calendar_data.button_text_month | default: with_calendar_schema.button_text_month.default %}
86
+ {%- assign calendar_btn_week = with_calendar_data.button_text_week | default: with_calendar_schema.button_text_week.default %}
87
+ {%- assign calendar_btn_day = with_calendar_data.button_text_day | default: with_calendar_schema.button_text_day.default %}
88
+ {%- assign calendar_btn_list = with_calendar_data.button_text_list | default: with_calendar_schema.button_text_list.default %}
89
+ {%- assign calendar_btn_today = with_calendar_data.button_text_today | default: with_calendar_schema.button_text_today.default %}
90
+
91
+ {%- assign calendar_events_data = include.event_data | default: with_calendar_data.events %}
92
+
93
+ {% include base/calendar-events.html.liquid id=calendar_events_id data=calendar_events_data %}
94
+ <div id="{{ calendar_id }}"></div>
95
+ <script>
96
+ document.addEventListener('DOMContentLoaded', function () {
97
+ var raw = JSON.parse(document.getElementById('{{ calendar_events_id }}').textContent);
98
+ var events = raw.map(function (event) {
99
+ var timed = event.start.indexOf('T') !== -1;
100
+ var start = event.start;
101
+ var end, allDay;
102
+ if (timed) {
103
+ end = event.end || event.start;
104
+ allDay = false;
105
+ } else {
106
+ var exclusiveEnd = new Date((event.end || event.start) + 'T00:00:00');
107
+ exclusiveEnd.setDate(exclusiveEnd.getDate() + 1);
108
+ end = exclusiveEnd.toISOString().slice(0, 10);
109
+ allDay = true;
110
+ }
111
+ return {
112
+ title: event.title,
113
+ start: start,
114
+ end: end,
115
+ allDay: allDay,
116
+ backgroundColor: 'var(--bs-' + (event.color || 'secondary') + ')',
117
+ extendedProps: { url: event.link }
118
+ };
119
+ });
120
+
121
+ EventCalendar.create(document.getElementById('{{ calendar_id }}'), {
122
+ view: {{ calendar_view | jsonify }},
123
+ headerToolbar: {
124
+ start: {{ calendar_toolbar_start | jsonify }},
125
+ center: {{ calendar_toolbar_center | jsonify }},
126
+ end: {{ calendar_toolbar_end | jsonify }}
127
+ },
128
+ buttonText: {
129
+ dayGridMonth: {{ calendar_btn_month | jsonify }},
130
+ timeGridWeek: {{ calendar_btn_week | jsonify }},
131
+ timeGridDay: {{ calendar_btn_day | jsonify }},
132
+ listMonth: {{ calendar_btn_list | jsonify }},
133
+ today: {{ calendar_btn_today | jsonify }}
134
+ },
135
+ events: events,
136
+ eventClick: function (info) {
137
+ // --- Security: block javascript:/data:/vbscript: URIs before navigation ---
138
+ var url = info.event.extendedProps.url;
139
+ var normalized = url ? String(url).replace(/[\x00-\x20]/g, '') : '';
140
+ if (url && !/^(javascript|data|vbscript):/i.test(normalized)) {
141
+ window.location.href = url;
142
+ }
143
+ }
144
+ });
145
+ });
146
+ </script>
147
+
148
+ {%- endif %}
@@ -0,0 +1,70 @@
1
+ {% comment %}
2
+ ================================================================================
3
+ Template: Event Calendar Library Initialization Component
4
+ Purpose: Loads the Event Calendar JS library (@event-calendar/build, formerly
5
+ vkurko/calendar) from CDN with SRI integrity checks. Library loading only —
6
+ initializing a calendar instance (mounting an element and supplying its
7
+ events data) is the responsibility of whatever page or layout uses it.
8
+ ================================================================================
9
+
10
+ Design Logic:
11
+ - Library loading only: does not mount or configure a calendar instance —
12
+ see calendar-init.html.liquid for that
13
+ - Split head/script output: "type" selects the CSS <link> (head) or JS
14
+ <script> (body) tag, capturing both fragments once and rendering by type
15
+ - CDN-hosted with Subresource Integrity (SRI): version-pinned, integrity-
16
+ checked delivery
17
+
18
+ Optional Inputs:
19
+ - type: "head" for CSS include, "script" for JavaScript
20
+ - version: Event Calendar version (e.g., "5.12.0")
21
+ - css_integrity, script_integrity: SRI integrity hashes
22
+ - data: Event Calendar configuration object
23
+
24
+ Data Source Hierarchy (priority):
25
+ 1. include.data
26
+ 2. page.with_calendar_data
27
+ 3. site.data.calendar
28
+ 4. site.data.base.calendar
29
+ ================================================================================
30
+ {% endcomment %}
31
+
32
+ {%- assign with_calendar = include.with_calendar
33
+ | default: page.with_calendar
34
+ %}
35
+
36
+ {%- assign with_calendar_data = include.data
37
+ | default: page.with_calendar_data
38
+ | default: site.data.calendar
39
+ | default: site.data.base.calendar
40
+ %}
41
+
42
+ {%- assign with_calendar_schema = site.data.base.calendar_schema.properties.with_calendar_data.properties %}
43
+
44
+ {%- if with_calendar %}
45
+
46
+ {%- comment %} === Presentation === {% endcomment %}
47
+ {%- comment %} --- Defaults --- {% endcomment %}
48
+ {%- assign calendar_version = with_calendar_data.version | default: with_calendar_schema.version.default %}
49
+ {%- assign calendar_css_integrity = with_calendar_data.css_integrity | default: with_calendar_schema.css_integrity.default %}
50
+ {%- assign calendar_script_integrity = with_calendar_data.script_integrity | default: with_calendar_schema.script_integrity.default %}
51
+
52
+ {%- capture html_calendar_head %}
53
+ <link href="https://cdn.jsdelivr.net/npm/@event-calendar/build@{{ calendar_version }}/dist/event-calendar.min.css" rel="stylesheet" integrity="{{ calendar_css_integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
54
+ {%- endcapture %}
55
+
56
+ {%- capture html_calendar_script %}
57
+ <!-- Event Calendar Library -->
58
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@{{ calendar_version }}/dist/event-calendar.min.js" integrity="{{ calendar_script_integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer" defer></script>
59
+ {%- endcapture %}
60
+
61
+ {%- comment %} --- HTML --- {% endcomment %}
62
+ {%- assign type = include.type %}
63
+ {%- case type %}
64
+ {%- when "head" %}
65
+ {{ html_calendar_head }}
66
+ {%- when "script" %}
67
+ {{ html_calendar_script }}
68
+ {%- endcase %}
69
+
70
+ {%- endif %}
@@ -17,7 +17,7 @@ Optional Inputs:
17
17
  - color: Color scheme for styling (default: "primary")
18
18
  - image, icon, screenshot: Visual elements
19
19
  - name, description: Text content
20
- - actions: Array of action buttons [{name, url, icon}]
20
+ - actions: Array of action buttons [{name, link, icon}]
21
21
  - All image/icon/name/description have customizable CSS classes
22
22
 
23
23
  Data Source:
@@ -90,7 +90,7 @@ Data Source:
90
90
  class = card_actions_btn_class
91
91
  role = "button"
92
92
  name = action.name
93
- url = action.url
93
+ link = action.link
94
94
  icon = action.icon
95
95
  icon_position = action.icon_position
96
96
  -%}