Skip to content

Commit

Permalink
projects page
Browse files Browse the repository at this point in the history
  • Loading branch information
hugh5 committed Apr 22, 2024
1 parent 8418c3f commit fe63d19
Show file tree
Hide file tree
Showing 34 changed files with 625 additions and 15 deletions.
136 changes: 125 additions & 11 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--accent-color: #9B70ff;
--background-color: #141414;
--secondary-background-color: #525252;
--tertiary-background-color: #272727;
--primary-text-color: #fff;
--secondary-text-color: #ccc;
}
Expand Down Expand Up @@ -92,6 +93,7 @@ footer a {
.row {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
}
Expand Down Expand Up @@ -127,7 +129,6 @@ h2 {
font-weight: bold;
font-size: 32px;
text-transform: uppercase;
/* margin-top: 0; */
margin-bottom: 10px;
margin-left: 40px;
align-self: flex-start;
Expand Down Expand Up @@ -184,7 +185,6 @@ ul {

#home {
max-width: 800px;
min-width: 100px;
}

/* Add your custom styles below */
Expand Down Expand Up @@ -218,33 +218,147 @@ ul {
}

#experience {
width: 800px;
max-width: 1000px;
}

.grid-container {
display: grid;
grid-template-columns: repeat(5, 90px);
/* 6 columns with equal width */
grid-auto-rows: auto;
/* Automatically adjust row height based on content */
gap: 30px 60px;
/* Adjust the gap between grid items as needed */
padding: 20px;

.logo {
width: 60px;
height: 60px;
}
}

@media (max-width: 800px) {
.grid-container {
align-self: flex-start;
grid-template-columns: repeat(2, 90px);
gap: 40px 20px;
}
}


.grid-container img {
width: 60px;
height: 60px;
.logo {
object-fit: cover;
display: block;
padding-bottom: 10px;
}

#projects {
max-width: 1000px;

.logo {
width: 30px;
height: 30px;
}

h2 {
margin-top: 10px;
margin-bottom: 10px;
}

a {
text-decoration: none;
color: var(--primary-text-color);
border-radius: 8px;
}

a:hover {
background-color: var(--tertiary-background-color);
}

.tech-stack {
display: flex;
justify-content: space-between;
align-items: center;

> .filler {
flex-grow: 1;
}

> *:not(.filler) {
padding: 10px 20px;
margin-left: 10px;
margin-right: 10px;
}
}
}

#projects > .column > :nth-child(3n+4) {
margin-top: 80px;
}

#project1 {
flex: 0.3;
}

.container {
--radius: 25px;
position: relative;
display: flex;
justify-content: center;
margin: 0 60px;
margin-bottom: 50px;

.content {
border: none;
object-fit: cover;
max-width: 100%;
max-height: 80vh;
border-radius: var(--radius);
}

.arrow {
width: 40px;
aspect-ratio: 1/1;
position: absolute;
top: calc(50% - 40px);
cursor: pointer;

img {
border-radius: 50%;
width: 100%;
}
}

.left-arrow {
left: -50px;
}

.right-arrow {
right: -50px;
}

.arrow:hover * {
background-color: var(--accent-color);
}
.dots {
display: flex;
justify-content: center;
gap: 10px;
position: absolute;
bottom: -50px;
width: 100%;
padding: 20px 0;

.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: var(--secondary-background-color);
transition: all 200ms ease-in-out;
}

.active {
background-color: var(--primary-text-color);
}

.dot:hover {
cursor: pointer;
background-color: var(--accent-color);
}
}
}
2 changes: 1 addition & 1 deletion experience.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hugh's Portfolio | Experience</title>
<link rel="stylesheet" href="css/style.css" />
<link rel="icon" type="image/x-icon" href="/images/favicon.ico" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script src="js/jquery.min.js"></script>
<script src="js/script.js"></script>
</head>
Expand Down
File renamed without changes.
Binary file added images/appstore.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/c.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/neuralnetwork/1.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/neuralnetwork/2.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/neuralnetwork/3.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/neuralnetwork/4.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/next.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/pathfinding/1.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/pathfinding/1.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/pathfinding/2.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/pathfinding/2.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/pathfinding/3.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/pathfinding/3.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/playstore.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/prev.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/snake/1.gif
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/snake/2.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/snake/3.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/sorting/1.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/sorting/2.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/sorting/3.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/timetable/1.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/timetable/2.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/timetable/3.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/timetable/4.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/timetable/5.png
Binary file added images/timetable/6.png
Binary file added images/website.png
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hugh's Portfolio</title>
<link rel="stylesheet" href="css/style.css" />
<link rel="icon" type="image/x-icon" href="/images/favicon.ico" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script src="js/jquery.min.js"></script>
<script src="js/script.js"></script>
</head>
Expand Down
88 changes: 86 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ function loadNav() {
});
});

// Load the footer

// On scroll, hide/show the navbar
var lastScroll = 0;
$(window).scroll(function (event) {
Expand All @@ -37,7 +35,93 @@ function loadFooter() {
$("footer").load("_footer.html");
}

let counter = {
project1: 0,
project2: 0,
project3: 0,
project4: 0,
project5: 0,
};

const images = {
project1: [
"/images/timetable/1.png",
"/images/timetable/2.png",
"/images/timetable/3.png",
"/images/timetable/4.png",
"/images/timetable/5.png",
"/images/timetable/6.png",
],
project2: [
"/images/pathfinding/1.png",
"/images/pathfinding/2.png",
"/images/pathfinding/3.png",
],
project3: [
"/images/sorting/1.png",
"/images/sorting/2.png",
"/images/sorting/3.png",
],
project4: [
"/images/neuralnetwork/1.jpg",
"/images/neuralnetwork/2.jpg",
"/images/neuralnetwork/3.jpg",
"/images/neuralnetwork/4.jpg",
],
project5: [
"/images/snake/1.gif",
"/images/snake/2.jpg",
"/images/snake/3.jpg",
],
};

function setContent(projectname) {
let selector = `#${projectname} > .content`;
$(selector).fadeOut(200, function () {
$(selector).attr("src", images[projectname][counter[projectname]]);
$(selector).fadeIn(200);
});
let dots = "";
for (let i = 0; i < images[projectname].length; i++) {
dots += `<span class="dot ${
i === counter[projectname] ? "active" : ""
}"></span>`;
}
$(`#${projectname} .dots`).html(dots);
$(`#${projectname} .dot`).on("click", function () {
counter[projectname] = $(this).index();
setContent(projectname);
});
}

function loadImageSliders() {
for (let projectname in counter) {
setContent(projectname);
}

$(".left-arrow").on("click", function () {
let projectname = $(this).parent().attr("id");
if (counter[projectname] === 0) {
counter[projectname] = images[projectname].length - 1;
} else {
counter[projectname]--;
}
setContent(projectname);
});

$(".right-arrow").on("click", function () {
let projectname = $(this).parent().attr("id");
if (counter[projectname] === images[projectname].length - 1) {
counter[projectname] = 0;
} else {
counter[projectname]++;
}
setContent(projectname);
});
}

$(function () {
loadNav();
loadFooter();
loadImageSliders();
});
Loading

0 comments on commit fe63d19

Please sign in to comment.