@twreporter/index-page 2.0.2 → 2.0.3-rc.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.
- package/CHANGELOG.md +16 -0
- package/lib/components/animations/scroll-fadein.js +17 -44
- package/lib/components/animations/section-animation-wrapper.js +19 -44
- package/lib/components/category-section.js +12 -61
- package/lib/components/common-utils/bottom-link.js +10 -34
- package/lib/components/common-utils/category-name.js +1 -7
- package/lib/components/common-utils/hover-effect.js +1 -8
- package/lib/components/common-utils/img-placeholder.js +2 -12
- package/lib/components/common-utils/img-wrapper.js +11 -43
- package/lib/components/common-utils/section-content-wrapper.js +1 -10
- package/lib/components/common-utils/section-name.js +1 -10
- package/lib/components/common-utils/section.js +1 -9
- package/lib/components/common-utils/swipable-mixin.js +5 -28
- package/lib/components/common-utils/twreporter-link.js +5 -18
- package/lib/components/donation-box-section.js +5 -40
- package/lib/components/editor-picks-mobile.js +10 -51
- package/lib/components/editor-picks.js +21 -83
- package/lib/components/infographic-section.js +18 -75
- package/lib/components/junior-box-section.js +6 -42
- package/lib/components/latest-section.js +9 -52
- package/lib/components/latest-topic.js +16 -77
- package/lib/components/mobile-swiper-list.js +5 -17
- package/lib/components/photography-section.js +29 -90
- package/lib/components/podcast-box-section.js +6 -43
- package/lib/components/prop-types/image.js +1 -7
- package/lib/components/prop-types/post.js +7 -13
- package/lib/components/prop-types/topic.js +7 -14
- package/lib/components/reviews.js +13 -62
- package/lib/components/topics-section.js +20 -100
- package/lib/constants/app.js +2 -3
- package/lib/constants/category-strings.js +2 -6
- package/lib/constants/mobile-mockup-specification.js +10 -9
- package/lib/constants/section-strings.js +2 -6
- package/lib/constants/strings.js +1 -2
- package/lib/index.js +2 -17
- package/lib/styles/animation.js +2 -6
- package/lib/utils/getHref.js +2 -5
- package/lib/utils/image-processor.js +4 -12
- package/lib/utils/style-utils.js +3 -6
- package/package.json +3 -3
|
@@ -4,79 +4,48 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _topic = _interopRequireDefault(require("./prop-types/topic"));
|
|
15
|
-
|
|
16
11
|
var _styleUtils = require("../utils/style-utils");
|
|
17
|
-
|
|
18
12
|
var _getHref = require("../utils/getHref");
|
|
19
|
-
|
|
20
13
|
var _bottomLink = _interopRequireDefault(require("./common-utils/bottom-link"));
|
|
21
|
-
|
|
22
14
|
var _categoryName = _interopRequireDefault(require("./common-utils/category-name"));
|
|
23
|
-
|
|
24
15
|
var _imgWrapper = _interopRequireDefault(require("./common-utils/img-wrapper"));
|
|
25
|
-
|
|
26
16
|
var _twreporterLink = _interopRequireDefault(require("./common-utils/twreporter-link"));
|
|
27
|
-
|
|
28
17
|
var _section = _interopRequireDefault(require("./common-utils/section"));
|
|
29
|
-
|
|
30
18
|
var _sectionAnimationWrapper = _interopRequireDefault(require("./animations/section-animation-wrapper"));
|
|
31
|
-
|
|
32
19
|
var _sectionName = _interopRequireDefault(require("./common-utils/section-name"));
|
|
33
|
-
|
|
34
20
|
var _mobileSwiperList = _interopRequireDefault(require("./mobile-swiper-list"));
|
|
35
|
-
|
|
36
21
|
var _sectionStrings = _interopRequireDefault(require("../constants/section-strings"));
|
|
37
|
-
|
|
38
22
|
var _strings = _interopRequireDefault(require("../constants/strings"));
|
|
39
|
-
|
|
40
23
|
var _mobileMockupSpecification = require("../constants/mobile-mockup-specification");
|
|
41
|
-
|
|
42
24
|
var _font = require("@twreporter/core/lib/constants/font");
|
|
43
|
-
|
|
44
25
|
var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/media-query"));
|
|
45
|
-
|
|
46
26
|
var _color = require("@twreporter/core/lib/constants/color");
|
|
47
|
-
|
|
48
27
|
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
49
|
-
|
|
50
28
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14; // utils
|
|
30
|
+
// components
|
|
31
|
+
// constants
|
|
32
|
+
// @twreporter
|
|
33
|
+
// lodash
|
|
54
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55
|
-
|
|
56
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
57
|
-
|
|
35
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
58
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
59
|
-
|
|
60
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
61
|
-
|
|
37
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
62
38
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
63
|
-
|
|
39
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
40
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
64
41
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
65
|
-
|
|
66
42
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
67
|
-
|
|
68
43
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
69
|
-
|
|
70
44
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
71
|
-
|
|
72
45
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
73
|
-
|
|
74
46
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
75
|
-
|
|
76
47
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
|
-
|
|
78
48
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
79
|
-
|
|
80
49
|
var _ = {
|
|
81
50
|
forEach: _forEach["default"],
|
|
82
51
|
get: _get["default"]
|
|
@@ -91,112 +60,88 @@ var mockup = {
|
|
|
91
60
|
}
|
|
92
61
|
};
|
|
93
62
|
var categoryPrefix = _strings["default"].topic + _strings["default"].fullShapeDot;
|
|
94
|
-
|
|
95
63
|
var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
96
64
|
displayName: "latest-topic__Container",
|
|
97
65
|
componentId: "q3zdc1-0"
|
|
98
66
|
})(["background-color:", ";"], _color.colorGrayscale.gray100);
|
|
99
|
-
|
|
100
67
|
var ContentContainer = /*#__PURE__*/(0, _styledComponents["default"])(_section["default"]).withConfig({
|
|
101
68
|
displayName: "latest-topic__ContentContainer",
|
|
102
69
|
componentId: "q3zdc1-1"
|
|
103
70
|
})(["text-align:center;"]);
|
|
104
|
-
|
|
105
71
|
var TopicFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
106
72
|
displayName: "latest-topic__TopicFrame",
|
|
107
73
|
componentId: "q3zdc1-2"
|
|
108
74
|
})(["width:447px;margin:0 auto;", ""], _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n "]))));
|
|
109
|
-
|
|
110
75
|
var Title = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
111
76
|
displayName: "latest-topic__Title",
|
|
112
77
|
componentId: "q3zdc1-3"
|
|
113
78
|
})(["width:374px;font-size:32px;font-weight:", ";font-family:", ";line-height:1.25;color:", ";text-align:center;margin:2px auto 0 auto;", ""], _font.fontWeight.bold, _font.fontFamily.title, _color.colorGrayscale.gray800, _mediaQuery["default"].mobileOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 24px;\n width: ", "%;\n "])), _mobileMockupSpecification.itemWidthPct));
|
|
114
|
-
|
|
115
79
|
var Description = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
116
80
|
displayName: "latest-topic__Description",
|
|
117
81
|
componentId: "q3zdc1-4"
|
|
118
|
-
})(["margin-top:12px;width:447px;font-size:16px;line-height:1.5;text-align:justify;color:", ";", ""], _color.colorGrayscale.gray800, _mediaQuery["default"].mobileOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "%;\n margin: 6px auto 0 auto;\n font-size: 18px;\n "])), _mobileMockupSpecification.itemWidthPct));
|
|
119
|
-
|
|
82
|
+
})(["margin-top:12px;width:447px;font-size:16px;line-height:1.5;text-align:justify;color:", ";", ""], _color.colorGrayscale.gray800, _mediaQuery["default"].mobileOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "%;\n margin: 6px auto 0 auto;\n font-size: 18px;\n "])), _mobileMockupSpecification.itemWidthPct));
|
|
120
83
|
|
|
84
|
+
// container for relateds FlexItem
|
|
121
85
|
var FlexBox = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
122
86
|
displayName: "latest-topic__FlexBox",
|
|
123
87
|
componentId: "q3zdc1-5"
|
|
124
|
-
})(["margin-top:48px;min-height:335px;padding:0 48px;display:flex;justify-content:center;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 49px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0 34px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: none;\n "]))));
|
|
125
|
-
|
|
88
|
+
})(["margin-top:48px;min-height:335px;padding:0 48px;display:flex;justify-content:center;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 49px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0 34px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: none;\n "]))));
|
|
126
89
|
|
|
90
|
+
// container for each related articles
|
|
127
91
|
var FlexItem = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
128
92
|
displayName: "latest-topic__FlexItem",
|
|
129
93
|
componentId: "q3zdc1-6"
|
|
130
94
|
})(["min-height:335px;width:426px;&:nth-child(2){margin:0 33px;}", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 290px;\n &:nth-child(2) {\n margin: 0 28px;\n }\n "]))), _mediaQuery["default"].tabletOnly(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 220px;\n &:nth-child(2) {\n margin: 0 20px;\n }\n "]))), _mediaQuery["default"].mobileOnly(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 100%;\n "]))));
|
|
131
|
-
|
|
132
95
|
var MobileList = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
133
96
|
displayName: "latest-topic__MobileList",
|
|
134
97
|
componentId: "q3zdc1-7"
|
|
135
98
|
})(["margin-top:30px;"]);
|
|
136
|
-
|
|
137
99
|
var RelatedsContentFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
138
100
|
displayName: "latest-topic__RelatedsContentFrame",
|
|
139
101
|
componentId: "q3zdc1-8"
|
|
140
102
|
})(["width:100%;height:auto;padding:0 8px 0 8px;"]);
|
|
141
|
-
|
|
142
103
|
var RelatedCategory = /*#__PURE__*/(0, _styledComponents["default"])(_categoryName["default"]).withConfig({
|
|
143
104
|
displayName: "latest-topic__RelatedCategory",
|
|
144
105
|
componentId: "q3zdc1-9"
|
|
145
106
|
})(["text-align:left;margin:12px 0 2px 0;"]);
|
|
146
|
-
|
|
147
107
|
var RelatedTitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
148
108
|
displayName: "latest-topic__RelatedTitle",
|
|
149
109
|
componentId: "q3zdc1-10"
|
|
150
110
|
})(["font-size:20px;font-weight:", ";font-family:", ";color:", ";line-height:1.5;"], _font.fontWeight.bold, _font.fontFamily.title, _color.colorGrayscale.gray800);
|
|
151
|
-
|
|
152
111
|
var RelatedDescription = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
153
112
|
displayName: "latest-topic__RelatedDescription",
|
|
154
113
|
componentId: "q3zdc1-11"
|
|
155
114
|
})(["margin-top:8px;height:auto;font-size:16px;line-height:20px;color:", ";", ";", ""], _color.colorGrayscale.gray800, (0, _styleUtils.truncate)('relative', 1.43, 4, _color.colorGrayscale.gray100), _mediaQuery["default"].mobileOnly(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n font-size: 18px;\n "]))));
|
|
156
|
-
|
|
157
115
|
var MoreFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
158
116
|
displayName: "latest-topic__MoreFrame",
|
|
159
117
|
componentId: "q3zdc1-12"
|
|
160
118
|
})(["margin:60px auto 0 auto;", ""], _mediaQuery["default"].mobileOnly(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin: 40px auto 0 auto;\n "]))));
|
|
161
|
-
|
|
162
119
|
var ImgFrame = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
163
120
|
displayName: "latest-topic__ImgFrame",
|
|
164
121
|
componentId: "q3zdc1-13"
|
|
165
122
|
})(["height:274px;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n height: 186px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n height: 140px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n height: 186px;\n "]))));
|
|
166
|
-
|
|
167
123
|
var LatestTopic = /*#__PURE__*/function (_React$PureComponent) {
|
|
168
124
|
_inherits(LatestTopic, _React$PureComponent);
|
|
169
|
-
|
|
170
125
|
var _super = _createSuper(LatestTopic);
|
|
171
|
-
|
|
172
126
|
function LatestTopic() {
|
|
173
127
|
_classCallCheck(this, LatestTopic);
|
|
174
|
-
|
|
175
128
|
return _super.apply(this, arguments);
|
|
176
129
|
}
|
|
177
|
-
|
|
178
130
|
_createClass(LatestTopic, [{
|
|
179
131
|
key: "render",
|
|
180
132
|
value: function render() {
|
|
181
133
|
var _this$props = this.props,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
134
|
+
data = _this$props.data,
|
|
135
|
+
useTinyImg = _this$props.useTinyImg;
|
|
185
136
|
var relateds = _.get(data, 'relateds', []);
|
|
186
|
-
|
|
187
137
|
var relatedsJsx = [];
|
|
188
|
-
|
|
189
138
|
_.forEach(relateds, function (post) {
|
|
190
139
|
if (_typeof(post) !== 'object' || post === null) {
|
|
191
140
|
return;
|
|
192
141
|
}
|
|
193
|
-
|
|
194
142
|
var isExternal = _.get(post, 'is_external', false);
|
|
195
|
-
|
|
196
143
|
var href = (0, _getHref.getHref)(_.get(post, 'slug', 'error'), isExternal);
|
|
197
|
-
|
|
198
144
|
var imgObj = _.get(post, 'hero_image') || _.get(post, 'og_image');
|
|
199
|
-
|
|
200
145
|
relatedsJsx.push( /*#__PURE__*/_react["default"].createElement(FlexItem, {
|
|
201
146
|
key: _.get(post, 'id')
|
|
202
147
|
}, /*#__PURE__*/_react["default"].createElement(_twreporterLink["default"], {
|
|
@@ -209,17 +154,14 @@ var LatestTopic = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
209
154
|
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)
|
|
210
155
|
})), /*#__PURE__*/_react["default"].createElement(RelatedsContentFrame, null, /*#__PURE__*/_react["default"].createElement(RelatedCategory, null, "".concat(categoryPrefix).concat(_.get(data, 'short_title', ''))), /*#__PURE__*/_react["default"].createElement(RelatedTitle, null, _.get(post, 'title', '')), /*#__PURE__*/_react["default"].createElement(RelatedDescription, null, _.get(post, 'og_description', ''))))));
|
|
211
156
|
});
|
|
212
|
-
|
|
213
157
|
return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(_sectionName["default"], null, /*#__PURE__*/_react["default"].createElement("span", null, _sectionStrings["default"].latestTopic)), /*#__PURE__*/_react["default"].createElement(TopicFrame, null, /*#__PURE__*/_react["default"].createElement(_categoryName["default"], null, "".concat(categoryPrefix).concat(_.get(data, 'short_title', ''))), /*#__PURE__*/_react["default"].createElement(Title, null, _.get(data, 'title', '')), /*#__PURE__*/_react["default"].createElement(Description, null, _.get(data, 'og_description', ''))), /*#__PURE__*/_react["default"].createElement(FlexBox, null, relatedsJsx), /*#__PURE__*/_react["default"].createElement(MobileList, null, /*#__PURE__*/_react["default"].createElement(_mobileSwiperList["default"], null, relatedsJsx)), /*#__PURE__*/_react["default"].createElement(MoreFrame, null, /*#__PURE__*/_react["default"].createElement(_bottomLink["default"], {
|
|
214
158
|
text: "\u66F4\u591A".concat(_.get(data, 'short_title', ''), "\u6587\u7AE0"),
|
|
215
159
|
path: "topics/".concat(_.get(data, 'slug', ''))
|
|
216
160
|
}))));
|
|
217
161
|
}
|
|
218
162
|
}]);
|
|
219
|
-
|
|
220
163
|
return LatestTopic;
|
|
221
164
|
}(_react["default"].PureComponent);
|
|
222
|
-
|
|
223
165
|
LatestTopic.defaultProps = {
|
|
224
166
|
data: {},
|
|
225
167
|
useTinyImg: false
|
|
@@ -228,7 +170,4 @@ LatestTopic.propTypes = {
|
|
|
228
170
|
data: (0, _topic["default"])(),
|
|
229
171
|
useTinyImg: _propTypes["default"].bool
|
|
230
172
|
};
|
|
231
|
-
|
|
232
|
-
var _default = (0, _sectionAnimationWrapper["default"])(LatestTopic);
|
|
233
|
-
|
|
234
|
-
exports["default"] = _default;
|
|
173
|
+
var _default = exports["default"] = (0, _sectionAnimationWrapper["default"])(LatestTopic);
|
|
@@ -4,36 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _react2 = require("swiper/react");
|
|
15
|
-
|
|
16
11
|
var _mobileMockupSpecification = require("../constants/mobile-mockup-specification");
|
|
17
|
-
|
|
18
12
|
var _rwd = require("@twreporter/react-components/lib/rwd");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
|
|
22
14
|
// constants
|
|
15
|
+
|
|
23
16
|
// @twreporter
|
|
17
|
+
|
|
24
18
|
var MobileList = /*#__PURE__*/(0, _styledComponents["default"])(_rwd.MobileOnly).withConfig({
|
|
25
19
|
displayName: "mobile-swiper-list__MobileList",
|
|
26
20
|
componentId: "sc-12lzcgi-0"
|
|
27
21
|
})([".swiper-container{width:100%;}.swiper-slide{width:", "%;}"], _mobileMockupSpecification.itemWidthPct);
|
|
28
|
-
|
|
29
22
|
var defaultFunc = function defaultFunc() {};
|
|
30
|
-
|
|
31
23
|
var MobileSwiperList = function MobileSwiperList(_ref) {
|
|
32
24
|
var children = _ref.children,
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
_ref$onSlideChange = _ref.onSlideChange,
|
|
26
|
+
onSlideChange = _ref$onSlideChange === void 0 ? defaultFunc : _ref$onSlideChange;
|
|
35
27
|
var render;
|
|
36
|
-
|
|
37
28
|
if (children) {
|
|
38
29
|
render = Array.isArray(children) ? children.map(function (item, idx) {
|
|
39
30
|
return /*#__PURE__*/_react["default"].createElement(_react2.SwiperSlide, {
|
|
@@ -41,7 +32,6 @@ var MobileSwiperList = function MobileSwiperList(_ref) {
|
|
|
41
32
|
}, item);
|
|
42
33
|
}) : /*#__PURE__*/_react["default"].createElement(_react2.SwiperSlide, null, children);
|
|
43
34
|
}
|
|
44
|
-
|
|
45
35
|
return /*#__PURE__*/_react["default"].createElement(MobileList, null, /*#__PURE__*/_react["default"].createElement(_react2.Swiper, {
|
|
46
36
|
onSlideChange: onSlideChange,
|
|
47
37
|
slidesPerView: 'auto',
|
|
@@ -49,10 +39,8 @@ var MobileSwiperList = function MobileSwiperList(_ref) {
|
|
|
49
39
|
spaceBetween: "".concat(_mobileMockupSpecification.itemPaddingRightPct, "%")
|
|
50
40
|
}, render));
|
|
51
41
|
};
|
|
52
|
-
|
|
53
42
|
MobileSwiperList.propTypes = {
|
|
54
43
|
children: _propTypes["default"].oneOf([_propTypes["default"].arrayOf(_propTypes["default"].element), _propTypes["default"].element]),
|
|
55
44
|
onSlideChange: _propTypes["default"].func
|
|
56
45
|
};
|
|
57
|
-
var _default = MobileSwiperList;
|
|
58
|
-
exports["default"] = _default;
|
|
46
|
+
var _default = exports["default"] = MobileSwiperList;
|
|
@@ -1,76 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _reactWaypoint = require("react-waypoint");
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
var _post = _interopRequireDefault(require("./prop-types/post"));
|
|
17
|
-
|
|
18
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
19
|
-
|
|
20
13
|
var _sectionAnimationWrapper = _interopRequireDefault(require("./animations/section-animation-wrapper"));
|
|
21
|
-
|
|
22
14
|
var _styleUtils = require("../utils/style-utils");
|
|
23
|
-
|
|
24
15
|
var _getHref = require("../utils/getHref");
|
|
25
|
-
|
|
26
16
|
var _bottomLink = _interopRequireDefault(require("./common-utils/bottom-link"));
|
|
27
|
-
|
|
28
17
|
var _categoryName = _interopRequireDefault(require("./common-utils/category-name"));
|
|
29
|
-
|
|
30
18
|
var _imgWrapper = _interopRequireDefault(require("./common-utils/img-wrapper"));
|
|
31
|
-
|
|
32
19
|
var _sectionName = _interopRequireDefault(require("./common-utils/section-name"));
|
|
33
|
-
|
|
34
20
|
var _twreporterLink = _interopRequireDefault(require("./common-utils/twreporter-link"));
|
|
35
|
-
|
|
36
21
|
var _sectionStrings = _interopRequireDefault(require("../constants/section-strings"));
|
|
37
|
-
|
|
38
22
|
var _categoryStrings = _interopRequireDefault(require("../constants/category-strings"));
|
|
39
|
-
|
|
40
23
|
var _font = require("@twreporter/core/lib/constants/font");
|
|
41
|
-
|
|
42
24
|
var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/media-query"));
|
|
43
|
-
|
|
44
25
|
var _color = require("@twreporter/core/lib/constants/color");
|
|
45
|
-
|
|
46
26
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11; // utils
|
|
28
|
+
// components
|
|
29
|
+
// constants
|
|
30
|
+
// @twreporter
|
|
31
|
+
// lodash
|
|
50
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
51
|
-
|
|
52
33
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
53
|
-
|
|
54
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
55
|
-
|
|
34
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
56
35
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
57
|
-
|
|
36
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
37
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
58
38
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
59
|
-
|
|
60
39
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
|
-
|
|
62
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
|
-
|
|
64
41
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
65
|
-
|
|
66
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
67
|
-
|
|
68
43
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
69
|
-
|
|
70
44
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
71
|
-
|
|
72
45
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
73
|
-
|
|
74
46
|
var _ = {
|
|
75
47
|
get: _get["default"]
|
|
76
48
|
};
|
|
@@ -82,11 +54,11 @@ var mockup = {
|
|
|
82
54
|
mobile: '414px'
|
|
83
55
|
}
|
|
84
56
|
}
|
|
85
|
-
};
|
|
86
|
-
// there will be only one column. Default is two columns.
|
|
57
|
+
};
|
|
87
58
|
|
|
59
|
+
// If window is less than oneColumnWidth,
|
|
60
|
+
// there will be only one column. Default is two columns.
|
|
88
61
|
var oneColumnWidthInt = 768;
|
|
89
|
-
|
|
90
62
|
var Section = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
91
63
|
displayName: "photography-section__Section",
|
|
92
64
|
componentId: "sc-42isjh-0"
|
|
@@ -95,59 +67,48 @@ var Section = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
95
67
|
}, function (props) {
|
|
96
68
|
return props.$isAutoHover ? '40px' : '80px';
|
|
97
69
|
}, _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 0px;\n "]))));
|
|
98
|
-
|
|
99
70
|
var Listing = /*#__PURE__*/_styledComponents["default"].ul.withConfig({
|
|
100
71
|
displayName: "photography-section__Listing",
|
|
101
72
|
componentId: "sc-42isjh-1"
|
|
102
73
|
})(["padding-left:0px;max-width:1344px;margin:0 auto;position:relative;padding-bottom:60px;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-width: 928px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n max-width: 700px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-top: 0px;\n padding-bottom: 40px;\n max-width: 100%;\n "]))));
|
|
103
|
-
|
|
104
74
|
var Item = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
|
105
75
|
displayName: "photography-section__Item",
|
|
106
76
|
componentId: "sc-42isjh-2"
|
|
107
77
|
})(["max-width:672px;display:inline-block;vertical-align:bottom;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 464px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n max-width: 349px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n max-width: 100%;\n width: 100%;\n height: 100%;\n display: block;\n "]))));
|
|
108
|
-
|
|
109
78
|
var Title = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
110
79
|
displayName: "photography-section__Title",
|
|
111
80
|
componentId: "sc-42isjh-3"
|
|
112
81
|
})(["position:absolute;color:", ";font-size:14px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);line-height:1.5;text-align:justify;font-weight:", ";font-family:", ";"], _color.colorGrayscale.white, _font.fontWeight.normal, _font.fontFamily.title);
|
|
113
|
-
|
|
114
82
|
var Img = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
115
83
|
displayName: "photography-section__Img",
|
|
116
84
|
componentId: "sc-42isjh-4"
|
|
117
85
|
})(["position:relative;width:672px;height:450px;", " ", " ", ""], _mediaQuery["default"].desktopOnly(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 464px;\n height: 310px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 0 auto;\n width: 350px;\n height: 234px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n "]))));
|
|
118
|
-
|
|
119
86
|
var Overlay = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
120
87
|
displayName: "photography-section__Overlay",
|
|
121
88
|
componentId: "sc-42isjh-5"
|
|
122
89
|
})(["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
90
|
return props.$isHover ? 1 : 0;
|
|
124
91
|
}, _color.colorPhoto.heavy, _mediaQuery["default"].tabletAndAbove(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n &:hover {\n opacity: 1;\n }\n "]))));
|
|
125
|
-
|
|
126
92
|
var More = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
127
93
|
displayName: "photography-section__More",
|
|
128
94
|
componentId: "sc-42isjh-6"
|
|
129
95
|
})(["text-align:center;"]);
|
|
130
|
-
|
|
131
96
|
var Photography = /*#__PURE__*/function (_React$PureComponent) {
|
|
132
97
|
_inherits(Photography, _React$PureComponent);
|
|
133
|
-
|
|
134
98
|
var _super = _createSuper(Photography);
|
|
135
|
-
|
|
136
99
|
function Photography() {
|
|
137
100
|
_classCallCheck(this, Photography);
|
|
138
|
-
|
|
139
101
|
return _super.apply(this, arguments);
|
|
140
102
|
}
|
|
141
|
-
|
|
142
103
|
_createClass(Photography, [{
|
|
143
104
|
key: "render",
|
|
144
105
|
value: function render() {
|
|
145
106
|
var _this$props = this.props,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
107
|
+
title = _this$props.title,
|
|
108
|
+
imgObj = _this$props.imgObj,
|
|
109
|
+
isHover = _this$props.isHover,
|
|
110
|
+
slug = _this$props.slug,
|
|
111
|
+
isExternal = _this$props.isExternal;
|
|
151
112
|
var href = (0, _getHref.getHref)(slug, isExternal);
|
|
152
113
|
return /*#__PURE__*/_react["default"].createElement(Item, null, /*#__PURE__*/_react["default"].createElement(_twreporterLink["default"], {
|
|
153
114
|
href: href,
|
|
@@ -162,10 +123,8 @@ var Photography = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
162
123
|
}, /*#__PURE__*/_react["default"].createElement(Title, null, /*#__PURE__*/_react["default"].createElement(_categoryName["default"], null, _categoryStrings["default"].photography), title))))));
|
|
163
124
|
}
|
|
164
125
|
}]);
|
|
165
|
-
|
|
166
126
|
return Photography;
|
|
167
127
|
}(_react["default"].PureComponent);
|
|
168
|
-
|
|
169
128
|
Photography.defaultProps = {
|
|
170
129
|
title: '',
|
|
171
130
|
imgObj: {},
|
|
@@ -180,17 +139,12 @@ Photography.propTypes = {
|
|
|
180
139
|
isHover: _propTypes["default"].bool,
|
|
181
140
|
slug: _propTypes["default"].string
|
|
182
141
|
};
|
|
183
|
-
|
|
184
142
|
var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
185
143
|
_inherits(PhotographySection, _React$PureComponent2);
|
|
186
|
-
|
|
187
144
|
var _super2 = _createSuper(PhotographySection);
|
|
188
|
-
|
|
189
145
|
function PhotographySection(props) {
|
|
190
146
|
var _this;
|
|
191
|
-
|
|
192
147
|
_classCallCheck(this, PhotographySection);
|
|
193
|
-
|
|
194
148
|
_this = _super2.call(this, props);
|
|
195
149
|
_this.state = {
|
|
196
150
|
eleTouchViewportTop: -1,
|
|
@@ -206,31 +160,26 @@ var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
206
160
|
_this._mounted = false;
|
|
207
161
|
return _this;
|
|
208
162
|
}
|
|
209
|
-
|
|
210
163
|
_createClass(PhotographySection, [{
|
|
211
164
|
key: "componentDidMount",
|
|
212
165
|
value: function componentDidMount() {
|
|
213
|
-
this._mounted = true;
|
|
214
|
-
|
|
166
|
+
this._mounted = true;
|
|
167
|
+
// fetch the posts in advance
|
|
215
168
|
var _checkViewportWidth = this._checkViewportWidth.bind(this);
|
|
216
|
-
|
|
217
169
|
_checkViewportWidth();
|
|
218
|
-
|
|
219
170
|
var resizeTimeout;
|
|
220
|
-
|
|
221
171
|
function resizeThrottler() {
|
|
222
172
|
// ignore resize events as long as an actualResizeHandler execution is in the queue
|
|
223
173
|
if (!resizeTimeout) {
|
|
224
174
|
resizeTimeout = setTimeout(function () {
|
|
225
175
|
resizeTimeout = null;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
176
|
+
_checkViewportWidth();
|
|
177
|
+
// The _checkViewportWidth will execute at a rate of 15fps
|
|
229
178
|
}, 500);
|
|
230
179
|
}
|
|
231
|
-
}
|
|
232
|
-
|
|
180
|
+
}
|
|
233
181
|
|
|
182
|
+
// add resize event listener
|
|
234
183
|
window.addEventListener('resize', resizeThrottler.bind(this), false);
|
|
235
184
|
}
|
|
236
185
|
}, {
|
|
@@ -242,7 +191,6 @@ var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
242
191
|
key: "_checkViewportWidth",
|
|
243
192
|
value: function _checkViewportWidth() {
|
|
244
193
|
var innerW = _.get(window, 'innerWidth', oneColumnWidthInt);
|
|
245
|
-
|
|
246
194
|
if (this._mounted) {
|
|
247
195
|
this.setState({
|
|
248
196
|
isAutoHover: innerW < oneColumnWidthInt
|
|
@@ -262,23 +210,19 @@ var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
262
210
|
key: "render",
|
|
263
211
|
value: function render() {
|
|
264
212
|
var _this2 = this;
|
|
265
|
-
|
|
266
213
|
var _this$props2 = this.props,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
214
|
+
data = _this$props2.data,
|
|
215
|
+
moreURI = _this$props2.moreURI,
|
|
216
|
+
useTinyImg = _this$props2.useTinyImg;
|
|
270
217
|
var _this$state = this.state,
|
|
271
|
-
|
|
272
|
-
|
|
218
|
+
eleTouchViewportTop = _this$state.eleTouchViewportTop,
|
|
219
|
+
isAutoHover = _this$state.isAutoHover;
|
|
273
220
|
var postComps = data.slice(0, this.itemsToShow).map(function (item, index) {
|
|
274
221
|
var imgObj = _.get(item, 'hero_image') || _.get(item, 'og_image');
|
|
275
|
-
|
|
276
222
|
var isHover = false;
|
|
277
|
-
|
|
278
223
|
if (isAutoHover) {
|
|
279
224
|
isHover = eleTouchViewportTop === index;
|
|
280
225
|
}
|
|
281
|
-
|
|
282
226
|
return /*#__PURE__*/_react["default"].createElement(_reactWaypoint.Waypoint, {
|
|
283
227
|
key: _.get(item, 'id'),
|
|
284
228
|
onEnter: function onEnter() {
|
|
@@ -311,10 +255,8 @@ var PhotographySection = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
311
255
|
})))));
|
|
312
256
|
}
|
|
313
257
|
}]);
|
|
314
|
-
|
|
315
258
|
return PhotographySection;
|
|
316
259
|
}(_react["default"].PureComponent);
|
|
317
|
-
|
|
318
260
|
PhotographySection.defaultProps = {
|
|
319
261
|
data: [],
|
|
320
262
|
moreURI: 'photography',
|
|
@@ -325,7 +267,4 @@ PhotographySection.propTypes = {
|
|
|
325
267
|
moreURI: _propTypes["default"].string,
|
|
326
268
|
useTinyImg: _propTypes["default"].bool
|
|
327
269
|
};
|
|
328
|
-
|
|
329
|
-
var _default = (0, _sectionAnimationWrapper["default"])(PhotographySection);
|
|
330
|
-
|
|
331
|
-
exports["default"] = _default;
|
|
270
|
+
var _default = exports["default"] = (0, _sectionAnimationWrapper["default"])(PhotographySection);
|