Skip to content

Commit

Permalink
js script to generate project tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Matts52 committed Nov 19, 2023
1 parent b5d5f10 commit f9cdb26
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 126 deletions.
130 changes: 4 additions & 126 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<link rel="stylesheet" href="styles.css">

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">

<script type="text/javascript" src="./scripts/gen_project_tiles.js"></script>

</head>
<body>

Expand Down Expand Up @@ -211,135 +214,10 @@ <h4 class="card-title">Bachelor of Computer Science and Economics</h4>








<!-- PROJECTS -->
<section id="projects" class="py-5">
<div class="container">
<h2 class="mb-4">Projects</h2>

<div class="row">

<!--
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="https://github.com/Matts52/matts52.github.io" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="assets/projects/Website.PNG" alt="University 2">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">This Website</h5>
<div class="flex-grow-1">
<p class="card-text">The goal of this website was to create a minimalist and low-maintenance platform.
The site features streamlined navigation and easy-to-read content, making it simple for visitors
to find information they need on me without unnecessary clutter. This site was a very different development
path compared to the previous Vue-based page</p>
</div>
<div class="mt-auto">
<a href="http://www.matthewsenick.com/" class="btn btn-primary card-btn">Show Me</a>
</div>
</div>
</div>
</div>
-->

<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="https://github.com/Matts52/Q_Learn_Single_Sealed_Bid_Auction" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="assets/projects/Q_Learn.PNG" alt="University 2">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">Q-Learning Auction Agent</h5>
<div class="flex-grow-1">
<p class="card-text">The goal of this project was to take an initial step to exploring
reinforcement learning and agent-based machine learning. Essentially, this JavaScript
application uses a single state Q-Learning algorithm to teach an artifiical agent how to
optimally bid in a two-player sealed bid auction setting.
</p>
</div>
<div class="mt-auto">
<a href="https://matthewsenick.com/Q_Learn_Single_Sealed_Bid_Auction/" class="btn btn-primary card-btn">Show Me</a>
</div>
</div>
</div>
</div>

<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="https://github.com/Matts52/ECO304" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="assets/projects/ECO304_HOME.PNG" alt="University 2">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">Helper Website for Students</h5>
<div class="flex-grow-1">
<p class="card-text">I built a website for my students that generated practice questions, visualizations, and a glossary of
terminology to help them learn the material. With this interactive tool, my students were able to test their knowledge and
reinforce key concepts, making the learning experience more engaging and effective.</p>
</div>
<div class="mt-auto">
<a href="http://www.matthewsenick.com/ECO304/" class="btn btn-primary card-btn">Show Me</a>
</div>
</div>
</div>
</div>
</div>



<div class="row">
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="https://github.com/Matts52/CLChess" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github-white.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="assets/projects/CLChess.jpg" alt="University 2">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">Command Line Chess</h5>
<div class="flex-grow-1">
<p class="card-text">A minimalist command line chess application built with python. In this game,
you can choose to play against another user, a random-moving AI player, or a simple cost-minimizing AI player.</p>
</div>
</div>
</div>
</div>

<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="https://github.com/Matts52/olympic-data-visualization" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="assets/projects/Olympic_DataVis.jpg" alt="University 2">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">Olympic Medal Data Visualization</h5>
<div class="flex-grow-1">
<p class="card-text">A tool that lets you explore and compare historical medal counts in the Olympics. A completely interactive
map is available to the user and a variety of settings can be explored. Medal counts are shown in stacked bar charts along
with a time series trend.</p>
</div>
<div class="mt-auto">
<a href="https://www.matthewsenick.com/olympic-data-visualization/" class="btn btn-primary card-btn">Show Me</a>
</div>
</div>
</div>
</div>
</div>
</section>

<section id="projects" class="py-5"></section>



Expand Down
13 changes: 13 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*** window onload functionality ***/
window.onload = function(){

generateProjectTiles();



}





/*** fading animation between sections ***/

// Get all sections on the page
Expand Down
73 changes: 73 additions & 0 deletions scripts/gen_project_tiles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

function generateProjectTiles(){

// Define an array of project data
const projects = [
{
title: "Q-Learning Auction Agent",
githubLink: "https://github.com/Matts52/Q_Learn_Single_Sealed_Bid_Auction",
imageSrc: "assets/projects/Q_Learn.PNG",
description: "The goal of this project was to take an initial step to exploring reinforcement learning and agent-based machine learning. Essentially, this JavaScript application uses a single state Q-Learning algorithm to teach an artificial agent how to optimally bid in a two-player sealed bid auction setting.",
demoLink: "https://matthewsenick.com/Q_Learn_Single_Sealed_Bid_Auction/",
},
{
title: "Helper Website for Students",
githubLink: "https://github.com/Matts52/ECO304",
imageSrc: "assets/projects/ECO304_HOME.PNG",
description: "I built a website for my students that generated practice questions, visualizations, and a glossary of terminology to help them learn the material. With this interactive tool, my students were able to test their knowledge and reinforce key concepts, making the learning experience more engaging and effective.",
demoLink: "http://www.matthewsenick.com/ECO304/",
},
{
title: "Command Line Chess",
githubLink: "https://github.com/Matts52/CLChess",
imageSrc: "assets/projects/CLChess.jpg",
description: "A minimalist command line chess application built with python. In this game, you can choose to play against another user, a random-moving AI player, or a simple cost-minimizing AI player.",
demoLink: "https://github.com/Matts52/CLChess",
},
{
title: "Olympic Medal Data Visualization",
githubLink: "https://github.com/Matts52/olympic-data-visualization",
imageSrc: "assets/projects/Olympic_DataVis.jpg",
description: "A tool that lets you explore and compare historical medal counts in the Olympics. A completely interactive map is available to the user and a variety of settings can be explored. Medal counts are shown in stacked bar charts along with a time series trend",
demoLink: "https://www.matthewsenick.com/olympic-data-visualization/",
},

];

// Get the container element
const container = document.getElementById("projects");

// Create the projects section HTML
const projectsHTML = `
<div class="container">
<h2 class="mb-4">Projects</h2>
<div class="row">
${projects.map(project => `
<div class="col-md-6 mb-4">
<div class="card h-100">
<div class="position-relative">
<a href="${project.githubLink}" class="position-absolute top-0 start-100 translate-middle p-3" style="z-index: 1;">
<img src="assets/icons/github.svg" class="github-icon" alt="GitHub icon" width="40">
</a>
<img class="card-img-top-large" src="${project.imageSrc}" alt="${project.title}">
</div>
<div class="card-body d-flex flex-column">
<h5 class="card-title">${project.title}</h5>
<div class="flex-grow-1">
<p class="card-text">${project.description}</p>
</div>
<div class="mt-auto">
<a href="${project.demoLink}" class="btn btn-primary card-btn">Show Me</a>
</div>
</div>
</div>
</div>
`).join('')}
</div>
</div>
`;

// Set the innerHTML of the container
container.innerHTML = projectsHTML;
}

0 comments on commit f9cdb26

Please sign in to comment.