From d36bd76d528db0efc5b9dfedb74d5fa9e7d412dd Mon Sep 17 00:00:00 2001 From: Bashynx Date: Tue, 23 Sep 2025 21:53:36 +0200 Subject: [PATCH] Added infinite scroll and pagination --- layout/_partial/feed.ejs | 37 +++++++++-------------------------- layout/_partial/post_feed.ejs | 4 ++-- layout/layout.ejs | 22 +++++++++++++++++++++ scripts/thumbnails.js | 5 ++--- source/css/style.css | 37 +++++++++++++++++++++-------------- 5 files changed, 57 insertions(+), 48 deletions(-) diff --git a/layout/_partial/feed.ejs b/layout/_partial/feed.ejs index b2327a6..4e18264 100644 --- a/layout/_partial/feed.ejs +++ b/layout/_partial/feed.ejs @@ -1,31 +1,12 @@ -<% columns = theme.column; %> -
-
- <% item.forEach(function(post, index) { %> - <% if (index % columns === 0) { %> - <%- include('post_feed', { post: post }) %> - <% } %> - <% }); %> -
-
- <% item.forEach(function(post, index) { %> - <% if (index % columns === 1) { %> - <%- include('post_feed', { post: post }) %> - <% } %> - <% }); %> -
- - <% if (columns === 3) { %> -
- <% item.forEach(function(post, index) { %> - <% if (index % columns === 2) { %> - <%- include('post_feed', { post: post }) %> - <% } %> - <% }); %> -
- <% } %> +
+ <% page.posts.forEach(function(post) { %> + <%- include('post_feed', { post: post }) %> + <% }); %>
-