Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahq3102 authored Sep 18, 2024
1 parent dd5541b commit a0287fa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ <h3 class="page-title white-text teal">Projects</h3>
</div>
</section>

<script>
<script>
// Array holding your recent project information, now including dates for sorting
const projects = [
{
Expand Down Expand Up @@ -588,11 +588,14 @@ <h3 class="page-title white-text teal">Projects</h3>

let displayedProjects = 1; // Initially display only one project

// Function to generate and display projects
// Function to generate and display projects with proper row/column layout
function displayProjects(limit) {
const recentProjectsDiv = document.getElementById("recent-projects");
recentProjectsDiv.innerHTML = ""; // Clear existing content

let rowDiv = document.createElement('div');
rowDiv.classList.add('row'); // Add row class for proper layout

// Generate project cards up to the given limit
for (let i = 0; i < limit && i < projects.length; i++) {
const project = projects[i];
Expand All @@ -614,8 +617,9 @@ <h3 class="page-title white-text teal">Projects</h3>
</div>
</div>
`;
recentProjectsDiv.innerHTML += projectHTML;
rowDiv.innerHTML += projectHTML;
}
recentProjectsDiv.appendChild(rowDiv); // Add the row div to the projects section
}

// Load more function for the button
Expand Down

0 comments on commit a0287fa

Please sign in to comment.