slow-steps 0.1.13 → 0.2.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: 6cbd613cb2698f8b14ddec71ea31af9f93863331204dec4e6ee3e188736bad82
4
- data.tar.gz: 95587738b544403e67b69c33e22edcad508f4c91ea115dede5e4cc4bae6fd634
3
+ metadata.gz: 0ba3703f35cb5bf5ecfb2ca11a661074314a745d34f322661d13b0be6a916cc2
4
+ data.tar.gz: 636e9685daf9f1e87e3b55e99a149a4b17e8907f22e168a1992c543776309ead
5
5
  SHA512:
6
- metadata.gz: 96ec670bbc9d10e86879c34a9d662c5b5860bbef00bbf41467492ccaa1be6a59a99a94acab6ea5e3e03ed2925a75fbb4dfd8f76c4c88399539434f8213ba5a25
7
- data.tar.gz: d9f8f6106c4d4192087e320bbe4536507f157fa90b3e4a77a2754f8f69f96719cf7de8dd149898dd4f33f57844526f9453928c9c403c01ddfd04df436e423fe0
6
+ metadata.gz: 247cf12a9f08d48546979cd8256c4f206502a7faab5f3d08ba058ef7f97aebed8eee3b6782451eb8b91cd8e7cb7ba162ec1c3518dd6e33774316c56fd8381bd6
7
+ data.tar.gz: 9c0a5cb030a84f67a51f20fc4d3b01a4258a257d79f44b62e3eb1b56aa0481567a941e13a457d495ea0b4828415a0e4e6eee0ff952c6c110c9e94dc29985afd1
@@ -1,33 +1,30 @@
1
1
  <!-- Take inputs from page front matter and calculate the coordinates of the svg elements -->
2
2
  {% assign image_handle = include.image_handle %}
3
3
 
4
- {% if page[image_handle].augment %}
4
+ <!-- get image dimensions -->
5
+ {%- assign imageX = page.images[image_handle].size | split: ', ' | first -%}
6
+ {%- assign imageY = page.images[image_handle].size | split: ', ' | last -%}
5
7
 
6
- <!-- get image dimensions -->
7
- {%- assign imageX = page[image_handle].augment.image | split: ', ' | first -%}
8
- {%- assign imageY = page[image_handle].augment.image | split: ', ' | last -%}
8
+ <!-- pre-assign arrays for circle centers and line ends -->
9
+ {% assign cX = '' | split: ',' %}
10
+ {% assign cY = '' | split: ',' %}
9
11
 
10
- <!-- pre-assign arrays for circle centers and line ends -->
11
- {% assign cX = '' | split: ',' %}
12
- {% assign cY = '' | split: ',' %}
12
+ <!-- loop over all the requested labels -->
13
+ {% for item in page.images[image_handle].labels %}
13
14
 
14
- <!-- loop over all the requested labels -->
15
- {% for item in page[image_handle].augment.labels %}
15
+ <!-- x(i) and y(i) -->
16
+ {% assign ix = item.coord | split: ', ' | first %}
17
+ {% assign iy = item.coord | split: ', ' | last %}
16
18
 
17
- <!-- x(i) and y(i) -->
18
- {% assign ix = item.coord | split: ', ' | first %}
19
- {% assign iy = item.coord | split: ', ' | last %}
19
+ <!-- calculate circle centers as percentage of image size -->
20
+ {% assign cx = ix | times: 100 | divided_by: imageX | append: ', ' %}
21
+ {% assign cy = iy | times: 100 | divided_by: imageY | append: ', ' %}
22
+ <!-- push into arrays -->
23
+ {% assign cX = cX | push: cx %}
24
+ {% assign cY = cY | push: cy %}
20
25
 
21
- <!-- calculate circle centers as percentage of image size -->
22
- {% assign cx = ix | times: 100 | divided_by: imageX | append: ', ' %}
23
- {% assign cy = iy | times: 100 | divided_by: imageY | append: ', ' %}
24
- <!-- push into arrays -->
25
- {% assign cX = cX | push: cx %}
26
- {% assign cY = cY | push: cy %}
26
+ {% endfor %}
27
27
 
28
- {% endfor %}
29
-
30
- {% endif %}
31
28
 
32
29
  <!--
33
30
  in: [imageX, imageY] pixels
@@ -35,6 +32,4 @@ in: [imageX, imageY] pixels
35
32
 
36
33
  out: cX = [cx_1, cx_2, ... , cx_n]
37
34
  cY = [cy_1, cy_2, ... , cy_n]
38
-
39
- X1 = [x1_1, x1_2, ... , x1_n]
40
35
  -->
@@ -0,0 +1,12 @@
1
+ <!--
2
+ insert an image located in assets/images/posts/ and wrap with .post__image div.
3
+ -->
4
+ <div class="post__image">
5
+
6
+ {% picture {{ include.link | prepend: 'posts/' }} --alt {{include.alt}} --img class="post__content--image" %}
7
+
8
+ {% if include.caption %}
9
+ <p class="image--caption">{{ include.caption }}</p>
10
+ {% endif %}
11
+
12
+ </div>
@@ -1,10 +1,55 @@
1
- <!-- include for post images to simplify the ux -->
1
+ <!--
2
+ insert an augmented image located in assets/images/content/
2
3
 
3
- <div class="post__image">
4
+ Usage:
4
5
 
5
- {% picture {{ include.link | prepend: 'posts/' }} --alt include.alt --img class="post__content--image" %}
6
+ <div class="wrapping-class" >
7
+ {% comment %}
8
+ {% include image.html
9
+ image="handle"
10
+ alt="Description"
11
+ class="image-class"
12
+ caption="Optional caption"
13
+ %}
14
+ {% endcomment %}
6
15
 
7
- {% if include.caption %}
8
- <p class="post__image--caption">{{ include.caption }}</p>
16
+ We close the wrapping div before the caption.
17
+
18
+ -->
19
+
20
+
21
+ {% capture path %}
22
+ {{ page.images[include.image].file | prepend: 'content/' }}
23
+ {% endcapture %}
24
+
25
+ {% picture {{ path }}
26
+ --img class="{{ include.class }}"
27
+ --alt {{ include.alt }} %}
28
+
29
+ {% if page.images[include.image].labels %}
30
+
31
+ {% include functions/calc-svg-coord.html image_handle=include.image %}
32
+
33
+ <svg class="svg__augment" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
34
+
35
+ {% for item in page.images[include.image].labels %}
36
+ <svg class="svg__labels hidden" x="{{ cX[forloop.index0] | remove: ", " }}%" y="{{ cY[forloop.index0] | remove: ", " }}%" style="overflow: visible">
37
+
38
+ <circle class="svg--elem svg--circle" cx="0%" cy="0%" r="6" />
39
+
40
+ <line class="svg--elem svg--line" x1="0" y1="0" y2="0" />
41
+
42
+ <text class="svg--elem svg--text trans-{% if item.reverse %}right{% else %}left{% endif %}" >{{ item.text }}</text>
43
+
44
+ </svg>
45
+ {% endfor %}
46
+
47
+ </svg>
9
48
  {% endif %}
49
+
50
+ <!-- closing warpping div -->
10
51
  </div>
52
+
53
+ {% if include.caption %}
54
+ <p class="image--caption">{{ include.caption }}</p>
55
+ {% endif %}
@@ -21,7 +21,7 @@ Last full read through 29/12/2020
21
21
  <div class="hero hero-65">
22
22
 
23
23
  <div class="hero__overlay h-100">
24
- {% picture {{ page.hero.image | prepend: 'content/' }}
24
+ {% picture {{ page.hero.file | prepend: 'content/' }}
25
25
  --img class="hero__image hero__image--fixed hero-65"
26
26
  --alt {{ page.hero.alt }} %}</div>
27
27
 
@@ -8,7 +8,7 @@ layout: default
8
8
  <div class="hero hero-65">
9
9
 
10
10
  <div class="hero__overlay h-100">
11
- {% picture {{ page.hero.image | prepend: 'content/' }}
11
+ {% picture {{ page.hero.file | prepend: 'content/' }}
12
12
  --img class="hero__image hero__image--fixed hero-65"
13
13
  --alt {{ page.hero.alt }} %}</div>
14
14
 
@@ -23,7 +23,7 @@ Last full read through 27/12/2020
23
23
  <div class="hero hero-65">
24
24
 
25
25
  <div class="hero__overlay">
26
- {% picture {{ page.hero.image | prepend: 'content/' }}
26
+ {% picture {{ page.hero.file | prepend: 'content/' }}
27
27
  --img class="hero__image image__filter--mix"
28
28
  --alt {{ page.hero.alt }} %}</div>
29
29
 
@@ -39,7 +39,7 @@ Last full read through 27/12/2020
39
39
 
40
40
  <div class="augmented-image">
41
41
 
42
- {% picture {{ page.subhero.image | prepend: 'content/' }}
42
+ {% picture {{ page.subhero.file | prepend: 'content/' }}
43
43
  --img class="hero__image"
44
44
  --alt {{ page.subhero.alt }} %}
45
45
 
@@ -51,7 +51,15 @@ Last full read through 27/12/2020
51
51
  </radialGradient>
52
52
  </defs>
53
53
 
54
- <circle class="svg__augment--pulse" cx="32%" cy="2%" />
54
+ <circle class="svg__augment--pulse" cx="32%" cy="2%" >
55
+
56
+ <!-- Can't animate with CSS, see https://stackoverflow.com/questions/32409101/resizing-svg-circle-radius-using-css-animation
57
+ -->
58
+ <animate attributeName="r" begin="0s" dur="2s" repeatCount="indefinite" from=".1" to="2"/>
59
+
60
+ <animate attributeName="fill-opacity" attributeType="CSS" begin="0s" dur="2s" repeatCount="indefinite" from="1" to="0" fill="freeze" />
61
+
62
+ </circle>
55
63
  <circle class="svg__augment--led" cx="32%" cy="2%" r=".5" />
56
64
 
57
65
  </svg>
@@ -89,31 +97,6 @@ Last full read through 27/12/2020
89
97
 
90
98
  <div class="segment__right augmented-image" >
91
99
 
92
- {% picture {{ page.guarantee.image | prepend: 'content/' }}
93
- --img class="hero__image image--guarantee h-100"
94
- --alt {{ page.guarantee.alt }} %}
95
-
96
- <svg class="svg__augment " width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
97
-
98
- {% include functions/calc-svg-coord.html image_handle="guarantee" %}
99
-
100
- {% for item in page.guarantee.augment.labels %}
101
-
102
- <svg class="svg__labels hidden" x="{{ cX[forloop.index0] | remove: ", " }}%" y="{{ cY[forloop.index0] | remove: ", " }}%" style="overflow: visible">
103
-
104
- <circle class="svg--elem svg--circle" cx="0%" cy="0%" r="6" />
105
-
106
- <line class="svg--elem svg--line" x1="0" y1="0" y2="0" />
107
-
108
- <text class="svg--elem svg--text trans-{% if item.reverse %}right{% else %}left{% endif %}" >{{ item.text }}</text>
109
-
110
- </svg>
111
-
112
- {% endfor %}
113
-
114
- </svg>
115
-
116
-
117
- </div>
100
+ {% include image.html image="guarantee" alt="Describe the image" class="hero__image image--guarantee h-100"%}
118
101
 
119
102
  </div>
@@ -24,7 +24,7 @@ Last full read through 27/12/2020
24
24
  <div class="hero hero-90">
25
25
 
26
26
  <div class="hero__overlay">
27
- {% picture {{ page.hero.image | prepend: 'content/' }}
27
+ {% picture {{ page.hero.file | prepend: 'content/' }}
28
28
  --img class="hero__image image__filter--mix h-100"
29
29
  --alt {{ page.hero.alt }} %}</div>
30
30
 
@@ -51,7 +51,7 @@ Last full read through 27/12/2020
51
51
 
52
52
  <div class="augmented-image">
53
53
 
54
- {% picture {{ page.subhero.image | prepend: 'content/' }}
54
+ {% picture {{ page.subhero.file | prepend: 'content/' }}
55
55
  --img class="hero__image"
56
56
  --alt {{ page.subhero.alt }} %}
57
57
 
@@ -63,7 +63,15 @@ Last full read through 27/12/2020
63
63
  </radialGradient>
64
64
  </defs>
65
65
 
66
- <circle class="svg__augment--pulse" cx="32%" cy="2%" />
66
+ <circle class="svg__augment--pulse" cx="32%" cy="2%" >
67
+
68
+ <!-- Can't animate with CSS, see https://stackoverflow.com/questions/32409101/resizing-svg-circle-radius-using-css-animation
69
+ -->
70
+ <animate attributeName="r" begin="0s" dur="2s" repeatCount="indefinite" from=".1" to="2"/>
71
+
72
+ <animate attributeName="fill-opacity" attributeType="CSS" begin="0s" dur="2s" repeatCount="indefinite" from="1" to="0" fill="freeze" />
73
+
74
+ </circle>
67
75
  <circle class="svg__augment--led" cx="32%" cy="2%" r=".5" />
68
76
 
69
77
  </svg>
@@ -94,60 +102,11 @@ Last full read through 27/12/2020
94
102
 
95
103
  <div class="segment__right augmented-image" >
96
104
 
97
- {% picture {{ page.guarantee.image | prepend: 'content/' }}
98
- --img class="hero__image image--guarantee h-100"
99
- --alt {{ page.guarantee.alt }} %}
100
-
101
- <svg class="svg__augment " width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
102
-
103
- {% include functions/calc-svg-coord.html image_handle="guarantee" %}
104
-
105
- {% for item in page.guarantee.augment.labels %}
106
-
107
- <svg class="svg__labels hidden" x="{{ cX[forloop.index0] | remove: ", " }}%" y="{{ cY[forloop.index0] | remove: ", " }}%" style="overflow: visible">
108
-
109
- <circle class="svg--elem svg--circle" cx="0%" cy="0%" r="6" />
105
+ {% include image.html image="guarantee" alt="Describe the image" class="hero__image image--guarantee h-100"%}
110
106
 
111
- <line class="svg--elem svg--line" x1="0" y1="0" y2="0" />
112
-
113
- <text class="svg--elem svg--text trans-{% if item.reverse %}right{% else %}left{% endif %}" >{{ item.text }}</text>
114
-
115
- </svg>
116
-
117
- {% endfor %}
118
-
119
- </svg>
120
-
121
-
122
- </div>
123
107
 
124
108
  </div>
125
109
 
126
110
  <div class="augmented-image" >
127
111
 
128
- {% picture {{ page.device.image | prepend: 'content/' }}
129
- --img class="hero__image"
130
- --alt {{ page.device.alt }} %}
131
-
132
- {% include functions/calc-svg-coord.html image_handle="device" %}
133
-
134
- <svg class="svg__augment" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
135
-
136
- {% for item in page.device.augment.labels %}
137
-
138
- <svg class="svg__labels hidden" x="{{ cX[forloop.index0] | remove: ", " }}%" y="{{ cY[forloop.index0] | remove: ", " }}%" style="overflow: visible">
139
-
140
- <circle class="svg--elem svg--circle" cx="0%" cy="0%" r="6" />
141
-
142
- <line class="svg--elem svg--line" x1="0" y1="0" y2="0" />
143
-
144
- <text class="svg--elem svg--text trans-{% if item.reverse %}right{% else %}left{% endif %}" >{{ item.text }}</text>
145
-
146
- </svg>
147
-
148
- {% endfor %}
149
-
150
-
151
- </svg>
152
-
153
- </div>
112
+ {% include image.html image="device" alt="Describe the image" class="hero__image" %}
@@ -8,7 +8,7 @@ layout: default
8
8
  <div class="hero hero-65">
9
9
 
10
10
  <div class="hero__overlay h-100">
11
- {% picture {{ page.hero.image | prepend: 'content/' }}
11
+ {% picture {{ page.hero.file | prepend: 'content/' }}
12
12
  --img class="hero__image hero__image--fixed hero-65"
13
13
  --alt {{ page.hero.alt }} %}</div>
14
14
 
@@ -24,13 +24,12 @@ layout: default
24
24
  {% picture thumb {{ post.image | prepend: 'posts/' }} --alt {{ post.alt }} --img class="feed__card--image" %}
25
25
  </div>
26
26
  <div class="feed__card--text">
27
-
27
+ <p class="feed__card--meta">Published <span>{{ post.date | date: "%b %d, %Y" }}</span></p>
28
28
  <a class="feed__card--link" href="{{ site.baseurl }}{{ post.url }}">
29
29
 
30
30
  <h4 class="feed__card--title">{{ post.title }}</h4>
31
31
  <p class="post__subtitle">{{ post.subtitle }}</p>
32
32
  </a>
33
- <p class="feed__card--meta">Published <span>{{ post.date | date: "%b %d, %Y" }}</span></p>
34
33
 
35
34
 
36
35
  </div>
@@ -2,10 +2,33 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <section class="fullwidth__wrap">
5
+ {% if page.hero %}
6
6
 
7
+ <div class="hero hero-65">
7
8
 
8
- {{ content }}
9
+ <div class="hero__overlay h-100">
10
+ {% picture {{ page.hero.file | prepend: 'content/' }}
11
+ --img class="hero__image hero__image--fixed hero-65"
12
+ --alt {{ page.hero.alt }} %}</div>
13
+
14
+ {% if page.title %}
15
+ <header class="hero__strap hero__strap--center image__filter--blur hero-65" aria-label="{{ strap }}">
16
+
17
+ <h1 aria-hidden="true" >
18
+ {% assign n = page.title.size | minus: 1 %}
19
+ {%- for char in (0..n ) -%}
20
+
21
+ <span style="animation-delay: {{ char | times: 40 | plus: 200 }}ms;">{{ page.title | slice: char }}</span>
22
+ {%- endfor -%}</h1>
9
23
 
24
+ </header>
25
+ {% endif %}
26
+ </div>
27
+
28
+ {% endif %}
29
+
30
+ <section class="fullwidth__wrap">
31
+
32
+ {{ content }}
10
33
 
11
34
  </section>
@@ -6,7 +6,7 @@
6
6
  width: 80vw
7
7
  max-width: 1200px
8
8
  margin: auto
9
-
9
+
10
10
 
11
11
  .post__feed
12
12
  display: flex
@@ -19,10 +19,10 @@
19
19
  .feed__card
20
20
  display: flex
21
21
  flex-direction: column
22
- width: 200px
22
+ //width: 200px
23
23
  max-width: 360px
24
24
  //height: 220px
25
- margin: 20px
25
+ //margin: 20px
26
26
  overflow: hidden
27
27
  border-radius: 0
28
28
  //box-shadow: 0 0 6px rgba($env-primary,.8)
@@ -68,7 +68,7 @@
68
68
 
69
69
  .feed__card--meta
70
70
  font-size: $font-size * .5
71
- padding: 1rem 0
71
+ padding: 0
72
72
  & > span
73
73
  font-weight: 600
74
74
 
@@ -76,3 +76,14 @@
76
76
 
77
77
  .feed__card--meta
78
78
  font-size: $font-size * .7
79
+
80
+ .feed__card
81
+ display: flex
82
+ flex-direction: column
83
+ width: 200px
84
+ max-width: 360px
85
+ //height: 220px
86
+ margin: 20px
87
+ overflow: hidden
88
+ border-radius: 0
89
+ //box-shadow: 0 0 6px rgba($env-primary,.8)
@@ -22,11 +22,14 @@ body
22
22
  background-color: $white
23
23
 
24
24
  .fullwidth__wrap
25
- width: 90vw
26
- max-width: 800px
27
- margin: auto
28
- margin-top: $navbar-height + $secondary-navbar-height + 5vh
25
+ background-color: $white
26
+ width: 100vw
27
+ padding-top: $navbar-height + $secondary-navbar-height + 5vh
28
+ & > *
29
+ margin: auto
30
+ max-width: 800px
29
31
  & > p
32
+
30
33
  padding: 3rem 0
31
34
  & > ol li, ul li
32
35
  padding: 1rem 0
@@ -135,6 +138,12 @@ body
135
138
  transform: scaleY(2)
136
139
 
137
140
 
141
+ .image--caption
142
+ font-size: $font-size * .7
143
+ color: $grey
144
+ padding: 1rem 0
145
+ text-align: center
146
+
138
147
  // Block colors and sizes
139
148
  .strap--opd-trust
140
149
  @include opd-blue-trust
@@ -243,21 +252,8 @@ $svg-text-offset: 60px
243
252
  stop-opacity: 1
244
253
 
245
254
  .svg__augment--pulse
246
- animation: pulse-ring 2s $bezier-pulse infinite
247
255
  fill: $led
248
256
 
249
- @keyframes pulse-ring
250
- 0%
251
- opacity: .5
252
- r: .1
253
-
254
- 50%
255
- opacity: .2
256
-
257
- 100%
258
- opacity: 0
259
- r: 2
260
-
261
257
 
262
258
  // Social icons wraped in <a's
263
259
  .social
@@ -42,7 +42,7 @@
42
42
  padding: 3rem 0
43
43
 
44
44
  .post__subtitle
45
- padding: 5rem 0
45
+ padding: 1rem 0
46
46
 
47
47
  .post__image
48
48
  width: 60vw
@@ -57,11 +57,6 @@
57
57
  width: 100%
58
58
  height: 50vh
59
59
 
60
- .post__image--caption
61
- font-size: $font-size * .7
62
- color: $grey
63
- padding: 1rem 0
64
- text-align: center
65
60
  .post__link
66
61
  color: $opd-blue-confidence
67
62
  text-decoration: none
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slow-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Made Slowly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-19 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -201,6 +201,7 @@ files:
201
201
  - _includes/head/descriptors/twitter-meta.html
202
202
  - _includes/head/env/conditional.html
203
203
  - _includes/head/head.html
204
+ - _includes/image-post.html
204
205
  - _includes/image.html
205
206
  - _includes/link.html
206
207
  - _includes/navigation/global.html
@@ -292,6 +293,7 @@ files:
292
293
  - assets/fonts/fontawesome-free-5.11.2-web/webfonts/fa-solid-900.ttf
293
294
  - assets/fonts/fontawesome-free-5.11.2-web/webfonts/fa-solid-900.woff
294
295
  - assets/fonts/fontawesome-free-5.11.2-web/webfonts/fa-solid-900.woff2
296
+ - assets/images/augmented_image.png
295
297
  - assets/js/animate_after_load.js
296
298
  - assets/js/calc-mobile-viewport.js
297
299
  - assets/js/mobile-nav-slider.js