Skip to content

Commit

Permalink
Update homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgsalazar committed Sep 30, 2024
1 parent dce9a19 commit 7b36da0
Show file tree
Hide file tree
Showing 28 changed files with 780 additions and 114 deletions.
Binary file added images/2022prez-socmed.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/2022senate-cf.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/covid-water-access.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/dkp.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/email.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/eskwela.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/fedelina.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/hiv-rising.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/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/ilijan-photo-essay.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/invisible.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/linkedin.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/marawi.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/marcos.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/ofw-debt.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/osaec-pt2.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/osaec.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/pcij-2022senate.textClipping
Binary file not shown.
Binary file added images/pcij-ilijan.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/pcij-lng.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/pcij-vip.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/vrvm.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/x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
373 changes: 259 additions & 114 deletions index.html

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions scriptFilters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
let activeFilters = new Set();

function toggleTag(tagElement, tag) {
tagElement.classList.toggle('active');
if (activeFilters.has(tag)) {
activeFilters.delete(tag);
} else {
activeFilters.add(tag);
}
filterItems();
}

function filterItems() {
const items = document.querySelectorAll('.item');
items.forEach(item => {
const tags = item.querySelectorAll('.tag');
const itemTags = Array.from(tags).map(tag => tag.textContent.toLowerCase());
const shouldShow = activeFilters.size === 0 || itemTags.some(tag => activeFilters.has(tag));
item.style.display = shouldShow ? 'block' : 'none';
});
}

// Back to Top button functionality
const backToTopButton = document.getElementById("back-to-top");

window.onscroll = function() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
backToTopButton.style.display = "block";
} else {
backToTopButton.style.display = "none";
}
};

backToTopButton.onclick = function() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
};

// Mobile menu toggle
const menuToggle = document.getElementById('menu-toggle');
const nav = document.querySelector('nav');

menuToggle.addEventListener('click', () => {
nav.classList.toggle('show');
});

// Close menu when clicking outside
document.addEventListener('click', (event) => {
if (!nav.contains(event.target) && !menuToggle.contains(event.target)) {
nav.classList.remove('show');
}
});
18 changes: 18 additions & 0 deletions scriptOverflow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function checkOverflow() {
const grid = document.querySelector('.grid');
const gridWidth = grid.offsetWidth;
const contentWidth = Array.from(grid.children).reduce((total, child) => total + child.offsetWidth, 0);
const gapWidth = (grid.children.length - 1) * 30; // 30px gap between items

if (contentWidth + gapWidth > gridWidth) {
grid.classList.add('overflow');
} else {
grid.classList.remove('overflow');
}
}

// Run on page load
window.addEventListener('load', checkOverflow);

// Run on window resize
window.addEventListener('resize', checkOverflow);
Loading

0 comments on commit 7b36da0

Please sign in to comment.