-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77faa29
commit 07cb10d
Showing
5 changed files
with
246 additions
and
28 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
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,38 @@ | ||
|
||
|
||
// Twinkling Star Animation | ||
// https://codepen.io/cliffgurney/pen/GNpzdx | ||
// | ||
|
||
// Amount of stars | ||
// function createStars(i) { | ||
// var i = i; | ||
// while(i){ | ||
// drawStars(); | ||
// i-=1; | ||
// } | ||
// } | ||
// // Create Stars | ||
// function drawStars(){ | ||
// var tmpStar = document.createElement("figure"); | ||
// tmpStar.className = "star"; | ||
// tmpStar.style.top = 100*Math.random()+"%"; | ||
// tmpStar.style.left = 100*Math.random()+"%"; | ||
// document.getElementById("sky").appendChild(tmpStar); | ||
// } | ||
// // Animate Stars | ||
// function selectStars() { | ||
// stars = document.querySelectorAll(".star"); | ||
// console.log(stars); | ||
// } | ||
// function animateStars() { | ||
// Array.prototype.forEach.call(stars, function(el, i){ | ||
// TweenMax.to(el, Math.random() * 0.4 + 0.4, {opacity: Math.random(), onComplete: animateStars}); | ||
// }); | ||
// } | ||
|
||
// createStars(500); | ||
// selectStars(); | ||
// animateStars(); | ||
|
||
|
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,180 @@ | ||
#sun-container { | ||
left: 15%; | ||
top: -250px; | ||
position: absolute; | ||
width: 100px; | ||
height: 100px; | ||
z-index: 100; | ||
opacity: 80%; | ||
animation: rotateSun 15s infinite alternate ; | ||
} | ||
|
||
@keyframes rotateSun { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(5deg); | ||
} | ||
} | ||
|
||
#sun { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 300px; | ||
height: 300px; | ||
background-color: #c1e8da; | ||
opacity: 30%; | ||
border-radius: 50%; | ||
transform: translate(-50%, -50%); | ||
z-index: 1; | ||
} | ||
|
||
|
||
#sun2 { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 500px; | ||
height: 500px; | ||
background-color: #c1e8da; | ||
opacity: 15%; | ||
border-radius: 50%; | ||
transform: translate(-50%, -50%); | ||
z-index: 1; | ||
} | ||
|
||
#sun3 { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 700px; | ||
height: 700px; | ||
background-color: #c1e8da; | ||
opacity: 10%; | ||
border-radius: 50%; | ||
transform: translate(-50%, -50%); | ||
z-index: 1; | ||
} | ||
|
||
/* Start of First Ray Styling (and sub-rays) */ | ||
|
||
|
||
#ray { | ||
position: absolute; | ||
z-index: -1000; | ||
top: 50%; | ||
left: -450%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform-origin: bottom left; | ||
transform: rotate(deg); | ||
background: linear-gradient(to top, transparent 50%, #c1e8da); | ||
opacity: 20%; | ||
} | ||
|
||
#ray2 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: 50%; | ||
left: -450%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform-origin: bottom left; | ||
transform: rotate(deg); | ||
background: linear-gradient(to top, transparent 60%, #c1e8da); | ||
opacity: 5%; | ||
} | ||
|
||
#ray3 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: 50%; | ||
left: -450%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 55%, 100% 55%); | ||
/* animation: animateClipPath 3s alternate 2; */ | ||
/* animation-iteration-count: 4; */ | ||
transform-origin: bottom left; | ||
/* transform: rotate(deg); */ | ||
background: linear-gradient(to top, transparent 80%, #c1e8da); | ||
opacity: 10%; | ||
} | ||
|
||
|
||
/* Start of Second Ray Styling (and sub-rays) */ | ||
#ray4 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: -500%; | ||
left: 1800%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform-origin: bottom left; | ||
transform: rotate(-45deg); | ||
background: linear-gradient(to top, transparent 50%, #c1e8da); | ||
opacity: 14%; | ||
} | ||
|
||
#ray5 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: -500%; | ||
left: 1800%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 55%, 100% 63%); | ||
transform-origin: bottom left; | ||
transform: rotate(-45deg); | ||
background: linear-gradient(to top, transparent 50%, #c1e8da); | ||
opacity: 10%; | ||
} | ||
|
||
#ray6 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: -500%; | ||
left: 1800%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform-origin: bottom left; | ||
transform: rotate(-45deg); | ||
background: linear-gradient(to top, transparent 50%, #c1e8da); | ||
opacity: 5%; | ||
} | ||
|
||
/* Start of Third Ray Styling (and sub-rays) */ | ||
|
||
#ray7 { | ||
position: absolute; | ||
z-index: -1000; | ||
top: -1400%; | ||
left: -2000%; | ||
|
||
width: 1000px; | ||
height: 3000px; | ||
|
||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform-origin: bottom left; | ||
transform: rotate(40deg); | ||
background: linear-gradient(to top, transparent 50%, #c1e8da); | ||
opacity: 20%; | ||
} |
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,26 @@ | ||
import React from "react"; | ||
import "./sun.css"; | ||
|
||
function Sun() { | ||
return ( | ||
<div id="sun-container"> | ||
<div id="sun"></div> | ||
<div id="sun2"></div> | ||
|
||
<div id="sun3"></div> | ||
<div id="ray"></div> | ||
<div id="ray2"></div> | ||
<div id="ray3"></div> | ||
|
||
<div id="ray4"></div> | ||
<div id="ray5"></div> | ||
<div id="ray6"></div> | ||
|
||
<div id="ray7"></div> | ||
<div id="ray8"></div> | ||
<div id="ray9"></div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Sun; |