@twreporter/index-page 2.0.0-rc.0 → 2.0.0-rc.2
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 +19 -0
- package/lib/components/common-utils/bottom-link.js +4 -4
- package/lib/components/editor-picks.js +35 -35
- package/lib/components/infographic-section.js +4 -4
- package/lib/components/junior-box-section.js +5 -5
- package/lib/components/latest-section.js +1 -3
- package/lib/components/photography-section.js +5 -5
- package/lib/components/podcast-box-section.js +5 -5
- package/lib/components/topics-section.js +4 -4
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.0.0-rc.2](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/index-page@2.0.0-rc.1...@twreporter/index-page@2.0.0-rc.2) (2024-05-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* upgrade `styled-component` version to v6 ([df93639](https://github.com/twreporter/twreporter-npm-packages/commit/df93639b1b1591d1506cf4cab13f6cda8d6c8aba))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.0.0-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/index-page@2.0.0-rc.0...@twreporter/index-page@2.0.0-rc.1) (2024-05-10)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @twreporter/index-page
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [2.0.0-rc.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/index-page@1.5.13-rc.4...@twreporter/index-page@2.0.0-rc.0) (2024-05-08)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -74,11 +74,11 @@ var Wrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
74
74
|
displayName: "bottom-link__Wrapper",
|
|
75
75
|
componentId: "r5njx2-2"
|
|
76
76
|
})(["font-size:14px;color:", ";cursor:pointer;display:inline-block;> span{padding-right:7px;}svg{width:7px;margin-bottom:-1px;margin-left:7px;transition:0.3s all ease-out;}&:hover{> svg{transform:translateX(5px);}}", "{color:", ";}", "{&:visited{color:", ";}}"], function (props) {
|
|
77
|
-
return props
|
|
77
|
+
return props.$isDarkBg ? _color.colorSupportive.main : _color.colorSupportive.heavy;
|
|
78
78
|
}, TextSpan, function (props) {
|
|
79
|
-
return props
|
|
79
|
+
return props.$isDarkBg ? _color.colorSupportive.main : _color.colorSupportive.heavy;
|
|
80
80
|
}, StyledA, function (props) {
|
|
81
|
-
return props
|
|
81
|
+
return props.$isDarkBg ? _color.colorSupportive.main : _color.colorSupportive.heavy;
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
exports.Wrapper = Wrapper;
|
|
@@ -90,7 +90,7 @@ var BottomLink = function BottomLink(props) {
|
|
|
90
90
|
target = props.target,
|
|
91
91
|
redirect = props.redirect;
|
|
92
92
|
return /*#__PURE__*/_react["default"].createElement(Wrapper, {
|
|
93
|
-
isDarkBg: isDarkBg
|
|
93
|
+
$isDarkBg: isDarkBg
|
|
94
94
|
}, redirect ? /*#__PURE__*/_react["default"].createElement(StyledA, {
|
|
95
95
|
href: path,
|
|
96
96
|
target: target,
|
|
@@ -142,11 +142,11 @@ var FlexItem = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
142
142
|
displayName: "editor-picks__FlexItem",
|
|
143
143
|
componentId: "sc-1bdfw2o-2"
|
|
144
144
|
})(["flex:0 0 20%;margin-right:20%;position:relative;transform:", ";transition:500ms transform ease-in,500ms margin-top ease-in;cursor:pointer;margin-top:", ";", " z-index:2;"], function (props) {
|
|
145
|
-
return props
|
|
145
|
+
return props.$selected !== 0 ? "translateX(-".concat((props.$selected - 1) * 200, "%)") : 'translateX(200%)';
|
|
146
146
|
}, function (props) {
|
|
147
|
-
return props
|
|
147
|
+
return props.$middle ? '-770px' : '16px';
|
|
148
148
|
}, _mediaQuery["default"].desktopAndBelow(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", ";\n "])), function (props) {
|
|
149
|
-
return props
|
|
149
|
+
return props.$middle ? '-540px' : '16px';
|
|
150
150
|
}));
|
|
151
151
|
|
|
152
152
|
var ImgFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -164,71 +164,71 @@ var LeftArrow = /*#__PURE__*/(0, _styledComponents["default"])(Arrow).withConfig
|
|
|
164
164
|
displayName: "editor-picks__LeftArrow",
|
|
165
165
|
componentId: "sc-1bdfw2o-5"
|
|
166
166
|
})(["left:17%;display:", ";", " transition:0.2s display linear;"], function (props) {
|
|
167
|
-
return props
|
|
167
|
+
return props.$selected === 0 ? 'none' : 'inline';
|
|
168
168
|
}, _mediaQuery["default"].desktopAndBelow(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n top: 365px;\n "]))));
|
|
169
169
|
var RightArrow = /*#__PURE__*/(0, _styledComponents["default"])(Arrow).withConfig({
|
|
170
170
|
displayName: "editor-picks__RightArrow",
|
|
171
171
|
componentId: "sc-1bdfw2o-6"
|
|
172
172
|
})(["right:17%;display:", ";", " transition:0.2s display linear;"], function (props) {
|
|
173
|
-
return props
|
|
173
|
+
return props.$selected === props.$dataLength - 1 ? 'none' : 'inline';
|
|
174
174
|
}, _mediaQuery["default"].desktopAndBelow(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n top: 365px;\n "]))));
|
|
175
175
|
var SideCategory = /*#__PURE__*/(0, _styledComponents["default"])(_categoryName["default"]).withConfig({
|
|
176
176
|
displayName: "editor-picks__SideCategory",
|
|
177
177
|
componentId: "sc-1bdfw2o-7"
|
|
178
178
|
})(["text-align:center;height:16px;line-height:1.33;position:absolute;width:auto;transform:translateX(-50%);text-align:center;width:161px;height:16px;top:453px;left:", ";", ""], function (props) {
|
|
179
|
-
return props
|
|
179
|
+
return props.$left ? props.$left : '0';
|
|
180
180
|
}, _mediaQuery["default"].desktopAndBelow(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n top: 338px;\n "]))));
|
|
181
181
|
var MiddleCategory = /*#__PURE__*/(0, _styledComponents["default"])(_categoryName["default"]).withConfig({
|
|
182
182
|
displayName: "editor-picks__MiddleCategory",
|
|
183
183
|
componentId: "sc-1bdfw2o-8"
|
|
184
184
|
})(["text-align:center;height:16px;line-height:1.33;position:absolute;top:", ";left:", ";width:auto;transform:translateX(-50%);text-align:center;width:161px;height:16px;"], function (props) {
|
|
185
|
-
return props
|
|
185
|
+
return props.$top ? props.$top : '0';
|
|
186
186
|
}, function (props) {
|
|
187
|
-
return props
|
|
187
|
+
return props.$left ? props.$left : '0';
|
|
188
188
|
});
|
|
189
189
|
|
|
190
190
|
var Title = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
191
191
|
displayName: "editor-picks__Title",
|
|
192
192
|
componentId: "sc-1bdfw2o-9"
|
|
193
193
|
})(["font-size:", ";font-weight:", ";font-family:", ";color:", ";width:", ";position:absolute;text-align:center;line-height:", ";max-height:", ";top:0;left:50%;transform:translateX(-50%);overflow:hidden;line-break:anywhere;", " ", ""], function (props) {
|
|
194
|
-
return props
|
|
194
|
+
return props.$middle ? "32px" : "16px";
|
|
195
195
|
}, _font.fontWeight.bold, _font.fontFamily.title, _color.colorGrayscale.gray800, function (props) {
|
|
196
|
-
return props
|
|
196
|
+
return props.$middle ? '450px' : '150px';
|
|
197
197
|
}, function (props) {
|
|
198
|
-
return props
|
|
198
|
+
return props.$middle ? '1.25' : '1.25';
|
|
199
199
|
}, function (props) {
|
|
200
|
-
return props
|
|
200
|
+
return props.$middle ? '2.5' : '7.5';
|
|
201
201
|
}, _mediaQuery["default"].desktopOnly(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: ", ";\n "])), function (props) {
|
|
202
|
-
return props
|
|
202
|
+
return props.$middle ? '450px' : '120px';
|
|
203
203
|
}), _mediaQuery["default"].tabletAndBelow(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: ", ";\n "])), function (props) {
|
|
204
|
-
return props
|
|
204
|
+
return props.$middle ? '450px' : '90px';
|
|
205
205
|
}));
|
|
206
206
|
|
|
207
207
|
var Description = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
208
208
|
displayName: "editor-picks__Description",
|
|
209
209
|
componentId: "sc-1bdfw2o-10"
|
|
210
210
|
})(["position:absolute;font-size:16px;width:450px;top:", ";left:", ";color:", ";transform:translateX(-50%);", ";", " z-index:2;"], function (props) {
|
|
211
|
-
return props
|
|
211
|
+
return props.$top ? props.$top : '0';
|
|
212
212
|
}, function (props) {
|
|
213
|
-
return props
|
|
213
|
+
return props.$left ? props.$left : '0';
|
|
214
214
|
}, _color.colorGrayscale.gray800, (0, _styleUtils.truncate)('absolute', 1.43, 2, 'white'), _mediaQuery["default"].tabletAndAbove(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n transition: .2s opacity linear;\n "])), function (props) {
|
|
215
|
-
return props
|
|
215
|
+
return props.$ifHover ? 'opacity: 0.7;' : '';
|
|
216
216
|
}));
|
|
217
217
|
|
|
218
218
|
var HoverEffect = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
219
219
|
displayName: "editor-picks__HoverEffect",
|
|
220
220
|
componentId: "sc-1bdfw2o-11"
|
|
221
221
|
})(["cursor:pointer;text-decoration:none;color:", ";", ""], _color.colorGrayscale.gray800, _mediaQuery["default"].tabletAndAbove(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", "\n transition: .2s opacity linear;\n "])), function (props) {
|
|
222
|
-
return props
|
|
222
|
+
return props.$ifHover ? 'opacity: 0.7;' : 'opacity: 1;';
|
|
223
223
|
}));
|
|
224
224
|
|
|
225
225
|
var FadeInFadeOut = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
226
226
|
displayName: "editor-picks__FadeInFadeOut",
|
|
227
227
|
componentId: "sc-1bdfw2o-12"
|
|
228
228
|
})(["opacity:", ";z-index:", ";transition:150ms opacity ease-in-out;"], function (props) {
|
|
229
|
-
return props
|
|
229
|
+
return props.$isSelected ? '1' : '0';
|
|
230
230
|
}, function (props) {
|
|
231
|
-
return props
|
|
231
|
+
return props.$isSelected ? '1' : '0';
|
|
232
232
|
}); // this is a container
|
|
233
233
|
|
|
234
234
|
|
|
@@ -324,8 +324,8 @@ var EditorPicks = /*#__PURE__*/function (_React$Component) {
|
|
|
324
324
|
|
|
325
325
|
return /*#__PURE__*/_react["default"].createElement(FlexItem, {
|
|
326
326
|
key: "key_".concat(obj.title),
|
|
327
|
-
middle: propsMap.middle,
|
|
328
|
-
selected: _this2.state.selected,
|
|
327
|
+
$middle: propsMap.middle,
|
|
328
|
+
$selected: _this2.state.selected,
|
|
329
329
|
onClick: function onClick() {
|
|
330
330
|
propsMap.onClick("a/".concat(_.get(obj, 'slug', 'error')));
|
|
331
331
|
}
|
|
@@ -334,13 +334,13 @@ var EditorPicks = /*#__PURE__*/function (_React$Component) {
|
|
|
334
334
|
redirect: isExternal,
|
|
335
335
|
plain: true
|
|
336
336
|
}, /*#__PURE__*/_react["default"].createElement(HoverEffect, {
|
|
337
|
-
ifHover: _this2.state.ifHover
|
|
337
|
+
$ifHover: _this2.state.ifHover
|
|
338
338
|
}, /*#__PURE__*/_react["default"].createElement(Title, {
|
|
339
|
-
middle: propsMap.middle,
|
|
339
|
+
$middle: propsMap.middle,
|
|
340
340
|
onMouseOver: _this2.handleOnMouseEnter,
|
|
341
341
|
onMouseLeave: _this2.handleOnMouseLeave
|
|
342
342
|
}, /*#__PURE__*/_react["default"].createElement("div", null, propsMap.middle ? getTruncate(obj.title) : obj.title)))) : /*#__PURE__*/_react["default"].createElement(Title, {
|
|
343
|
-
middle: propsMap.middle
|
|
343
|
+
$middle: propsMap.middle
|
|
344
344
|
}, /*#__PURE__*/_react["default"].createElement("div", null, propsMap.middle ? getTruncate(obj.title) : obj.title)));
|
|
345
345
|
});
|
|
346
346
|
}();
|
|
@@ -401,22 +401,22 @@ var EditorPicks = /*#__PURE__*/function (_React$Component) {
|
|
|
401
401
|
};
|
|
402
402
|
return /*#__PURE__*/_react["default"].createElement(FadeInFadeOut, {
|
|
403
403
|
key: _.get(post, 'id'),
|
|
404
|
-
isSelected: index === selectDataToShow[theProp.position]
|
|
404
|
+
$isSelected: index === selectDataToShow[theProp.position]
|
|
405
405
|
}, theProp.dataPath === 'og_description' ? /*#__PURE__*/_react["default"].createElement(_twreporterLink["default"], {
|
|
406
406
|
href: href,
|
|
407
407
|
redirect: isExternal,
|
|
408
408
|
plain: true
|
|
409
409
|
}, /*#__PURE__*/_react["default"].createElement(theProp.component, {
|
|
410
|
-
ifHover: _this2.state.ifHover,
|
|
411
|
-
top: theProp.propsForComponent.top,
|
|
412
|
-
left: theProp.propsForComponent.left,
|
|
410
|
+
$ifHover: _this2.state.ifHover,
|
|
411
|
+
$top: theProp.propsForComponent.top,
|
|
412
|
+
$left: theProp.propsForComponent.left,
|
|
413
413
|
onMouseEnter: _this2.handleOnMouseEnter,
|
|
414
414
|
onMouseLeave: _this2.handleOnMouseLeave // Adds fade-in fade-out inline style for IE and Edge
|
|
415
415
|
,
|
|
416
416
|
style: fadingStyle
|
|
417
417
|
}, currentData)) : /*#__PURE__*/_react["default"].createElement(theProp.component, {
|
|
418
|
-
top: theProp.propsForComponent.top,
|
|
419
|
-
left: theProp.propsForComponent.left // Adds fade-in fade-out inline style for IE and Edge
|
|
418
|
+
$top: theProp.propsForComponent.top,
|
|
419
|
+
$left: theProp.propsForComponent.left // Adds fade-in fade-out inline style for IE and Edge
|
|
420
420
|
,
|
|
421
421
|
style: fadingStyle
|
|
422
422
|
}, currentData));
|
|
@@ -437,7 +437,7 @@ var EditorPicks = /*#__PURE__*/function (_React$Component) {
|
|
|
437
437
|
};
|
|
438
438
|
return /*#__PURE__*/_react["default"].createElement(FadeInFadeOut, {
|
|
439
439
|
key: _.get(imgObj, 'id'),
|
|
440
|
-
isSelected: index === _this2.state.selected
|
|
440
|
+
$isSelected: index === _this2.state.selected
|
|
441
441
|
}, /*#__PURE__*/_react["default"].createElement(_twreporterLink["default"], {
|
|
442
442
|
href: href,
|
|
443
443
|
redirect: isExternal,
|
|
@@ -460,11 +460,11 @@ var EditorPicks = /*#__PURE__*/function (_React$Component) {
|
|
|
460
460
|
var Arrows = function () {
|
|
461
461
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(LeftArrow, {
|
|
462
462
|
onClick: _this2.onShiftToRight,
|
|
463
|
-
selected: _this2.state.selected
|
|
463
|
+
$selected: _this2.state.selected
|
|
464
464
|
}, /*#__PURE__*/_react["default"].createElement(LeftArrowIcon, null)), /*#__PURE__*/_react["default"].createElement(RightArrow, {
|
|
465
465
|
onClick: _this2.onShiftToLeft,
|
|
466
|
-
selected: _this2.state.selected,
|
|
467
|
-
dataLength: _this2.props.data.length
|
|
466
|
+
$selected: _this2.state.selected,
|
|
467
|
+
$dataLength: _this2.props.data.length
|
|
468
468
|
}, /*#__PURE__*/_react["default"].createElement(RightArrowIcon, null)));
|
|
469
469
|
}();
|
|
470
470
|
|
|
@@ -123,11 +123,11 @@ var ImgFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
123
123
|
displayName: "infographic-section__ImgFrame",
|
|
124
124
|
componentId: "sc-2fohll-7"
|
|
125
125
|
})(["position:relative;width:430px;height:", ";", " ", " ", ""], function (props) {
|
|
126
|
-
return props
|
|
126
|
+
return props.$isPortrait ? '596px' : '282px';
|
|
127
127
|
}, _mediaQuery["default"].desktopOnly(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n max-width: 290px;\n height: ", ";\n "])), function (props) {
|
|
128
|
-
return props
|
|
128
|
+
return props.$isPortrait ? '390px' : '190px';
|
|
129
129
|
}), _mediaQuery["default"].tabletOnly(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin: 0 auto;\n width: 220px;\n height: ", ";\n "])), function (props) {
|
|
130
|
-
return props
|
|
130
|
+
return props.$isPortrait ? '290px' : '145px';
|
|
131
131
|
}), _mediaQuery["default"].mobileOnly(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 100%;\n height: 186px;\n "]))));
|
|
132
132
|
|
|
133
133
|
var More = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -160,7 +160,7 @@ var Infographic = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
160
160
|
href: href,
|
|
161
161
|
redirect: isExternal
|
|
162
162
|
}, /*#__PURE__*/_react["default"].createElement(ImgFrame, {
|
|
163
|
-
isPortrait: isPortrait
|
|
163
|
+
$isPortrait: isPortrait
|
|
164
164
|
}, /*#__PURE__*/_react["default"].createElement(_imgWrapper["default"], {
|
|
165
165
|
alt: imgObj.alt,
|
|
166
166
|
src: imgObj.src,
|
|
@@ -88,13 +88,13 @@ var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
88
88
|
displayName: "junior-box-section__Container",
|
|
89
89
|
componentId: "sc-1yjyxv7-0"
|
|
90
90
|
})(["background-image:", ";background-size:contain;padding-top:30px;padding-bottom:30px;", " ", " ", ""], function (props) {
|
|
91
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
91
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/KidsReporter_Desktop.jpg)");
|
|
92
92
|
}, _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-image: ", ";\n padding-top: 40px;\n padding-bottom: 60px;\n "])), function (props) {
|
|
93
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
93
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/KidsReporter_Mobile.jpg)");
|
|
94
94
|
}), _mediaQuery["default"].tabletOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-image: ", ";\n "])), function (props) {
|
|
95
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
95
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/KidsReporter_Tablet.jpg)");
|
|
96
96
|
}), _mediaQuery["default"].hdOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-image: ", ";\n "])), function (props) {
|
|
97
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
97
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/KidsReporter_DesktopHD.jpg)");
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
100
|
var ContentContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -133,7 +133,7 @@ var JuniorBoxSection = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
133
133
|
value: function render() {
|
|
134
134
|
var releaseBranch = this.props.releaseBranch;
|
|
135
135
|
return /*#__PURE__*/_react["default"].createElement(Container, {
|
|
136
|
-
releaseBranch: releaseBranch
|
|
136
|
+
$releaseBranch: releaseBranch
|
|
137
137
|
}, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(TextColumn, null, /*#__PURE__*/_react["default"].createElement("h3", null, "\u770B\u5152\u5C11\u65B0\u805E\uFF0C\u8207\u5B69\u5B50\u5C0D\u8A71"), /*#__PURE__*/_react["default"].createElement("p", null, "\u5411\u5B69\u5B50\u89E3\u91CB\u91CD\u8981\u7684\u4E8B\u4EF6\u3001\u56B4\u8085\u7684\u8B70\u984C\uFF0C\u662F\u6C11\u4E3B\u793E\u6703\u5F88\u91CD\u8981\u7684\u4E8B\uFF0C\u4E5F\u662F\u300A\u5831\u5C0E\u8005\u300B\u8EAB\u70BA\u975E\u71DF\u5229\u5A92\u9AD4\u7684\u91CD\u8981\u8CAC\u4EFB\uFF0C\u8B93\u6211\u5011\u548C\u4F60\u4E00\u8D77\u5C0B\u627E\u5C0D\u8A71\u7684\u5951\u6A5F\u3002")), /*#__PURE__*/_react["default"].createElement(CTAButton, null, /*#__PURE__*/_react["default"].createElement(_juniorLink["default"], null, /*#__PURE__*/_react["default"].createElement("span", null, "\u524D\u5F80\u95B1\u8B80", /*#__PURE__*/_react["default"].createElement(Icon, null, /*#__PURE__*/_react["default"].createElement(ArrowIcon, null)))))));
|
|
138
138
|
}
|
|
139
139
|
}]);
|
|
@@ -101,9 +101,7 @@ var ItemFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
101
101
|
var ImageFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
102
102
|
displayName: "latest-section__ImageFrame",
|
|
103
103
|
componentId: "hzxpx3-3"
|
|
104
|
-
})(["width:100%;height:128px;background
|
|
105
|
-
return props.background ? "url(".concat(props.background, ")") : 'backgroun-image';
|
|
106
|
-
}, _mediaQuery["default"].desktopOnly(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: 90px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 110px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n height: 100px;\n "]))), mobileSemiMidWidth, mobileMinWidth);
|
|
104
|
+
})(["width:100%;height:128px;background-size:cover;background-position:center;display:block;", " ", " ", " @media (max-width:", "){height:93px;}@media (max-width:", "){height:88px;}"], _mediaQuery["default"].desktopOnly(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: 90px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 110px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n height: 100px;\n "]))), mobileSemiMidWidth, mobileMinWidth);
|
|
107
105
|
|
|
108
106
|
var ContentFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
109
107
|
displayName: "latest-section__ContentFrame",
|
|
@@ -91,9 +91,9 @@ var Section = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
91
91
|
displayName: "photography-section__Section",
|
|
92
92
|
componentId: "sc-42isjh-0"
|
|
93
93
|
})(["position:relative;background-color:", ";padding-bottom:", ";padding-top:100px;", ""], function (props) {
|
|
94
|
-
return props
|
|
94
|
+
return props.$isAutoHover ? _color.colorGrayscale.white : _color.colorPhoto.dark;
|
|
95
95
|
}, function (props) {
|
|
96
|
-
return props
|
|
96
|
+
return props.$isAutoHover ? '40px' : '80px';
|
|
97
97
|
}, _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 0px;\n "]))));
|
|
98
98
|
|
|
99
99
|
var Listing = /*#__PURE__*/_styledComponents["default"].ul.withConfig({
|
|
@@ -120,7 +120,7 @@ var Overlay = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
120
120
|
displayName: "photography-section__Overlay",
|
|
121
121
|
componentId: "sc-42isjh-5"
|
|
122
122
|
})(["position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;opacity:", ";transition:0.5s ease;background-color:", "b3;", ""], function (props) {
|
|
123
|
-
return props
|
|
123
|
+
return props.$isHover ? 1 : 0;
|
|
124
124
|
}, _color.colorPhoto.heavy, _mediaQuery["default"].tabletAndAbove(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n &:hover {\n opacity: 1;\n }\n "]))));
|
|
125
125
|
|
|
126
126
|
var More = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -158,7 +158,7 @@ var Photography = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
158
158
|
srcSet: imgObj.srcSet,
|
|
159
159
|
sizes: "(min-width: ".concat(_styleUtils.breakPoints.desktopMinWidth, ") ").concat(mockup.img.sizes.desktop, ", ") + "(min-width: ".concat(_styleUtils.breakPoints.tabletMinWidth, ") ").concat(mockup.img.sizes.tablet, ", ") + "".concat(mockup.img.sizes.mobile)
|
|
160
160
|
}, /*#__PURE__*/_react["default"].createElement(Overlay, {
|
|
161
|
-
isHover: isHover
|
|
161
|
+
$isHover: isHover
|
|
162
162
|
}, /*#__PURE__*/_react["default"].createElement(Title, null, /*#__PURE__*/_react["default"].createElement(_categoryName["default"], null, _categoryStrings["default"].photography), title))))));
|
|
163
163
|
}
|
|
164
164
|
}]);
|
|
@@ -303,7 +303,7 @@ var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
303
303
|
key: 'section_check_point',
|
|
304
304
|
onLeave: this.onLeave
|
|
305
305
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Section, {
|
|
306
|
-
isAutoHover: isAutoHover
|
|
306
|
+
$isAutoHover: isAutoHover
|
|
307
307
|
}, /*#__PURE__*/_react["default"].createElement(_sectionName["default"], null, /*#__PURE__*/_react["default"].createElement("span", null, _sectionStrings["default"].photography)), /*#__PURE__*/_react["default"].createElement(Listing, null, postComps), /*#__PURE__*/_react["default"].createElement(More, null, /*#__PURE__*/_react["default"].createElement(_bottomLink["default"], {
|
|
308
308
|
text: "\u66F4\u591A\u5F71\u50CF\u65B0\u805E",
|
|
309
309
|
isDarkBg: true,
|
|
@@ -88,13 +88,13 @@ var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
88
88
|
displayName: "podcast-box-section__Container",
|
|
89
89
|
componentId: "sc-16lji0u-0"
|
|
90
90
|
})(["background-image:", ";background-size:contain;padding-top:30px;padding-bottom:30px;", " ", " ", ""], function (props) {
|
|
91
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
91
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/PodcastBox_Desktop.jpg)");
|
|
92
92
|
}, _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-image: ", ";\n padding-top: 40px;\n padding-bottom: 60px;\n "])), function (props) {
|
|
93
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
93
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/PodcastBox_Mobile.jpg)");
|
|
94
94
|
}), _mediaQuery["default"].tabletOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-image: ", ";\n "])), function (props) {
|
|
95
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
95
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/PodcastBox_Tablet.jpg)");
|
|
96
96
|
}), _mediaQuery["default"].hdOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-image: ", ";\n "])), function (props) {
|
|
97
|
-
return "url(".concat(_app["default"].assetsPath, "/").concat(props
|
|
97
|
+
return "url(".concat(_app["default"].assetsPath, "/").concat(props.$releaseBranch, "/PodcastBox_DesktopHD.jpg)");
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
100
|
var ContentContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -135,7 +135,7 @@ var PodcastBoxSection = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
135
135
|
value: function render() {
|
|
136
136
|
var releaseBranch = this.props.releaseBranch;
|
|
137
137
|
return /*#__PURE__*/_react["default"].createElement(Container, {
|
|
138
|
-
releaseBranch: releaseBranch
|
|
138
|
+
$releaseBranch: releaseBranch
|
|
139
139
|
}, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(TextColumn, null, /*#__PURE__*/_react["default"].createElement("h3", null, "\u807DPodcast\uFF0C\u611F\u53D7\u771F\u5BE6"), /*#__PURE__*/_react["default"].createElement("p", null, "\u5831\u5C0E\u8005Podcast\u7BC0\u76EE\uFF0C\u900F\u904E\u8A18\u8005\u3001\u4E8B\u4EF6\u7576\u4E8B\u4EBA\u7684\u7B2C\u4E00\u624B\u544A\u767D\uFF0C\u548C\u4F86\u81EA\u73FE\u5834\u7684\u6536\u97F3\u7D00\u9304\uFF0C\u5E36\u4F60\u8D70\u9032\u65B0\u805E\u5E55\u5F8C\u3001\u6545\u4E8B\u73FE\u5834\uFF0C\u611F\u53D7\u66F4\u5B8C\u6574\u7684\u771F\u5BE6\u3002")), /*#__PURE__*/_react["default"].createElement(ListenButton, null, /*#__PURE__*/_react["default"].createElement(_podcastLink["default"], null, listenNow))));
|
|
140
140
|
}
|
|
141
141
|
}]);
|
|
@@ -139,7 +139,7 @@ var Column = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
139
139
|
displayName: "topics-section__Column",
|
|
140
140
|
componentId: "sc-17suvlo-7"
|
|
141
141
|
})(["flex:0 0 ", "px;margin-bottom:12px;cursor:pointer;&:first-child{margin-right:30px;}opacity:", ";transition:0.2s opacity linear;", " ", ""], mockup.hd.width["default"], function (props) {
|
|
142
|
-
return props
|
|
142
|
+
return props.$ifHover ? 0.7 : 1;
|
|
143
143
|
}, _mediaQuery["default"].desktopOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 0 0 ", "px;\n "])), mockup.desktop.width["default"]), _mediaQuery["default"].tabletOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 0 0 ", "px;\n &:first-child {\n margin-right: 20px;\n }\n "])), mockup.tablet.width["default"]));
|
|
144
144
|
|
|
145
145
|
var TopicNameColumn = /*#__PURE__*/(0, _styledComponents["default"])(Column).withConfig({
|
|
@@ -314,7 +314,7 @@ var TopicsInARow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
314
314
|
}, topicName));
|
|
315
315
|
titleColumns.push( /*#__PURE__*/_react["default"].createElement(TitleColumn, {
|
|
316
316
|
key: id,
|
|
317
|
-
ifHover: indexHovered === index,
|
|
317
|
+
$ifHover: indexHovered === index,
|
|
318
318
|
onMouseOver: function onMouseOver() {
|
|
319
319
|
_this2.handleHover(index);
|
|
320
320
|
},
|
|
@@ -327,7 +327,7 @@ var TopicsInARow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
327
327
|
}, /*#__PURE__*/_react["default"].createElement(Title, null, title))));
|
|
328
328
|
imgColumns.push( /*#__PURE__*/_react["default"].createElement(ImgColumn, {
|
|
329
329
|
key: id,
|
|
330
|
-
ifHover: indexHovered === index,
|
|
330
|
+
$ifHover: indexHovered === index,
|
|
331
331
|
onMouseOver: function onMouseOver() {
|
|
332
332
|
_this2.handleHover(index);
|
|
333
333
|
},
|
|
@@ -345,7 +345,7 @@ var TopicsInARow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
345
345
|
}))));
|
|
346
346
|
descColumns.push( /*#__PURE__*/_react["default"].createElement(DescColumn, {
|
|
347
347
|
key: id,
|
|
348
|
-
ifHover: indexHovered === index,
|
|
348
|
+
$ifHover: indexHovered === index,
|
|
349
349
|
onMouseOver: function onMouseOver() {
|
|
350
350
|
_this2.handleHover(index);
|
|
351
351
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/index-page",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"prepublishOnly": "make build"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@twreporter/core": "^1.21.0-rc.
|
|
16
|
-
"@twreporter/react-components": "^9.0.0-rc.
|
|
15
|
+
"@twreporter/core": "^1.21.0-rc.3",
|
|
16
|
+
"@twreporter/react-components": "^9.0.0-rc.2",
|
|
17
17
|
"lodash": "^4.0.0",
|
|
18
18
|
"prop-types": "^15.0.0",
|
|
19
19
|
"react": "^18.2.0",
|
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
"react-swipeable": "^4.0.1",
|
|
23
23
|
"react-transition-group": "^4.4.5",
|
|
24
24
|
"react-waypoint": "^9.0.2",
|
|
25
|
-
"styled-components": "^
|
|
25
|
+
"styled-components": "^6.0.0",
|
|
26
|
+
"stylis": "^4.0.0",
|
|
26
27
|
"swiper": "6.8.4"
|
|
27
28
|
},
|
|
28
29
|
"files": [
|
|
29
30
|
"lib"
|
|
30
31
|
],
|
|
31
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "536cda99a9af7fe0d7404a8fcf8db55c762b8bb1"
|
|
32
33
|
}
|