Skip to content

Commit

Permalink
Merge pull request #310 from ORNL-AMO/issue-279-c
Browse files Browse the repository at this point in the history
Issue 279 - Finish Win/Lose pages
  • Loading branch information
rhernandez-intertech authored Mar 28, 2024
2 parents 5056043 + 8cfe17d commit 38c6933
Show file tree
Hide file tree
Showing 25 changed files with 883 additions and 168 deletions.
46 changes: 46 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dependencies": {
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fontsource/lato": "^5.0.20",
"@fontsource/roboto": "^4.5.7",
"@mui/material": "^5.8.7",
"@react-pdf/renderer": "^3.3.8",
Expand All @@ -23,6 +24,7 @@
"@visx/text": "^2.10.0",
"@visx/tooltip": "^2.10.0",
"@visx/visx": "^3.1.2",
"animate.css": "^4.1.1",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"electron-log": "^4.4.8",
Expand All @@ -33,6 +35,7 @@
"react-dom": "^18.2.0",
"react-plotly.js": "^2.6.0",
"react-scripts": "5.0.1",
"swiper": "^11.0.7",
"typescript": "^4.7.4",
"wait-on": "^7.0.1",
"web-vitals": "^2.1.4"
Expand Down
259 changes: 259 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,263 @@ $landfill-gasses: #f06807;

#dashboardText {
font-weight: bold;
}
// EOG slider

.swiper {
width: 100%;
height: 100%;
}

.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
display: flex;
justify-content: center;
align-items: center;

&::before {
content: '';
//todo problem with animations?
@extend .slide1-image;
}
}

.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}

.autoplay-progress {
position: absolute;
right: 16px;
bottom: 16px;
z-index: 10;
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: var(--swiper-theme-color);
}

.autoplay-progress svg {
--progress: 0;
position: absolute;
left: 0;
top: 0px;
z-index: 10;
width: 100%;
height: 100%;
stroke-width: 4px;
stroke: var(--swiper-theme-color);
fill: none;
stroke-dashoffset: calc(125.6 * (1 - var(--progress)));
stroke-dasharray: 125.6;
transform: rotate(-90deg);
}

// Animations

// #animate-underline-emphasis {
// display: inline-block;
// position: relative;
// padding-bottom: 3px;
// }

// @keyframes border {
// from {
// width: 0%;
// }

// to {
// width: 100%;
// }
// }

// #animate-underline-emphasis:after {
// content: '';
// display: block;
// margin: auto;
// height: 5px;
// width: 0px;
// background: #fff;
// animation-name: border;
// animation-duration: 1000ms;
// animation-delay: 2s;
// animation-fill-mode: both;
// }

// todo replace w above
.animate-underline-emphasis {
border-bottom: 5px solid #fff;
padding-bottom: 3px;
margin: auto;
height: 5px;
padding-bottom: 0px;
}

// @keyframes fade-color {
// 0% { color: rgba(68,68,68,.6); }
// 100% { color: white; }
// }


// .animate-color {
// color: rgba(68,68,68,.6);
// padding-left: 12px;
// padding-right: 12px;
// font-weight: 1000;
// font-size: 36px;
// animation: fade-color 3s;
// animation-delay: 1s;
// animation-fill-mode: both;
// }

@keyframes fade-opacity {
0% { opacity: 1; }
100% { opacity: 0; }
}


#fade-to-white {
&::before {
position: absolute;
background-color: #000;
display: flex;
// width: 100%;
height: 100%;
// animation: fade-opacity 10s;
// animation-delay: 6s;
// animation-fill-mode: forwards;
}
}

// Slides
.swiper-slide.swiper-slide-active.lose-game-bg {
&::before {
position: fixed;
z-index: -1;
background: url('images/lose-image-opt.jpg');
// filter: blur($blur-radius);
background-size: cover;
top: -1 * $blur-radius;
left: -1 * $blur-radius;
bottom: -1 * $blur-radius;
right: -1 * $blur-radius;
display: block;
}
}

.swiper-slide.swiper-slide-active.slide1-image {
&::before {
position: fixed;
z-index: -1;
background: url('images/turbine2-opt.jpg') ;
// filter: blur($blur-radius);
background-size: cover;
top: -1 * $blur-radius;
left: -1 * $blur-radius;
bottom: -1 * $blur-radius;
right: -1 * $blur-radius;
display: block;
}
}

.swiper-slide.swiper-slide-active.slide2-image {
&::before {
position: fixed !important;
z-index: -1;
background: url('images/solar-array2-opt.jpg') !important;
background-size: cover !important;

// filter: blur($blur-radius);
top: -1 * $blur-radius;
left: -1 * $blur-radius;
bottom: -1 * $blur-radius;
right: -1 * $blur-radius;
display: block;
}
}

.swiper-slide.swiper-slide-active.slide3-image {
&::before {
position: fixed !important;
z-index: -1;
background: url('images/electricity.jpg') !important;
background-size: cover !important;

// filter: blur($blur-radius);
top: -1 * $blur-radius;
left: -1 * $blur-radius;
bottom: -1 * $blur-radius;
right: -1 * $blur-radius;
display: block;
}

}

.swiper-slide.swiper-slide-active.slide4-image {
&::before {
position: fixed !important;
z-index: -1;
background: url('images/field-opt.jpg') !important;
background-size: cover !important;

// filter: blur($blur-radius);
top: -1 * $blur-radius;
left: -1 * $blur-radius;
bottom: -1 * $blur-radius;
right: -1 * $blur-radius;
display: block;
}
}

// .lose-game-text {
// display: 'flex';
// flex-direction: 'column';
// flex-grow: 1;
// color: #000;
// border-radius: 10px;
// padding: 36px 128px;
// animation-fill-mode: 'forwards';
// opacity: 0;
// font-size: 32px;
// font-weight: 900;
// text-transform: uppercase;
// font-family:"Lato", sans-serif;
// }

.lose-game-text {
display: 'flex';
flex-direction: 'column';
flex-grow: 1;
color: #000;
border-radius: 10px;
padding: 36px 64px;
animation-fill-mode: 'forwards';
opacity: 0;
font-size: 36px;
letter-spacing: 0px;
line-height: 3rem;
font-weight: 900;
text-transform: uppercase;
font-family:"Lato", sans-serif;
}

.slide-stat-div {
font-size: 42px;
color: #fff;
font-weight: 900;
border-radius: 10px;
letter-spacing: 1.5px;
text-align: center;
text-transform: uppercase;
font-family: "Lato", sans-serif;
line-height: 4rem;
margin-top: 0;
}
Loading

0 comments on commit 38c6933

Please sign in to comment.