jekyll-scouts_uk_2018 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/_layouts/section.html +10 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e4e1e2faf95ba31dce2ef5a42a921b6da0a07fca3f5c4bc23b0087e5fa22407
4
- data.tar.gz: 6366e3ccef39ad1f775ff0e0753a57f6a19643d85d8fe845b1b0e00ee4932880
3
+ metadata.gz: e35ad34280ba04bb31284f42eea6366ddaeaab5f46c20b19874d96713058d793
4
+ data.tar.gz: 77e08e51dc4d5ea7072c5eab051e25b7b339949a48490b6bbbb88ae8c04cad3a
5
5
  SHA512:
6
- metadata.gz: edcffa3effe4c9b1ed8f6a6191e0354b452a5a1ac7c8ae29a8b9311cd84bfb2c67f0f47b3815ad72e316a9080a2c2be12822fb78cb17b1240313e2cfbdd5d201
7
- data.tar.gz: 89a0c683dd5a70759bfa96e30bbee5e7eb29eb08eecec2f7e63444f1942eb0ec41007c85c44369a94b7abd263abeb47c1968d97271a42cab146ee8bda7c2c21f
6
+ metadata.gz: 2a706e8efe06807a75b13238d7de6c1ec7d01ae0abb7ce7c04d5e0a2027a52a22e4f1aa9136c896d4e97c9e2940c9a2517920efec779d47184ec9e2c5edba563
7
+ data.tar.gz: 5a33afe9f6810984a3928739b31cbd7c94dfd257938a85372fd7e4a6e17f55ffb896e59b92853f0482054335c2a67e5ce46033b055322a01b1d780a208f20f7d
data/README.md CHANGED
@@ -8,7 +8,7 @@ A [Jekyll](https://jekyllrb.com/) template for the UK Scouts brand (2018). You c
8
8
  Add this line to your Jekyll site's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'jekyll-scouts_uk_2018', '~> 1.0'
11
+ gem 'jekyll-scouts_uk_2018', '~> 1.1'
12
12
  ```
13
13
 
14
14
  And add this line to your Jekyll site's _config.yml:
@@ -84,7 +84,8 @@ Then create your files in the _sections directory. A number of front matter sett
84
84
  * type: squirrels / beavers / cubs / scouts / explorers / network / activesupport - causes the correct logo to be shown
85
85
  * logo_type: (only for squirrels) primary / symbol
86
86
  * logo_colour: black / white / (others that vary by section e.g. blue / colourful for beavers, green for cubs / scouts)
87
- * youth_approved: foundation / bronze (causes the relevant seal to be displayed)
87
+ * youth_approved.level: foundation / bronze (causes the relevant seal to be displayed)
88
+ * youth_approved.expires: date of certificate expiry in YYYY-MM-DD format.
88
89
  * social_links.email
89
90
  * social_links.twitter
90
91
  * social_links.facebook
@@ -43,12 +43,16 @@ main_class: section
43
43
  </h1>
44
44
 
45
45
  {%- if page.youth_approved -%}
46
- <a href="https://www.scouts.scot/members/youth-involvement/youth-approved-award/" rel="nofollow noopener" target="_blank" class="youth-approved">
47
- {%- assign logo = page.youth_approved | capitalize -%}
48
- {%- assign logo = "assets/images/YouthApproved" | append: logo | relative_url -%}
49
- {%- assign alt = "We've got the " | append: page.youth_approved | append: " Youth Approved award from Scouts Scotland." -%}
50
- <img src="{{ logo }}.png" srcset="{{ logo }}-100.png 100w, {{ logo }}-320.png 320w, {{ logo }}-480.png 480w, {{ logo }}-640.png 640w" alt="{{ alt }}">
51
- </a>
46
+ {%- assign today = 'now' | date: '%Y-%m-%d' -%}
47
+ {%- assign expires = page.youth_approved.expires | date: '%Y-%m-%d' -%}
48
+ {%- if expires >= today -%}
49
+ <a href="https://www.scouts.scot/members/youth-involvement/youth-approved-award/" rel="nofollow noopener" target="_blank" class="youth-approved">
50
+ {%- assign logo = page.youth_approved.level | capitalize -%}
51
+ {%- assign logo = "assets/images/YouthApproved" | append: logo | relative_url -%}
52
+ {%- assign alt = "We've got the " | append: page.youth_approved.level | append: " Youth Approved award from Scouts Scotland." -%}
53
+ <img src="{{ logo }}.png" srcset="{{ logo }}-100.png 100w, {{ logo }}-320.png 320w, {{ logo }}-480.png 480w, {{ logo }}-640.png 640w" alt="{{ alt }}">
54
+ </a>
55
+ {%- endif -%}
52
56
  {%- endif -%}
53
57
  </div>
54
58
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scouts_uk_2018
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gauld