mc-react-header 0.2.1 → 0.3.3
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/.github/workflows/release_and_publish.yml +41 -0
- package/README.md +21 -78
- package/dist/Breadcrumbs.css +97 -101
- package/dist/Breadcrumbs.js +11 -11
- package/dist/Navbar.css +128 -129
- package/dist/Navbar.js +69 -132
- package/dist/index.css +14 -15
- package/dist/index.js +19 -41
- package/package.json +57 -56
- package/public/index.html +43 -43
- package/public/manifest.json +25 -25
- package/public/robots.txt +3 -3
- package/src/App.css +38 -38
- package/src/App.js +23 -23
- package/src/App.test.js +14 -14
- package/src/MaterialsCloudHeader/Breadcrumbs.css +97 -101
- package/src/MaterialsCloudHeader/Breadcrumbs.js +15 -19
- package/src/MaterialsCloudHeader/Navbar.css +128 -129
- package/src/MaterialsCloudHeader/Navbar.js +104 -131
- package/src/MaterialsCloudHeader/index.css +14 -15
- package/src/MaterialsCloudHeader/index.js +16 -25
- package/src/index.css +13 -13
- package/src/index.js +18 -18
- package/src/reportWebVitals.js +13 -13
- package/src/setupTests.js +5 -5
package/dist/Navbar.js
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
require("./Navbar.css");
|
|
9
8
|
var _mcloud_logo = _interopRequireDefault(require("./assets/mcloud_logo.png"));
|
|
10
9
|
require("font-awesome/css/font-awesome.min.css");
|
|
11
|
-
var _react =
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
|
|
14
|
-
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); } }
|
|
15
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
-
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); }
|
|
18
|
-
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); }
|
|
19
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
|
-
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); }; }
|
|
21
|
-
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); }
|
|
22
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23
|
-
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; } }
|
|
24
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
-
var mainSections = {
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const mainSections = {
|
|
26
13
|
learn: {
|
|
27
14
|
name: "LEARN",
|
|
28
15
|
link: "https://www.materialscloud.org/learn"
|
|
@@ -44,7 +31,7 @@ var mainSections = {
|
|
|
44
31
|
link: "https://www.materialscloud.org/archive"
|
|
45
32
|
}
|
|
46
33
|
};
|
|
47
|
-
|
|
34
|
+
const dropdownSections = {
|
|
48
35
|
policies: {
|
|
49
36
|
name: "Policies",
|
|
50
37
|
link: "https://www.materialscloud.org/policies"
|
|
@@ -74,119 +61,69 @@ var dropdownSections = {
|
|
|
74
61
|
link: "https://www.materialscloud.org/explore/connect"
|
|
75
62
|
}
|
|
76
63
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
_this.toggleDropdown = _this.toggleDropdown.bind(_assertThisInitialized(_this));
|
|
88
|
-
_this.setWrapperRef = _this.setWrapperRef.bind(_assertThisInitialized(_this));
|
|
89
|
-
_this.handleClickOutside = _this.handleClickOutside.bind(_assertThisInitialized(_this));
|
|
90
|
-
return _this;
|
|
91
|
-
}
|
|
92
|
-
_createClass(DropdownMenu, [{
|
|
93
|
-
key: "componentDidMount",
|
|
94
|
-
value: function componentDidMount() {
|
|
95
|
-
document.addEventListener("mousedown", this.handleClickOutside);
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "componentWillUnmount",
|
|
99
|
-
value: function componentWillUnmount() {
|
|
100
|
-
document.removeEventListener("mousedown", this.handleClickOutside);
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "setWrapperRef",
|
|
104
|
-
value: function setWrapperRef(node) {
|
|
105
|
-
this.wrapperRef = node;
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
key: "handleClickOutside",
|
|
109
|
-
value: function handleClickOutside(event) {
|
|
110
|
-
if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
|
|
111
|
-
if (this.state.dropdownOpen) {
|
|
112
|
-
this.setState({
|
|
113
|
-
dropdownOpen: false
|
|
114
|
-
});
|
|
115
|
-
}
|
|
64
|
+
const DropdownMenu = _ref => {
|
|
65
|
+
let {
|
|
66
|
+
activeSection
|
|
67
|
+
} = _ref;
|
|
68
|
+
const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
|
|
69
|
+
const wrapperRef = (0, _react.useRef)(null);
|
|
70
|
+
(0, _react.useEffect)(() => {
|
|
71
|
+
function handleClickOutside(event) {
|
|
72
|
+
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
73
|
+
setDropdownOpen(false);
|
|
116
74
|
}
|
|
117
75
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
173
|
-
src: _mcloud_logo["default"],
|
|
174
|
-
height: "50",
|
|
175
|
-
alt: "MC logo"
|
|
176
|
-
})), Object.keys(mainSections).map(function (key, i) {
|
|
177
|
-
var cname = "mc-navlink";
|
|
178
|
-
if (key == _this3.props.activeSection) cname += " active";
|
|
179
|
-
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
180
|
-
key: i,
|
|
181
|
-
className: cname,
|
|
182
|
-
href: mainSections[key].link
|
|
183
|
-
}, mainSections[key].name);
|
|
184
|
-
}), /*#__PURE__*/_react["default"].createElement(DropdownMenu, {
|
|
185
|
-
activeSection: this.props.activeSection
|
|
186
|
-
}));
|
|
187
|
-
}
|
|
188
|
-
}]);
|
|
189
|
-
return Navbar;
|
|
190
|
-
}(_react["default"].Component);
|
|
191
|
-
var _default = Navbar;
|
|
192
|
-
exports["default"] = _default;
|
|
76
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
77
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
78
|
+
}, []);
|
|
79
|
+
const toggleDropdown = () => setDropdownOpen(prev => !prev);
|
|
80
|
+
const dropdownContentClass = "dropdown-content" + (dropdownOpen ? " dropdown-open" : "");
|
|
81
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
ref: wrapperRef,
|
|
83
|
+
className: "more-dropdown"
|
|
84
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
className: "more-btn",
|
|
86
|
+
onClick: toggleDropdown
|
|
87
|
+
}, "More ", /*#__PURE__*/React.createElement("i", {
|
|
88
|
+
className: "fa fa-caret-down"
|
|
89
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
className: dropdownContentClass
|
|
91
|
+
}, Object.keys(dropdownSections).map((element, i) => {
|
|
92
|
+
const {
|
|
93
|
+
link,
|
|
94
|
+
name
|
|
95
|
+
} = dropdownSections[element];
|
|
96
|
+
const cname = element === activeSection ? "active" : "";
|
|
97
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
98
|
+
key: i,
|
|
99
|
+
className: cname,
|
|
100
|
+
href: link
|
|
101
|
+
}, name);
|
|
102
|
+
})));
|
|
103
|
+
};
|
|
104
|
+
const Navbar = _ref2 => {
|
|
105
|
+
let {
|
|
106
|
+
activeSection
|
|
107
|
+
} = _ref2;
|
|
108
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: "mc-navbar"
|
|
110
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
111
|
+
className: "mc-navbrand",
|
|
112
|
+
href: "https://www.materialscloud.org/home"
|
|
113
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
114
|
+
src: _mcloud_logo.default,
|
|
115
|
+
height: "50",
|
|
116
|
+
alt: "MC logo"
|
|
117
|
+
})), Object.keys(mainSections).map((key, i) => {
|
|
118
|
+
let cname = "mc-navlink";
|
|
119
|
+
if (key === activeSection) cname += " active";
|
|
120
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
121
|
+
key: i,
|
|
122
|
+
className: cname,
|
|
123
|
+
href: mainSections[key].link
|
|
124
|
+
}, mainSections[key].name);
|
|
125
|
+
}), /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
126
|
+
activeSection: activeSection
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
var _default = exports.default = Navbar;
|
package/dist/index.css
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
.main-container {
|
|
2
|
-
background-color: #f0f6f9;
|
|
3
|
-
height:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
margin:
|
|
10
|
-
margin-
|
|
11
|
-
|
|
12
|
-
padding:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
.main-container {
|
|
2
|
+
background-color: #f0f6f9;
|
|
3
|
+
min-height: 100vh;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.content-container {
|
|
7
|
+
background-color: white;
|
|
8
|
+
margin: 5px;
|
|
9
|
+
margin-top: 30px;
|
|
10
|
+
margin-bottom: 10px;
|
|
11
|
+
padding: 2px;
|
|
12
|
+
padding-bottom: 20px;
|
|
13
|
+
border-radius: 2px;
|
|
14
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
exports.default = void 0;
|
|
9
7
|
require("./index.css");
|
|
10
8
|
var _Navbar = _interopRequireDefault(require("./Navbar"));
|
|
11
9
|
var _Breadcrumbs = _interopRequireDefault(require("./Breadcrumbs"));
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return _super.call(this, props);
|
|
31
|
-
}
|
|
32
|
-
_createClass(MaterialsCloudHeader, [{
|
|
33
|
-
key: "render",
|
|
34
|
-
value: function render() {
|
|
35
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
|
-
className: "main-container"
|
|
37
|
-
}, /*#__PURE__*/_react["default"].createElement(_Navbar["default"], {
|
|
38
|
-
activeSection: this.props.activeSection
|
|
39
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
|
-
className: "content-container"
|
|
41
|
-
}, /*#__PURE__*/_react["default"].createElement(_Breadcrumbs["default"], {
|
|
42
|
-
breadcrumbsPath: this.props.breadcrumbsPath
|
|
43
|
-
}), this.props.children));
|
|
44
|
-
}
|
|
45
|
-
}]);
|
|
46
|
-
return MaterialsCloudHeader;
|
|
47
|
-
}(_react["default"].Component);
|
|
48
|
-
var _default = MaterialsCloudHeader;
|
|
49
|
-
exports["default"] = _default;
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const MaterialsCloudHeader = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
activeSection,
|
|
14
|
+
breadcrumbsPath,
|
|
15
|
+
children
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "main-container"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(_Navbar.default, {
|
|
20
|
+
activeSection: activeSection
|
|
21
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "content-container"
|
|
23
|
+
}, /*#__PURE__*/React.createElement(_Breadcrumbs.default, {
|
|
24
|
+
breadcrumbsPath: breadcrumbsPath
|
|
25
|
+
}), children));
|
|
26
|
+
};
|
|
27
|
+
var _default = exports.default = MaterialsCloudHeader;
|
package/package.json
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mc-react-header",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"author": "Kristjan Eimre <kristjan.eimre@epfl.ch>",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.js",
|
|
7
|
-
"babel": {
|
|
8
|
-
"presets": [
|
|
9
|
-
"@babel/preset-react",
|
|
10
|
-
"@babel/preset-env"
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
15
|
-
"@testing-library/react": "^13.4.0",
|
|
16
|
-
"@testing-library/user-event": "^13.5.0",
|
|
17
|
-
"font-awesome": "^4.7.0",
|
|
18
|
-
"react": "^18.2.0",
|
|
19
|
-
"react-dom": "^18.2.0",
|
|
20
|
-
"react-scripts": "5.0.1",
|
|
21
|
-
"web-vitals": "^2.1.4"
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"start": "react-scripts start",
|
|
25
|
-
"prebuild": "rimraf dist",
|
|
26
|
-
"build": "
|
|
27
|
-
"test": "react-scripts test",
|
|
28
|
-
"eject": "react-scripts eject"
|
|
29
|
-
},
|
|
30
|
-
"eslintConfig": {
|
|
31
|
-
"extends": [
|
|
32
|
-
"react-app",
|
|
33
|
-
"react-app/jest"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"browserslist": {
|
|
37
|
-
"production": [
|
|
38
|
-
">0.2%",
|
|
39
|
-
"not dead",
|
|
40
|
-
"not op_mini all"
|
|
41
|
-
],
|
|
42
|
-
"development": [
|
|
43
|
-
"last 1 chrome version",
|
|
44
|
-
"last 1 firefox version",
|
|
45
|
-
"last 1 safari version"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@babel/cli": "^7.19.3",
|
|
50
|
-
"@babel/core": "^7.20.2",
|
|
51
|
-
"@babel/preset-env": "^7.20.2",
|
|
52
|
-
"@babel/preset-react": "^7.18.6",
|
|
53
|
-
"babel-loader": "^9.1.0",
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "mc-react-header",
|
|
3
|
+
"version": "0.3.3",
|
|
4
|
+
"author": "Kristjan Eimre <kristjan.eimre@epfl.ch>",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"babel": {
|
|
8
|
+
"presets": [
|
|
9
|
+
"@babel/preset-react",
|
|
10
|
+
"@babel/preset-env"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
15
|
+
"@testing-library/react": "^13.4.0",
|
|
16
|
+
"@testing-library/user-event": "^13.5.0",
|
|
17
|
+
"font-awesome": "^4.7.0",
|
|
18
|
+
"react": "^18.2.0",
|
|
19
|
+
"react-dom": "^18.2.0",
|
|
20
|
+
"react-scripts": "^5.0.1",
|
|
21
|
+
"web-vitals": "^2.1.4"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"start": "react-scripts start",
|
|
25
|
+
"prebuild": "rimraf dist",
|
|
26
|
+
"build": "cross-env NODE_ENV=production npx babel src/MaterialsCloudHeader --out-dir dist --copy-files",
|
|
27
|
+
"test": "react-scripts test",
|
|
28
|
+
"eject": "react-scripts eject"
|
|
29
|
+
},
|
|
30
|
+
"eslintConfig": {
|
|
31
|
+
"extends": [
|
|
32
|
+
"react-app",
|
|
33
|
+
"react-app/jest"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"browserslist": {
|
|
37
|
+
"production": [
|
|
38
|
+
">0.2%",
|
|
39
|
+
"not dead",
|
|
40
|
+
"not op_mini all"
|
|
41
|
+
],
|
|
42
|
+
"development": [
|
|
43
|
+
"last 1 chrome version",
|
|
44
|
+
"last 1 firefox version",
|
|
45
|
+
"last 1 safari version"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/cli": "^7.19.3",
|
|
50
|
+
"@babel/core": "^7.20.2",
|
|
51
|
+
"@babel/preset-env": "^7.20.2",
|
|
52
|
+
"@babel/preset-react": "^7.18.6",
|
|
53
|
+
"babel-loader": "^9.1.0",
|
|
54
|
+
"cross-env": "^7.0.3",
|
|
55
|
+
"rimraf": "^4.3.1"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/public/index.html
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<meta
|
|
9
|
-
name="description"
|
|
10
|
-
content="Web site created using create-react-app"
|
|
11
|
-
/>
|
|
12
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
-
<!--
|
|
14
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
-
-->
|
|
17
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
-
<!--
|
|
19
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
-
|
|
23
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
-
-->
|
|
27
|
-
<title>React App</title>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
-
<div id="root"></div>
|
|
32
|
-
<!--
|
|
33
|
-
This HTML file is a template.
|
|
34
|
-
If you open it directly in the browser, you will see an empty page.
|
|
35
|
-
|
|
36
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
-
|
|
39
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
-
-->
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<title>React App</title>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
+
<div id="root"></div>
|
|
32
|
+
<!--
|
|
33
|
+
This HTML file is a template.
|
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
|
35
|
+
|
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
+
|
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
+
-->
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
package/public/manifest.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
package/public/robots.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
-
User-agent: *
|
|
3
|
-
Disallow:
|
|
1
|
+
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
+
User-agent: *
|
|
3
|
+
Disallow:
|