jekyll-theme-bas-style-kit 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d76c808d94ebc8040f64c706f511098847b961b7
4
- data.tar.gz: 4874064a8bae4db2cbfdb105e2d55cc06153c83d
3
+ metadata.gz: a56cc128c5a45c3cc09c6aa8302f3637e7ebad32
4
+ data.tar.gz: 235c350940d5acc5a81ce529535004a754e1b148
5
5
  SHA512:
6
- metadata.gz: 0893c1845dc61fec2fcafa12fa9f6bbe8dad5ac9dd679223eaaae0495de5cb7ff426a3702e10a4ef434b3928dd391005c53a417db0b00d55633918dd742c21e8
7
- data.tar.gz: 0debd3d55267dcedf2a5082b80e096da90e1127dad0d37b5d22b4e55394b48ca3770fdb2b0296b587475358f5c7b74d63ec7876271f675d1c3d870c01748ac0e
6
+ metadata.gz: 6c9df02310e8cd1646246a0a865ba28127883bffa7abde5a0523bbc45488279033255ccbfb3ce91fa29e83aedd9fc9354972fbbb0d1c9a3c0e814a97661674a5
7
+ data.tar.gz: 4379eacbf303c3ac5057fd239c4b0bf9df2b586b3910ccbc8fe26ed90a2ac12200f710a3b89bfb7b8c30a78bb1af53046710361425b8884c5c2593993b0761e5
@@ -0,0 +1,12 @@
1
+ # BAS Style Kit Jekyll Theme - Change log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
+
6
+ ## [Unreleased][unreleased]
7
+
8
+ ## 0.1.0 - 12/03/2017
9
+
10
+ ### Added
11
+
12
+ * Initial project - based on BAS Style Kit version 0.1.0, and adapted from the BAS Style Kit documentation Jekyll site
@@ -0,0 +1,15 @@
1
+ # Contributing policy
2
+
3
+ We welcome contributions from both other NERC centres and from external entities under the following guidelines:
4
+
5
+ * These are general guidelines used by default for projects that we make available,
6
+ they do not represent any formal policy or notice
7
+
8
+ * The preferred method of integrating contributions is through a Git pull request to the nominated repository
9
+
10
+ * The preferred method of raising issues is through the nominated issue tracker
11
+
12
+ * Follow any defined coding standards where specified, or any obvious conventions implied within the code
13
+
14
+ Last updated: February 2016
15
+ Contact address: webapps@bas.ac.uk (BAS Web & Applications Team)
@@ -0,0 +1,21 @@
1
+ The MIT license
2
+
3
+ Copyright (c) NERC BAS 2017 https://www.bas.ac.uk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,7 @@
1
+ # License
2
+
3
+ Copyright 2017 NERC BAS.
4
+
5
+ Unless stated otherwise all code is licensed under the MIT license.
6
+
7
+ Copies of this license are included within this project.
@@ -0,0 +1,632 @@
1
+ # jekyll-theme-bas-style-kit
2
+
3
+ Jekyll theme implementation of the [BAS Style Kit](https://stlye-kit.web.bas.ac.uk).
4
+
5
+ ![Screenshot of theme](screenshot.png)
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Jekyll site's `Gemfile`:
10
+
11
+ ```ruby
12
+ gem "jekyll-theme-bas-style-kit"
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```shell
18
+ $ bundle
19
+ ```
20
+
21
+ Or install it yourself as:
22
+
23
+ ```
24
+ $ gem install jekyll-theme-bas-style-kit
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ Refer to [Jekyll's theme documentation](https://jekyllrb.com/docs/themes/) for general information.
30
+
31
+ ### Selecting the BAS Style Kit Jekyll theme
32
+
33
+ Add this line to your Jekyll site's `_config.yml`:
34
+
35
+ ```yaml
36
+ theme: jekyll-theme-bas-style-kit
37
+ ```
38
+
39
+ ### Layouts
40
+
41
+ This theme provides three layouts:
42
+
43
+ * blank
44
+ * HTML
45
+ * default
46
+
47
+ #### Blank
48
+
49
+ Returns content without modification, and is used as the fundamental layout, from which all other layouts derive.
50
+
51
+ This layout is useful if you need to output data in a format other than HTML (such as JSON or XML).
52
+
53
+ **Note:** You will need to set a suitable content-type header if returning non-HTML content.
54
+
55
+ #### HTML
56
+
57
+ Returns content in the `<body>` tag of a basic HTML page. Includes `<head>` elements returned by the *head* include.
58
+
59
+ **Note:** This layout includes the BAS Style Kit CSS styles, but not Bootstrap JavaScript components (see the
60
+ *default* layout for this).
61
+
62
+ **Note:** This layout does not include information about the use of Cookies, which **MUST** be displayed if used on a
63
+ website. You will need to provide a suitable notice to users if this applies. See the *Cookie notice* section for more
64
+ information.
65
+
66
+ This layout is useful if you need to show content in isolation, or using a specific page style, such as a page designed
67
+ for printing, or for displaying full screen.
68
+
69
+ #### Default
70
+
71
+ Returns content in a [container](https://style-kit.web.bas.ac.uk/core/layout/#fixed-width-container) with a number of
72
+ additional components using includes:
73
+
74
+ | Component | Include File | Description | Notes |
75
+ | ------------------------ | -------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
76
+ | Cookie notice banner | `layout/cookie-banner.html` | Dismissible cookie notice | See the *Cookie notice* section for more information |
77
+ | Site navigation | `layout/site-navigation.html` | [Navbar](https://style-kit.web.bas.ac.uk/components/navbar/) containing site navigation | See the *Site navigation* section for more information |
78
+ | Development phase banner | `layout/phase-banner.html` | Contextual warning for current development phase | See the *Development phase* section for more information |
79
+ | Site footer | `layout/site-footer.html` | Basic [footer](https://style-kit.web.bas.ac.uk/components/footer/) | Designed to be overiden, see the *Legal policies* section for information it must contain |
80
+ | JavaScript | `snippets/body-js.html` | Scripts required for jQuery, Bootstrap's JavaScript components, and the cookie notice banner | - |
81
+ | Analytics | `snippets/google-analytics.html` | Scripts required for Google Analytics | Not included if `ga_property` config option is not set |
82
+
83
+ ### Includes
84
+
85
+ Includes for this theme are split into *layout* and *snippets*. Layouts are used as part of the visual structure of the
86
+ site (such as the main navigation). Snippets are more general and used in various places (including in other includes).
87
+
88
+ #### Cookie Banner
89
+
90
+ **Type:** Layout
91
+
92
+ **File:** `layout/cookie-banner.html`
93
+
94
+ Presents a full-width banner, pinned to the top of the page, with a statement that the site uses cookies, and where a
95
+ user can find out more information.
96
+
97
+ This banner can be dismissed by the user, which will hide the message for 30 days using (ironically) a cookie.
98
+
99
+ See the *Cookie notice* section for more information.
100
+
101
+ **Note:** This include depends on the `snippets/body-js.html` include.
102
+
103
+ #### Phase Banner
104
+
105
+ **Type:** Layout
106
+
107
+ **File:** `layout/phase-banner.html`
108
+
109
+ Presents a full-width banner, pinned after the site navigation, with a statement describing the status of the website.
110
+ For example, if a website is in the *beta* phase of development, a notice advising users that the website is still
111
+ under development will be shown, with an invitation for them to submit feedback.
112
+
113
+ If a website is in the *live* phase of development, no banner is shown.
114
+
115
+ See the *Development phase notice* and *Website feedback* sections for more information.
116
+
117
+ **Note:** The message shown for each development phase cannot currently be changed.
118
+
119
+ #### Site footer
120
+
121
+ **Type:** Layout
122
+
123
+ **File:** `layout/site-footer.html`
124
+
125
+ Provides a basic [footer](https://style-kit.web.bas.ac.uk/components/footer/) designed to meet requirements for:
126
+
127
+ * linking to the top of the current page and to give feedback
128
+ * explaining the license for content within the website
129
+ * displaying links to legal polices
130
+
131
+ As footers will vary greatly between websites, this footer is deliberately basic, and limited, in its structure. It is
132
+ expected this include will be overiden by each website with its own specific footer.
133
+
134
+ See the *Legal policies* and *Website feedback* sections for information on what a footer **MUST** contain.
135
+
136
+ #### Site navigation
137
+
138
+ **Type:** Layout
139
+
140
+ **File:** `layout/site-navigation.html`
141
+
142
+ Provides a default implementation of a [navbar](https://style-kit.web.bas.ac.uk/components/navbar/) designed to meet
143
+ the needs of most websites. The navbar consists of:
144
+
145
+ * the site title
146
+ * a toggle to show or hide navigation items on smaller devices (such as phones)
147
+ * a set of navigation items (see the *Site navigation* section for how to set these)
148
+ * a drop-down of other relevant BAS websites, including the BAS public website and data catalogue
149
+ * a link to give feedback about the website
150
+
151
+ See the *Site navigation* and *Website feedback* sections for more information.
152
+
153
+ #### Back to top
154
+
155
+ **Type:** Snippet
156
+
157
+ **File:** `snippets/back-to-top.html`
158
+
159
+ Provides a link to the `#site-top` anchor, positioned at the top of each page. It is shown in the default footer
160
+ include.
161
+
162
+ **Note:** This snippet depends on the *default* layout being used, or a layout with a `#site-top` element defined.
163
+
164
+ #### Body JS
165
+
166
+ **Type:** Snippet
167
+
168
+ **File:** `snippets/body-js.html`
169
+
170
+ Inserts `<script>` tags for:
171
+
172
+ * jQuery (required for Bootstrap's JavaScript components and the cookie banner)
173
+ * Bootstrap JavaScript components (required for components such as drop-down menus)
174
+ * JS Cookie (required for the cookie banner)
175
+ * cookie banner (a script to hide the cookie banner using a cookie, if the user chooses to)
176
+
177
+ **Note:** This snippet is designed for loading JavaScript *after* the main page content. If a script needs to be run
178
+ before this content, you will need to do this manually.
179
+
180
+ #### Google Analytics
181
+
182
+ **Type:** Snippet
183
+
184
+ **File:** `snippets/google-analytics.html`
185
+
186
+ If the `ga_property` config option is set, include the Google Analytics tracking script, and configures it for the
187
+ relevant Google Analytics property.
188
+
189
+ The tracking script is configured to anonymise the IP address of visitors client side, meaning we it is never visible
190
+ to the Google Analytics service.
191
+
192
+ #### Head
193
+
194
+ **Type:** Snippet
195
+
196
+ **File:** `snippets/head.html`
197
+
198
+ Represents the `<head>` tag of a HTML page with these elements:
199
+
200
+ * HTML doc-type
201
+ * UTF-8 character encoding scheme
202
+ * directive for Internet Explorer to use the latest rendering engine available (ignored by Microsoft Edge)
203
+ * directive for devices to set the viewport width to the width of the current device in CSS pixels at a scale of 100%,
204
+ and an initial scale of 100%
205
+ * the title directive, containing a page title (if set) followed by the site `title` config option
206
+ * the description directive, containing the site `description` config option
207
+ * the canonical directive, used for constructing internal URLs and by search engines for deduplicating content where it
208
+ is available from multiple locations. Uses the `baseurl` config option and expresses a preference for URLs without a
209
+ `.html` extension if used.
210
+ * links to the image used by mobile devices if this website is pinned to a home-screen
211
+ * references to the BAS Style Kit, Jekyll theme, and website specific CSS
212
+ * workarounds for older versions of Internet Explorer to not break with the use of modern HTML features
213
+
214
+ #### Is something wrong
215
+
216
+ **Type:** Snippet
217
+
218
+ **File:** `snippets/is-something-wrong.html`
219
+
220
+ Displays a link to give feedback about the current website. It is shown in the default footer include.
221
+
222
+ See the *Website feedback* section for more information.
223
+
224
+ ### Assets
225
+
226
+ All assets in this theme are scoped to the `bsk-jekyll` directory.
227
+
228
+ **Note:** In the longer term, all of these assets are due to be hosted within the BAS CDN, rather than within each
229
+ website that uses this theme. This makes such sites more consistent, and gives performance benefits using browser
230
+ caching.
231
+
232
+ #### `bsk-jekyll/bas-style-kit-jekyll-theme.scss`
233
+
234
+ CSS styles specific to this theme, designed to be the same for each site using this theme.
235
+
236
+ **Note:** This file **SHOULD NOT** be overiden, use `css/main.scss` instead.
237
+
238
+ **Note:** This file currently contains some styles that are waiting to be merged with the upstream Style Kit project.
239
+
240
+ #### `bsk-jekyll/img/apple-touch-icon.png`
241
+
242
+ Image used if this website is pinned to the start screen of a smartphone.
243
+
244
+ **Note:** The name of this file is conventional, and **SHOULD NOT** be changed. It **MAY** be overiden if needed.
245
+
246
+ #### `bsk-jekyll/js/cookie-banner.js`
247
+
248
+ Simple script to set a cookie when the user dismisses the cookie banner. If this cookie is present the banner will not
249
+ be shown on subsequent pages for a period of 30 days. After this time the banner will be shown again, until dismissed
250
+ again for another 30 days.
251
+
252
+ #### `css/main.scss`
253
+
254
+ CSS styles specific to each website. This file is empty by default and is designed to be overiden by each website.
255
+
256
+ **Note:** This file is included in the *head* include, and so **SHOULD NOT** be removed to avoid 404 errors. It **MAY**
257
+ be left empty if not needed.
258
+
259
+ **Note:** This file will not be moved to the BAS CDN.
260
+
261
+ ### Config options
262
+
263
+ There are a number of config options used by this theme, which **SHOULD** be set, within `_config.yml`.
264
+
265
+ Jekyll config options which **SHOULD** be set:
266
+
267
+ * `title`
268
+ * `description`
269
+
270
+ Theme specific options which **SHOULD** be set:
271
+
272
+ | Option | Type | Description | Example Value | Notes |
273
+ | ------------------- | ------ | -------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------- |
274
+ | `phase` | String | Current development phase for website | "alpha" | See the *Development phase notice* section for more information |
275
+ | `copyright_href` | String | URL to copyright statement for website | "/copyright-statement | See the *Legal policies* section for more information |
276
+ | `privacy_href` | String | URL to privacy policy for website | "/privacy-policy" | See the *Legal policies* section for more information |
277
+ | `cookies_href` | String | URL to cookie policy for website | "/cookie-policy" | See the *Legal policies* section for more information |
278
+ | `feedback_href` | String | URL to feedback page for website | "/feedback" | See the *Website feedback* section for more information |
279
+ | `ga_property` | String | Google Analytics property for website | "UA-64130716-XX" | Values should start with `UA-64130716-` for BAS Google Analytics properties |
280
+ | `nav_items` | List | Items in this website to include in the site navigation | *List of items* | See the *Site navigation* section for more information |
281
+ | `nav_related_sites` | List | Items for other BAS websites to include in the site navigation | *List of items* | See the *Site navigation* section for more information |
282
+
283
+ ### Site navigation
284
+
285
+ Two kinds of navigation item are supported within the site navigation (an instance of the
286
+ [navbar](https://style-kit.web.bas.ac.uk/components/navbar/) component):
287
+
288
+ 1. resources within the current website - shown after the site title
289
+ 2. BAS websites relevant to the current website - shown before the feedback item on the navbar's right
290
+
291
+ Both kinds of item are displayed using the *Site navigation* include, and set using config options:
292
+
293
+ * internal items: `nav_items`
294
+ * related items: `nav_related_sites`
295
+
296
+ #### Internal items
297
+
298
+ This theme allows multiple types of item to be used for internal navigation items. Some of these types are generic,
299
+ some are included to integrate more easily with Jekyll's conventions and features.
300
+
301
+ **Properties**
302
+
303
+ | Property | Type | Required | Description | Example Value | Notes |
304
+ | -------- | ------ | -------- | ------------------------------------------------- | ------------- | ------------------------------------------------ |
305
+ | `name` | String | Yes | Used as the link text | `About` | - |
306
+ | `type` | String | Yes | Controls how this item is processed and displayed | `single_item` | May require additional properties to be set |
307
+
308
+ Supported item types are:
309
+
310
+ * `single_item`
311
+ * `dropdown_item`
312
+
313
+ **Example**
314
+
315
+ ```yml
316
+ nav_items:
317
+ -
318
+ name: About
319
+ type: single_item
320
+ ```
321
+
322
+ ##### Single item
323
+
324
+ The most basic item type, set manually and displayed as a navbar item (link).
325
+
326
+ **Additional Properties**
327
+
328
+ | Property | Type | Required | Description | Example Value | Notes |
329
+ | -------- | ------ | -------- | --------------------------------- | ------------- | ------------------------------------------------ |
330
+ | `href` | String | Yes | Used as the link `href` attribute | `/about` | Set the `href` property to `/` for the home page |
331
+
332
+ **Active item**
333
+
334
+ When the current page matches the `href` attribute, the item is made the active navbar item.
335
+
336
+ **Example**
337
+
338
+ ```yml
339
+ nav_items:
340
+ -
341
+ name: Home
342
+ type: single_item
343
+ href: /
344
+ -
345
+ name: About
346
+ type: single_item
347
+ href: /about
348
+ ```
349
+
350
+ ##### Dropdown item
351
+
352
+ A more complex item type, set manually and displayed as a
353
+ [navbar drop-down](https://style-kit.web.bas.ac.uk/components/navbar/#drop-down-menus).
354
+
355
+ **Note:** Advanced drop-down features such as dividers and headers are not supported.
356
+
357
+ **Additional Properties**
358
+
359
+ | Property | Type | Required | Description | Example Value | Notes |
360
+ | ------------------ | ------ | -------- | ------------------------------------------ | ------------- | ------------------------------------------------ |
361
+ | `actions` | List | Yes | Defines the actions for the drop-down menu | N/A | - |
362
+ | `actions.*.name` | String | Yes | Used as the action text | `Downloads` | Example of a single action |
363
+ | `actions.*.href` | String | Yes | Used as the action `href` atttibute | `/resources/downloads` | Example of a single action |
364
+
365
+ **Active item**
366
+
367
+ When the current page matches the `href` attribute of an action in a drop-down item, the drop-down action is made
368
+ active, and drop-down menu the active navbar item.
369
+
370
+ **Example**
371
+
372
+ ```yml
373
+ nav_items:
374
+ -
375
+ name: Resources
376
+ type: dropdown_item
377
+ actions:
378
+ -
379
+ name: Downloads
380
+ href: /resources/downloads
381
+ ```
382
+
383
+ #### Related items
384
+
385
+ Related items are comparatively  easier to define than internal items, it uses the same structure as the `single_item`
386
+ internal item type.
387
+
388
+ **Note:** Related items **SHOULD** always include entries for the BAS public website and BAS data catalogue.
389
+
390
+ **Note:** Related items **SHOULD NOT** include non-BAS websites, as the drop-down menu title 'Part of the British
391
+ Antarctic Survey' implies its contents will be BAS operated websites.
392
+
393
+ **Example**
394
+
395
+ ```yml
396
+ nav_related_sites:
397
+ -
398
+ name: BAS Home
399
+ href: https://www.bas.ac.uk
400
+ -
401
+ name: BAS Style Kit
402
+ href: https://style-kit.bas.ac.uk
403
+ -
404
+ name: Discover BAS data
405
+ href: https://data.bas.ac.uk
406
+ ```
407
+
408
+ ### Cookie notice
409
+
410
+ By law and by policy BAS websites are required to tell end-users whether cookies are used, and if so, where they can
411
+ find out more information about these cookies.
412
+
413
+ It is assumed all BAS websites will use cookies, not least as all websites are expected to use analytics tracking,
414
+ which depends on cookies.
415
+
416
+ This theme provides a cookie banner to meet this need. It consists of:
417
+
418
+ * the `phase` config option - which defines the URL to a page explaining how cookies are used on this website
419
+ * the *Cookie banner* include - which displays a dismissible message and a link to the cookies usage page
420
+ * the *Site footer* include - which includes a link to the cookies usage page
421
+ * the *Body JS* include - which includes the JavaScript needed to make the cookie banner dismissible
422
+
423
+ The `cookies_href` config option **MUST** be set to a location with more information on how the website uses cookies.
424
+ See the *Legal policies* section for more information.
425
+
426
+ **Note:** This **SHOULD NOT** be the cookie policy used on the BAS public website, as it is not representative of our
427
+ other websites.
428
+
429
+ ### Development phase notice
430
+
431
+ Websites exist at various stages of a development lifecycle - from inception, development, general availability through
432
+ to retirement.
433
+
434
+ Various points in this lifecycle are relevant to highlight to end-users, to give context and managing expectations.
435
+ For example, new websites likely won't perform well, or have missing information.
436
+
437
+ The BAS Style Kit, and this theme, support the
438
+ [development phases](https://www.gov.uk/service-manual/agile-delivery#phases-of-an-agile-project) defined by the
439
+ Government Digital Service (GDS) - these are:
440
+
441
+ * Discovery - a stage before any website is built
442
+ * Alpha - an early prototyping stage
443
+ * Beta - a pre-release stage, things are expected to work correctly but with restrictions in terms of scale,
444
+ completeness or performance
445
+ * Live - a service in general release - expected to work correctly without restrictions
446
+ * Retirement - a service being wound down - expected to work until being shut-down, but no further improvements made
447
+
448
+ This theme provides a development phase banner to inform end-users of the current development phase. It consists of:
449
+
450
+ * the `phase` config option - which defines current development phase for the website
451
+ * the *Phase banner* include - which displays information to end-users
452
+
453
+ The `phase` config option **MUST** be set to one of these options:
454
+
455
+ * `alpha`
456
+ * `beta`
457
+ * `live`
458
+ * `retired`
459
+
460
+ For all phases except live, a banner with a link to give site feedback will be shown. In the live phase no additional
461
+ information is shown.
462
+
463
+ **Note:** The *discovery* phase is not supported as website prototypes should only be made in the *alpha* stage.
464
+
465
+ ### Legal policies
466
+
467
+ By law and by policy BAS websites are required to provide end-users with information on various legal policies. Namely:
468
+
469
+ 1. a copyright statement
470
+ 2. a privacy policy
471
+ 3. a cookies policy
472
+
473
+ Links to these policies are displayed in the *Site footer* include, using config options to set their locations.
474
+
475
+ #### Copyright statement
476
+
477
+ The `copyright_href` config option **MUST** be set to a location with more information on how information on this
478
+ website is licensed, and how it can be used.
479
+
480
+ It **MUST** document, which legal entity owns the content on the website, the license they make it available to
481
+ different auidences under, and what these users can and can't do as a result of this license.
482
+
483
+ It **MUST** acknowledge other rights holders, and the terms under which they make their information available, if this
484
+ applies. This may include information from other parts of BAS or NERC, which are licensed differently.
485
+
486
+ The license under which the majority of the website's content is made available **SHOULD** be displayed in the site
487
+ footer, to make it easy to find by end-users. The phrase `Except where otherwise stated` can be used where multiple
488
+ licenses apply to different types of concept, providing this is suitably explained in the copyright statement, or next
489
+ to the relevant content.
490
+
491
+ Template policies which can be used as an example/base for such policies are being developed with relevant stake
492
+ holders. Until these are ready contact the Web & Applications team for advice on what to put in such polices.
493
+
494
+ **Note:** This **SHOULD NOT** be the copyright statement used on the BAS public website, as it is not representative of
495
+ our other websites.
496
+
497
+ #### Privacy policy
498
+
499
+ The `privacy_href` config option **MUST** be set to a location with more information on how user's information is used
500
+ by the website.
501
+
502
+ It **MUST** document if any personal information is collected from end-users, why it is collected, who will hold it
503
+ and process it, how long it will be held for, and how the end-user can access, update or remove this information.
504
+
505
+ Template policies which can be used as an example/base for such policies are being developed with relevant stake
506
+ holders. Until these are ready contact the Web & Applications team for advice on what to put in such polices.
507
+
508
+ **Note:** This **SHOULD NOT** be the privacy policy used on the BAS public website, as it is not representative of our
509
+ other websites.
510
+
511
+ #### Cookies policy
512
+
513
+ The `cookies_href` config option **MUST** be set to a location with more information on how the website uses cookies.
514
+
515
+ It should document the cookies used, what they are for and when they are set to expire. It should also provide
516
+ information on how users can view and manage cookies used by this website.
517
+
518
+ Template policies which can be used as an example/base for such policies are being developed with relevant stake
519
+ holders. Until these are ready contact the Web & Applications team for advice on what to put in such polices.
520
+
521
+ **Note:** This **SHOULD NOT** be the cookie policy used on the BAS public website, as it is not representative of our
522
+ other websites.
523
+
524
+ ### Website feedback
525
+
526
+ Feedback from end-users is vital to build a website based on their needs, rather than the needs we think they have.
527
+
528
+ To this end, an easy to use mechanism for end-users to submit feedback **SHOULD** be available on all websites.
529
+
530
+ This theme provides numerous links to a feedback URL, defined using the `feedback_href` config option. This **SHOULD**
531
+ take the user to a form where they can provide feedback about the website.
532
+
533
+ Links to this URL are shown:
534
+
535
+ * in the site navigation, as the right most item
536
+ * in the development phase banner, for development phases except *live*
537
+ * in the site footer, as a 'is something wrong with this page?' link
538
+
539
+ See the *Site navigation*, *Site footer* and *Development phase notice* sections for more information.
540
+
541
+ ## Development
542
+
543
+ [Git](https://git-scm.com) and [Docker](https://www.docker.com/products/docker) [1] are required to build this project
544
+ locally.
545
+
546
+ To update the Docker image for this project, access to the private
547
+ [BAS Docker Registry](https://docker-registry.data.bas.ac.uk) [2] is also required.
548
+
549
+ ```shell
550
+ $ git clone https://gitlab.data.bas.ac.uk/BSK/bas-style-kit-jekyll-theme.git
551
+ $ cd bas-style-kit-jekyll-theme
552
+
553
+ $ docker-compose up
554
+ ```
555
+
556
+ Go to [localhost:9000](http://localhost:9000) to preview the theme.
557
+
558
+ **Note:** If you don't have access to the BAS Private Docker Registry, you will need to build the project Docker image
559
+ locally first using `docker-compose build`.
560
+
561
+ [1] To install Git and Docker:
562
+
563
+ **On macOS**
564
+
565
+ ```shell
566
+ $ brew install git
567
+ $ brew cask install docker
568
+ ```
569
+
570
+ **On Windows**
571
+
572
+ * Install Docker and Git using their respective installers
573
+
574
+ [2] The first time you use this registry, you will need to authenticate using:
575
+ `docker login docker-registry.data.bas.ac.uk`
576
+
577
+ ### Updating dependencies
578
+
579
+ If `Gemfile` is changed, the project Docker image will need to be rebuilt and pushed to the private BAS Docker
580
+ Repository [1].
581
+
582
+ The current project version is used as part of the project Docker image tag to ensure the latest version is used by all
583
+ developers. Before rebuilding this image you **MUST** update this tag value in `docker-compose.yml` and `.gitlab-ci.yml`
584
+ first.
585
+
586
+ ```shell
587
+ $ cd jekyll-theme-bas-style-kit/
588
+
589
+ $ docker-compose build app
590
+ $ docker-compose push app
591
+ ```
592
+
593
+ [1] The first time you use this registry, you will need to authenticate using:
594
+ `docker login docker-registry.data.bas.ac.uk`
595
+
596
+ ### Ruby Gem
597
+
598
+ This theme is distributed as a Ruby Gem, through the public [Ruby Gems](https://rubygems.org) gem hosting service.
599
+
600
+ The `jekyll-theme-bas-style-kit.gemspec` file details the properties of the Gem for this project.
601
+
602
+ **Note:** The `spec.files` parameter controls which files in this project are copied into the Gem. If a file is not
603
+ listed it won't be included. This is separate to the Git `.gitignore` file.
604
+
605
+ ## Release procedures
606
+
607
+ 1. bump version in `jekyll-theme-bas-style-kit.gemspec` and `docker-compose.yml`
608
+ 2. `docker-compose build`
609
+ 3. `docker-compose push`
610
+ 4. close release
611
+ 5. commit changes to git and tag with new version
612
+ 6. `docker-compose run app gem build jekyll-theme-bas-style-kit.gemspec`
613
+ 7. `docker-compose run app gem push jekyll-theme-bas-style-kit-*.gem`
614
+
615
+ ## Issue tracking
616
+
617
+ This project uses issue tracking, see the
618
+ [issue tracker](https://gitlab.data.bas.ac.uk/BSK/bas-style-kit-jekyll-theme/issues) for more information.
619
+
620
+ **Note:** Read & write access to this issue tracker is restricted. Contact the project maintainer to request access.
621
+
622
+ ## Feedback
623
+
624
+ The maintainer of this project is the BAS Web & Applications Team, they can be contacted at: webapps@bas.ac.uk.
625
+
626
+ ## License
627
+
628
+ Copyright 2017 NERC BAS.
629
+
630
+ Unless stated otherwise, all code is licensed under the MIT license.
631
+
632
+ Copies of this licenses are included within this project.
@@ -0,0 +1,7 @@
1
+ <div class="alert bsk-jekyll-alert-top-pin bsk-jekyll-alert-cookie-banner" id="site-cookie-banner" role="alert">
2
+ <div class="container">
3
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close"><i class="fa fa-times-circle" aria-hidden="true"></i></button>
4
+ This website uses cookies to help us make it better -
5
+ <a class="alert-link" href="{{ site.cookies_href }}">find out more</a>.
6
+ </div>
7
+ </div>
@@ -0,0 +1,15 @@
1
+ {% unless site.phase == 'live' %}
2
+ <div class="container">
3
+ <div>
4
+ <span class="label bsk-jekyll-label-phase-{{ site.phase | downcase }}">{{ site.phase | upcase }}</span>
5
+ {% if site.phase == 'alpha' %}
6
+ This is a new website – your <a href="{{ site.feedback_href | prepend: site.baseurl }}">feedback</a> will help us to improve it.
7
+ {% elsif site.phase == 'beta' %}
8
+ This is a new website – your <a href="{{ site.feedback_href | prepend: site.baseurl }}">feedback</a> will help us to improve it.
9
+ {% elsif site.phase == 'retired' %}
10
+ This website is being shut down soon - <a href="{{ site.feedback_href | prepend: site.baseurl }}">contact us</a> if this will affect you.
11
+ {% endif %}
12
+ </div>
13
+ <hr />
14
+ </div>
15
+ {% endunless %}
@@ -0,0 +1,26 @@
1
+ <footer class="footer-bsk footer-bsk-default site-footer">
2
+ <div class="container">
3
+ <!-- main content -->
4
+ <div class="pull-left">
5
+ {% include snippets/is-something-wrong.html %}
6
+ </div>
7
+ <div class="pull-right">
8
+ {% include snippets/back-to-top.html %}
9
+ </div>
10
+ <div class="clearfix"></div>
11
+ <div role="separator" class="footer-bsk-divider"></div>
12
+ <!-- Copyright & legal -->
13
+ <div class="footer-bsk-ogl">
14
+ <a class="ogl-symbol" rel="license" href="http://www.nationalarchives.gov.uk/doc/open-government-licence/"><img alt="Open Government Licence logo" src="https://s3-eu-west-1.amazonaws.com/bas-cdn-dev/scratch/bas-style-kit-jekyll-theme/img/ogl-symbol-white.png"></a>
15
+ <div class="ogl-text">All content is licensed under the <a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/">Open Government Licence v3.0</a>, except where otherwise stated</div>
16
+ </div>
17
+ <div class="footer-bsk-policy-links">
18
+ © {{site.time | date: "%Y"}} NERC BAS
19
+ <ul class="list-inline">
20
+ <li><a href="{{ site.copyright_href }}">Copyright</a></li>
21
+ <li><a href="{{ site.privacy_href }}">Privacy</a></li>
22
+ <li><a href="{{ site.cookies_href }}">Cookies</a></li>
23
+ </ul>
24
+ </div>
25
+ </div>
26
+ </footer>
@@ -0,0 +1,68 @@
1
+ <nav class="navbar navbar-bsk navbar-static-top site-navigation">
2
+ <div class="container">
3
+ <!-- Site name and toggle get grouped for better mobile display -->
4
+ <div class="navbar-header">
5
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#site-navbar-collapse" aria-expanded="false">
6
+ <span class="sr-only">Toggle navigation</span>
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ <span class="icon-bar"></span>
10
+ </button>
11
+ <a class="navbar-brand" href="/">{{ site.title }}</a>
12
+ </div><!-- /.navbar-header -->
13
+
14
+ <!-- Collect navigation items, links, forms etc., for toggling -->
15
+ <div class="collapse navbar-collapse" id="site-navbar-collapse">
16
+ <ul class="nav navbar-nav">
17
+ {% for item in site.nav_items %}
18
+ {% comment %} Single navbar items {% endcomment %}
19
+ {% if item.type == 'single_item' %}
20
+ {% assign page_url = page.url | remove: '.html' %}
21
+ <li {% if page_url == item.href %} class="active"{% endif %}>
22
+ {% if page_url == item.url %}<span class="sr-only">(current)</span>{% endif %}
23
+ <a href="{{ item.href }}">{{ item.name }}</a>
24
+ </li>
25
+
26
+ {% comment %} Dropdown navbar items {% endcomment %}
27
+ {% elsif item.type == 'dropdown_item' %}
28
+ {% assign page_url = page.url | remove: '.html' %}
29
+ {% for action in item.actions %}
30
+ {% if page_url == action.href %}
31
+ {% assign is_active = true %}
32
+ {% endif %}
33
+ {% endfor %}
34
+ <li class="dropdown {% if is_active %}active{% endif %}">
35
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
36
+ {% if is_active %}<span class="sr-only">(current)</span>{% endif %}
37
+ {{ item.name }} <span class="caret"></span></a>
38
+ <ul class="dropdown-menu dropdown-menu-bsk">
39
+ {% for action in item.actions %}
40
+ <li {% if page_url == action.href %} class="active"{% endif %}>
41
+ {% if page_url == action.href %}<span class="sr-only">(current)</span>{% endif %}
42
+ <a href="{{ action.href }}">{{ action.name }}</a>
43
+ </li>
44
+ {% endfor %}
45
+ </ul>
46
+ </li>
47
+ {% endif %}
48
+ {% endfor %}
49
+ </ul><!-- /.navbar-nav -->
50
+
51
+ <ul class="nav navbar-nav navbar-right">
52
+ <li class="dropdown">
53
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
54
+ Part of the British Antarctic Survey <span class="caret"></span>
55
+ </a>
56
+ <ul class="dropdown-menu dropdown-menu-bsk">
57
+ {% for item in site.nav_related_sites %}
58
+ <li><a href="{{ item.href }}">{{ item.name }}</a></li>
59
+ {% endfor %}
60
+ </ul>
61
+ </li>
62
+ <li>
63
+ <a href="{{ site.feedback_href }}">Feedback</a>
64
+ </li>
65
+ </ul><!-- /.navbar-nav .navbar-right -->
66
+ </div><!-- /.navbar-collapse -->
67
+ </div><!-- /.container -->
68
+ </nav>
@@ -0,0 +1 @@
1
+ <a class="back-to-top" href="#site-top"><i class="fa fa-arrow-up" aria-hidden="true"></i> Back to top</a>
@@ -0,0 +1,8 @@
1
+ <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
2
+ <script src="https://cdn.web.bas.ac.uk/js-libs/jquery-3.1.1.min.js"></script>
3
+ <!-- Compiled and minified Bootstrap JavaScript plugins, include individual plugins instead if needed -->
4
+ <script src="https://cdn.web.bas.ac.uk/js-libs/boostrap-3.3.7.min.js"></script>
5
+ <!-- Cookie library used to persistently hide the cookie banner (slightly ironic we need a cookie to do this) -->
6
+ <script src="https://cdn.web.bas.ac.uk/js-libs/js.cookie-2.1.3.min.js"></script>
7
+ <!-- Code for managing cookie banner -->
8
+ <script src="{{ '/assets/bsk-jekyll/js/cookie-banner.js' | prepend: site.baseurl }}"></script>
@@ -0,0 +1,12 @@
1
+ <script>
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6
+
7
+ ga('create', '{{ site.ga_property }}', 'auto', {
8
+ anonymizeIp: true
9
+ });
10
+ ga('send', 'pageview');
11
+
12
+ </script>
@@ -0,0 +1,29 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ <!-- The above 3 meta tags *must* come first in the head -->
6
+ <title>{% if page.title %}{{ page.title | escape }} &middot; {{ site.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
7
+ <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
9
+
10
+ <!-- Favicons -->
11
+ <link rel="apple-touch-icon" sizes="152x152" href="{{ "/bsk-jekyll/img/apple-touch-icon.png" | prepend: site.baseurl }}">
12
+ <link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{ "/bsk-jekyll/img/apple-touch-icon.png" | prepend: site.baseurl }}">
13
+
14
+ <!-- Compiled and minified customised Bootstrap CSS for the BAS Style Kit -->
15
+ <link rel="stylesheet" href="https://cdn.web.bas.ac.uk/bas-style-kit/0.1.0/css/bootstrap-bsk.min.css" integrity="sha256-LcHhV+YQv+6Le1nrMcfpE3YoFYIvnfC8mtEa6IC4r48=" crossorigin="anonymous">
16
+ <!-- Compiled and minified BAS Style Kit CSS -->
17
+ <link rel="stylesheet" href="https://cdn.web.bas.ac.uk/bas-style-kit/0.1.0/css/bas-style-kit.min.css" integrity="sha256-BtBOHsRYohQJ5q9Lpjs53snUSKyMuV2bYkPEAmQH56o=" crossorigin="anonymous">
18
+ <!-- Theme specific styles -->
19
+ <link rel="stylesheet" href="{{ "/assets/bsk-jekyll/css/jekyll-theme-bas-style-kit.css" | prepend: site.baseurl }}">
20
+ <!-- Site specific styles -->
21
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">
22
+
23
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
24
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
25
+ <!--[if lt IE 9]>
26
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
27
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
28
+ <![endif]-->
29
+ </head>
@@ -0,0 +1 @@
1
+ <a href="{{ site.feedback_href | prepend: site.baseurl }}">Is something wrong with this page?</a>
@@ -0,0 +1 @@
1
+ {{ content }}
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: html
3
+ ---
4
+
5
+ <div id="site-top"></div>
6
+ <a href="#site-content" class="sr-only sr-only-focusable">Skip to main content</a>
7
+ {% include layout/cookie-banner.html %}
8
+ {% include layout/site-navigation.html %}
9
+ {% include layout/phase-banner.html %}
10
+
11
+ <main class="container site-main">
12
+ {{ content }}
13
+ </main>
14
+
15
+ {% include layout/site-footer.html %}
16
+
17
+ {% include snippets/body-js.html %}
18
+ {% if ga_property %}
19
+ {% include snippets/google-analytics.html %}
20
+ {% endif %}
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: blank
3
+ ---
4
+
5
+ <!DOCTYPE html>
6
+ <html lang="en-GB">
7
+ {% include snippets/head.html %}
8
+
9
+ <body>
10
+ {{ content }}
11
+ </body>
12
+ </html>
@@ -0,0 +1,75 @@
1
+ ---
2
+ ---
3
+ @charset "utf-8";
4
+
5
+ //
6
+ // Additioanl styles specific to Jekyll websites using the BAS Style Kit
7
+ //
8
+
9
+ // Styles for extending the colour of the footer to fill pages where there isn't enough content to fill the viewport
10
+ // These will be merged into a future version of the BAS Style Kit
11
+
12
+ html {
13
+ background-color: #333;
14
+ }
15
+ .site-main {
16
+ min-height: 300px;
17
+ }
18
+
19
+ // Styles for Cookie banner
20
+ // These will be merged into a future version of the BAS Style Kit
21
+ //
22
+
23
+ .bsk-jekyll-alert-top-pin {
24
+ margin-bottom: 0;
25
+
26
+ border: none;
27
+ border-radius: 0;
28
+ }
29
+
30
+ .bsk-jekyll-alert-cookie-banner {
31
+ background-color: #006AAA;
32
+ color: white;
33
+
34
+ .alert-link {
35
+ color: white;
36
+ }
37
+
38
+ .close {
39
+ filter: alpha(opacity=70);
40
+ opacity: .7;
41
+ color: #E7EBF1;
42
+
43
+ &:focus, &:hover {
44
+ filter: alpha(opacity=100);
45
+ opacity: 1;
46
+ }
47
+ }
48
+ }
49
+
50
+ // Sryles for development phase banner
51
+ // These will be merged into a future version of the BAS Style :-webkit-any()
52
+ //
53
+
54
+ .bsk-jekyll-label-phase-alpha,
55
+ .bsk-jekyll-label-phase-beta,
56
+ .bsk-jekyll-label-phase-live,
57
+ .bsk-jekyll-label-phase-retired {
58
+ border-radius: 0;
59
+ font-weight: normal;
60
+ }
61
+
62
+ .bsk-jekyll-label-phase-alpha {
63
+ background-color: #D53880;
64
+ color: #333;
65
+ }
66
+ .bsk-jekyll-label-phase-beta {
67
+ background-color: #F47738;
68
+ color: #333;
69
+ }
70
+ .bsk-jekyll-label-phase-live {
71
+ background-color: #85994B;
72
+ }
73
+ .bsk-jekyll-label-phase-retired {
74
+ background-color: #6F777B;
75
+ }
@@ -0,0 +1,32 @@
1
+ jQuery(function($){
2
+
3
+ // Look for cookie to hide cookie banner
4
+
5
+ var cookieBannerValue = Cookies.get('seen_cookie_message');
6
+
7
+ if (typeof cookieBannerValue !== 'undefined') {
8
+ if (cookieBannerValue == 'yes') {
9
+
10
+ // Supress cookie message
11
+ // Since we already have jQuery available we may as well use its convenience methods
12
+ jQuery('#site-cookie-banner').remove();
13
+ }
14
+ }
15
+
16
+ // React to closing the cookie banner
17
+
18
+ jQuery('#site-cookie-banner').on('close.bs.alert', function () {
19
+
20
+ // Set a cookie to persist hiding the cookie banner for the next 30 days
21
+ var cookie_name = '';
22
+ var cookie_value = 'yes'
23
+
24
+ Cookies.set(
25
+ 'seen_cookie_message', // cookie name
26
+ 'yes', // cookie value
27
+ {
28
+ expires: 30 // in days
29
+ }
30
+ );
31
+ })
32
+ });
@@ -0,0 +1,7 @@
1
+ ---
2
+ ---
3
+ @charset "utf-8";
4
+
5
+ //
6
+ // Additioanl styles specific to this website
7
+ //
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-bas-style-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Fennell
@@ -58,7 +58,29 @@ email:
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
- files: []
61
+ files:
62
+ - CHANGELOG.md
63
+ - CONTRIBUTING.md
64
+ - LICENSE-MIT.md
65
+ - LICENSE.md
66
+ - README.md
67
+ - _includes/layout/cookie-banner.html
68
+ - _includes/layout/phase-banner.html
69
+ - _includes/layout/site-footer.html
70
+ - _includes/layout/site-navigation.html
71
+ - _includes/snippets/back-to-top.html
72
+ - _includes/snippets/body-js.html
73
+ - _includes/snippets/google-analytics.html
74
+ - _includes/snippets/head.html
75
+ - _includes/snippets/is-something-wrong.html
76
+ - _layouts/blank.html
77
+ - _layouts/default.html
78
+ - _layouts/html.html
79
+ - assets/bsk-jekyll/css/jekyll-theme-bas-style-kit.scss
80
+ - assets/bsk-jekyll/img/apple-touch-icon.png
81
+ - assets/bsk-jekyll/js/cookie-banner.js
82
+ - assets/css/main.scss
83
+ - screenshot.png
62
84
  homepage: https://gitlab.data.bas.ac.uk/BSK/bas-style-kit-jekyll-theme
63
85
  licenses:
64
86
  - MIT