diff --git a/backend/page_scripts.js b/backend/page_scripts.js index 5bee6e8..d2def9b 100644 --- a/backend/page_scripts.js +++ b/backend/page_scripts.js @@ -13,7 +13,7 @@ async function index(request, response) { // const is_setup_complete = core.settings["SETUP_COMPLETE"]; // if (!is_setup_complete) return response.redirect("/register"); - const blog_list = await core.getPost({ requester_id: request.session.user?.id, page: request.query.page || 0 }); + const blog_list = await core.getPost({ requester_id: request.session.user?.id }, {}, { page: request.query.page || 0 }); const tags = await core.getTags(); blog_list.data.forEach((post) => { diff --git a/frontend/views/themes/default/css/index.css b/frontend/views/themes/default/css/index.css index 7ccc688..96da19d 100644 --- a/frontend/views/themes/default/css/index.css +++ b/frontend/views/themes/default/css/index.css @@ -154,6 +154,20 @@ .page { display: flex; + flex-direction: column; +} + +.horizontal-button-container { + background-color: white; + box-shadow: rgba(0, 0, 0, 0.1098039216) 0 0px 5px; + margin-top: 2rem; + padding: 1rem; + box-sizing: border-box; + flex-direction: column; + border-radius: 5px; +} +.horizontal-button-container button { + height: 2rem; } .search { diff --git a/frontend/views/themes/default/css/index.scss b/frontend/views/themes/default/css/index.scss index c089a8b..16e5d73 100644 --- a/frontend/views/themes/default/css/index.scss +++ b/frontend/views/themes/default/css/index.scss @@ -171,6 +171,21 @@ .page { display: flex; + flex-direction: column; +} +.horizontal-button-container { + background-color: white; + // min-height: 100px; + box-shadow: #0000001c 0 0px 5px; + margin-top: 2rem; + padding: 1rem; + box-sizing: border-box; + flex-direction: column; + border-radius: 5px; + + button { + height: 2rem; + } } .search { margin-top: 2rem; diff --git a/frontend/views/themes/default/ejs/index.ejs b/frontend/views/themes/default/ejs/index.ejs index cb3f6d8..5715dc5 100644 --- a/frontend/views/themes/default/ejs/index.ejs +++ b/frontend/views/themes/default/ejs/index.ejs @@ -10,6 +10,13 @@ <%- include("partials/header.ejs") %>
+ <%if(logged_in_user) {%> +
+
+ +
+
+ <%}%>
diff --git a/frontend/views/themes/default/ejs/partials/pagination.ejs b/frontend/views/themes/default/ejs/partials/pagination.ejs index 8dbcea7..f109c7b 100644 --- a/frontend/views/themes/default/ejs/partials/pagination.ejs +++ b/frontend/views/themes/default/ejs/partials/pagination.ejs @@ -4,7 +4,7 @@ < Previous <% } else {%> - < Previous + <%}%>
@@ -18,6 +18,6 @@ <% if(pagination.includes(Number(current_page) + 1)) {%> Next > <% } else {%> - Next > + <%}%>