kitamuradev / sample-developer-portfolio Goto Github PK
View Code? Open in Web Editor NEWSample Developer Portfolio
Home Page: https://sample-developer-portfolio.vercel.app
Sample Developer Portfolio
Home Page: https://sample-developer-portfolio.vercel.app
<style is:global>
:root {
--color-primary: #0EA5E9;
--color-background-body: #0B1121;
--color-background-workbox: #112240;
--color-section-line: #233554;
--color-section-headtext: #CCD6F6;
--color-basetext: #8892B0;
}
html {
font-size: 100%;
scroll-behavior: smooth;
}
body {
background-color: var(--color-background-body);
color: var(--color-basetext);
}
</style>
$breakpoints: (
'sm': 'screen and (width <= 520px)', // 520px以下(520pxも含む)
'md': 'screen and (width <= 768px)', // 768px以下(768pxも含む)
) !default;
@mixin mq($breakpoint) {
@media #{map-get($breakpoints, $breakpoint)} {
@content;
}
}
// example - rem(24) => 1.5rem
@function rem($fontSize) {
@return calc($fontSize / 16) * 1rem;
}
// hover wrapper
@mixin hover {
@media (hover: hover) and (pointer: fine) {
@content;
}
}
// line height
$lh_sm: 1.4 !default;
$lh_md: 1.5 !default;
$lh_lg: 1.6 !default;
$lh_xl: 1.7 !default;
$lh_2xl: 1.8 !default;
// font size
// letter spacing
let prevScrollPos = window.pageYOffset;
window.addEventListener("scroll", function() {
let currentScrollPos = window.pageYOffset;
if (prevScrollPos > currentScrollPos) {
// 上にスクロールしている場合、ヘッダーを表示する
document.querySelector("header").style.top = "0";
} else {
// 下にスクロールしている場合、ヘッダーを非表示にする
document.querySelector("header").style.top = "-100px";
}
prevScrollPos = currentScrollPos;
});
基本方針は lottie web
に ローカルのjsonファイル を食わせる
アニメーション アセット
ローディング中は画面スクロールさせない実装
window.addEventListener("load", () => {
document.body.style.overflow = "hidden";
setTimeout(() => {
const loader = document.querySelector(".loader");
loader.style.display = "none";
document.body.style.overflow = "visible";
}, 3800);
});
document.querySelector("#content").addEventListener("click", () => {
document.querySelector('.header__menu__btn').classList.remove("is-active");
document.querySelector('.header__menu__aside').classList.remove("is-active");
document.body.classList.remove("blur");
});
gsap
.timeline({
delay: 3.8,
})
.from(".fade-in", {
opacity: 0,
y: 10,
duration: 0.5,
ease: "power2.inOut",
stagger: 0.2,
});
:root {
--layer-1: 100;
--layer-2: 200;
--layer-3: 300;
}
.header {
z-index: var(--layer-1);
}
.modal {
z-index: var(--layer-3);
}
.popup {
z-index: var(--layer-2);
}
理由
以下のバグを修正する
transform: translate(0px, 0px)
が付与されてしまうことが原因A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.