Skip to content

Commit

Permalink
Two default columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jochemloedeman committed Sep 8, 2024
1 parent dd3616a commit f1a425e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</script>
</head>

<body class="bg-white h-screen text-black opacity-0 transition ease-in duration-700 mx-auto w-3/4">
<body class="bg-white h-screen text-black opacity-0 transition ease-in duration-700 mx-auto w-11/12 xl:w-3/4">
<!-- Navbar -->
<header class="flex w-full overflow-hidden pt-16 pb-12">
<!-- Navbar -->
Expand Down Expand Up @@ -93,7 +93,7 @@
</nav>
</header>
<!-- Content -->
<div id="gallery" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-5">
<div id="gallery" class="grid grid-cols-2 lg:grid-cols-3 gap-x-5">
</div>

<!-- Footer -->
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/distribute_images.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const images = [
"image_14.jpg",
];

const twoColumnThreshold = 768;
// const twoColumnThreshold = 768;
const threeColumnThreshold = 1024;

// Function to distribute images into columns
Expand All @@ -26,13 +26,13 @@ function distributeImages() {

gallery.innerHTML = ''; // Clear existing content
// Get the number of columns based on the current screen size
let columnCount = 1;
let columnCount = 2;
if (window.innerWidth >= threeColumnThreshold) {
columnCount = 3;
}
else if (window.innerWidth >= twoColumnThreshold) {
columnCount = 2;
}
// else if (window.innerWidth >= twoColumnThreshold) {
// columnCount = 2;
// }

// Create columns
const columns = [];
Expand Down

0 comments on commit f1a425e

Please sign in to comment.