forked from NationalBankBelgium/stark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-starter): add preloading screens
Added a loading screen for when Angular is starting up. Added a warning screen for when JavaScript is not enabled in the browser. Added a warning for when the browser is not supported. ISSUES CLOSED: NationalBankBelgium#840 NationalBankBelgium#596 NationalBankBelgium#597
- Loading branch information
1 parent
57ab7dc
commit 4022058
Showing
5 changed files
with
215 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* Hide the app / loader / browser warning until it is determined if JS is enabled and if the browser is compatible */ | ||
.stark-app, | ||
.stark-loading, | ||
.stark-browser-warning { | ||
display: none; | ||
} | ||
|
||
.stark-browser-outdated .stark-browser-warning { | ||
display: block; | ||
} | ||
|
||
.stark-browser-ok .stark-app { | ||
display: flex; | ||
} | ||
|
||
.stark-browser-ok .stark-loading { | ||
display: block; | ||
} | ||
|
||
.stark-preload h1 { | ||
font-size: 24px; | ||
font-weight: 400; | ||
line-height: 32px; | ||
margin: 0 0 16px; | ||
} | ||
|
||
.stark-preload { | ||
color: #000; | ||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, | ||
sans-serif; | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 26px; | ||
|
||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
box-sizing: border-box; | ||
max-width: 100%; | ||
width: 500px; | ||
overflow: hidden; | ||
border: solid 1px rgba(0, 0, 0, 0.12); | ||
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12); | ||
|
||
margin: 16px auto; | ||
border-radius: 8px; | ||
text-align: center; | ||
} | ||
|
||
.stark-preload header { | ||
padding: 16px; | ||
background: #143e74 url("/assets/stark-core/logo/stark_header_bg.png") top right no-repeat; | ||
border-radius: 2px 2px 0 0; | ||
} | ||
|
||
.stark-preload header i { | ||
margin: auto; | ||
display: block; | ||
width: 200px; | ||
height: 60px; | ||
background: url("/assets/stark-core/logo/stark_logo_transparent.svg") no-repeat; | ||
background-size: 100% 100%; | ||
} | ||
|
||
.stark-preload .content { | ||
display: block; | ||
padding: 16px; | ||
background: #fff; | ||
} | ||
|
||
.stark-preload .stark-loading-icon { | ||
margin: 0 auto 8px auto; | ||
display: block; | ||
width: 64px; | ||
height: 64px; | ||
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgeD0iMCIgeT0iMCIgdmlld0JveD0iMCAwIDUwIDUwIj48cGF0aCBmaWxsPSIjN2ZiYWUzIiBkPSJNMjUuMjUxLDYuNDYxYy0xMC4zMTgsMC0xOC42ODMsOC4zNjUtMTguNjgzLDE4LjY4M2g0LjA2OGMwLTguMDcxLDYuNTQzLTE0LjYxNSwxNC42MTUtMTQuNjE1VjYuNDYxeiI+PC9wYXRoPjwvc3ZnPg=="); | ||
/* Base64 created from SVG on this site: http://www.opinionatedgeek.com/DotNet/Tools/Base64Encode/ and from this source: | ||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" x="0" y="0" viewBox="0 0 50 50"><path fill="#7fbae3" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"></path></svg> | ||
*/ | ||
fill: currentColor; | ||
transform-origin: 50% 50%; | ||
animation: loader-spin 0.8s linear infinite; | ||
} | ||
|
||
@keyframes loader-spin { | ||
0% { | ||
transform: rotate(0); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters