mc-react-header 0.2.1 → 0.3.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/.github/workflows/release_and_publish.yml +41 -0
- package/README.md +21 -78
- package/dist/Breadcrumbs.css +101 -101
- package/dist/Breadcrumbs.js +6 -6
- package/dist/Navbar.css +129 -129
- package/dist/Navbar.js +16 -16
- package/dist/index.css +14 -15
- package/dist/index.js +8 -8
- 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 +101 -101
- package/src/MaterialsCloudHeader/Breadcrumbs.js +19 -19
- package/src/MaterialsCloudHeader/Navbar.css +129 -129
- package/src/MaterialsCloudHeader/Navbar.js +131 -131
- package/src/MaterialsCloudHeader/index.css +14 -15
- package/src/MaterialsCloudHeader/index.js +25 -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
|
@@ -4,12 +4,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
require("./Navbar.css");
|
|
9
9
|
var _mcloud_logo = _interopRequireDefault(require("./assets/mcloud_logo.png"));
|
|
10
10
|
require("font-awesome/css/font-awesome.min.css");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
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
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; }
|
|
@@ -130,20 +130,20 @@ var DropdownMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
130
130
|
if (this.state.dropdownOpen) {
|
|
131
131
|
dropdownContentClass += " dropdown-open";
|
|
132
132
|
}
|
|
133
|
-
return /*#__PURE__*/_react
|
|
133
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
134
134
|
ref: this.setWrapperRef,
|
|
135
135
|
className: "more-dropdown"
|
|
136
|
-
}, /*#__PURE__*/_react
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
137
137
|
className: "more-btn",
|
|
138
138
|
onClick: this.toggleDropdown
|
|
139
|
-
}, "More ", /*#__PURE__*/_react
|
|
139
|
+
}, "More ", /*#__PURE__*/_react.default.createElement("i", {
|
|
140
140
|
className: "fa fa-caret-down"
|
|
141
|
-
})), /*#__PURE__*/_react
|
|
141
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
142
142
|
className: dropdownContentClass
|
|
143
143
|
}, Object.keys(dropdownSections).map(function (element, i) {
|
|
144
144
|
var cname = "";
|
|
145
145
|
if (element == _this2.props.activeSection) cname = "active";
|
|
146
|
-
return /*#__PURE__*/_react
|
|
146
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
147
147
|
key: i,
|
|
148
148
|
className: cname,
|
|
149
149
|
href: dropdownSections[element].link
|
|
@@ -152,7 +152,7 @@ var DropdownMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
152
152
|
}
|
|
153
153
|
}]);
|
|
154
154
|
return DropdownMenu;
|
|
155
|
-
}(_react
|
|
155
|
+
}(_react.default.Component);
|
|
156
156
|
var Navbar = /*#__PURE__*/function (_React$Component2) {
|
|
157
157
|
_inherits(Navbar, _React$Component2);
|
|
158
158
|
var _super2 = _createSuper(Navbar);
|
|
@@ -164,29 +164,29 @@ var Navbar = /*#__PURE__*/function (_React$Component2) {
|
|
|
164
164
|
key: "render",
|
|
165
165
|
value: function render() {
|
|
166
166
|
var _this3 = this;
|
|
167
|
-
return /*#__PURE__*/_react
|
|
167
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
168
168
|
className: "mc-navbar"
|
|
169
|
-
}, /*#__PURE__*/_react
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
170
170
|
className: "mc-navbrand",
|
|
171
171
|
href: "https://www.materialscloud.org/home"
|
|
172
|
-
}, /*#__PURE__*/_react
|
|
173
|
-
src: _mcloud_logo
|
|
172
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
173
|
+
src: _mcloud_logo.default,
|
|
174
174
|
height: "50",
|
|
175
175
|
alt: "MC logo"
|
|
176
176
|
})), Object.keys(mainSections).map(function (key, i) {
|
|
177
177
|
var cname = "mc-navlink";
|
|
178
178
|
if (key == _this3.props.activeSection) cname += " active";
|
|
179
|
-
return /*#__PURE__*/_react
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
180
180
|
key: i,
|
|
181
181
|
className: cname,
|
|
182
182
|
href: mainSections[key].link
|
|
183
183
|
}, mainSections[key].name);
|
|
184
|
-
}), /*#__PURE__*/_react
|
|
184
|
+
}), /*#__PURE__*/_react.default.createElement(DropdownMenu, {
|
|
185
185
|
activeSection: this.props.activeSection
|
|
186
186
|
}));
|
|
187
187
|
}
|
|
188
188
|
}]);
|
|
189
189
|
return Navbar;
|
|
190
|
-
}(_react
|
|
190
|
+
}(_react.default.Component);
|
|
191
191
|
var _default = Navbar;
|
|
192
|
-
exports
|
|
192
|
+
exports.default = _default;
|
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
|
@@ -4,12 +4,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.css");
|
|
10
10
|
var _Navbar = _interopRequireDefault(require("./Navbar"));
|
|
11
11
|
var _Breadcrumbs = _interopRequireDefault(require("./Breadcrumbs"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
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
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; }
|
|
@@ -32,18 +32,18 @@ var MaterialsCloudHeader = /*#__PURE__*/function (_React$Component) {
|
|
|
32
32
|
_createClass(MaterialsCloudHeader, [{
|
|
33
33
|
key: "render",
|
|
34
34
|
value: function render() {
|
|
35
|
-
return /*#__PURE__*/_react
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
className: "main-container"
|
|
37
|
-
}, /*#__PURE__*/_react
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_Navbar.default, {
|
|
38
38
|
activeSection: this.props.activeSection
|
|
39
|
-
}), /*#__PURE__*/_react
|
|
39
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
40
40
|
className: "content-container"
|
|
41
|
-
}, /*#__PURE__*/_react
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_Breadcrumbs.default, {
|
|
42
42
|
breadcrumbsPath: this.props.breadcrumbsPath
|
|
43
43
|
}), this.props.children));
|
|
44
44
|
}
|
|
45
45
|
}]);
|
|
46
46
|
return MaterialsCloudHeader;
|
|
47
|
-
}(_react
|
|
47
|
+
}(_react.default.Component);
|
|
48
48
|
var _default = MaterialsCloudHeader;
|
|
49
|
-
exports
|
|
49
|
+
exports.default = _default;
|
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.1",
|
|
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:
|
package/src/App.css
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
.App {
|
|
2
|
-
text-align: center;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.App-logo {
|
|
6
|
-
height: 40vmin;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
-
.App-logo {
|
|
12
|
-
animation: App-logo-spin infinite 20s linear;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.App-header {
|
|
17
|
-
background-color: #282c34;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
font-size: calc(10px + 2vmin);
|
|
24
|
-
color: white;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.App-link {
|
|
28
|
-
color: #61dafb;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes App-logo-spin {
|
|
32
|
-
from {
|
|
33
|
-
transform: rotate(0deg);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
transform: rotate(360deg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
height: 40vmin;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
+
.App-logo {
|
|
12
|
+
animation: App-logo-spin infinite 20s linear;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.App-header {
|
|
17
|
+
background-color: #282c34;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
font-size: calc(10px + 2vmin);
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.App-link {
|
|
28
|
+
color: #61dafb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes App-logo-spin {
|
|
32
|
+
from {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/App.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "./App.css";
|
|
2
|
-
|
|
3
|
-
import MaterialsCloudHeader from "./MaterialsCloudHeader";
|
|
4
|
-
|
|
5
|
-
function App() {
|
|
6
|
-
return (
|
|
7
|
-
<div className="App">
|
|
8
|
-
<MaterialsCloudHeader
|
|
9
|
-
activeSection={"discover"} // see the corresponding key in MaterialsCloudHeader/Navbar.js
|
|
10
|
-
breadcrumbsPath={[
|
|
11
|
-
{ name: "Discover", link: "https://www.materialscloud.org/discover" },
|
|
12
|
-
{ name: "Materials Cloud three-dimensional crystals database", link: "https://www.materialscloud.org/discover/mc3d" },
|
|
13
|
-
{ name: "test", link: null },
|
|
14
|
-
]}
|
|
15
|
-
>
|
|
16
|
-
<h3>Test content</h3>
|
|
17
|
-
<p>Test content</p>
|
|
18
|
-
</MaterialsCloudHeader>
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default App;
|
|
1
|
+
import "./App.css";
|
|
2
|
+
|
|
3
|
+
import MaterialsCloudHeader from "./MaterialsCloudHeader";
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="App">
|
|
8
|
+
<MaterialsCloudHeader
|
|
9
|
+
activeSection={"discover"} // see the corresponding key in MaterialsCloudHeader/Navbar.js
|
|
10
|
+
breadcrumbsPath={[
|
|
11
|
+
{ name: "Discover", link: "https://www.materialscloud.org/discover" },
|
|
12
|
+
{ name: "Materials Cloud three-dimensional crystals database", link: "https://www.materialscloud.org/discover/mc3d" },
|
|
13
|
+
{ name: "test", link: null },
|
|
14
|
+
]}
|
|
15
|
+
>
|
|
16
|
+
<h3>Test content</h3>
|
|
17
|
+
<p>Test content</p>
|
|
18
|
+
</MaterialsCloudHeader>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default App;
|
package/src/App.test.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { render, screen } from "@testing-library/react";
|
|
2
|
-
import App from "./App";
|
|
3
|
-
|
|
4
|
-
test("renders learn link", () => {
|
|
5
|
-
render(<App />);
|
|
6
|
-
const linkElement = screen.getByText(/LEARN/i);
|
|
7
|
-
expect(linkElement).toBeInTheDocument();
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
test("renders work link", () => {
|
|
11
|
-
render(<App />);
|
|
12
|
-
const linkElement = screen.getByText(/WORK/i);
|
|
13
|
-
expect(linkElement).toBeInTheDocument();
|
|
14
|
-
});
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import App from "./App";
|
|
3
|
+
|
|
4
|
+
test("renders learn link", () => {
|
|
5
|
+
render(<App />);
|
|
6
|
+
const linkElement = screen.getByText(/LEARN/i);
|
|
7
|
+
expect(linkElement).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test("renders work link", () => {
|
|
11
|
+
render(<App />);
|
|
12
|
+
const linkElement = screen.getByText(/WORK/i);
|
|
13
|
+
expect(linkElement).toBeInTheDocument();
|
|
14
|
+
});
|