@financial-times/o-topper 5.3.1 → 5.4.0
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.
- package/CHANGELOG.md +7 -0
- package/demos/src/demo-snappy.scss +4 -0
- package/demos/src/full-bleed-image-center.mustache +1 -0
- package/demos/src/full-bleed-image-left.mustache +1 -0
- package/demos/src/full-bleed-offset-right-rail.mustache +28 -0
- package/demos/src/full-bleed-offset.mustache +1 -1
- package/origami.json +22 -0
- package/package.json +1 -1
- package/src/scss/_elements.scss +5 -6
- package/src/scss/_layout.scss +0 -1
- package/src/scss/_mixins.scss +6 -2
- package/src/scss/themes/_full-bleed-image.scss +25 -9
- package/src/scss/themes/_full-bleed-offset.scss +60 -14
- package/src/scss/themes/_split-text.scss +35 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.4.0](https://www.github.com/Financial-Times/origami/compare/o-topper-v5.3.1...o-topper-v5.4.0) (2022-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Updates caption position for improved contrast. Adds additional demos to the registry which were previously missing. [pr 877](https://github.com/Financial-Times/origami/pull/877)
|
|
9
|
+
|
|
3
10
|
### [5.3.1](https://www.github.com/Financial-Times/origami/compare/o-topper-v5.3.0...o-topper-v5.3.1) (2022-09-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
<source media="(min-width: 1220px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/https://d1e00ek4ebabms.cloudfront.net/production/0c368ecb-3d2d-4bf2-be88-2befb42c45f8.jpg?source=origami-build-tools&fit=scale-down&quality=highest&width=1440 1440w">
|
|
19
19
|
<img alt="" class="o-topper__image" src="https://www.ft.com/__origami/service/image/v2/images/raw/https://d1e00ek4ebabms.cloudfront.net/production/c41b7e70-fe88-4789-818e-3bacf0f65980.jpg?source=origami-build-tools&fit=scale-down&quality=highest&width=1440">
|
|
20
20
|
</picture>
|
|
21
|
+
<figcaption class="o-topper__image-credit">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo</figcaption>
|
|
21
22
|
</figure>
|
|
22
23
|
</div>
|
|
@@ -18,5 +18,6 @@
|
|
|
18
18
|
<source media="(min-width: 1220px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/https://d1e00ek4ebabms.cloudfront.net/production/0c368ecb-3d2d-4bf2-be88-2befb42c45f8.jpg?source=origami-build-tools&fit=scale-down&quality=highest&width=1440 1440w">
|
|
19
19
|
<img alt="" class="o-topper__image" src="https://www.ft.com/__origami/service/image/v2/images/raw/https://d1e00ek4ebabms.cloudfront.net/production/c41b7e70-fe88-4789-818e-3bacf0f65980.jpg?source=origami-build-tools&fit=scale-down&quality=highest&width=1440">
|
|
20
20
|
</picture>
|
|
21
|
+
<figcaption class="o-topper__image-credit">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo</figcaption>
|
|
21
22
|
</figure>
|
|
22
23
|
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="o-topper o-topper--full-bleed-offset o-topper--right-rail o-topper--color-paper">
|
|
2
|
+
<div class="o-topper__content">
|
|
3
|
+
<div class="o-topper__tags">
|
|
4
|
+
<a href="https://www.ft.com/comment/the-big-read" class="o-topper__brand">
|
|
5
|
+
The Big Read
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://www.ft.com/topics/people/George_Soros" class="o-topper__topic">
|
|
8
|
+
George Soros
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
<h1 class="o-topper__headline o-topper__headline--large">
|
|
12
|
+
<span class="article-classifier__gap">George Soros fights back against populist foes</span>
|
|
13
|
+
</h1>
|
|
14
|
+
<div class="o-topper__standfirst">Once a symbol of the spread of democracy in Europe, the billionaire’s foundation is now the target of resurgent nationalism</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="o-topper__background"></div>
|
|
18
|
+
|
|
19
|
+
<figure class="o-topper__visual">
|
|
20
|
+
<picture class="o-topper__picture">
|
|
21
|
+
<source media="(max-width: 490px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/42da357a-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=490 490w">
|
|
22
|
+
<source media="(max-width: 1220px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/05fff02c-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=1220 1220w">
|
|
23
|
+
<source media="(min-width: 1220px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/402afdfa-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=1440 1440w">
|
|
24
|
+
<img alt="" class="o-topper__image" src="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/05fff02c-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=1440">
|
|
25
|
+
</picture>
|
|
26
|
+
<figcaption class="o-topper__image-credit">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo © Bloomberg</figcaption>
|
|
27
|
+
</figure>
|
|
28
|
+
</div>
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
<source media="(min-width: 1220px)" srcset="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/402afdfa-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=1440 1440w">
|
|
24
24
|
<img alt="" class="o-topper__image" src="https://www.ft.com/__origami/service/image/v2/images/raw/http://prod-upp-image-read.ft.com/05fff02c-f78e-11e7-8715-e94187b3017e?source=origami-build-tools&fit=scale-down&quality=highest&width=1440">
|
|
25
25
|
</picture>
|
|
26
|
-
<figcaption class="o-topper__image-credit"
|
|
26
|
+
<figcaption class="o-topper__image-credit">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo © Bloomberg</figcaption>
|
|
27
27
|
</figure>
|
|
28
28
|
</div>
|
package/origami.json
CHANGED
|
@@ -54,6 +54,28 @@
|
|
|
54
54
|
"template": "/demos/src/full-bleed-offset.mustache",
|
|
55
55
|
"description": "This is a theme that editorial can choose, which comes through the API"
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"name": "Full Bleed Offset Right Rail",
|
|
59
|
+
"title": "Offset Full-Bleed Image Topper",
|
|
60
|
+
"template": "/demos/src/full-bleed-offset-right-rail.mustache",
|
|
61
|
+
"description": "This is a theme that editorial can choose, which comes through the API"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "Full Bleed Offset Snappy Grid",
|
|
65
|
+
"title": "Offset Full-Bleed Image Topper",
|
|
66
|
+
"template": "/demos/src/full-bleed-offset.mustache",
|
|
67
|
+
"description": "This is a theme that editorial can choose, which comes through the API",
|
|
68
|
+
"sass":"demos/src/demo-snappy.scss",
|
|
69
|
+
"hidden": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "Full Bleed Offset Right Rail Snappy Grid",
|
|
73
|
+
"title": "Offset Full-Bleed Image Topper",
|
|
74
|
+
"template": "/demos/src/full-bleed-offset-right-rail.mustache",
|
|
75
|
+
"description": "This is a theme that editorial can choose, which comes through the API",
|
|
76
|
+
"sass":"demos/src/demo-snappy.scss",
|
|
77
|
+
"hidden": true
|
|
78
|
+
},
|
|
57
79
|
{
|
|
58
80
|
"name": "Split Text Left",
|
|
59
81
|
"title": "Left-Aligned Split Text Topper",
|
package/package.json
CHANGED
package/src/scss/_elements.scss
CHANGED
|
@@ -41,12 +41,11 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
@mixin _oTopperImageCredit {
|
|
44
|
-
@include oTypographySans(-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
text-shadow: 1px 1px 1px oColorsByName('slate');
|
|
44
|
+
@include oTypographySans(-1);
|
|
45
|
+
padding: 10px 11px 0px;
|
|
46
|
+
@include oGridRespondTo(L) {
|
|
47
|
+
padding-left: 18px;
|
|
48
|
+
}
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
//IE9 support
|
package/src/scss/_layout.scss
CHANGED
package/src/scss/_mixins.scss
CHANGED
|
@@ -237,11 +237,11 @@
|
|
|
237
237
|
$foreground: oColorsGetTextColor($background, $opacity: 100);
|
|
238
238
|
$link-text-color: oColorsByUsecase('link', 'text');
|
|
239
239
|
$link-contrasts-with-background: oColorsGetContrastRatio($background, $link-text-color) > 4.5;
|
|
240
|
-
|
|
241
240
|
// include oTopperColor on a parent then extend this placeholder on a
|
|
242
241
|
// descendent to lend that descendent the color you specified in the mixin
|
|
243
242
|
.o-topper__background,
|
|
244
|
-
.o-topper__content
|
|
243
|
+
.o-topper__content,
|
|
244
|
+
.o-topper__image-credit {
|
|
245
245
|
background-color: $background;
|
|
246
246
|
}
|
|
247
247
|
|
|
@@ -293,6 +293,10 @@
|
|
|
293
293
|
color: oColorsMix($foreground, $color-name, 73);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
+
|
|
297
|
+
.o-topper__image-credit {
|
|
298
|
+
color: oColorsMix($foreground, $color-name, 73);
|
|
299
|
+
}
|
|
296
300
|
|
|
297
301
|
@if $color-name == 'paper' or $color-name == 'wheat' {
|
|
298
302
|
.o-topper__opinion-genre,
|
|
@@ -5,7 +5,12 @@
|
|
|
5
5
|
.o-topper__read-next {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
.o-topper__background {
|
|
9
|
+
grid-row: 1;
|
|
10
|
+
}
|
|
11
|
+
.o-topper__visual {
|
|
12
|
+
grid-row: 1 /span 2;
|
|
13
|
+
}
|
|
9
14
|
&.o-topper--full-bleed-image-center {
|
|
10
15
|
@include oGridRespondTo(S) {
|
|
11
16
|
@include _oTopperAlignText(center);
|
|
@@ -26,7 +31,7 @@
|
|
|
26
31
|
@include oGridRespondTo(M) {
|
|
27
32
|
display: grid;
|
|
28
33
|
grid-template-columns: 1fr 1fr;
|
|
29
|
-
grid-template-rows: 1fr;
|
|
34
|
+
grid-template-rows: minmax(auto, 480px) 1fr;
|
|
30
35
|
|
|
31
36
|
.o-topper__content {
|
|
32
37
|
grid-row: 1;
|
|
@@ -38,20 +43,31 @@
|
|
|
38
43
|
background: transparent;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
@include oGridRespondTo(L) {
|
|
49
|
+
grid-template-rows: minmax(auto, 600px) 1fr;
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
@supports (object-fit: cover) {
|
|
47
53
|
.o-topper__visual {
|
|
48
54
|
height: auto;
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
@include oGridRespondTo(M) {
|
|
56
|
+
.o-topper__image {
|
|
57
|
+
height: 480px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
51
60
|
@include oGridRespondTo(L) {
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
.o-topper__image {
|
|
62
|
+
height: 600px;
|
|
63
|
+
}
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
66
|
}
|
|
67
|
+
|
|
68
|
+
.o-topper__image-credit {
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
color: oColorsByName("black-70");
|
|
71
|
+
margin-bottom: -20px;
|
|
72
|
+
}
|
|
57
73
|
}
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
// sass-lint:disable mixins-before-declarations
|
|
2
2
|
|
|
3
3
|
@mixin _oTopperThemeFullBleedOffset {
|
|
4
|
+
&.o-topper--right-rail {
|
|
5
|
+
.o-topper__image-credit {
|
|
6
|
+
@if $o-grid-mode != 'snappy' {
|
|
7
|
+
@include oGridRespondTo(L) {
|
|
8
|
+
width: calc(100vw - 720px);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@include oGridRespondTo(XL) {
|
|
12
|
+
width: calc(50vw - 110px);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
display: flex;
|
|
5
18
|
flex-direction: column;
|
|
6
|
-
|
|
19
|
+
|
|
7
20
|
@include oGridRespondTo($until: L) {
|
|
8
21
|
margin: 0 auto;
|
|
9
22
|
padding: 0;
|
|
23
|
+
|
|
24
|
+
.o-topper__background {
|
|
25
|
+
position: absolute;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
10
28
|
}
|
|
11
29
|
|
|
12
30
|
.o-topper__read-next {
|
|
@@ -30,7 +48,7 @@
|
|
|
30
48
|
@include oGridRespondTo(M) {
|
|
31
49
|
display: grid;
|
|
32
50
|
grid-template-columns: auto;
|
|
33
|
-
grid-template-rows: 20px
|
|
51
|
+
grid-template-rows: 20px 520px 60px min-content;
|
|
34
52
|
|
|
35
53
|
.o-topper__content {
|
|
36
54
|
grid-column: 1;
|
|
@@ -39,15 +57,15 @@
|
|
|
39
57
|
|
|
40
58
|
.o-topper__visual {
|
|
41
59
|
grid-column: 1;
|
|
42
|
-
grid-row: 1 / span
|
|
60
|
+
grid-row: 1 / span 4;
|
|
43
61
|
}
|
|
44
62
|
}
|
|
45
63
|
|
|
64
|
+
|
|
46
65
|
//Add extra 20px columns to get the space outside the content well
|
|
47
66
|
@include oGridRespondTo(L) {
|
|
48
67
|
grid-template-columns: 40px 0px 20px minmax(500px, 700px) 20px minmax(0, auto) 300px;
|
|
49
68
|
|
|
50
|
-
// .o-topper__content {
|
|
51
69
|
&.o-topper--centered {
|
|
52
70
|
grid-template-columns: 40px 1fr 0 minmax(500px, 700px) 40px 1fr 40px;
|
|
53
71
|
}
|
|
@@ -63,9 +81,21 @@
|
|
|
63
81
|
|
|
64
82
|
.o-topper__visual {
|
|
65
83
|
grid-column: 1 / span 7;
|
|
84
|
+
left: 0px;
|
|
85
|
+
margin-left: 0px;
|
|
86
|
+
width: inherit;
|
|
87
|
+
overflow: visible;
|
|
66
88
|
}
|
|
67
|
-
}
|
|
68
89
|
|
|
90
|
+
.o-topper__picture {
|
|
91
|
+
position: relative;
|
|
92
|
+
width: 100vw;
|
|
93
|
+
margin-left: -50vw;
|
|
94
|
+
left: 50%;
|
|
95
|
+
height: 600px;
|
|
96
|
+
display: block;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
69
99
|
@include oGridRespondTo(XL) {
|
|
70
100
|
grid-template-columns: 40px 40px 20px minmax(500px, 700px) 40px minmax(0, auto) 300px;
|
|
71
101
|
}
|
|
@@ -73,19 +103,35 @@
|
|
|
73
103
|
@supports (object-fit: cover) {
|
|
74
104
|
.o-topper__visual {
|
|
75
105
|
height: auto;
|
|
76
|
-
max-height: 480px;
|
|
77
|
-
|
|
78
|
-
@include oGridRespondTo(L) {
|
|
79
|
-
height: 600px;
|
|
80
|
-
max-height: 600px;
|
|
81
|
-
}
|
|
82
106
|
}
|
|
83
107
|
}
|
|
108
|
+
|
|
109
|
+
@include oGridRespondTo( $from: M , $until: L ) {
|
|
110
|
+
display: flex;
|
|
111
|
+
}
|
|
84
112
|
|
|
85
113
|
.o-topper__image-credit {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
114
|
+
text-align: left;
|
|
115
|
+
@include oGridRespondTo(L) {
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
padding-left: 0px;
|
|
118
|
+
min-width: 320px;
|
|
119
|
+
transform: translate(20px, 0);
|
|
120
|
+
width: calc(100vw - 800px);
|
|
121
|
+
float: right;
|
|
89
122
|
}
|
|
123
|
+
@include oGridRespondTo($from: XL) {
|
|
124
|
+
transform: translate(calc(50vw - 590px), 0);
|
|
125
|
+
width: calc(50vw - 250px);
|
|
126
|
+
}
|
|
127
|
+
@if $o-grid-mode == 'snappy' {
|
|
128
|
+
@include oGridRespondTo($from: L, $until: XL) {
|
|
129
|
+
transform: translate(calc(50vw - 470px), 0);
|
|
130
|
+
width: calc(50vw - 170px);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
90
134
|
}
|
|
135
|
+
|
|
136
|
+
|
|
91
137
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
@include oGridRespondTo($until: M) {
|
|
15
15
|
padding: 0;
|
|
16
|
+
|
|
16
17
|
.o-topper__content {
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-direction: column;
|
|
@@ -23,12 +24,19 @@
|
|
|
23
24
|
.o-topper__visual {
|
|
24
25
|
min-height: 350px;
|
|
25
26
|
}
|
|
27
|
+
|
|
28
|
+
.o-topper__picture {
|
|
29
|
+
position: relative;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 350px;
|
|
32
|
+
float: right;
|
|
33
|
+
}
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
@include oGridRespondTo(M) {
|
|
29
37
|
display: grid;
|
|
30
38
|
grid-template-columns: 1fr 1fr;
|
|
31
|
-
grid-template-rows: 1fr;
|
|
39
|
+
grid-template-rows: minmax(0, 480px) 1fr;
|
|
32
40
|
|
|
33
41
|
.o-topper__content {
|
|
34
42
|
grid-column: 1 / span 2;
|
|
@@ -39,14 +47,18 @@
|
|
|
39
47
|
padding-right: 20px;
|
|
40
48
|
}
|
|
41
49
|
|
|
42
|
-
.o-
|
|
50
|
+
.o-topper__background {
|
|
43
51
|
grid-row: 1;
|
|
44
52
|
}
|
|
45
53
|
|
|
54
|
+
.o-topper__visual {
|
|
55
|
+
grid-row: 1/span 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
46
58
|
.o-topper__picture {
|
|
47
59
|
width: 50%;
|
|
48
60
|
float: right;
|
|
49
|
-
height:
|
|
61
|
+
height: auto;
|
|
50
62
|
position: relative;
|
|
51
63
|
}
|
|
52
64
|
|
|
@@ -57,6 +69,10 @@
|
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
|
|
72
|
+
@include oGridRespondTo(L) {
|
|
73
|
+
grid-template-rows: minmax(0, 600px) 1fr;
|
|
74
|
+
}
|
|
75
|
+
|
|
60
76
|
@supports (object-fit: cover) {
|
|
61
77
|
.o-topper__image {
|
|
62
78
|
position: absolute;
|
|
@@ -64,12 +80,26 @@
|
|
|
64
80
|
|
|
65
81
|
.o-topper__visual {
|
|
66
82
|
@include oGridRespondTo(M) {
|
|
67
|
-
|
|
83
|
+
.o-topper__picture {
|
|
84
|
+
height: 480px;
|
|
85
|
+
}
|
|
68
86
|
}
|
|
87
|
+
|
|
69
88
|
@include oGridRespondTo(L) {
|
|
70
|
-
|
|
89
|
+
.o-topper__picture {
|
|
90
|
+
height: 600px;
|
|
91
|
+
}
|
|
71
92
|
}
|
|
72
93
|
}
|
|
73
94
|
}
|
|
74
95
|
|
|
96
|
+
.o-topper__image-credit {
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
color: oColorsByName("black-70");
|
|
99
|
+
position: relative;
|
|
100
|
+
width: 100%;
|
|
101
|
+
float: right;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
margin-bottom: -20px;
|
|
104
|
+
}
|
|
75
105
|
}
|