add alt favicon and footer controller
This commit is contained in:
parent
f7b7690086
commit
d61f2c5975
BIN
images/favicon2.ico
Normal file
BIN
images/favicon2.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 797 B |
@ -10,7 +10,8 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
<title>Tben Design V3</title>
|
<title>Tben Design V3</title>
|
||||||
<meta name="description" content="Web/Graphic/Motion Designer, UI UX Designer, Frontend Web Developer">
|
<meta name="description" content="Web/Graphic/Motion Designer, UI UX Designer, Frontend Web Developer">
|
||||||
<link rel="shortcut icon" href="https://www.dropbox.com/s/fftv7ewhi13tisa/favicon.ico?dl=0" type="image/x-icon">
|
<link rel="shortcut icon" href="https://benjamintoby.github.io/personal_site/images/favicon2.ico"
|
||||||
|
type="image/x-icon">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800|Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800|Material+Icons" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
@ -170,7 +171,7 @@
|
|||||||
|
|
||||||
<!-- #################################################################################-- Contact Me -->
|
<!-- #################################################################################-- Contact Me -->
|
||||||
|
|
||||||
<section class="my-work-section">
|
<section class="contact-section">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="scroll-into-view-content">So. Let's have a chat</h2>
|
<h2 class="scroll-into-view-content">So. Let's have a chat</h2>
|
||||||
<p class="scroll-into-view-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
<p class="scroll-into-view-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
||||||
@ -212,6 +213,8 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="contact-section-controller"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
29
main.css
29
main.css
@ -507,7 +507,7 @@ input:focus {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*############################################################# -- About Me -- */
|
/*############################################################# -- My Specialties -- */
|
||||||
|
|
||||||
.my-specialties-section {
|
.my-specialties-section {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@ -554,6 +554,33 @@ input:focus {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*############################################################# -- Contact Me -- */
|
||||||
|
|
||||||
|
.contact-section {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-section > div:nth-of-type(2) {
|
||||||
|
background-color: var(--sec-color-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-section-controller {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
103
scripts/main.js
103
scripts/main.js
@ -13,10 +13,12 @@ const mainCTA = document.querySelector(".main-cta-button");
|
|||||||
const allHeaderElements = document.querySelectorAll("header *");
|
const allHeaderElements = document.querySelectorAll("header *");
|
||||||
const mountains = document.querySelectorAll("#mountains");
|
const mountains = document.querySelectorAll("#mountains");
|
||||||
const clouds = document.querySelectorAll("#clouds");
|
const clouds = document.querySelectorAll("#clouds");
|
||||||
|
const footerController = document.querySelector(".contact-section-controller");
|
||||||
|
const header = document.querySelector("header");
|
||||||
|
|
||||||
|
|
||||||
function intro() {
|
function intro() {
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: heroTextSection,
|
targets: heroTextSection,
|
||||||
width: [0, "50%"],
|
width: [0, "50%"],
|
||||||
@ -25,17 +27,17 @@ function intro() {
|
|||||||
duration: 1500,
|
duration: 1500,
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: allHeaderElements,
|
targets: allHeaderElements,
|
||||||
translateX: [-20, 0],
|
translateX: [-20, 0],
|
||||||
// rotateY: [50, 0],
|
// rotateY: [50, 0],
|
||||||
opacity: [0, 1],
|
opacity: [0, 1],
|
||||||
easing: "easeOutQuad",
|
easing: "easeOutQuad",
|
||||||
duration: 800,
|
duration: 800,
|
||||||
delay: anime.stagger(100, {start: 1000}/* , {easing: 'easeOutQuad'} */),
|
delay: anime.stagger(100, { start: 1000 }/* , {easing: 'easeOutQuad'} */),
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: myBigTextBlock,
|
targets: myBigTextBlock,
|
||||||
translateY: [100, 0],
|
translateY: [100, 0],
|
||||||
@ -44,7 +46,7 @@ function intro() {
|
|||||||
duration: 1200,
|
duration: 1200,
|
||||||
delay: 2000,
|
delay: 2000,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: myImageBlock,
|
targets: myImageBlock,
|
||||||
translateY: [100, 0],
|
translateY: [100, 0],
|
||||||
@ -53,7 +55,7 @@ function intro() {
|
|||||||
duration: 1500,
|
duration: 1500,
|
||||||
delay: 2200,
|
delay: 2200,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mainTextBlock,
|
targets: mainTextBlock,
|
||||||
translateX: [-50, 0],
|
translateX: [-50, 0],
|
||||||
@ -62,7 +64,7 @@ function intro() {
|
|||||||
duration: 1200,
|
duration: 1200,
|
||||||
delay: 2500,
|
delay: 2500,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mainCTA,
|
targets: mainCTA,
|
||||||
translateX: [-50, 0],
|
translateX: [-50, 0],
|
||||||
@ -71,7 +73,7 @@ function intro() {
|
|||||||
duration: 1200,
|
duration: 1200,
|
||||||
delay: 2600,
|
delay: 2600,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mountains,
|
targets: mountains,
|
||||||
translateY: [200, 0],
|
translateY: [200, 0],
|
||||||
@ -80,7 +82,7 @@ function intro() {
|
|||||||
duration: 1500,
|
duration: 1500,
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: clouds,
|
targets: clouds,
|
||||||
opacity: [0.2, 1],
|
opacity: [0.2, 1],
|
||||||
@ -88,61 +90,61 @@ function intro() {
|
|||||||
duration: 1200,
|
duration: 1200,
|
||||||
delay: 800,
|
delay: 800,
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intro Initialization
|
// Intro Initialization
|
||||||
|
|
||||||
function introInit() {
|
function introInit() {
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: heroTextSection,
|
targets: heroTextSection,
|
||||||
width: [0],
|
width: [0],
|
||||||
translateX: 200,
|
translateX: 200,
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: allHeaderElements,
|
targets: allHeaderElements,
|
||||||
translateX: [-20],
|
translateX: [-20],
|
||||||
opacity: [0],
|
opacity: [0],
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: myBigTextBlock,
|
targets: myBigTextBlock,
|
||||||
translateY: [100],
|
translateY: [100],
|
||||||
opacity: [0],
|
opacity: [0],
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: myImageBlock,
|
targets: myImageBlock,
|
||||||
translateY: [100],
|
translateY: [100],
|
||||||
opacity: [0],
|
opacity: [0],
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mainTextBlock,
|
targets: mainTextBlock,
|
||||||
translateX: [-50],
|
translateX: [-50],
|
||||||
opacity: [0],
|
opacity: [0],
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mainCTA,
|
targets: mainCTA,
|
||||||
translateX: [-50],
|
translateX: [-50],
|
||||||
opacity: [0],
|
opacity: [0],
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: mountains,
|
targets: mountains,
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
introInit();
|
introInit();
|
||||||
@ -161,9 +163,9 @@ var windowRect = {
|
|||||||
var headerObserver = new IntersectionObserver(changeHeader, windowRect);
|
var headerObserver = new IntersectionObserver(changeHeader, windowRect);
|
||||||
|
|
||||||
function changeHeader(entry) {
|
function changeHeader(entry) {
|
||||||
|
|
||||||
if(entry[0].isIntersecting) {
|
if (entry[0].isIntersecting) {
|
||||||
document.querySelector("header").className = "none";
|
header.className = "none";
|
||||||
anime({
|
anime({
|
||||||
targets: "header img",
|
targets: "header img",
|
||||||
width: 40,
|
width: 40,
|
||||||
@ -172,16 +174,16 @@ function changeHeader(entry) {
|
|||||||
duration: 400,
|
duration: 400,
|
||||||
easing: "easeOutCubic",
|
easing: "easeOutCubic",
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: "header > a > div",
|
targets: "header > a > div",
|
||||||
translateX: 0,
|
translateX: 0,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.querySelector("header").classList.add("scrolled");
|
header.classList.add("scrolled");
|
||||||
anime({
|
anime({
|
||||||
targets: "header img",
|
targets: "header img",
|
||||||
width: 60,
|
width: 60,
|
||||||
@ -190,7 +192,7 @@ function changeHeader(entry) {
|
|||||||
duration: 400,
|
duration: 400,
|
||||||
easing: "easeOutCubic",
|
easing: "easeOutCubic",
|
||||||
});
|
});
|
||||||
|
|
||||||
anime({
|
anime({
|
||||||
targets: "header > a > div",
|
targets: "header > a > div",
|
||||||
translateX: -50,
|
translateX: -50,
|
||||||
@ -211,7 +213,7 @@ setTimeout(() => {
|
|||||||
|
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
setTimeout(() => {intro();}, 1000);
|
setTimeout(() => { intro(); }, 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -233,21 +235,22 @@ var windowRect2 = {
|
|||||||
var sectionsIO = new IntersectionObserver(sectionsObserverFn, windowRect2);
|
var sectionsIO = new IntersectionObserver(sectionsObserverFn, windowRect2);
|
||||||
|
|
||||||
function sectionsObserverFn(entries) {
|
function sectionsObserverFn(entries) {
|
||||||
|
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
entry.target.classList.add("scrolled-into-view");
|
entry.target.classList.add("scrolled-into-view");
|
||||||
|
headerObserver.observe(footerController);
|
||||||
// anime({
|
|
||||||
// targets: contents[entry.target.firstElementChild],
|
// anime({
|
||||||
// width: [0, "50%"],
|
// targets: contents[entry.target.firstElementChild],
|
||||||
// easing: "cubicBezier( 0.93, 0, 0.09, 1 )",
|
// width: [0, "50%"],
|
||||||
// opacity: [0, 1],
|
// easing: "cubicBezier( 0.93, 0, 0.09, 1 )",
|
||||||
// duration: 1200,
|
// opacity: [0, 1],
|
||||||
// });
|
// duration: 1200,
|
||||||
}
|
// });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -265,13 +268,13 @@ const contents = document.querySelectorAll(".scroll-into-view-content");
|
|||||||
const contentsIO = new IntersectionObserver(contentsObserverFn, windowRect2);
|
const contentsIO = new IntersectionObserver(contentsObserverFn, windowRect2);
|
||||||
|
|
||||||
function contentsObserverFn(entries) {
|
function contentsObserverFn(entries) {
|
||||||
|
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
entry.target.classList.add("scrolled-into-view-content");
|
entry.target.classList.add("scrolled-into-view-content");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,22 +296,22 @@ const myToolsIconsAnimated = anime({
|
|||||||
targets: myToolsIcons,
|
targets: myToolsIcons,
|
||||||
translateX: [-20, 0],
|
translateX: [-20, 0],
|
||||||
translateY: [-20, 0],
|
translateY: [-20, 0],
|
||||||
// rotateY: [50, 0],
|
// rotateY: [50, 0],
|
||||||
opacity: [0, 1],
|
opacity: [0, 1],
|
||||||
easing: "easeOutQuad",
|
easing: "easeOutQuad",
|
||||||
duration: 1200,
|
duration: 1200,
|
||||||
delay: anime.stagger(150, {start: 200}),
|
delay: anime.stagger(150, { start: 200 }),
|
||||||
loop: false,
|
loop: false,
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
complete: function() { myToolsIconsAnimated.remove(myToolsIcons); },
|
complete: function () { myToolsIconsAnimated.remove(myToolsIcons); },
|
||||||
});
|
});
|
||||||
|
|
||||||
function myToolsFn(entries) {
|
function myToolsFn(entries) {
|
||||||
|
|
||||||
if(entries[0].isIntersecting) {
|
if (entries[0].isIntersecting) {
|
||||||
myToolsIconsAnimated.play();
|
myToolsIconsAnimated.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -326,6 +329,8 @@ myToolsIO.observe(myToolsParagraph);
|
|||||||
|
|
||||||
//############################################# -- Contact Form
|
//############################################# -- Contact Form
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//var form = document.getElementById("my-form");
|
//var form = document.getElementById("my-form");
|
||||||
//
|
//
|
||||||
// async function handleSubmit(event) {
|
// async function handleSubmit(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user