jekyll-theme-bas-style-kit 0.5.0 → 0.10.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: 89c327ba8fda0366d129d83bf7377e02520027cdf14f228d5cbb0b0526d0041c
4
- data.tar.gz: 3ebf7581bb4114d223c746711e762150c6f5309ee981c21520d5869e23a50f79
3
+ metadata.gz: b908438db459e82826393134d985468e10310620aa50ad9aa64a37ea3f2315d3
4
+ data.tar.gz: 0a0cf92ed57a4d435fc80edc4e967d76517b4c1c070952a3af97dc443bb097ed
5
5
  SHA512:
6
- metadata.gz: 11477eb8b9156a57d3f7c15f077e99bba66294d5eb62ceb0062ef1dfa5fc1d44c50071e1a608d2588ca1c4be748abcbcc2e537c6642a510b0982d843e9cdf11a
7
- data.tar.gz: 48826acebfe2ad7a89895838897d368913115b7f53a1f48a2b65b6f105d5e49fb7db679ae8afcc2370e92dd9caaf5a5a2c6666feba258d65ad542197d63188a8
6
+ metadata.gz: 6798c1642676febbb0a84bc8cc86737252bdcb802707fa8a568152f72860a43732d4c89e9f09233d5c5169ebbbb59d35a6ac696e4eb6b642cbef9d0f206ce44c
7
+ data.tar.gz: 8802655c6262bc25076cda5fc0c4a3064ed64b82dc331bf9585337940bae59ae139c8f92d2e2d6273f27c3f14c0da5ee722d5ddf5862812fe357140b43456964
@@ -5,6 +5,103 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ### Removed
9
+
10
+ * Synk testing due to incompatibility with modern bundler versions
11
+
12
+ ## 0.10.0 - 2020-06-27
13
+
14
+ ### Added
15
+
16
+ * Updated to Style Kit 0.6.0-beta
17
+ * Updated to JS Cookie 2.2.1
18
+ * Updated to jQuery 3.5.1
19
+ * Updated to Jekyll 4.1
20
+ * Updated Ruby dependencies
21
+ * Missing patterns for start and 'sign in' page patterns
22
+ * Support for new component patterns (item type header and ORCID iD)
23
+
24
+ ### Changed
25
+
26
+ * Feedback links changed to open in a new tab
27
+ * Updated licence dates
28
+ * Updated release procedures
29
+
30
+ ## 0.9.0 - 2019-07-02
31
+
32
+ ### Added
33
+
34
+ * Updated to Style Kit 0.6.0-alpha
35
+
36
+ ### Fixed
37
+
38
+ * Updating Gem lock file to fix gem versioning issue
39
+ * Correcting use of deprecated `js-libs` in the BAS CDN
40
+
41
+ ### Changed
42
+
43
+ * Major refactoring and simplification of README and other documentation
44
+ * Removing versioning from Docker containers
45
+
46
+ ## 0.8.0 - 2018-11-28
47
+
48
+ ### Added
49
+
50
+ * Updated dependencies for internal Gem test site
51
+ * Updated to Style Kit 0.5.0
52
+ * Tracking Gem lock file within project
53
+
54
+ ## 0.7.0 - 2018-11-24
55
+
56
+ ### Added
57
+
58
+ * 'Problem with this service' (basic) page pattern variant
59
+ * 'Problem with this service' (contact) page pattern variant
60
+ * 'Problem with this service' (alternative) page pattern variant
61
+ * 'Service unavailable' (contact) page pattern variant
62
+ * 'Service unavailable' (availability) page pattern variant
63
+ * 'Service unavailable' (alternative) page pattern variant
64
+ * 'Service unavailable' (partly closed) page pattern variant
65
+ * 'Service unavailable' (closed) page pattern variant
66
+ * 'Service unavailable' (replaced) page pattern variant
67
+ * Updated to Jekyll 3.8.5 to address security vulnerability
68
+ * Updated to Style Kit 0.5.0-beta
69
+ * Snyk dependency scanning support
70
+
71
+ ### Fixed
72
+
73
+ * README typo
74
+
75
+ ### Changed
76
+
77
+ * Improving release procedures
78
+
79
+ ## 0.6.0 - 2018-09-18
80
+
81
+ ### Changed [BREAKING!]
82
+
83
+ * Icon uses replaced with alternatives or removed where not needed due to the removal of Font Awesome
84
+ * Favicon attribute option changed, set `bas_style_kit_jekyll_theme.attributes.head_favicon` to `default` for the Style
85
+ Kit favicon, other values will be ignored and no favicon will be set
86
+
87
+ ### Added
88
+
89
+ * Updated to Style Kit 0.5.0-alpha
90
+ * Implemented Style Kit Favicon
91
+ * Implemented 'page not found' pattern and support for design patterns generally
92
+ * Implemented 'Service unavailable (basic)' pattern
93
+ * Ruby dependencies are now scanned for vulnerabilities using Snyk
94
+
95
+ ### Changed
96
+
97
+ * Updating order of navigation launcher items
98
+ * Improving Dockerfiles
99
+ * Improving internal test content
100
+
101
+ ### Fixed
102
+
103
+ * Corrected link to issue tracker
104
+
8
105
  ## 0.5.0 - 2018-07-06
9
106
 
10
107
  ### Fixed
@@ -54,7 +151,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
54
151
  * Re-licensing project under the Open Government License
55
152
  * Upgrading to Jekyll 3.7.2
56
153
  * Upgrading to Style Kit 0.3.0
57
- * Layouts, includes and data files are now in a `bas-style-kit` namespace
154
+ * Layouts, includes and data files are now in a `bas-style-kit` namespace
58
155
  * Generic *blank* and *HTML* layouts and associated includes have been redeveloped
59
156
  * The Style Kit layout has been split into *base* and *standard* layouts
60
157
  * 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-2020, 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
 
@@ -20,11 +20,11 @@ $ bundle
20
20
 
21
21
  Or install it yourself as:
22
22
 
23
- ```
23
+ ```shell
24
24
  $ gem install jekyll-theme-bas-style-kit
25
25
  ```
26
26
 
27
- Add these lines to your `_config.yml` to use the Style Kit theme:
27
+ Finally, to use the theme, add this line to your `_config.yml` file:
28
28
 
29
29
  ```yaml
30
30
  theme: jekyll-theme-bas-style-kit
@@ -34,106 +34,497 @@ theme: jekyll-theme-bas-style-kit
34
34
 
35
35
  Refer to [Jekyll's theme documentation](https://jekyllrb.com/docs/themes/) for general information.
36
36
 
37
- ### Layouts
37
+ ### Quick start
38
38
 
39
- This theme defines two types of layout:
39
+ Add these lines to your `_config.yml` file:
40
40
 
41
- * *generic* - non Style Kit specific intended for atypical content
42
- * *non-generic* - implement the Style Kit either broadly or in more opinionated forms
41
+ ```yml
42
+ bas_style_kit_jekyll_theme:
43
+ attributes:
44
+ head_title:
45
+ default: 'Example service'
46
+ appended: ' - Example service'
47
+ head_description: 'Service to act as an example'
48
+ site_brand:
49
+ text: 'Example service'
50
+ href: '/'
51
+ site_development_phase: 'beta'
52
+ site_feedback_href: '/feedback'
53
+ legal_policies:
54
+ cookies_href: '/legal/cookies'
55
+ copyright_href: '/legal/copyright'
56
+ privacy_href: '/legal/privacy'
57
+ # Optional - add a custom CSS file with a relative URL
58
+ site_styles:
59
+ -
60
+ href: '/css/main.css'
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
+ ```
43
74
 
44
- All layouts use the `.html` extension. I.e. the layout `blank` should be referenced as `blank.html`.
75
+ To optionally add navigation menu items, add these lines to `_data/menus.yml`:
45
76
 
46
- All layouts are namespaced using a `bas-style-kit/` directory - i.e. the layout `blank.html` should be referenced as
47
- `bas-style-kit/blank.html`.
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
48
92
 
49
- To use a layout by default add the following to your `_config.yml`:
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:
50
103
 
51
104
  ```yml
52
105
  defaults:
53
106
  -
54
107
  scope:
55
- # an empty string here means all files in the project
108
+ # An empty string here means all files in the project
56
109
  path: ""
57
110
  values:
58
- layout: "bas-style-kit/bsk--standard"
111
+ layout: "app"
59
112
  ```
60
113
 
61
- #### Generic layouts
114
+ #### Use a page pattern
62
115
 
63
- * [`blank`](/docs/layout/blank.md)
64
- * [`html`](/docs/layout/html.md)
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:
65
118
 
66
- #### Style Kit specific layouts
119
+ ```html
120
+ ---
121
+ layout: views/bas-style-kit/[page-pattern]
122
+ ---
123
+ ```
67
124
 
68
- * [`bsk--base`](/docs/layout/bsk--base.md)
69
- * [`bsk--standard`](/docs/layout/bsk--standard.md)
70
- * [`bsk--standard-page`](/docs/layout/bsk--standard-page.md)
125
+ Where `[page-pattern]` in the extends value is the name of a page pattern, for example:
71
126
 
72
- ### Includes
127
+ ```html
128
+ ---
129
+ layout: views/bas-style-kit/bsk--page-not-found
130
+ ---
131
+ ```
73
132
 
74
- Refer to [Jekyll's documentation](https://jekyllrb.com/docs/include/) for general information.
133
+ #### Use a component pattern
75
134
 
76
- This theme uses includes extensively to give fine grained control over how elements such as the navbar behave, including
77
- both their content and structure.
135
+ To include a [component pattern](#component-pattern), call the relevant include with an required parameters.
136
+ For example:
78
137
 
79
- Includes are often used conditionally using a related configuration option, to be disabled more easily.
138
+ ```
139
+ {% include bas-style-kit/bsk--pattern--item-type-header.html item_type="Item type" item_title="Item title" %}
140
+ ```
80
141
 
81
- All includes use the `.html` extension. I.e. the include `body` should be referenced as `body.html`.
142
+ ### Patterns
82
143
 
83
- All includes are namespaced using a `bas-style-kit/` directory - i.e. the include `body.html` should be referenced as
84
- `bas-style-kit/body.html`.
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.
85
146
 
86
- #### Generic includes
147
+ There are two types of pattern used in the Style Kit and these templates:
87
148
 
88
- * [`head`](/docs/include/head.md)
89
- * [`body`](/docs/include/body.md)
90
- * [`toc`](/docs/include/toc.md)
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
- #### Style Kit specific includes
153
+ #### Page patterns
93
154
 
94
- * [`bsk-head`](/docs/include/bsk-head.md)
95
- * [`bsk-body`](/docs/include/bsk-body.md)
96
- * [`bsk-body--standard`](/docs/include/bsk-body--standard.md)
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.
97
157
 
98
- HTML Head includes:
158
+ See the [Style Kit documentation](https://style-kit.web.bas.ac.uk) for general information on using these patterns.
99
159
 
100
- * [`bsk-head--core-meta`](/docs/include/bsk-head--core-meta.md)
101
- * [`bsk-head--seo-meta`](/docs/include/bsk-head--seo-meta.md)
102
- * [`bsk-head--core-styles`](/docs/include/bsk-head--core-styles.md)
103
- * [`bsk-head--favicon`](/docs/include/bsk-head--favicon.md)
160
+ ##### 'page not found' pattern
104
161
 
105
- HTML Body includes:
162
+ No configuration options.
106
163
 
107
- * [`bsk-body--core-scripts`](/docs/include/bsk-body--core-scripts.md)
108
- * [`bsk-body--analytics-script`](/docs/include/bsk-body--analytics-script.md)
109
- * [`bsk-body--back-to-top`](/docs/include/bsk-body--back-to-top.md)
110
- * [`bsk-body--standard-header`](/docs/include/bsk-body--standard-header.md)
111
- * [`bsk-body--standard-footer`](/docs/include/bsk-body--standard-footer.md)
112
- * [`bsk-body--page-header`](/docs/include/bsk-body--page-header.md)
113
- * [`bsk-body--toc`](/docs/include/bsk-body--toc.md)
164
+ ##### 'service unavailable' pattern
114
165
 
115
- Footer includes:
166
+ Use page content for:
116
167
 
117
- * [`bsk-footer--back-to-top`](/docs/include/bsk-footer--back-to-top.md)
118
- * [`bsk-footer--contents`](/docs/include/bsk-footer--contents.md)
119
- * [`bsk-footer--governance`](/docs/include/bsk-footer--governance.md)
120
- * [`bsk-footer--is-something-wrong`](/docs/include/bsk-footer--is-something-wrong.md)
121
- * [`bsk-footer--legal-policies`](/docs/include/bsk-footer--legal-policies.md)
168
+ * contact information
169
+
170
+ Optionally, use page content for:
171
+
172
+ * details of alternative services
173
+
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]
207
+
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
+ ```
218
+
219
+ [2]
220
+
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
+ ```
229
+
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
+ ```
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>
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
268
+ ---
269
+ layout: views/bas-style-kit/bsk--sign-in-microsoft
270
+
271
+ call_to_action_href: #
272
+ ---
273
+ ```
274
+
275
+ #### Component patterns
276
+
277
+ These templates use includes for all component patterns. Include parameters are used for customising each instance of
278
+ the component.
279
+
280
+ See the [Style Kit documentation](https://style-kit.web.bas.ac.uk) for general information on using these patterns.
281
+
282
+ ##### Item type header pattern
283
+
284
+ Parameters:
285
+
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
288
+
289
+ ```html
290
+ {% include bas-style-kit/bsk--pattern--item-type-header.html item_type="Item type" item_title="Item title" %}
291
+ ```
292
+
293
+ ##### ORCID iD pattern
294
+
295
+ Parameters:
296
+
297
+ * `orcid_id` the ORCID iD of an individual as a URL
298
+
299
+ ```
300
+ {% include bas-style-kit/bsk--pattern--orcid-id.html orcid_id="https://sandbox.orcid.org/0000-0001-8373-6934" %}
301
+ ```
302
+
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
+ ```
122
334
 
123
- Header includes:
335
+ #### Resource objects
124
336
 
125
- * [`bsk-header--cookie-notice`](/docs/include/bsk-header--cookie-notice.md)
126
- * [`bsk-header--site-navigation`](/docs/include/bsk-header--site-navigation.md)
127
- * [`bsk-header--development-phase`](/docs/include/bsk-header--development-phase.md)
337
+ Resource objects have the following properties:
128
338
 
129
- Navigation includes:
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=` |
130
344
 
131
- * [`bsk-nav--header`](/docs/include/bsk-nav--header.md)
132
- * [`bsk-nav--collapse`](/docs/include/bsk-nav--collapse.md)
133
- * [`bsk-nav-header--collapse-trigger`](/docs/include/bsk-nav-header--collapse-trigger.md)
134
- * [`bsk-nav-header--brand`](/docs/include/bsk-nav-header--brand.md)
135
- * [`bsk-nav-collapse--primary-navigation`](/docs/include/bsk-nav-collapse--primary-navigation.md)
136
- * [`bsk-nav-collapse--secondary-navigation`](/docs/include/bsk-nav-collapse--secondary-navigation.md)
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.
418
+
419
+ For example:
420
+
421
+ ```yml
422
+ bas_style_kit_jekyll_theme:
423
+ attributes:
424
+ site_development_phase: 'alpha'
425
+ ```
426
+
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'
438
+ ```
439
+
440
+ ### Website analytics
441
+
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.
444
+
445
+ **Note:** When used, the anonymise IP option in Google Analytics is enabled by default.
446
+
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
+ ```
474
+
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.
477
+
478
+ ### Layouts
479
+
480
+ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/layouts/) for general information.
481
+
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:
484
+
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
495
+
496
+ For example:
497
+
498
+ ```markdown
499
+ ---
500
+ layout: bas-style-kit/html
501
+ ---
502
+
503
+ Page content
504
+ ```
505
+
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.
508
+
509
+ For example:
510
+
511
+ ```markdown
512
+ ---
513
+ layout: bas-style-kit/bsk--standard
514
+ main_content_classes: foo
515
+ ---
516
+
517
+ Page content
518
+ ```
519
+
520
+ ### Includes
521
+
522
+ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/includes/) for general information.
523
+
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.
526
+
527
+ Includes are often used conditionally using a related configuration option, to be disabled more easily.
137
528
 
138
529
  ### Data files
139
530
 
@@ -141,15 +532,9 @@ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/datafiles/) for gene
141
532
 
142
533
  This theme uses data files to define CSS and JavaScript resources to load and for some variables about the theme.
143
534
 
144
- 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
145
536
  element `foo` in the data file `bsk-vars.yml` is available as `site.data.bas-style-kit.bsk-vars.foo`.
146
537
 
147
- #### Style Kit specific data files
148
-
149
- * [bsk-css](/data-file/bsk-css.md)
150
- * [bsk-js](/data-file/bsk-js.md)
151
- * [bsk-vars](/data-file/bsk-vars.md)
152
-
153
538
  ### Variables
154
539
 
155
540
  Refer to [Jekyll's documentation](https://jekyllrb.com/docs/variables/) for general information.
@@ -168,7 +553,7 @@ Refer to [Jekyll's documentation](https://jekyllrb.com/docs/configuration/) for
168
553
  Configuration options are used extensively throughout this theme. Some variables are used to set properties such as the
169
554
  brand text or image in the navbar (attributes), others are used to enable various features (feature flags).
170
555
 
171
- 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
172
557
  page options can be applied to specific content items. Default values can be set for page options, which can then be
173
558
  overridden by specific content items.
174
559
 
@@ -192,10 +577,67 @@ bas_style_kit_jekyll_theme:
192
577
  back_to_top_anchor: '[value]'
193
578
  ```
194
579
 
195
- #### Style Kit specific configuration options
196
-
197
- * [feature flags](/docs/config/feature-flags.md)
198
- * [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* | - |
199
641
 
200
642
  ### Plugins
201
643
 
@@ -207,10 +649,10 @@ This theme depends on these plugins:
207
649
 
208
650
  ## Development
209
651
 
210
- [Git](https://git-scm.com), [Docker](https://www.docker.com/community-edition) and
652
+ [Git](https://git-scm.com), [Docker](https://www.docker.com/community-edition) and
211
653
  [Docker Compose](https://docs.docker.com/compose/overview/) are required to build this project locally.
212
654
 
213
- To update the Docker image for this project, access to the private
655
+ To update the Docker image for this project, access to the private
214
656
  [BAS Docker Registry](https://docker-registry.data.bas.ac.uk) [1] is also required.
215
657
 
216
658
  ```shell
@@ -221,7 +663,7 @@ $ docker-compose up
221
663
 
222
664
  Visit [localhost:9000](http://localhost:9000) to see a preview of the theme.
223
665
 
224
- **Note:** If you don't have access to the BAS Private Docker Registry, you will need to build the project Docker image
666
+ **Note:** If you don't have access to the BAS Private Docker Registry, you will need to build the project Docker image
225
667
  locally first using `docker-compose build`.
226
668
 
227
669
  [1] The first time you use this registry, you will need to authenticate using:
@@ -232,7 +674,7 @@ $ docker login docker-registry.data.bas.ac.uk
232
674
 
233
675
  ### Updating dependencies
234
676
 
235
- If the `.gemspec` for this project is changed, the project Docker image will need to be rebuilt and pushed to the
677
+ If the `.gemspec` for this project is changed, the project Docker image will need to be rebuilt and pushed to the
236
678
  private BAS Docker Repository [1].
237
679
 
238
680
  ```shell
@@ -254,7 +696,7 @@ They will be installed automatically when this theme is used by an end-user.
254
696
 
255
697
  ### Jekyll config options
256
698
 
257
- The Jekyll Data plugin is used to set config options within sites that use this theme. Make sure to document which
699
+ The Jekyll Data plugin is used to set config options within sites that use this theme. Make sure to document which
258
700
  config options are set by this theme.
259
701
 
260
702
  ### Ruby Gem
@@ -263,12 +705,12 @@ This theme is distributed as a Ruby Gem, through the public [Ruby Gems](https://
263
705
 
264
706
  The `jekyll-theme-bas-style-kit.gemspec` file details the properties of the Gem for this project.
265
707
 
266
- **Note:** The `spec.files` parameter controls which files in this project are copied into the Gem. If a file is not
708
+ **Note:** The `spec.files` parameter controls which files in this project are copied into the Gem. If a file is not
267
709
  listed it won't be included. This is separate to the Git `.gitignore` file.
268
710
 
269
711
  ## GitHub mirror
270
712
 
271
- A read-only mirror of this project's repository is maintained on GitHub, to support Jekyll's automatic theme
713
+ A read-only mirror of this project's repository is maintained on GitHub, to support Jekyll's automatic theme
272
714
  installation, and to allow use by those outside of BAS.
273
715
 
274
716
  Merge requests **WILL NOT** be accepted on this mirror.
@@ -278,11 +720,7 @@ Merge requests **WILL NOT** be accepted on this mirror.
278
720
  Before release:
279
721
 
280
722
  1. create a release branch
281
- 2. remove `-develop` from the version in:
282
- * `jekyll-theme-bas-style-kit.gemspec`
283
- * `docker-compose.yml`
284
- * `_data/bsk_jekyll_vars.json`
285
- 3. push the app docker image [1]
723
+ 3. build and push the app docker image [1]
286
724
  4. if new config options have been set, update the usage section
287
725
  5. update screen-shot (width: 900px)
288
726
  6. close release in changelog
@@ -293,11 +731,10 @@ Before release:
293
731
 
294
732
  After release:
295
733
 
296
- 1. bump the version with `-develop` as a prefix in:
734
+ 1. bump the version in:
297
735
  * `jekyll-theme-bas-style-kit.gemspec`
298
- * `docker-compose.yml`
299
736
  * `_data/bsk_jekyll_vars.json`
300
- 2. push the app docker image [1]
737
+ 2. build and push the app docker image [1]
301
738
  3. commit changes, merge with master and close release branch
302
739
 
303
740
  [1]
@@ -310,31 +747,26 @@ $ docker-compose push
310
747
  [2]
311
748
 
312
749
  ```shell
313
- # add 'entrypoint: ash' to the app service in /docker-compose.yml
314
- $ docker-compose run app gem build jekyll-theme-bas-style-kit.gemspec
315
- $ docker-compose run app gem push jekyll-theme-bas-style-kit-*.gem
316
- # remove 'entrypoint: ash' from the app service in /docker-compose.yml
750
+ $ docker-compose run --entrypoint="" app ash
751
+ $ gem build jekyll-theme-bas-style-kit.gemspec
752
+ $ gem push jekyll-theme-bas-style-kit-*.gem
317
753
  ```
318
754
 
319
- **Note:** Add `entrypoint: ash` to the `app` service in `docker-compose.yml` to run these commands
320
-
321
755
  ## Issue tracking
322
756
 
323
- This project uses [issue tracking](https://gitlab.data.bas.ac.uk/web-apps/bsk/bas-style-kit-jekyll-theme) to manage
324
- development of new features/improvements and reporting bugs.
325
-
326
- **Note:** Read & write access to this issue tracker is restricted. Contact the project maintainer to request access.
757
+ This project uses [issue tracking](https://trello.com/b/0Mhzizpk/bas-style-kit) to manage development of new
758
+ features/improvements and reporting bugs.
327
759
 
328
760
  ## Feedback
329
761
 
330
- The maintainer of this project is the BAS Web & Applications Team, they can be contacted through the
762
+ The maintainer of this project is the BAS Web & Applications Team, they can be contacted through the
331
763
  [BAS Service Desk](mailto:servicedesk@bas.ac.uk).
332
764
 
333
765
  ## License
334
766
 
335
- © UK Research and Innovation (UKRI), 2017-2018, British Antarctic Survey.
767
+ © UK Research and Innovation (UKRI), 2017-2020, British Antarctic Survey.
336
768
 
337
- You may use and re-use this software and associated documentation files free of charge in any format or medium, under
769
+ You may use and re-use this software and associated documentation files free of charge in any format or medium, under
338
770
  the terms of the Open Government Licence v3.0.
339
771
 
340
772
  You may obtain a copy of the Open Government Licence at http://www.nationalarchives.gov.uk/doc/open-government-licence/