Skip to content

Commit 267f9c3

Browse files
authored
3D Hero Banner (#58)
* Hide right border of last navbar item * Added three.js dependencies * Started integrating HeroBanner3d * Added ocean * Configured sun at sunset * Configured sun at sunset * Slower water * Renamed OceanAndSky to Environment * Stop animation after a few text loops * Added config for HeroBanner3d inside docusaurus.config.js; choose 2d or 3d banner according to config * Updated index.test.js to test for 3d hero banner * Added unit tests for AnimatedText and Environment * Added unit tests for HeroBanner3d and Ocean; bumped to 1.6.0
1 parent 677a84f commit 267f9c3

27 files changed

+1556
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
77
You should update the version number in the [package.json](./package.json) according to the semantic versioning,
88
then run `npm install`.
99

10+
## 1.6.0
11+
- Added 3D hero banner
12+
1013
## 1.5.1
1114
- Bumped to node 16, docusaurus 2.0.1, react 17.0.2
1215

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ This project uses [Jest](https://jestjs.io/) for unit testing. When contributing
2626

2727
The naming convention for a file `foo.js` is to put the related unit tests next to it as `foo.test.js`.
2828

29-
Run the unit tests with:
29+
Run all the unit tests with:
3030

3131
```
3232
npm run test
3333
```
3434

35+
or a specific unit test with:
36+
37+
```
38+
npm run test <path to test file>
39+
```
40+
3541
Unit tests for React components use [snapshot testing](https://jestjs.io/docs/snapshot-testing), please take a moment
3642
to learn about this kind of tests and how to use them.
3743

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ We would like to give a special thanks to:
44

55
* [Ishan @seefromthesky](https://unsplash.com/@seefromthesky) for the photo on Unsplash
66
* [Christina @ wocintechchat.com](https://unsplash.com/@wocintechchat) for the photo on Unsplash
7+
* [three.js](https://threejs.org/) for the [Ocean](https://threejs.org/examples/webgl_shaders_ocean.html) example from which we based the `HeroBanner3d` implementation

docusaurus.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@ limitations under the License.
1616

1717
const customFields = {
1818
heroConfig: {
19-
title: 'Powering global travel through a world-class tech platform.',
20-
subtitle: 'Peek behind the scenes at our open source projects.'
19+
hero2d: {
20+
title: 'Powering global travel through a world-class tech platform.',
21+
subtitle: 'Peek behind the scenes at our open source projects.',
22+
imageUrl: '/img/hero.jpg'
23+
},
24+
hero3d: {
25+
enabled: true,
26+
title: 'Expedia Group',
27+
subtitle: 'Open Source'
28+
}
2129
},
2230
repositoriesConfig: {
2331
navbarLabel: 'Projects',

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
const config = {
1818
resetMocks: true,
19+
setupFiles: ["<rootDir>/src/jest/helpers.js"],
1920
transform: {
2021
"\\.[jt]sx?$": "babel-jest",
2122
".+\\.(css|styl|less|sass|scss)$": "jest-css-modules-transform"

0 commit comments

Comments
 (0)