mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-25 05:09:49 -06:00
animate header name
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { Route, Link, Routes, BrowserRouter as Router } from 'react-router-dom'
|
||||
|
||||
import './App.css';
|
||||
import './static/css/App.css';
|
||||
import './static/css/head.scss'
|
||||
import menu from './assets/menu.svg'
|
||||
import Nav from './componets/Nav.js'
|
||||
import Socials from './componets/Socials.js'
|
||||
import Name from './componets/Name.js'
|
||||
import Home from './pages/Home.js'
|
||||
import Projects from './pages/Projects';
|
||||
import Activities from './pages/Activities';
|
||||
@@ -21,7 +23,7 @@ function App() {
|
||||
<Router>
|
||||
<div className="App">
|
||||
<div className="header">
|
||||
<a href="/"><h1>Andrew Simonson</h1></a>
|
||||
<Name />
|
||||
<img src={menu} alt="menu" id='menu' onClick={toggleMenu}/>
|
||||
<Nav id='navbar'>
|
||||
<Link to='/'>Home</Link>
|
||||
|
||||
BIN
src/assets/photos/sun.png
Normal file
BIN
src/assets/photos/sun.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
37
src/componets/Name.js
Normal file
37
src/componets/Name.js
Normal file
@@ -0,0 +1,37 @@
|
||||
export default function Name() {
|
||||
return (
|
||||
<a href="/">
|
||||
<div id="name-container">
|
||||
<div className="glitch">
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
<div className="line name">
|
||||
<h1 className="textGrad">Andrew Simonson</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ function resizer() {
|
||||
else { // mobile view
|
||||
window.onscroll = '';
|
||||
document.querySelector('.header').style.backgroundColor = '#1a1a1a';
|
||||
document.querySelector('.header > a > h1').style.fontSize = "1.5rem";
|
||||
document.querySelectorAll('.header .name h1').forEach(function(x){x.style.fontSize = "1.5rem";});
|
||||
// document.querySelector('.header > h1').style.color = "#ecebeb";
|
||||
document.querySelector(".header").style.borderBottomWidth = '3px';
|
||||
e.style.maxHeight = '0px';
|
||||
@@ -39,12 +39,11 @@ function resizer() {
|
||||
function scrollFunction() {
|
||||
if (document.body.scrollTop > 10 || document.documentElement.scrollTop > 10) {
|
||||
document.querySelector('.header').style.backgroundColor = '#1a1a1a';
|
||||
document.querySelector('.header > a > h1').style.fontSize = "1.5rem";
|
||||
// document.querySelector('.header > h1').style.color = "#a8a8a8";
|
||||
document.querySelectorAll('.header .name h1').forEach(function(x){x.style.fontSize = "1.5rem";});
|
||||
document.querySelectorAll('.navElement *').forEach(x => { x.style.paddingTop = '.3rem'; x.style.paddingBottom = '.3rem'; x.style.fontSize = '1rem' });
|
||||
} else {
|
||||
document.querySelector('.header').style.backgroundColor = 'rgba(0,0,0,0)';
|
||||
document.querySelector('.header > a > h1').style.fontSize = "2rem";
|
||||
document.querySelectorAll('.header .name h1').forEach(function(x){x.style.fontSize = "2rem";});
|
||||
// document.querySelector('.header > h1').style.color = "#ecebeb";
|
||||
document.querySelectorAll('.navElement *').forEach(x => { x.style.paddingTop = '.5rem'; x.style.paddingBottom = '.5rem'; x.style.fontSize = '1.2rem' });
|
||||
}
|
||||
|
||||
@@ -2,7 +2,22 @@
|
||||
|
||||
@font-face {
|
||||
font-family: "neon-future";
|
||||
src: url("./assets/fonts/Neon\ Future.ttf")
|
||||
src: url("../fonts/Neon\ Future.ttf")
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "starixo";
|
||||
src: url("../fonts/Starixo.otf")
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "independent";
|
||||
src: url("../fonts/INDEPENDENT.ttf")
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "sunset-club";
|
||||
src: url("../fonts/SunsetClub.otf")
|
||||
}
|
||||
|
||||
html, body {
|
||||
@@ -12,7 +27,7 @@ html, body {
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-image: url('assets/plexus.jpg');
|
||||
background-image: url('../../assets/plexus.jpg');
|
||||
/*url('https://i.pinimg.com/originals/d6/c3/ac/d6c3ac09021dbc0cda8ee27837d2c795.png')*/
|
||||
background-attachment: fixed;
|
||||
background-size: 100% auto;
|
||||
@@ -79,6 +94,16 @@ a {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.name {
|
||||
background: url("../../assets/photos/sun.png") 0/5rem no-repeat;
|
||||
background-size: contain;
|
||||
padding-left: 5.5rem;
|
||||
}
|
||||
|
||||
.textGrad {
|
||||
font-family: "sunset-club" !important;
|
||||
}
|
||||
|
||||
.navControl {
|
||||
transition: .4s;
|
||||
}
|
||||
@@ -319,7 +344,7 @@ a {
|
||||
font-family: "neon-future";
|
||||
color: #fff;
|
||||
text-shadow: 0 0 7px #fff, 0 0 10px #fff, 0 0 21px #fff, 0 0 42px #5271ff,
|
||||
0 0 82px #5271ff, 0 0 92px #5271ff, 0 0 102px #5271ff, 0 0 151px #5271ff;
|
||||
0 0 82px #5271ff, 0 0 92px #5271ff, 0 0 102px #5271ff, 0 0 151px #5271ff;
|
||||
animation: pulsate 0.11s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
@@ -337,7 +362,7 @@ a {
|
||||
padding: 2em;
|
||||
margin: 2em;
|
||||
box-shadow: 0 0 0.2rem #fff, 0 0 0.2rem #fff, 0 0 2rem #5271ff,
|
||||
0 0 0.8rem #5271ff, 0 0 2.8rem #5271ff, inset 0 0 1.3rem #5271ff;
|
||||
0 0 0.8rem #5271ff, 0 0 2.8rem #5271ff, inset 0 0 1.3rem #5271ff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
60
src/static/css/head.scss
Normal file
60
src/static/css/head.scss
Normal file
@@ -0,0 +1,60 @@
|
||||
.line {
|
||||
&:not(:first-child) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
@for $i from 1 through 10 {
|
||||
&:nth-child(#{$i}) {
|
||||
animation:
|
||||
clip 6000ms $i * -600ms linear infinite,
|
||||
glitch#{$i} 2500ms random(1000) * -1ms linear infinite;
|
||||
|
||||
@keyframes glitch#{$i} {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
96% {
|
||||
transform: translateX(0);
|
||||
color: #fff;
|
||||
}
|
||||
97% {
|
||||
transform: translateX(random(10) - 5px);
|
||||
color: #4E9A26;
|
||||
}
|
||||
98% {
|
||||
transform: translateX(random(10) - 5px);
|
||||
color: #AC1212;
|
||||
}
|
||||
99% {
|
||||
transform: translateX(random(10) - 5px);
|
||||
color: #fff;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes clip {
|
||||
0% {
|
||||
clip-path: polygon(
|
||||
0 100%,
|
||||
100% 100%,
|
||||
100% 120%,
|
||||
0 120%
|
||||
);
|
||||
}
|
||||
|
||||
100% {
|
||||
clip-path: polygon(
|
||||
0 -20%,
|
||||
100% -20%,
|
||||
100% 0%,
|
||||
0 0
|
||||
);
|
||||
}
|
||||
}
|
||||
BIN
src/static/fonts/INDEPENDENT.ttf
Normal file
BIN
src/static/fonts/INDEPENDENT.ttf
Normal file
Binary file not shown.
BIN
src/static/fonts/Starixo.otf
Executable file
BIN
src/static/fonts/Starixo.otf
Executable file
Binary file not shown.
BIN
src/static/fonts/SunsetClub.otf
Normal file
BIN
src/static/fonts/SunsetClub.otf
Normal file
Binary file not shown.
Reference in New Issue
Block a user