forked from nukeop/nuclear
-
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.
refactor(webpack): simplify webpack config and index.html
- Loading branch information
Chazz
committed
Dec 15, 2019
1 parent
6121398
commit 69b4f8b
Showing
13 changed files
with
302 additions
and
489 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 |
---|---|---|
|
@@ -71,6 +71,7 @@ package-lock.json | |
# vscode | ||
.vscode/ | ||
tsconfig.json | ||
jsconfig.json | ||
|
||
#nvm | ||
.nvmrc |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,99 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Nuclear Music Player</title> | ||
|
||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"></link> | ||
<style type="text/css"> | ||
body { | ||
background: #282a36; | ||
} | ||
|
||
.loader-container { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background: transparent; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: -1; | ||
} | ||
|
||
.nuclear-loader { | ||
position: relative; | ||
display: flex; | ||
flex-flow: column; | ||
background: linear-gradient(45deg, #43CBFF 0%, #9708CC 100%); | ||
background-size: 200% 200%; | ||
width: 15rem; | ||
height: 15rem; | ||
border-radius: 2rem; | ||
box-shadow: 0 0 38px rgba(0,0,0,0.30), 0 0 12px rgba(0,0,0,0.22); | ||
animation: gradient-anim 2s ease-in-out infinite; | ||
} | ||
|
||
@keyframes gradient-anim { | ||
0%, 100% { | ||
background-position: 50% 50%; | ||
} | ||
|
||
25% { | ||
background-position: 0% 100%; | ||
} | ||
|
||
75% { | ||
background-position: 100% 0%; | ||
} | ||
} | ||
|
||
.nuclear-loader>span { | ||
position: absolute; | ||
width: 0; | ||
height: 0; | ||
border-top: 4rem solid #FAFAFA; | ||
border-left: 3rem solid transparent; | ||
border-right: 3rem solid transparent; | ||
} | ||
|
||
.nuclear-loader>span:nth-child(1) { | ||
right: 4.5rem; | ||
top: 3.5rem; | ||
} | ||
|
||
.nuclear-loader>span:nth-child(2) { | ||
right: 7.5rem; | ||
bottom: 3.5rem; | ||
|
||
} | ||
|
||
.nuclear-loader>span:nth-child(3) { | ||
left: 7.5rem; | ||
bottom: 3.5rem; | ||
} | ||
|
||
@keyframes loader-anim { | ||
0%, 100% { | ||
border-top: 4rem solid #FAFAFA; | ||
} | ||
|
||
50% { | ||
border-top: 4rem solid transparent; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="react-root"> | ||
<div class="loader-container"> | ||
<div class="nuclear-loader"> | ||
<span></span> | ||
<span></span> | ||
<span></span> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"></link> | ||
<% if (htmlWebpackPlugin.options.production) { %> | ||
<!-- Sentry.io error monitoring --> | ||
<script src="https://cdn.ravenjs.com/3.26.4/raven.min.js" crossorigin="anonymous"></script> | ||
<% } %> | ||
<style> | ||
body { | ||
background: #282a36; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="react-root"> | ||
<nuclear-loader /> | ||
</div> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
const template = document.createElement('template'); | ||
template.innerHTML = ` | ||
<style> | ||
@keyframes gradient-anim { | ||
0%, 100% { | ||
background-position: 50% 50%; | ||
} | ||
25% { | ||
background-position: 0% 100%; | ||
} | ||
75% { | ||
background-position: 100% 0%; | ||
} | ||
} | ||
@keyframes loader-anim { | ||
0%, 100% { | ||
border-top: 4rem solid #FAFAFA; | ||
} | ||
50% { | ||
border-top: 4rem solid transparent; | ||
} | ||
} | ||
:host { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background: transparent; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: -1; | ||
} | ||
.nuclear-loader { | ||
position: relative; | ||
display: flex; | ||
flex-flow: column; | ||
background: linear-gradient(45deg, #43CBFF 0%, #9708CC 100%); | ||
background-size: 200% 200%; | ||
width: 15rem; | ||
height: 15rem; | ||
border-radius: 2rem; | ||
box-shadow: 0 0 38px rgba(0,0,0,0.30), 0 0 12px rgba(0,0,0,0.22); | ||
animation: gradient-anim 2s ease-in-out infinite; | ||
} | ||
.nuclear-loader>span { | ||
position: absolute; | ||
width: 0; | ||
height: 0; | ||
border-top: 4rem solid #FAFAFA; | ||
border-left: 3rem solid transparent; | ||
border-right: 3rem solid transparent; | ||
} | ||
.nuclear-loader>span:nth-child(1) { | ||
right: 4.5rem; | ||
top: 3.5rem; | ||
} | ||
.nuclear-loader>span:nth-child(2) { | ||
right: 7.5rem; | ||
bottom: 3.5rem; | ||
} | ||
.nuclear-loader>span:nth-child(3) { | ||
left: 7.5rem; | ||
bottom: 3.5rem; | ||
} | ||
</style> | ||
<div class="nuclear-loader"> | ||
<span></span> | ||
<span></span> | ||
<span></span> | ||
</div>`; | ||
|
||
class NuclearLoader extends HTMLElement { | ||
constructor() { | ||
super(); | ||
this.attachShadow({mode: 'open'}); | ||
this.shadowRoot.appendChild(template.content.cloneNode(true)); | ||
} | ||
} | ||
|
||
window.customElements.define('nuclear-loader', NuclearLoader); |
Oops, something went wrong.