@twreporter/index-page 2.1.9 → 2.2.0-rc.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.
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _font = require("@twreporter/core/lib/constants/font");
|
|
10
|
+
var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/media-query"));
|
|
11
|
+
var _color = require("@twreporter/core/lib/constants/color");
|
|
12
|
+
var _externalLinks = _interopRequireDefault(require("@twreporter/core/lib/constants/external-links"));
|
|
13
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
+
// assets
|
|
17
|
+
var ArrowIcon = function ArrowIcon(props) {
|
|
18
|
+
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("title", null, "ic/chevron_right"), /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
19
|
+
id: "a",
|
|
20
|
+
d: "M2 0L.59 1.41 5.17 6 .59 10.59 2 12l6-6z"
|
|
21
|
+
})), /*#__PURE__*/_react["default"].createElement("g", {
|
|
22
|
+
fill: "none",
|
|
23
|
+
fillRule: "evenodd"
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement("mask", {
|
|
25
|
+
id: "b",
|
|
26
|
+
fill: "#fff"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("use", {
|
|
28
|
+
xlinkHref: "#a"
|
|
29
|
+
})), /*#__PURE__*/_react["default"].createElement("g", {
|
|
30
|
+
mask: "url(#b)",
|
|
31
|
+
fill: "#FFF"
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
+
d: "M-8-6h24v24H-8z"
|
|
34
|
+
}))));
|
|
35
|
+
};
|
|
36
|
+
ArrowIcon.defaultProps = {
|
|
37
|
+
width: "8",
|
|
38
|
+
height: "12",
|
|
39
|
+
viewBox: "0 0 8 12",
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
42
|
+
}; // @twreporter
|
|
43
|
+
var mockup = {
|
|
44
|
+
defaultWidth: 320,
|
|
45
|
+
contentWidth: 238
|
|
46
|
+
};
|
|
47
|
+
var mobileContentWidthPct = mockup.contentWidth / mockup.defaultWidth * 100;
|
|
48
|
+
var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
49
|
+
displayName: "new-donation-box-section__Container",
|
|
50
|
+
componentId: "sc-19q3hlt-0"
|
|
51
|
+
})(["background-color:", ";padding-top:30px;padding-bottom:30px;", ""], _color.colorGrayscale.black, _mediaQuery["default"].mobileOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 40px;\n padding-bottom: 60px;\n "]))));
|
|
52
|
+
var ContentContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
53
|
+
displayName: "new-donation-box-section__ContentContainer",
|
|
54
|
+
componentId: "sc-19q3hlt-1"
|
|
55
|
+
})(["display:flex;justify-content:space-between;align-items:center;max-width:1024px;margin:0 auto;padding:0 100px;color:", ";h3{margin:0;font-size:32px;font-weight:", ";font-family:", ";line-height:1.63;}p{margin-top:10px;font-size:14px;line-height:1.57;text-align:left;}", " ", " ", ""], _color.colorGrayscale.white, _font.fontWeight.bold, _font.fontFamily.title, _mediaQuery["default"].hdOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-width: 1440px;\n padding: 0 219px;\n "]))), _mediaQuery["default"].tabletOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n padding: 0 110px;\n p{\n margin-top: 17px;\n }\n "]))), _mediaQuery["default"].mobileOnly(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n max-width: ", "%;\n display: block;\n text-align: center;\n padding: 0;\n h3{\n font-size: 24px;\n line-height: 2.17;\n }\n p{\n margin-top: 0;\n }\n "])), mobileContentWidthPct));
|
|
56
|
+
var DonateButton = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
57
|
+
displayName: "new-donation-box-section__DonateButton",
|
|
58
|
+
componentId: "sc-19q3hlt-2"
|
|
59
|
+
})(["a{width:116px;height:40px;border-radius:20px;background:", ";border:none;color:", ";font-size:16px;cursor:pointer;display:table;", " ", " span{display:table-cell;vertical-align:middle;text-align:center;font-weight:", ";}}"], _color.colorGrayscale.white, _color.colorBrand.heavy, _mediaQuery["default"].tabletOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n right: 110px;\n top: 9px;\n "]))), _mediaQuery["default"].mobileOnly(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin: 40px auto 0 auto;\n "]))), _font.fontWeight.bold);
|
|
60
|
+
var TextColumn = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
61
|
+
displayName: "new-donation-box-section__TextColumn",
|
|
62
|
+
componentId: "sc-19q3hlt-3"
|
|
63
|
+
})(["", ""], _mediaQuery["default"].desktopOnly(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n max-width: 608px;\n "]))));
|
|
64
|
+
var Icon = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
65
|
+
displayName: "new-donation-box-section__Icon",
|
|
66
|
+
componentId: "sc-19q3hlt-4"
|
|
67
|
+
})(["display:inline-block;margin-left:8.6px;width:7px;height:12px;"]);
|
|
68
|
+
var DonateInfo = /*#__PURE__*/_react["default"].createElement("span", null, "\u770B\u898B\u6539\u8B8A", /*#__PURE__*/_react["default"].createElement(Icon, null, /*#__PURE__*/_react["default"].createElement(ArrowIcon, null)));
|
|
69
|
+
var DonationBoxSection = function DonationBoxSection() {
|
|
70
|
+
return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(TextColumn, null, /*#__PURE__*/_react["default"].createElement("h3", null, "\u8D0A\u52A9\u5831\u5C0E\u8005\u7684\u4E0B\u4E00\u500B\u5341\u5E74"), /*#__PURE__*/_react["default"].createElement("p", null, "\u81EA2015\u5E749\u6708\uFF0C\u300A\u5831\u5C0E\u8005\u300B\u9760\u793E\u6703\u5927\u773E\u7684\u8D0A\u52A9\u8D70\u5230\u4E86\u4ECA\u5929\uFF0C\u9080\u60A8\u4E00\u8D77\u898B\u8B49\u6211\u5011\u8D70\u904E\u7684\u8DEF\uFF0C\u4E26\u4E14\u652F\u6301\u6211\u5011\u5EA6\u904E\u4E0B\u4E00\u500B\u5341\u5E74\u7684\u6311\u6230\u3002")), /*#__PURE__*/_react["default"].createElement(DonateButton, null, /*#__PURE__*/_react["default"].createElement("a", {
|
|
71
|
+
href: _externalLinks["default"].tenYearAnniversary,
|
|
72
|
+
target: "_blank",
|
|
73
|
+
rel: "noopener noreferrer"
|
|
74
|
+
}, DonateInfo))));
|
|
75
|
+
};
|
|
76
|
+
var _default = exports["default"] = DonationBoxSection;
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
var _featureFlag = require("@twreporter/core/lib/constants/feature-flag");
|
|
7
8
|
var _categorySection = _interopRequireDefault(require("./components/category-section"));
|
|
8
9
|
var _donationBoxSection = _interopRequireDefault(require("./components/donation-box-section"));
|
|
9
10
|
var _editorPicks = _interopRequireDefault(require("./components/editor-picks"));
|
|
@@ -16,11 +17,12 @@ var _podcastBoxSection = _interopRequireDefault(require("./components/podcast-bo
|
|
|
16
17
|
var _reviews = _interopRequireDefault(require("./components/reviews"));
|
|
17
18
|
var _scrollFadein = _interopRequireDefault(require("./components/animations/scroll-fadein"));
|
|
18
19
|
var _topicsSection = _interopRequireDefault(require("./components/topics-section"));
|
|
20
|
+
var _newDonationBoxSection = _interopRequireDefault(require("./components/new-donation-box-section"));
|
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
22
|
var _default = exports["default"] = {
|
|
21
23
|
components: {
|
|
22
24
|
CategorySection: _categorySection["default"],
|
|
23
|
-
DonationBoxSection: _donationBoxSection["default"],
|
|
25
|
+
DonationBoxSection: _featureFlag.TEN_YEAR_ANNIVERSARY ? _newDonationBoxSection["default"] : _donationBoxSection["default"],
|
|
24
26
|
EditorPicks: _editorPicks["default"],
|
|
25
27
|
InforgraphicSection: _infographicSection["default"],
|
|
26
28
|
JuniorBoxSection: _juniorBoxSection["default"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/index-page",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-rc.0",
|
|
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.
|
|
16
|
-
"@twreporter/react-components": "^9.8.1",
|
|
15
|
+
"@twreporter/core": "^1.27.0-rc.1",
|
|
16
|
+
"@twreporter/react-components": "^9.8.2-rc.1",
|
|
17
17
|
"lodash": "^4.0.0",
|
|
18
18
|
"prop-types": "^15.0.0",
|
|
19
19
|
"react": "^18.2.0",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"files": [
|
|
30
30
|
"lib"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "3b2aeed8de855191d21b49b8df861026a27c95ea"
|
|
33
33
|
}
|