jekyll-theme-bas-style-kit 0.6.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54c4be6b3f545080f6b9a1732d0cb9ed6df145bd1e12bfd3bed99bd5d5d087f8
4
- data.tar.gz: a499c53f7ce5ae7eddf776c21abf72ccad53ac450d4b8898b6051e5e3056a7dd
3
+ metadata.gz: 857666e665b0c111fc76c3cc8e6fb6fe31901026d2cb3ca3934a43a3fa489040
4
+ data.tar.gz: 6fd109b6a4ade7f9eb8a3b6c92df36999683a5130603f30164f1e8b1309d3fd5
5
5
  SHA512:
6
- metadata.gz: 6b5fb5a4c2bff1760efb1e2add4f834d56cb2c0c558fff58b83e4ee9d99dbdfa08b10af8709cf541d2488058f085261f6d198604c0f6c0bd1d71187b94fa16fa
7
- data.tar.gz: 67a8d3c47dde8f49ce089d0345da5a59cccb92cb314422c6c8ca35522af85393919493681c13e127737843490bb43f7ae3e421cadca6d580e87345aaaa3fa1e5
6
+ metadata.gz: a8ff20ced3b6ff5f97266d91fe546108ed8c8a4918031285384515c61da8c4687107751a18881a6c87230fbcd0e425c61ca02ab41711b0fa1fc5f8c5e54b5e01
7
+ data.tar.gz: 529f1b50ecbcdd7b56a0cdb224a934d5a3ec8618f7ef312f02252767f2663578d28fb6e17bb89d3b571c68f8d30e2fa817945765d57082f2a3885bfcbe89cbae
data/CHANGELOG.md CHANGED
@@ -5,13 +5,94 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## 0.11.0 - 2021-03-17
9
+
10
+ ### Added
11
+
12
+ * Updated to Style Kit 0.6.1
13
+ * Updated to jQuery 3.6.0
14
+ * Updated to Jekyll 4.2
15
+ * Updated Ruby dependencies
16
+ * Added optional item type header pattern integration into standard page layout
17
+
18
+ ### Removed
19
+
20
+ * Synk testing due to incompatibility with modern bundler versions
21
+
22
+ ## 0.10.0 - 2020-06-27
23
+
24
+ ### Added
25
+
26
+ * Updated to Style Kit 0.6.0-beta
27
+ * Updated to JS Cookie 2.2.1
28
+ * Updated to jQuery 3.5.1
29
+ * Updated to Jekyll 4.1
30
+ * Updated Ruby dependencies
31
+ * Missing patterns for start and 'sign in' page patterns
32
+ * Support for new component patterns (item type header and ORCID iD)
33
+
34
+ ### Changed
35
+
36
+ * Feedback links changed to open in a new tab
37
+ * Updated licence dates
38
+ * Updated release procedures
39
+
40
+ ## 0.9.0 - 2019-07-02
41
+
42
+ ### Added
43
+
44
+ * Updated to Style Kit 0.6.0-alpha
45
+
46
+ ### Fixed
47
+
48
+ * Updating Gem lock file to fix gem versioning issue
49
+ * Correcting use of deprecated `js-libs` in the BAS CDN
50
+
51
+ ### Changed
52
+
53
+ * Major refactoring and simplification of README and other documentation
54
+ * Removing versioning from Docker containers
55
+
56
+ ## 0.8.0 - 2018-11-28
57
+
58
+ ### Added
59
+
60
+ * Updated dependencies for internal Gem test site
61
+ * Updated to Style Kit 0.5.0
62
+ * Tracking Gem lock file within project
63
+
64
+ ## 0.7.0 - 2018-11-24
65
+
66
+ ### Added
67
+
68
+ * 'Problem with this service' (basic) page pattern variant
69
+ * 'Problem with this service' (contact) page pattern variant
70
+ * 'Problem with this service' (alternative) page pattern variant
71
+ * 'Service unavailable' (contact) page pattern variant
72
+ * 'Service unavailable' (availability) page pattern variant
73
+ * 'Service unavailable' (alternative) page pattern variant
74
+ * 'Service unavailable' (partly closed) page pattern variant
75
+ * 'Service unavailable' (closed) page pattern variant
76
+ * 'Service unavailable' (replaced) page pattern variant
77
+ * Updated to Jekyll 3.8.5 to address security vulnerability
78
+ * Updated to Style Kit 0.5.0-beta
79
+ * Snyk dependency scanning support
80
+
81
+ ### Fixed
82
+
83
+ * README typo
84
+
85
+ ### Changed
86
+
87
+ * Improving release procedures
88
+
8
89
  ## 0.6.0 - 2018-09-18
9
90
 
10
91
  ### Changed [BREAKING!]
11
92
 
12
93
  * Icon uses replaced with alternatives or removed where not needed due to the removal of Font Awesome
13
- * Favicon attribute option changed, set `bas_style_kit_jekyll_theme.attributes.head_favicon` to `default` for the Style
14
- Kit favicon, other values will be ignored and no favicon will be set
94
+ * Favicon attribute option changed, set `bas_style_kit_jekyll_theme.attributes.head_favicon` to `default` for the Style
95
+ Kit favicon, other values will be ignored and no favicon will be set
15
96
 
16
97
  ### Added
17
98
 
@@ -19,6 +100,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
19
100
  * Implemented Style Kit Favicon
20
101
  * Implemented 'page not found' pattern and support for design patterns generally
21
102
  * Implemented 'Service unavailable (basic)' pattern
103
+ * Ruby dependencies are now scanned for vulnerabilities using Snyk
22
104
 
23
105
  ### Changed
24
106
 
@@ -79,7 +161,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
79
161
  * Re-licensing project under the Open Government License
80
162
  * Upgrading to Jekyll 3.7.2
81
163
  * Upgrading to Style Kit 0.3.0
82
- * Layouts, includes and data files are now in a `bas-style-kit` namespace
164
+ * Layouts, includes and data files are now in a `bas-style-kit` namespace
83
165
  * Generic *blank* and *HTML* layouts and associated includes have been redeveloped
84
166
  * The Style Kit layout has been split into *base* and *standard* layouts
85
167
  * Style Kit includes have been redeveloped and renamed
data/LICENSE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # License
2
2
 
3
- © UK Research and Innovation (UKRI), 2017-2018, British Antarctic Survey.
3
+ © UK Research and Innovation (UKRI), 2017-2021, British Antarctic Survey.
4
4
 
5
- You may use and re-use this software and associated documentation files free of charge in any format or medium, under
5
+ You may use and re-use this software and associated documentation files free of charge in any format or medium, under
6
6
  the terms of the Open Government Licence v3.0.
7
7
 
8
8
  You may obtain a copy of the Open Government Licence at http://www.nationalarchives.gov.uk/doc/open-government-licence/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # BAS Style Kit Jekyll Theme
2
2
 
3
- Jekyll theme for the [BAS Style Kit](https://stlye-kit.web.bas.ac.uk).
3
+ Jekyll theme for the [BAS Style Kit](https://style-kit.web.bas.ac.uk).
4
4
 
5
5
  ![Screenshot of theme](screenshot.png)
6
6
 
@@ -36,27 +36,9 @@ Refer to [Jekyll's theme documentation](https://jekyllrb.com/docs/themes/) for g
36
36
 
37
37
  ### Quick start
38
38
 
39
- #### Standard page
40
-
41
- To base all pages on the `bsk--standard` layout, add the following to your `_config.yml` file:
39
+ Add these lines to your `_config.yml` file:
42
40
 
43
41
  ```yml
44
- # Content settings
45
- #
46
-
47
-
48
- defaults:
49
- -
50
- scope:
51
- # An empty string here means all files in the project
52
- path: ""
53
- values:
54
- layout: "bas-style-kit/bsk--standard"
55
-
56
-
57
- # Theme settings
58
- #
59
-
60
42
  bas_style_kit_jekyll_theme:
61
43
  attributes:
62
44
  head_title:
@@ -67,171 +49,482 @@ bas_style_kit_jekyll_theme:
67
49
  text: 'Example service'
68
50
  href: '/'
69
51
  site_development_phase: 'beta'
70
- # Optional - web analytics
71
- site_analytics:
72
- id: UA-64130716-27
52
+ site_feedback_href: '/feedback'
53
+ legal_policies:
54
+ cookies_href: '/legal/cookies'
55
+ copyright_href: '/legal/copyright'
56
+ privacy_href: '/legal/privacy'
73
57
  # Optional - add a custom CSS file with a relative URL
74
58
  site_styles:
75
59
  -
76
60
  href: '/css/main.css'
77
61
  type: 'local'
62
+ # Optional - add a custom JS file with a SRI value
63
+ site_scripts:
64
+ -
65
+ href: 'https://example.com/js/example.js'
66
+ integrity: 'abc123'
67
+ type: 'remote'
68
+ # Optional - enable web analytics
69
+ site_analytics:
70
+ id: '1234'
71
+ # Optional - choose between the `bsk-container` and `bsk-container-fluid` layout container
72
+ container: 'bsk-container'
73
+ ```
74
+
75
+ To optionally add navigation menu items, add these lines to `_data/menus.yml`:
76
+
77
+ ```
78
+ site_navigation_primary:
79
+ - url: '#'
80
+ title: 'Item'
81
+
82
+ site_navigation_launcher:
83
+ - url: 'https://www.bas.ac.uk'
84
+ title: BAS Home
85
+ weight: 1
86
+ - url: 'https://example.com'
87
+ title: Related service
88
+ weight: 3
89
+ ```
90
+
91
+ #### Standard page
92
+
93
+ To create a page in an application or website based on the standard BAS page structure, create an application layout
94
+ (e.g. `_layouts/app.html`) with the following:
95
+
96
+ ```
97
+ ---
98
+ layout: layouts/bas-style-kit/bsk--standard.html
99
+ ---
100
+ ```
101
+
102
+ To base all pages this layout add these lines to your `_config.yml` file:
103
+
104
+ ```yml
105
+ defaults:
106
+ -
107
+ scope:
108
+ # An empty string here means all files in the project
109
+ path: ""
110
+ values:
111
+ layout: "app"
112
+ ```
113
+
114
+ #### Use a page pattern
115
+
116
+ To create a page in an application or website based on a [page pattern](#page-patterns), create a view
117
+ (e.g. `views/error.pug`) with the following:
118
+
119
+ ```html
120
+ ---
121
+ layout: views/bas-style-kit/[page-pattern]
122
+ ---
123
+ ```
124
+
125
+ Where `[page-pattern]` in the extends value is the name of a page pattern, for example:
126
+
127
+ ```html
128
+ ---
129
+ layout: views/bas-style-kit/bsk--page-not-found
130
+ ---
131
+ ```
132
+
133
+ #### Use a component pattern
134
+
135
+ To include a [component pattern](#component-pattern), call the relevant include with an required parameters.
136
+ For example:
137
+
138
+ ```
139
+ {% include bas-style-kit/bsk--pattern--item-type-header.html item_type="Item type" item_title="Item title" %}
78
140
  ```
79
141
 
80
142
  ### Patterns
81
143
 
82
- Design patterns are used to demonstrate preferred ways to pass on information to users, or ask them for information.
83
- For example, information to show when a service is unavailable, formatting dates consistently or asking users for their
84
- username in a consistent way. See the [Style Kit documentation](https://style-kit.web.bas.ac.uk/patterns) for more
85
- information.
144
+ Patterns are used to define preferred ways to pass information to users, and ask information from users, in a consistent
145
+ way. See the [Style Kit documentation](https://style-kit.web.bas.ac.uk/patterns) for more information.
86
146
 
87
- These patterns are implemented by this theme based on the reference examples included in the Style Kit. These
88
- include patterns for:
147
+ There are two types of pattern used in the Style Kit and these templates:
89
148
 
90
- * **pages** - standalone pages designed to be used without customisation, defined as [Views](#views)
149
+ * [pages](#page-patterns) - standalone pages designed to be used without customisation using [Views](#views)
150
+ * [components](#component-patterns) - inline elements designed to be used without customisation using
151
+ [Includes](#includes)
91
152
 
92
- ### Using custom CSS/JS
153
+ #### Page patterns
93
154
 
94
- ...
155
+ These template include [Views](#views) for all page patterns. In most cases all variants of a pattern use the same view,
156
+ but with different options using variables and/or page content.
95
157
 
96
- ### Navigation menu items
158
+ See the [Style Kit documentation](https://style-kit.web.bas.ac.uk) for general information on using these patterns.
97
159
 
98
- ...
160
+ ##### 'page not found' pattern
99
161
 
100
- ### Navigation branding
162
+ No configuration options.
101
163
 
102
- ...
164
+ ##### 'service unavailable' pattern
103
165
 
104
- ### Site development phase
166
+ Use page content for:
105
167
 
106
- ...
168
+ * contact information
107
169
 
108
- ### Website analytics
170
+ Optionally, use page content for:
109
171
 
110
- ...
172
+ * details of alternative services
111
173
 
112
- ### Views
174
+ Optionally, use a `pattern_availability` page variable for setting the availability line:
175
+
176
+ * a value of `closed` will show conventional text
177
+ * a value of `replaced` will show conventional text
178
+ * no value will show conventional text
179
+
180
+ ##### 'problem with this service' pattern
181
+
182
+ Use page content for:
183
+
184
+ * contact information
185
+
186
+ Optionally, use page content for:
187
+
188
+ * details of alternative services
189
+
190
+ ##### 'start' pattern
191
+
192
+ Use page content for:
193
+
194
+ * a list of needs the service caters for, as a list wrapped in a section with the `bsk-service-uses` class [1]
195
+ * a call to action, as a link wrapped in a section with the `bsk-call-to-action` class [2]
196
+ * if the call to action should be a 'Sign in to start' button use [3]
197
+ * contact information, as text wrapped in a section with the `bsk-more-information` class [4]
198
+
199
+ Optionally, use page content for:
200
+
201
+ * 'before you start' information, wrapped in a section with the `bsk-before-you-start` class [5]
202
+
203
+ **Note:** If not already included via a layout, include
204
+ [Font Awesome](https://style-kit.web.bas.ac.uk/core/icons/#font-awesome) to show the ORCID symbol.
205
+
206
+ [1]
113
207
 
114
- Views provide complete pages to implement page [Patterns](#patterns).
208
+ ```html
209
+ <section class="bsk-service-uses">
210
+ <h2 class="bsk-h3">Use this service to:</h2>
211
+ <ul>
212
+ <li>access some information</li>
213
+ <li>perform an action</li>
214
+ <li>etc.</li>
215
+ </ul>
216
+ </section>
217
+ ```
115
218
 
116
- All views use the `.html` extension. I.e. the view `page-not-found` should be referenced as `page-not-found.html`.
219
+ [2]
117
220
 
118
- All views are namespaced using a `bas-style-kit/` directory - i.e. the view `page-not-found.html` should be referenced
119
- as `bas-style-kit/page-not-found.html`.
221
+ ```html
222
+ <section class="bsk-call-to-action">
223
+ <a class="bsk-btn bsk-btn-primary bsk-btn-lg" href="#">
224
+ Start Now
225
+ <i class="fa-fw fas fa-chevron-right"></i>
226
+ </a>
227
+ </section>
228
+ ```
120
229
 
121
- Within Jekyll views are implemented as layouts. To implement a view create a page with the relevant 'view layout.
230
+ [3]
231
+
232
+ ```html
233
+ <section class="bsk-call-to-action">
234
+ <button class="bsk-btn bsk-btn-ms-account bsk-btn-lg">
235
+ <object class="bsk-ms-pictogram" type="image/svg+xml" data="https://cdn.web.bas.ac.uk/bas-style-kit/{{ site.data.bas-style-kit.bsk-vars.bsk_version }}/img/logos-symbols/ms-pictogram.svg"></object>
236
+ Sign in to start
237
+ <i class="fa-fw fas fa-chevron-right"></i>
238
+ </button>
239
+ <p class="bsk-sign-in-hint bsk-text-muted">Use the account you use for your NERC email to sign into this service.</p>
240
+ </section>
241
+ ```
122
242
 
243
+ [4]
244
+
245
+ ```html
246
+ <section class="bsk-more-information">
247
+ <h2 class="bsk-h3">More information</h2>
248
+ <p>Contact the <a href="#">Sample Team</a> for information and help on how to use [website or application].</p>
249
+ </section>
123
250
  ```
251
+
252
+ [5]
253
+
254
+ ```html
255
+ <section class="bsk-before-you-start">
256
+ <h2 class="bsk-h3">Before you start</h2>
257
+ <p>You need some information to use this service.</p>
258
+ </section>
259
+ ```
260
+
261
+ ##### 'sign in' pattern
262
+
263
+ Use page content for:
264
+
265
+ * a call to action, as a page variable [1]
266
+
267
+ ```html
124
268
  ---
125
- layout: views/bas-style-kit/page-not-found
269
+ layout: views/bas-style-kit/bsk--sign-in-microsoft
270
+
271
+ call_to_action_href: #
126
272
  ---
127
273
  ```
128
274
 
129
- **Note:** You do not need to add any page content.
275
+ #### Component patterns
130
276
 
131
- ### Layouts
277
+ These templates use includes for all component patterns. Include parameters are used for customising each instance of
278
+ the component.
132
279
 
133
- This theme defines two types of layout:
280
+ See the [Style Kit documentation](https://style-kit.web.bas.ac.uk) for general information on using these patterns.
134
281
 
135
- * *generic* - non Style Kit specific intended for atypical content
136
- * *non-generic* - implement the Style Kit either broadly or in more opinionated forms
282
+ ##### Item type header pattern
137
283
 
138
- All layouts use the `.html` extension. I.e. the layout `blank` should be referenced as `blank.html`.
284
+ Parameters:
139
285
 
140
- All layouts are namespaced using a `bas-style-kit/` directory - i.e. the layout `blank.html` should be referenced as
141
- `bas-style-kit/blank.html`.
286
+ * `item_type` the type or kind of thing the item is, e.g. if the item is a person, it's type is 'person'
287
+ * `item_title` a label specific to the item, e.g. if the item is a person their name
142
288
 
143
- #### Generic layouts
289
+ ```html
290
+ {% include bas-style-kit/bsk--pattern--item-type-header.html item_type="Item type" item_title="Item title" %}
291
+ ```
144
292
 
145
- * [`blank`](/docs/layout/blank.md)
146
- * [`html`](/docs/layout/html.md)
293
+ ##### ORCID iD pattern
147
294
 
148
- #### Style Kit specific layouts
295
+ Parameters:
149
296
 
150
- * [`bsk--base`](/docs/layout/bsk--base.md)
151
- * [`bsk--standard`](/docs/layout/bsk--standard.md)
152
- * [`bsk--standard-page`](/docs/layout/bsk--standard-page.md)
297
+ * `orcid_id` the ORCID iD of an individual as a URL
153
298
 
154
- **Note:** The `bsk--stardard-page` layout is only available in this theme.
299
+ ```
300
+ {% include bas-style-kit/bsk--pattern--orcid-id.html orcid_id="https://sandbox.orcid.org/0000-0001-8373-6934" %}
301
+ ```
155
302
 
156
- Layouts inheriting from the `bsk--standard` layout can add additional classes to the `#main-content` element by setting
157
- the `main_content_classes` variable in each layout.
303
+ **Note:** If not already included via a layout, include
304
+ [Font Awesome](https://style-kit.web.bas.ac.uk/core/icons/#font-awesome) to show the ORCID symbol.
305
+
306
+ ### Using custom CSS/JS
307
+
308
+ Support is provided for loading additional CSS an/or JavaScript resources, such as application or website specific
309
+ styling or interactivity, either as references to files.
310
+
311
+ This support is available in all layouts which inherit from the `bsk--basic.html` layout.
312
+
313
+ For file resources, variables are provided for adding URLs and optional SRI values. Files will be included in the
314
+ relevant block automatically, after the Style Kit's own resources if a Style Kit layout is used.
315
+
316
+ * CSS resources are outputted at the end of the `<head>` element
317
+ * JS resources are outputted at the end of the `<body>` element
318
+
319
+ Add these lines to your `_config.yml` file:
320
+
321
+ ```yml
322
+ bas_style_kit_jekyll_theme:
323
+ attributes:
324
+ site_styles:
325
+ -
326
+ href: '/css/main.css'
327
+ type: 'local'
328
+ site_scripts:
329
+ -
330
+ href: 'https://example.com/js/example.js'
331
+ integrity: 'abc123'
332
+ type: 'remote'
333
+ ```
334
+
335
+ #### Resource objects
336
+
337
+ Resource objects have the following properties:
338
+
339
+ | Property | Data Type | Required | Allowed Values | Example Value |
340
+ | ----------- | --------- | -------- | ------------------- | ------------------------------------------------------ |
341
+ | `href` | String | Yes | Any URL | `/css/app.css` / `https://example.com/js/app.js` |
342
+ | `type` | String | Yes | `local` or `remote` | `local` |
343
+ | `integrity` | String | No | Any SRI value | `sha256-ClILH8AIH4CkAybtlKhzqqQUYR4eSDiNTK5LIWfF4qQ=` |
344
+
345
+ The `integrity` property is used to specify a
346
+ [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) value for
347
+ a resource. If specified an `integrity` attribute and will be added to the generated markup. A `crossorigin`
348
+ attribute will also be added for
349
+ [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) support with a
350
+ hard-coded, `anonymous`, value.
351
+
352
+ ### Navigation menu items
353
+
354
+ When using the `bsk--standard.html` layout, a [navbar](https://style-kit.web.bas.ac.uk/components/navbar/) is included
355
+ as part of the 'standard header', which consists of a cookie banner, navbar and site development phase banner.
356
+
357
+ This navbar consists of three menus (and other elements, documented elsewhere):
358
+
359
+ 1. a primary navigation menu - aligned left, after [brand elements](#navigation-branding)
360
+ 2. a secondary navigation menu - aligned right, before the launcher menu
361
+ 3. a navigation launcher menu - aligned right, after the secondary navigation menu
362
+
363
+ The navigation launcher is a restricted menu, used to link to other BAS websites and applications. By default it
364
+ contains links to the [BAS public website](https://www.bas.ac.uk) and the [BAS data catalogue](https://data.bas.ac.uk).
365
+ Other websites and applications can be added as well where relevant.
366
+
367
+ The primary and secondary navigation menu's support:
368
+
369
+ * [navbar items](https://style-kit.web.bas.ac.uk/components/navbar/#item)
370
+ * [navbar drop-down menus](https://style-kit.web.bas.ac.uk/components/navbar/#drop-down-menus)
371
+ * [navbar drop-down menu items](https://style-kit.web.bas.ac.uk/components/navbar/#drop-down-menus)
372
+
373
+ The navigation launcher menu, which is implemented as a drop-down menu, supports:
374
+
375
+ * [navbar drop-down menu items](https://style-kit.web.bas.ac.uk/components/navbar/#drop-down-menus)
376
+
377
+ All navigation menus are implemented using the [Jekyll menus](https://github.com/forestryio/jekyll-menus) plugin.
378
+
379
+ * primary navigation menu items should be added to the `site_navigation_primary` menu
380
+ * secondary navigation menu items should be added to the `site_navigation_secondary` menu
381
+ * navigation launcher menu items should be added to the `site_navigation_launcher` menu
382
+
383
+ **Note:** Menu items are only recursed once, deeper objects will be ignored.
384
+
385
+ ### Navigation branding
386
+
387
+ [Navbars](https://style-kit.web.bas.ac.uk/components/navbar/) are also used to display the name/identity of a website
388
+ or application, to remind users where they are. These elements are referred to as 'brand' elements within the Style Kit.
389
+
390
+ In the 'standard header', navbar brand elements are shown on the far left.
391
+
392
+ Supported brand elements:
393
+
394
+ * [brand text](https://style-kit.web.bas.ac.uk/components/navbar/#brand-text) - set using the
395
+ `bas_style_kit_jekyll_theme.attributes.site_brand.text` config variable
396
+ * [brand image](https://style-kit.web.bas.ac.uk/components/navbar/#brand-image) - set using the
397
+ `bas_style_kit_jekyll_theme.attributes.site_brand.img` config variable
398
+
399
+ Brand elements can be used together or individually, with fix classes applied automatically as needed.
400
+
401
+ Brand elements are linked to a location specified by the `bas_style_kit_jekyll_theme.attributes.site_brand.href` config
402
+ variable, which should be the index of each website or application (i.e. `/`).
403
+
404
+ ### Site development phase
405
+
406
+ The site development phase reflects the stage of development for a website or application, e.g. alpha or live. They are
407
+ described in the Style Kit [here](https://style-kit.web.bas.ac.uk/core/colours/#development-phase-colours).
408
+
409
+ For websites or applications that are not firmly in the 'live' phase, a banner should be shown to inform users and
410
+ request feedback. This forms part of the 'standard header' of cookie banner, navbar and site development phase banner.
411
+
412
+ In these templates, the `bas_style_kit_jekyll_theme.attributes.site_development_phase` config variable is used to
413
+ specify the current phase for a website or application. When using the `bsk--standard.html`layout, a banner will be
414
+ shown automatically based on this variable.
415
+
416
+ To disable this banner, set the `bas_style_kit_jekyll_theme.attributes.site_development_phase` config variable to
417
+ `live-stable`. This isn't a real phase but separates a newly released website or application from something more mature.
158
418
 
159
419
  For example:
160
420
 
421
+ ```yml
422
+ bas_style_kit_jekyll_theme:
423
+ attributes:
424
+ site_development_phase: 'alpha'
161
425
  ```
162
- ---
163
- layout: bas-style-kit/bsk--standard
164
- main_content_classes: bsk-pattern-page-not-found
165
- ---
166
426
 
167
- <h1 class="bsk-page-header">Page not found</h1>
427
+ #### Experimental development phase
428
+
429
+ Alternatively, the `bas_style_kit_jekyll_theme.attributes.site_development_phase` config variable can be set to
430
+ `experimental` to indicate where an website or application is used for staging or other development/testing activities.
431
+
432
+ For example:
433
+
434
+ ```yml
435
+ bas_style_kit_jekyll_theme:
436
+ attributes:
437
+ site_development_phase: 'experimental'
168
438
  ```
169
439
 
170
- ### Includes
440
+ ### Website analytics
171
441
 
172
- Refer to [Jekyll's documentation](https://jekyllrb.com/docs/include/) for general information.
442
+ To include the Google Analytics universal tracking library (gtag), set the
443
+ `bas_style_kit_jekyll_theme.attributes.site_analytics.id` property to relevant Google Analytics property ID.
173
444
 
174
- This theme uses includes extensively to give fine grained control over how elements such as the navbar behave, including
175
- both their content and structure.
445
+ **Note:** When used, the anonymise IP option in Google Analytics is enabled by default.
176
446
 
177
- Includes are often used conditionally using a related configuration option, to be disabled more easily.
447
+ For example:
448
+
449
+ ```yml
450
+ bas_style_kit_jekyll_theme:
451
+ attributes:
452
+ site_analaytics:
453
+ id: '123abc'
454
+ ```
455
+
456
+ ## Components
457
+
458
+ Components in these templates are structured according to Jekyll's conventions (e.g. layouts in `_layouts/`). They are
459
+ also namespaced in a `bas-style-kit` directory (e.g. `_layouts/bas-style-kit/`). Components that are specific to the
460
+ Style Kit are prefixed with `bsk--`.
461
+
462
+ ### Views
463
+
464
+ Views are used for implementing [page patterns](#page-patterns). They are essentially layouts but with predefined page
465
+ content relevant to each pattern.
466
+
467
+ Within Jekyll, views are implemented as layouts. To use a view, create a page with the relevant 'view' layout.
468
+
469
+ ```
470
+ ---
471
+ layout: views/bas-style-kit/page-not-found
472
+ ---
473
+ ```
178
474
 
179
- All includes use the `.html` extension. I.e. the include `body` should be referenced as `body.html`.
475
+ Views for some pattern variants can be used as-is, others require variables or page content to be set as well. See the
476
+ [Page patterns](#page-patterns) section for more information.
180
477
 
181
- All includes are namespaced using a `bas-style-kit/` directory - i.e. the include `body.html` should be referenced as
182
- `bas-style-kit/body.html`.
478
+ ### Layouts
183
479
 
184
- #### Generic includes
480
+ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/layouts/) for general information.
185
481
 
186
- * [`head`](/docs/include/head.md)
187
- * [`body`](/docs/include/body.md)
188
- * [`toc`](/docs/include/toc.md)
482
+ Layouts are 'base' templates from which views or other layouts inherit. Layouts in this theme are hierarchical, with
483
+ each layout extending the last in this order:
189
484
 
190
- #### Style Kit specific includes
485
+ * `blank.html`: lowest level layout, intentionally as minimal as possible and not intended for direct use, unless
486
+ non-HTML output is needed
487
+ * `html.html`: defines a minimal, accessible, HTML5 structure with some recommended best practices for cross-platform
488
+ compatibility
489
+ * `bsk--base.html`: intentionally implements the BAS Style Kit as minimally as possible and not intended for direct use,
490
+ unless the bsk_standard.j2 layout is unsuitable
491
+ * `bsk--standard.html`: defines an opinionated, conventional, page layout with a 'standard' header/footer, recommended
492
+ as a base for application/website layouts
493
+ * `bsk--standard-page.html`: defines an opinionated, conventional, content page layout, recommended as a base for
494
+ content type websites, such as documentation
191
495
 
192
- * [`bsk-head`](/docs/include/bsk-head.md)
193
- * [`bsk-body`](/docs/include/bsk-body.md)
194
- * [`bsk-body--standard`](/docs/include/bsk-body--standard.md)
496
+ For example:
195
497
 
196
- HTML Head includes:
498
+ ```markdown
499
+ ---
500
+ layout: bas-style-kit/html
501
+ ---
197
502
 
198
- * [`bsk-head--core-meta`](/docs/include/bsk-head--core-meta.md)
199
- * [`bsk-head--seo-meta`](/docs/include/bsk-head--seo-meta.md)
200
- * [`bsk-head--core-styles`](/docs/include/bsk-head--core-styles.md)
201
- * [`bsk-head--favicon`](/docs/include/bsk-head--favicon.md)
503
+ Page content
504
+ ```
202
505
 
203
- HTML Body includes:
506
+ Layouts inheriting from the `bsk--standard` layout can add additional classes to the `#main-content` element by setting
507
+ the `main_content_classes` variable in each layout.
204
508
 
205
- * [`bsk-body--core-scripts`](/docs/include/bsk-body--core-scripts.md)
206
- * [`bsk-body--analytics-script`](/docs/include/bsk-body--analytics-script.md)
207
- * [`bsk-body--back-to-top`](/docs/include/bsk-body--back-to-top.md)
208
- * [`bsk-body--standard-header`](/docs/include/bsk-body--standard-header.md)
209
- * [`bsk-body--standard-footer`](/docs/include/bsk-body--standard-footer.md)
210
- * [`bsk-body--page-header`](/docs/include/bsk-body--page-header.md)
211
- * [`bsk-body--toc`](/docs/include/bsk-body--toc.md)
509
+ For example:
212
510
 
213
- Footer includes:
511
+ ```markdown
512
+ ---
513
+ layout: bas-style-kit/bsk--standard
514
+ main_content_classes: foo
515
+ ---
214
516
 
215
- * [`bsk-footer--back-to-top`](/docs/include/bsk-footer--back-to-top.md)
216
- * [`bsk-footer--contents`](/docs/include/bsk-footer--contents.md)
217
- * [`bsk-footer--governance`](/docs/include/bsk-footer--governance.md)
218
- * [`bsk-footer--is-something-wrong`](/docs/include/bsk-footer--is-something-wrong.md)
219
- * [`bsk-footer--legal-policies`](/docs/include/bsk-footer--legal-policies.md)
517
+ Page content
518
+ ```
220
519
 
221
- Header includes:
520
+ ### Includes
222
521
 
223
- * [`bsk-header--cookie-notice`](/docs/include/bsk-header--cookie-notice.md)
224
- * [`bsk-header--site-navigation`](/docs/include/bsk-header--site-navigation.md)
225
- * [`bsk-header--development-phase`](/docs/include/bsk-header--development-phase.md)
522
+ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/includes/) for general information.
226
523
 
227
- Navigation includes:
524
+ This theme uses includes extensively to give fine grained control over how elements such as the navbar behave, including
525
+ both their content and structure.
228
526
 
229
- * [`bsk-nav--header`](/docs/include/bsk-nav--header.md)
230
- * [`bsk-nav--collapse`](/docs/include/bsk-nav--collapse.md)
231
- * [`bsk-nav-header--collapse-trigger`](/docs/include/bsk-nav-header--collapse-trigger.md)
232
- * [`bsk-nav-header--brand`](/docs/include/bsk-nav-header--brand.md)
233
- * [`bsk-nav-collapse--primary-navigation`](/docs/include/bsk-nav-collapse--primary-navigation.md)
234
- * [`bsk-nav-collapse--secondary-navigation`](/docs/include/bsk-nav-collapse--secondary-navigation.md)
527
+ Includes are often used conditionally using a related configuration option, to be disabled more easily.
235
528
 
236
529
  ### Data files
237
530
 
@@ -239,15 +532,9 @@ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/datafiles/) for gene
239
532
 
240
533
  This theme uses data files to define CSS and JavaScript resources to load and for some variables about the theme.
241
534
 
242
- All data files use the `.yml` (Yaml) extension and are namespaced using a `bas-style-kit/` directory - i.e. a data
535
+ All data files use the `.yml` (Yaml) extension and are namespaced using a `bas-style-kit/` directory - i.e. a data
243
536
  element `foo` in the data file `bsk-vars.yml` is available as `site.data.bas-style-kit.bsk-vars.foo`.
244
537
 
245
- #### Style Kit specific data files
246
-
247
- * [bsk-css](/data-file/bsk-css.md)
248
- * [bsk-js](/data-file/bsk-js.md)
249
- * [bsk-vars](/data-file/bsk-vars.md)
250
-
251
538
  ### Variables
252
539
 
253
540
  Refer to [Jekyll's documentation](https://jekyllrb.com/docs/variables/) for general information.
@@ -266,7 +553,7 @@ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/configuration/) for
266
553
  Configuration options are used extensively throughout this theme. Some variables are used to set properties such as the
267
554
  brand text or image in the navbar (attributes), others are used to enable various features (feature flags).
268
555
 
269
- Configuration options operate at different scopes, *site* or *page*. Site options applies to across a site, whereas
556
+ Configuration options operate at different scopes, *site* or *page*. Site options applies to across a site, whereas
270
557
  page options can be applied to specific content items. Default values can be set for page options, which can then be
271
558
  overridden by specific content items.
272
559
 
@@ -290,25 +577,84 @@ bas_style_kit_jekyll_theme:
290
577
  back_to_top_anchor: '[value]'
291
578
  ```
292
579
 
293
- #### Style Kit specific configuration options
294
-
295
- * [feature flags](/docs/config/feature-flags.md)
296
- * [attributes](/docs/config/attributes.md)
580
+ These config options can be set at a page, collection or site level:
581
+
582
+ * `bas_style_kit_jekyll_theme.feature_flags.page.toc`
583
+
584
+ These config options should be changed or set for each website or application:
585
+
586
+ * `bas_style_kit_jekyll_theme.attributes.head_title.default`
587
+ * `bas_style_kit_jekyll_theme.attributes.head_title.appended`
588
+ * `bas_style_kit_jekyll_theme.attributes.head_description`
589
+ * `bas_style_kit_jekyll_theme.attributes.site_analytics.id`
590
+ * `bas_style_kit_jekyll_theme.attributes.site_brand.text`
591
+ * `bas_style_kit_jekyll_theme.attributes.site_development_phase`
592
+ * `bas_style_kit_jekyll_theme.attributes.site_feedback_href`
593
+ * `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.cookies_href`
594
+ * `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.copyright_href`
595
+ * `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.privacy_href`
596
+
597
+ These config options may, but don't need to be, changed or set for each website or application:
598
+
599
+ * `bas_style_kit_jekyll_theme.attributes.container`
600
+ * `bas_style_kit_jekyll_theme.attributes.site_styles`
601
+ * `bas_style_kit_jekyll_theme.attributes.site_scripts`
602
+ * `bas_style_kit_jekyll_theme.attributes.head_favicon`
603
+ * `bas_style_kit_jekyll_theme.attributes.site_brand.img`
604
+ * `bas_style_kit_jekyll_theme.attributes.site_brand.href`
605
+
606
+ These config options do not normally, and should not, need to be changed or set:
607
+
608
+ * `bas_style_kit_jekyll_theme.attributes.site_back_to_top_target_href`
609
+ * `bas_style_kit_jekyll_theme.attributes.site_footer.ogl.href`
610
+ * `bas_style_kit_jekyll_theme.attributes.site_footer.ogl.version`
611
+
612
+ These config options must not be changed and should be treated as read only:
613
+
614
+ * `site.data.bas-style-kit.bsk-vars.theme_version`
615
+ * `site.data.bas-style-kit.bsk-vars.bsk_version`
616
+
617
+ | Config Option | Value Type | Allowed Values | Default Value | Notes |
618
+ | --------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------- |
619
+ | `bas_style_kit_jekyll_theme.feature_flags.page.toc` | Boolean | `true` / `false` | `true` | Whether to show the table of contents in standard pages |
620
+ | `bas_style_kit_jekyll_theme.attributes.head_title.default` | String | Any string | 'site title' | Typically 1-3 words |
621
+ | `bas_style_kit_jekyll_theme.attributes.head_title.appended` | String | Any string | *None* | Typically 1-3 words |
622
+ | `bas_style_kit_jekyll_theme.attributes.head_description` | String | Any string | 'site description' | Typically 1-2 sentences |
623
+ | `bas_style_kit_jekyll_theme.attributes.site_analytics.id` | String | Google Analytics property ID | *None* | See [Site analytics](#site-analytics) |
624
+ | `bas_style_kit_jekyll_theme.attributes.site_brand.text` | String | Any string | 'site title' | Typically 1-3 words |
625
+ | `bas_style_kit_jekyll_theme.attributes.site_development_phase` | String | `discovery` / `alpha` / `beta` / `live` / `live-stable` / `retired` / `experimental` / `custom` | 'alpha' | See [Site development phase](#site-development-phase) |
626
+ | `bas_style_kit_jekyll_theme.attributes.site_feedback_href` | String | URL to feedback page or other content (e.g. model overlay) | '/feedback.html' | - |
627
+ | `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.cookies_href` | String | URL to cookies legal policy | '/legal/cookies' | - |
628
+ | `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.copyright_href` | String | URL to copyright legal policy | '/legal/copyright' | - |
629
+ | `bas_style_kit_jekyll_theme.attributes.site_footer.legal_policies.privacy_href` | String | URL to privacy legal policy | '/legal/privacy' | - |
630
+ | `bas_style_kit_jekyll_theme.attributes.container` | String | `fixed` / `fluid` | 'fixed' | - |
631
+ | `bas_style_kit_jekyll_theme.attributes.site_styles` | Array | Site style object | *Empty array* | See [Using custom CSS/JS](#using-custom-cssjs) |
632
+ | `bas_style_kit_jekyll_theme.attributes.site_scripts` | Array | Site script object | *Empty array* | See [Using custom CSS/JS](#using-custom-cssjs) |
633
+ | `bas_style_kit_jekyll_theme.attributes.head_favicon` | String | `default` | 'default' | The favicon to use, use 'default' the standard BAS favicon |
634
+ | `bas_style_kit_jekyll_theme.attributes.site_brand.img` | String | URL to image | *None* | See [Navigation menu branding](#navigation-menu-branding) |
635
+ | `bas_style_kit_jekyll_theme.attributes.site_brand.href` | String | URL to content | '/' | See [Navigation menu branding](#navigation-menu-branding) |
636
+ | `bas_style_kit_jekyll_theme.attributes.site_back_to_top_target_href` | String | CSS ID selector | '#site-top' | - |
637
+ | `bas_style_kit_jekyll_theme.attributes.site_footer.ogl.href` | String | URL to OGL information page | *As implemented* | - |
638
+ | `bas_style_kit_jekyll_theme.attributes.site_footer.ogl.version` | String | Any OGL version | *As implemented* | - |
639
+ | `site.data.bas-style-kit.bsk-vars.theme_version` | String | Any [SemVer](https://semver.org/) value | *As implemented* | - |
640
+ | `site.data.bas-style-kit.bsk-vars.bsk_version` | String | Any BAS Style Kit version | *As implemented* | - |
297
641
 
298
642
  ### Plugins
299
643
 
300
644
  This theme depends on these plugins:
301
645
 
302
646
  * [Jekyll data](https://github.com/ashmaroli/jekyll-data) - for including theme data files into a site's configuration
303
- * [Jekyll menu](https://github.com/forestryio/jekyll-menus) - for managing navigation menus
647
+ * [Jekyll menus](https://github.com/forestryio/jekyll-menus) - for managing navigation menus
304
648
  * [Jekyll tidy](https://github.com/apsislabs/jekyll-tidy) - for rewriting HTML output to be well structured
305
649
 
650
+ **Note:** A patched version of the *Jekyll menus* plugin is used to fix a Ruby 3.0 incompatibility.
651
+
306
652
  ## Development
307
653
 
308
- [Git](https://git-scm.com), [Docker](https://www.docker.com/community-edition) and
654
+ [Git](https://git-scm.com), [Docker](https://www.docker.com/community-edition) and
309
655
  [Docker Compose](https://docs.docker.com/compose/overview/) are required to build this project locally.
310
656
 
311
- To update the Docker image for this project, access to the private
657
+ To update the Docker image for this project, access to the private
312
658
  [BAS Docker Registry](https://docker-registry.data.bas.ac.uk) [1] is also required.
313
659
 
314
660
  ```shell
@@ -319,7 +665,7 @@ $ docker-compose up
319
665
 
320
666
  Visit [localhost:9000](http://localhost:9000) to see a preview of the theme.
321
667
 
322
- **Note:** If you don't have access to the BAS Private Docker Registry, you will need to build the project Docker image
668
+ **Note:** If you don't have access to the BAS Private Docker Registry, you will need to build the project Docker image
323
669
  locally first using `docker-compose build`.
324
670
 
325
671
  [1] The first time you use this registry, you will need to authenticate using:
@@ -330,7 +676,7 @@ $ docker login docker-registry.data.bas.ac.uk
330
676
 
331
677
  ### Updating dependencies
332
678
 
333
- If the `.gemspec` for this project is changed, the project Docker image will need to be rebuilt and pushed to the
679
+ If the `.gemspec` for this project is changed, the project Docker image will need to be rebuilt and pushed to the
334
680
  private BAS Docker Repository [1].
335
681
 
336
682
  ```shell
@@ -352,7 +698,7 @@ They will be installed automatically when this theme is used by an end-user.
352
698
 
353
699
  ### Jekyll config options
354
700
 
355
- The Jekyll Data plugin is used to set config options within sites that use this theme. Make sure to document which
701
+ The Jekyll Data plugin is used to set config options within sites that use this theme. Make sure to document which
356
702
  config options are set by this theme.
357
703
 
358
704
  ### Ruby Gem
@@ -361,12 +707,12 @@ This theme is distributed as a Ruby Gem, through the public [Ruby Gems](https://
361
707
 
362
708
  The `jekyll-theme-bas-style-kit.gemspec` file details the properties of the Gem for this project.
363
709
 
364
- **Note:** The `spec.files` parameter controls which files in this project are copied into the Gem. If a file is not
710
+ **Note:** The `spec.files` parameter controls which files in this project are copied into the Gem. If a file is not
365
711
  listed it won't be included. This is separate to the Git `.gitignore` file.
366
712
 
367
713
  ## GitHub mirror
368
714
 
369
- A read-only mirror of this project's repository is maintained on GitHub, to support Jekyll's automatic theme
715
+ A read-only mirror of this project's repository is maintained on GitHub, to support Jekyll's automatic theme
370
716
  installation, and to allow use by those outside of BAS.
371
717
 
372
718
  Merge requests **WILL NOT** be accepted on this mirror.
@@ -376,11 +722,7 @@ Merge requests **WILL NOT** be accepted on this mirror.
376
722
  Before release:
377
723
 
378
724
  1. create a release branch
379
- 2. remove `-develop` from the version in:
380
- * `jekyll-theme-bas-style-kit.gemspec`
381
- * `docker-compose.yml`
382
- * `_data/bsk_jekyll_vars.json`
383
- 3. push the app docker image [1]
725
+ 3. build and push the app docker image [1]
384
726
  4. if new config options have been set, update the usage section
385
727
  5. update screen-shot (width: 900px)
386
728
  6. close release in changelog
@@ -391,11 +733,10 @@ Before release:
391
733
 
392
734
  After release:
393
735
 
394
- 1. bump the version with `-develop` as a prefix in:
736
+ 1. bump the version in:
395
737
  * `jekyll-theme-bas-style-kit.gemspec`
396
- * `docker-compose.yml`
397
738
  * `_data/bsk_jekyll_vars.json`
398
- 2. push the app docker image [1]
739
+ 2. build and push the app docker image [1]
399
740
  3. commit changes, merge with master and close release branch
400
741
 
401
742
  [1]
@@ -408,28 +749,26 @@ $ docker-compose push
408
749
  [2]
409
750
 
410
751
  ```shell
411
- $ docker-compose run --entrypoint=[] app ash
752
+ $ docker-compose run --entrypoint="" app ash
412
753
  $ gem build jekyll-theme-bas-style-kit.gemspec
413
754
  $ gem push jekyll-theme-bas-style-kit-*.gem
414
755
  ```
415
756
 
416
757
  ## Issue tracking
417
758
 
418
- This project uses [issue tracking](https://trello.com/b/0Mhzizpk/bas-style-kit) to manage development of new
759
+ This project uses [issue tracking](https://trello.com/b/0Mhzizpk/bas-style-kit) to manage development of new
419
760
  features/improvements and reporting bugs.
420
761
 
421
- **Note:** Read & write access to this issue tracker is restricted. Contact the project maintainer to request access.
422
-
423
762
  ## Feedback
424
763
 
425
- The maintainer of this project is the BAS Web & Applications Team, they can be contacted through the
764
+ The maintainer of this project is the BAS Web & Applications Team, they can be contacted through the
426
765
  [BAS Service Desk](mailto:servicedesk@bas.ac.uk).
427
766
 
428
767
  ## License
429
768
 
430
- © UK Research and Innovation (UKRI), 2017-2018, British Antarctic Survey.
769
+ © UK Research and Innovation (UKRI), 2017-2021, British Antarctic Survey.
431
770
 
432
- You may use and re-use this software and associated documentation files free of charge in any format or medium, under
771
+ You may use and re-use this software and associated documentation files free of charge in any format or medium, under
433
772
  the terms of the Open Government Licence v3.0.
434
773
 
435
774
  You may obtain a copy of the Open Government Licence at http://www.nationalarchives.gov.uk/doc/open-government-licence/