Skip to content

Commit

Permalink
Fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
agarun committed May 30, 2024
1 parent ddf05c7 commit dfbea09
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
4 changes: 4 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

/* `Globe` components */
.globe-container {
display: flex;
flex-direction: column;
height: 100lvh;

& > div {
position: absolute;
top: 0;
Expand Down
11 changes: 7 additions & 4 deletions src/lib/fx/noise.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ function Noise() {
currentCanvas.width,
currentCanvas.height
);
const buffer = new Uint32Array(imageData.data.buffer);
for (let i = 0; i < buffer.length; i++) {
const data = imageData.data; // `Uint8ClampedArray`
for (let i = 0; i < data.length; i += 4) {
const gray = 230 + Math.random() * 25; // Gray values closer to white
const alpha = 0.25 * 255; // Adjust opacity
buffer[i] = ((alpha << 24) | (gray << 16) | (gray << 8) | gray) >>> 0;
data[i] = gray; // Red
data[i + 1] = gray; // Green
data[i + 2] = gray; // Blue
data[i + 3] = alpha; // Alpha
}
context.putImageData(imageData, 0, 0);
}
Expand All @@ -38,7 +41,7 @@ function Noise() {
<div
id="noise"
className={`will-change-transform mix-blend-multiply
absolute z-50 top-0 left-0 pointer-events-none
fixed z-50 top-0 left-0 pointer-events-none
w-full h-lvh
transition-opacity duration-500 opacity-100`}
style={{
Expand Down
29 changes: 12 additions & 17 deletions src/lib/globes/globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,14 @@ function Globe({ albums }: { albums: Array<Album> }) {
navigator.userAgent.toLowerCase().includes('mac');

return (
<section className="globe-container">
<section
className={`globe-container
py-64
md:px-24
lg:px-36
2xl:px-64
`}
>
<GlobeGL
ref={globeEl}
width={width}
Expand Down Expand Up @@ -413,14 +420,8 @@ function Globe({ albums }: { albums: Array<Album> }) {
customThreeObjectUpdate={customThreeObjectUpdate}
/>

<section
className={`
content-container text-3xl
my-36 m-12
md:mt-48 md:ml-36 md:m-24
2xl:ml-64`}
>
<h1 className="font-bold my-20 text-center md:text-left">
<section className={`content-container grow text-3xl`}>
<h1 className="font-bold mb-20 text-center md:text-left">
Aaron Agarunov
</h1>

Expand Down Expand Up @@ -452,15 +453,9 @@ function Globe({ albums }: { albums: Array<Album> }) {
</ul>
</section>

<footer
className={`
tracking-tight content
m-24
md:mr-36
2xl:mr-64`}
>
<footer className={`tracking-tight content`}>
<div className="text-3xl text-center md:text-right">
<p className="m-0 p-0 mt-1">&copy; {new Date().getFullYear()}</p>
<p className="m-0 p-0">&copy; {new Date().getFullYear()}</p>
</div>
</footer>
</section>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Nav: React.FC<{
<Link
href="/about"
prefetch={false}
className="flex gap-1 items-center text-2xl sm:text-sm text-gray-400 hover:text-gray-500"
className="flex gap-1 items-center text-2xl sm:leading-5 sm:text-[15px] text-gray-400 hover:text-gray-500"
>
<InfoIcon />
About
Expand All @@ -49,7 +49,7 @@ export const Nav: React.FC<{
<Link
href="/about"
prefetch={false}
className="flex gap-1 items-center text-lg sm:text-sm text-gray-400 hover:text-gray-500"
className="flex gap-1 items-center text-2xl sm:leading-5 sm:text-[15px] text-gray-400 hover:text-gray-500"
>
<SocialIcon />
Socials
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const config: Config = {
extend: {
spacing: {
'2.5': '0.875rem'
},
screens: {
'3xl': '2000px'
}
}
},
Expand Down

0 comments on commit dfbea09

Please sign in to comment.