Skip to content

Commit b62e642

Browse files
committed
'roy'
1 parent d5cc0e7 commit b62e642

File tree

5 files changed

+218
-51
lines changed

5 files changed

+218
-51
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/test.html

assets/css/style.css

+102-12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body{
1212
overflow: overlay;
1313
}
1414
*::-webkit-scrollbar{
15-
height: 10px;
15+
height: 0px;
1616
width: 3px;
1717
}
1818
*::-webkit-scrollbar-thumb{
@@ -29,12 +29,11 @@ body{
2929
.header{
3030
position: fixed;
3131
top: 0px;
32-
width: 50%;
32+
width: 100%;
3333
height: 100px;
3434
display: flex;
3535
align-items: center;
36-
justify-content: space-between;
37-
padding: 0 25%;
36+
justify-content: center;
3837
background-color: #6116bd;
3938
z-index: 1;
4039
}
@@ -48,6 +47,7 @@ body{
4847
border-bottom: 3px solid transparent;
4948
-webkit-user-select: none;
5049
user-select: none;
50+
margin: 1vw;
5151
}
5252

5353
.cont{
@@ -87,6 +87,7 @@ body{
8787
.subcont{
8888
height: calc(100vh - 100px);
8989
display: inline-block;
90+
position: relative;
9091
padding-top: 100px;
9192
}
9293
.cards-cont{
@@ -99,18 +100,26 @@ body{
99100
grid-template-rows: 1fr 1fr;
100101
align-items: center;
101102
justify-content: center;
103+
perspective: 2000px;
104+
}
105+
.in{
106+
background-color: transparent !important
102107
}
103108

104109
.card{
110+
position: relative;
105111
height: 250px;
106112
width: 450px;
107-
background-color: #17162D;
108-
border-radius: 10px;
109113
margin: 0 30px;
110-
box-shadow: 50px 50px 70px rgba(0, 0, 0, 0.268);
111114
padding: 30px;
112115
box-sizing: border-box;
113-
color: white;
116+
transition: 200ms scale ease-in;
117+
transform-style: preserve-3d;
118+
-webkit-user-select: none;
119+
user-select: none;
120+
}
121+
.card:hover{
122+
scale: 1.05;
114123
}
115124

116125
.card-title{
@@ -134,27 +143,77 @@ body{
134143
width: 100%;
135144
height: 40px;
136145
grid-template-columns: 1fr 1fr 3fr 1fr 1fr;
146+
justify-items: center;
147+
}
148+
149+
150+
.card-back, .card-front{
151+
border-radius: 10px;
152+
background-color: #ab79c0;
153+
box-sizing: border-box;
154+
padding: 30px;
155+
height: 100%;
156+
width: 100%;
157+
position: absolute;
158+
top: 0;
159+
left: 0;
160+
}
161+
.card-front{
162+
transform: translateZ(1px);
137163
}
164+
.card-back{
165+
transform: rotateY(-180deg);
166+
}
167+
.card-description{
168+
white-space: pre-line;
169+
}
170+
138171
a{
139-
color: white;
172+
color: black;
140173
text-decoration: none;
141174
}
142-
.ico{
175+
.ico, .bi{
143176
opacity: 0.8;
144177
}
145-
.ico:hover{
178+
.ico:hover, .bi:hover{
146179
opacity: 1;
147180
}
148-
.ico::before, .ico{
181+
.ico::before, .ico, .bi::before{
149182
margin-right: 5px;
150183
font-size: 40px;
151184
cursor: pointer;
152185
}
186+
187+
.rl-btn{
188+
position: absolute;
189+
height: 60px;
190+
width: 60px;
191+
margin: 20px;
192+
top: calc(150vh);
193+
opacity: 0.04;
194+
filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.56));
195+
transition: 150ms opacity ease-in;
196+
}
197+
.l{
198+
display: none;
199+
}
200+
.r{
201+
right: 0;
202+
}
203+
.rl-btn::before{
204+
font-size: 60px;
205+
color: white;
206+
}
207+
.rl-btn:hover{
208+
opacity: 0.8
209+
}
210+
153211
#work{
154212
background-color: #7f349f;
155213
width: 100vw;
156214
overflow-y: hidden;
157215
overflow-x: overlay;
216+
scroll-behavior: smooth;
158217
}
159218
#edu{
160219
background-color: #9d5281;
@@ -223,4 +282,35 @@ a{
223282
100%{
224283
opacity: 1;
225284
}
285+
}
286+
287+
@keyframes flipLeft {
288+
100%{
289+
transform: rotateY(-180deg)
290+
}
291+
}
292+
293+
@keyframes flipRight {
294+
0%{
295+
transform: rotateY(-180deg);
296+
}
297+
100%{
298+
transform: rotateY(0deg);
299+
}
300+
301+
}
302+
303+
304+
@media (max-width: 550px) {
305+
.headerBtns{
306+
font-size: small;
307+
height: 15px;
308+
}
309+
.cards-cont{
310+
grid-template-rows: 1fr 1fr 1fr;
311+
}
312+
.card{
313+
width: 380px;
314+
height: 200px;
315+
}
226316
}

assets/scripts/script.js

+108-37
Original file line numberDiff line numberDiff line change
@@ -79,47 +79,118 @@ fetch("https://api.github.com/users/actuallyroy/starred")
7979
.then(response => response.json())
8080
.then(data => {
8181
data.forEach(item => {
82+
let projT = undefined
83+
if (item.topics.includes("website"))
84+
projT = 'website'
85+
if (item.topics.includes("android"))
86+
projT = 'android'
87+
if (item.topics.includes("windows"))
88+
projT = 'windows'
89+
if (item.topics.includes('console'))
90+
projT = 'console'
91+
let des = ""
92+
if (item.description)
93+
des = item.description
8294
if (item.owner.login === 'actuallyroy') {
8395
item.topics.length = 3
8496
document.getElementById("cardsCont").innerHTML += `<div class="card">
85-
<div class="card-title">${item.name}</div>
86-
<div class="card-tags-cont">
87-
${item.topics.map(topic => {
88-
return `<span class="card-tags">${topic}</span>`
97+
<div class="card-front">
98+
<div class="card-title">${item.name}</div>
99+
<div class="card-tags-cont">
100+
${item.topics.map((topic) => {
101+
return `<span class="card-tags">${topic}</span>`;
89102
}).join("")}
90-
</div>
91-
<div class="card-ico-cont">
92-
<a href="${item.html_url}" target="_blank"><i class="bi bi-github ico"></i></a>
93-
<a href="https://github.com/actuallyroy/${item.name}/fork" target="_blank">
94-
<svg class="ico" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
95-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 8.125C12.5 8.62228 12.3025 9.0992 11.9508 9.45083C11.5992 9.80246 11.1223 10 10.625 10C10.1277 10 9.65082 9.80246 9.29919 9.45083C8.94756 9.0992 8.75001 8.62228 8.75001 8.125C8.75001 7.62772 8.94756 7.15081 9.29919 6.79918C9.65082 6.44755 10.1277 6.25 10.625 6.25C11.1223 6.25 11.5992 6.44755 11.9508 6.79918C12.3025 7.15081 12.5 7.62772 12.5 8.125V8.125ZM12.5 13.43C13.751 12.9877 14.8054 12.1174 15.4768 10.9729C16.1482 9.82833 16.3934 8.48331 16.169 7.1755C15.9446 5.8677 15.2651 4.68132 14.2506 3.82606C13.2361 2.97079 11.9519 2.5017 10.625 2.5017C9.2981 2.5017 8.0139 2.97079 6.9994 3.82606C5.9849 4.68132 5.3054 5.8677 5.08102 7.1755C4.85664 8.48331 5.10181 9.82833 5.7732 10.9729C6.4446 12.1174 7.49899 12.9877 8.75001 13.43V15.625C8.75001 17.1168 9.34264 18.5476 10.3975 19.6025C11.4524 20.6574 12.8832 21.25 14.375 21.25H18.125V26.57C16.8733 27.0123 15.8182 27.883 15.1464 29.028C14.4745 30.173 14.2291 31.5187 14.4535 32.8271C14.6779 34.1356 15.3576 35.3226 16.3726 36.1784C17.3876 37.0341 18.6724 37.5035 20 37.5035C21.3276 37.5035 22.6124 37.0341 23.6274 36.1784C24.6424 35.3226 25.3222 34.1356 25.5465 32.8271C25.7709 31.5187 25.5255 30.173 24.8536 29.028C24.1818 27.883 23.1267 27.0123 21.875 26.57V21.25H25.625C27.1169 21.25 28.5476 20.6574 29.6025 19.6025C30.6574 18.5476 31.25 17.1168 31.25 15.625V13.43C32.501 12.9877 33.5554 12.1174 34.2268 10.9729C34.8982 9.82833 35.1434 8.48331 34.919 7.1755C34.6946 5.8677 34.0151 4.68132 33.0006 3.82606C31.9861 2.97079 30.7019 2.5017 29.375 2.5017C28.0481 2.5017 26.7639 2.97079 25.7494 3.82606C24.7349 4.68132 24.0554 5.8677 23.831 7.1755C23.6066 8.48331 23.8518 9.82833 24.5232 10.9729C25.1946 12.1174 26.249 12.9877 27.5 13.43V15.625C27.5 16.1223 27.3025 16.5992 26.9508 16.9508C26.5992 17.3025 26.1223 17.5 25.625 17.5H14.375C13.8777 17.5 13.4008 17.3025 13.0492 16.9508C12.6976 16.5992 12.5 16.1223 12.5 15.625V13.43ZM21.875 31.875C21.875 32.3723 21.6775 32.8492 21.3258 33.2008C20.9742 33.5525 20.4973 33.75 20 33.75C19.5027 33.75 19.0258 33.5525 18.6742 33.2008C18.3226 32.8492 18.125 32.3723 18.125 31.875C18.125 31.3777 18.3226 30.9008 18.6742 30.5492C19.0258 30.1975 19.5027 30 20 30C20.4973 30 20.9742 30.1975 21.3258 30.5492C21.6775 30.9008 21.875 31.3777 21.875 31.875ZM29.375 10C29.8723 10 30.3492 9.80246 30.7008 9.45083C31.0525 9.0992 31.25 8.62228 31.25 8.125C31.25 7.62772 31.0525 7.15081 30.7008 6.79918C30.3492 6.44755 29.8723 6.25 29.375 6.25C28.8777 6.25 28.4008 6.44755 28.0492 6.79918C27.6976 7.15081 27.5 7.62772 27.5 8.125C27.5 8.62228 27.6976 9.0992 28.0492 9.45083C28.4008 9.80246 28.8777 10 29.375 10Z" fill="white"/>
96-
</svg>
97-
</a>
98-
<div></div>
99-
<a href="https://actuallyroy.github.io/${item.name}" target="_blank">
100-
<i class="bi bi-globe ico"></i>
101-
</a>
102-
<i class="bi bi-filetype-html ico"></i>
103-
</div>
104-
</div>`;
103+
</div>
104+
<div class="card-ico-cont">
105+
<a href="${item.html_url}" target="_blank"><i class="bi bi-github ico"></i></a>
106+
<a href="https://github.com/actuallyroy/${item.name}/fork" target="_blank">
107+
<svg class="ico" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
108+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 8.125C12.5 8.62228 12.3025 9.0992 11.9508 9.45083C11.5992 9.80246 11.1223 10 10.625 10C10.1277 10 9.65082 9.80246 9.29919 9.45083C8.94756 9.0992 8.75001 8.62228 8.75001 8.125C8.75001 7.62772 8.94756 7.15081 9.29919 6.79918C9.65082 6.44755 10.1277 6.25 10.625 6.25C11.1223 6.25 11.5992 6.44755 11.9508 6.79918C12.3025 7.15081 12.5 7.62772 12.5 8.125V8.125ZM12.5 13.43C13.751 12.9877 14.8054 12.1174 15.4768 10.9729C16.1482 9.82833 16.3934 8.48331 16.169 7.1755C15.9446 5.8677 15.2651 4.68132 14.2506 3.82606C13.2361 2.97079 11.9519 2.5017 10.625 2.5017C9.2981 2.5017 8.0139 2.97079 6.9994 3.82606C5.9849 4.68132 5.3054 5.8677 5.08102 7.1755C4.85664 8.48331 5.10181 9.82833 5.7732 10.9729C6.4446 12.1174 7.49899 12.9877 8.75001 13.43V15.625C8.75001 17.1168 9.34264 18.5476 10.3975 19.6025C11.4524 20.6574 12.8832 21.25 14.375 21.25H18.125V26.57C16.8733 27.0123 15.8182 27.883 15.1464 29.028C14.4745 30.173 14.2291 31.5187 14.4535 32.8271C14.6779 34.1356 15.3576 35.3226 16.3726 36.1784C17.3876 37.0341 18.6724 37.5035 20 37.5035C21.3276 37.5035 22.6124 37.0341 23.6274 36.1784C24.6424 35.3226 25.3222 34.1356 25.5465 32.8271C25.7709 31.5187 25.5255 30.173 24.8536 29.028C24.1818 27.883 23.1267 27.0123 21.875 26.57V21.25H25.625C27.1169 21.25 28.5476 20.6574 29.6025 19.6025C30.6574 18.5476 31.25 17.1168 31.25 15.625V13.43C32.501 12.9877 33.5554 12.1174 34.2268 10.9729C34.8982 9.82833 35.1434 8.48331 34.919 7.1755C34.6946 5.8677 34.0151 4.68132 33.0006 3.82606C31.9861 2.97079 30.7019 2.5017 29.375 2.5017C28.0481 2.5017 26.7639 2.97079 25.7494 3.82606C24.7349 4.68132 24.0554 5.8677 23.831 7.1755C23.6066 8.48331 23.8518 9.82833 24.5232 10.9729C25.1946 12.1174 26.249 12.9877 27.5 13.43V15.625C27.5 16.1223 27.3025 16.5992 26.9508 16.9508C26.5992 17.3025 26.1223 17.5 25.625 17.5H14.375C13.8777 17.5 13.4008 17.3025 13.0492 16.9508C12.6976 16.5992 12.5 16.1223 12.5 15.625V13.43ZM21.875 31.875C21.875 32.3723 21.6775 32.8492 21.3258 33.2008C20.9742 33.5525 20.4973 33.75 20 33.75C19.5027 33.75 19.0258 33.5525 18.6742 33.2008C18.3226 32.8492 18.125 32.3723 18.125 31.875C18.125 31.3777 18.3226 30.9008 18.6742 30.5492C19.0258 30.1975 19.5027 30 20 30C20.4973 30 20.9742 30.1975 21.3258 30.5492C21.6775 30.9008 21.875 31.3777 21.875 31.875ZM29.375 10C29.8723 10 30.3492 9.80246 30.7008 9.45083C31.0525 9.0992 31.25 8.62228 31.25 8.125C31.25 7.62772 31.0525 7.15081 30.7008 6.79918C30.3492 6.44755 29.8723 6.25 29.375 6.25C28.8777 6.25 28.4008 6.44755 28.0492 6.79918C27.6976 7.15081 27.5 7.62772 27.5 8.125C27.5 8.62228 27.6976 9.0992 28.0492 9.45083C28.4008 9.80246 28.8777 10 29.375 10Z" fill="black"/>
109+
</svg>
110+
</a>
111+
<div></div>
112+
<a href="${item.homepage}" target="_blank">
113+
${projTypIcon[projT]}
114+
</a>
115+
${langIcons[item.language]}
116+
</div>
117+
</div>
118+
<div class="card-back">
119+
<div>Description</div>
120+
<p class="card-description"><em>${des}</em></p>
121+
<div class="card-back in"></div>
122+
</div>
123+
</div>`;
105124
}
106125
})
107-
})
108-
109-
let obj = [
110-
"css",
111-
"firebase",
112-
"html",
113-
"javasctipt",
114-
"personal-website",
115-
"portfolio",
116-
"portfolio-website",
117-
"resume",
118-
];
119-
120-
let obj1 = obj.map((topic) => {
121-
return `<span class="card-tags">${topic}</span>`;
122-
});
126+
let cards = document.querySelectorAll(".card")
127+
cards.forEach(card => {
128+
card.addEventListener("click", () => {
129+
if (card.style.animation == "800ms ease 0s 1 normal forwards running flipLeft") {
130+
card.style.animation = "800ms flipRight forwards";
131+
} else {
132+
card.style.animation = "800ms flipLeft forwards";
133+
}
134+
})
135+
card.firstElementChild.nextElementSibling.addEventListener("mouseout", () => {
136+
card.style.animation = "800ms flipRight forwards";
137+
})
138+
})
139+
})
123140

124-
console.log(obj1)
125-
141+
142+
const langIcons = {
143+
JavaScript: '<i class="bi bi-filetype-js"></i>',
144+
HTML: '<i class="bi bi-filetype-html"></i>',
145+
Java: '<i class="bi bi-filetype-java"></i>',
146+
null: ""
147+
};
148+
149+
const projTypIcon = {
150+
website: '<i class="bi bi-globe ico"></i>',
151+
android: '<i class="bi bi-android2"></i>',
152+
windows: '<i class="bi bi-microsoft"></i>',
153+
console: '<i class="bi bi-terminal-fill"></i>',
154+
undefined: ""
155+
};
156+
157+
158+
let work = document.getElementById("work")
159+
let l = document.querySelector(".l")
160+
let r = document.querySelector(".r");
161+
work.onscroll = () => {
162+
if (work.scrollLeft > 100) {
163+
l.style.display = 'block'
164+
} else {
165+
l.style.display = "none";
166+
}
167+
if (work.scrollLeft > work.scrollWidth - window.innerWidth - 100) {
168+
r.style.display = 'none'
169+
} else {
170+
r.style.display = "block";
171+
}
172+
}
173+
174+
r.onclick = () => {
175+
work.scrollLeft += 400
176+
}
177+
178+
l.onclick = () => {
179+
work.scrollLeft -= 400;
180+
};
181+
182+
183+
let rectR = r.getBoundingClientRect();
184+
let y = rectR.top + 30;
185+
let x = rectR.left + 30;
186+
let rectL = l.getBoundingClientRect();
187+
let y1 = rectL.top + 30;
188+
let x1 = rectL.left + 30;
189+
190+
191+
window.onmousemove = (e) => {
192+
let d = Math.sqrt((x - e.x) ** 2 + (y - e.y) ** 2)
193+
let d1 = Math.sqrt((x1 - e.x) ** 2 + (y1 - e.y) ** 2);
194+
r.style.opacity = 0.8 - d / 2000
195+
l.style.opacity = 0.9 - d1 / 2000
196+
}

index.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<body>
1414
<div class="header" id="header">
1515
<span class="headerBtns">Home</span>
16-
<span class="headerBtns">My work</span>
16+
<span class="headerBtns">My works</span>
1717
<span class="headerBtns">Education</span>
1818
<span class="headerBtns">Skills</span>
1919
<span class="headerBtns">Blog</span>
@@ -34,10 +34,12 @@
3434
<div class="cont" id="work">
3535
<div class="subcont" >
3636
<div class="cards-cont" id="cardsCont">
37-
37+
3838
</div>
3939
</div>
4040
</div>
41+
<i class="bi bi-arrow-left-circle-fill rl-btn l"></i>
42+
<i class="bi bi-arrow-right-circle-fill rl-btn r"></i>
4143
<div class="cont" id="edu">
4244

4345
</div>

push.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
git add .
2+
git commit -m 'roy'
3+
git push

0 commit comments

Comments
 (0)