Skip to content

Commit

Permalink
Made the website.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsachdeva7 committed Jan 15, 2024
0 parents commit 31315c7
Show file tree
Hide file tree
Showing 29 changed files with 203 additions and 0 deletions.
Binary file added fonts/Inter-VariableFont_slnt,wght.ttf
Binary file not shown.
Binary file added images/100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/books.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bulb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/camera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/china.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globewmeridians.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/industrialdesign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/massage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/meche.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/peace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pfp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/philippines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/rocket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/temporary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tennis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/weightlifting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/womancook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/png" href="images/favicon.png">
<title>hi, i'm jugs💯</title>
<link rel="stylesheet" href="style.css">
<script src="index.js"></script>
</head>
<body>
<div class="center-vert center-hor">
<!-- <div class="icon-container">
<div class="icon" style="background-image: url('images/globe.png');"></div>
<div class="icon" style="background-image: url('images/books.png');"></div>
<div class="icon" style="background-image: url('images/bulb.png');"></div>
<div class="icon" style="background-image: url('images/massage.png');"></div>
</div> -->
<div id="circle-wrapper">
<div id="circle">
<div class="pfp"></div>
<div class="slide" id="images/globe.png" style="display: none">
<p>i'm from the <span style="font-weight: bold">philippines</span> <img src="images/philippines.png" height="25px"><br><br>
i was born in manila, and when <br> i was 1, my family moved to <br> <span style="font-weight: bold">shanghai, china</span> <img src="images/china.png" height="25px"> <br><br> after 9 years there, we moved<br>back to the philippines
and<br> have lived there since <img src="images/home.png" height="25px"></p>
</div>
<div class="slide" id="images/books.png" style="display:none">
<p>i'm a <span style="font-weight: bold">mech e</span> major <img src="images/meche.png" height="25px"><br>but i'm likely switching to <span style="font-weight: bold">cs</span> <img src="images/cs.png" height="25px"><br><br>coding comes way more naturally <br>to me + i love being able to quickly experiment and make things <img src="images/rocket.png" height="25px">
<br><br>i also intend on minoring in<br><span style="font-weight: bold">industrial design</span> <img src="images/industrialdesign.png" height="25px">
</p>
</div>
<div class="slide" id="images/bulb.png" style="display:none">
<p>i want to make the energy<br>transition more <span style="font-weight: bold">inclusive</span> <img src="images/globewmeridians.png" height="25px"><br><br>in high school, my ngo and i<br>worked with an <span style="font-weight: bold">indigenous filipino tribe</span> to deploy <span style="font-weight: bold">solar power</span> <img src="images/sun.png" height="25px"><br><br>we <span style="font-weight: bold">can't</span> leave off-the-grid communities behind <img src="images/cant.png" height="25px"></p>
</div>
<div class="slide" id="images/massage.png" style="display:none">
<p>in my free time, i like to play<br>tennis <img src="images/tennis.png" height="25px"> work out <img src="images/weightlifting.png" height="25px"> and <br>work on my mom's business <img src="images/womancook.png" height="25px"><br><br>i also love listening to music—<br>frank ocean and kid cudi <img src="images/top.png" height="25px"></p>
</div>
</div>
</div>
<p class="hi">
hi, i'm <span class="bold">jugs</span> <img src="images/100.png" height="40px">
</p>
</div>
</body>
</html>
61 changes: 61 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* @param {string[]} icons
*/
function circle(icons) {
const ICON_DIAMETER = 125;
const BONUS_OFFSET = 90;
const angle = 360 / icons.length;
const pfp = document.querySelector(".pfp")

const container = document.getElementById('circle');
const offsetToParentCenter = parseInt(container.offsetWidth / 2); // assumes parent is square
const radius = offsetToParentCenter + BONUS_OFFSET;
const totalOffset = offsetToParentCenter - (ICON_DIAMETER / 2);
for (let i = 1; i <= icons.length; ++i) {
const iconSrc = icons[i - 1];

if (!iconSrc) continue;

const icon = document.createElement('div');

const slide = document.getElementById(iconSrc)

icon.addEventListener('mouseenter', () => {
icon.style.boxShadow = '0px 0px 100px rgb(120,120,120,0.5)';
pfp.style.display = "none";
slide.style.display = "flex";
});

icon.addEventListener('mouseleave', () => {
icon.style.boxShadow = '';
pfp.style.display = "block";
slide.style.display = "none";
});

icon.className = 'icon';
icon.style.position = 'absolute';
icon.style.width = ICON_DIAMETER + 'px';
icon.style.height = ICON_DIAMETER + 'px';
icon.style.backgroundImage = `url('${iconSrc}')`;
const y = Math.sin((angle * i) * (Math.PI / 180)) * radius;
const x = Math.cos((angle * i) * (Math.PI / 180)) * radius;
icon.style.top = (y + totalOffset).toString() + "px";
icon.style.left = (x + totalOffset).toString() + "px";
container.appendChild(icon);
}

const wrapper = document.getElementById('circle-wrapper');
const maxIconDistance = (radius * 2) + ICON_DIAMETER;
wrapper.style.width = maxIconDistance + 'px';
wrapper.style.height = maxIconDistance + 'px';
}

const icons = [,,,,,'images/globe.png','images/books.png', 'images/bulb.png', 'images/massage.png',,];

window.addEventListener('DOMContentLoaded', () => {
circle(icons);
});

window.addEventListener('resize', () => {
circle(icons);
});
99 changes: 99 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
@font-face {
src: url(fonts/Inter-VariableFont_slnt\,wght.ttf);
font-family: "Inter";
}

body {
background-color: rgb(27, 27, 27);
margin: 0;
}

.center-hor {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
}

.center-vert {
display: flex;
flex-direction: column;
justify-content: center;
height: 100vh;
}

.icon-container {
display: flex;
gap: 20px;
}

#circle-wrapper {
display: flex;
align-items: center;
justify-content: center;
}

#circle {
position: relative;
width: 450px;
height: 450px;
}

.icon {
background-size: 60%;
border-radius: 50%;
background-color: rgb(47, 47, 47);
background-position: center center;
background-repeat: no-repeat;
position: absolute;
transition: box-shadow 0.5s ease;
}

#circle:nth-child(1):hover{
animation-name: glow;
animation-duration: 1.0s;
}

/* .icon:nth-child(1) { top: 50%; left: 0%; transform: translate(300%, -100%); }
.icon:nth-child(2) { top: 50%; left: 0%; transform: translate(400%, -235%); }
.icon:nth-child(3) { top: 50%; right: 0%; transform: translate(-400%, -235%); }
.icon:nth-child(4) { top: 50%; right: 0%; transform: translate(-300%, -100%); } */

.pfp {
width: 450px;
height: 450px;
background-image: url("images/pfp.jpg");
background-size: cover;
border-radius: 50%;
overflow: hidden;
margin-top: auto;
position: relative;
}

.slide {
width: 450px;
height: 450px;
border-radius: 50%;
background-color: rgb(47, 47, 47);
overflow: hidden;
text-align: center;
display:flex;
flex-direction:column;
justify-content: center;
font-size: 25px;
font-weight: 500;
color: white;
font-family: Inter;
}

.hi {
font-size: 45px;
font-family: "Inter";
color: white;
font-weight: 500;
margin: -125px 0 0 0;
}

.bold {
font-weight: 700;
}

0 comments on commit 31315c7

Please sign in to comment.