Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Anime list columns expanded to full width #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions controllers/index.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,18 @@ const RenderHomePage = async (req, res, next) => {
mangass = await mangaParkObj.getMangaList(1);
const mangaUpdateList = mangass.LatestManga;

res.render("index", {
title: "Mirai",
navList: navList,
updateList: updateList,
mangaUpdateList: mangaUpdateList,
newAnimeList: newAnimeList,
popularList: popularList,
ongoingList: ongoingList,
});
setTimeout(function(){
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, since the render method for home page was working concurrently with the other web scraping functions, the home page was getting rendered before the fetching of ongoing anime list was complete.

Here, I have added a simple timeout of 3 seconds for the render home page function. This 3 second delay is enough for the web scraping functions to complete before the rendering happens - thus solving the issue.

res.render("index", {
title: "Mirai",
navList: navList,
updateList: updateList,
mangaUpdateList: mangaUpdateList,
newAnimeList: newAnimeList,
popularList: popularList,
ongoingList: ongoingList,
});
},
3000);
};

module.exports = RenderHomePage;
2 changes: 1 addition & 1 deletion views/animelist.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="page-single">
<div class="container">
<div class="row ipad-width2">
<div class="col-md-8 col-sm-12 col-xs-12">
<div class="col-md-8 col-sm-12 col-xs-12" style="width: 100%">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a small change in css of the anime list columns. They were pushed to the left hand side of the screen previously, as mentioned in issue #12.

<div class="topbar-filter">
<p class="pad-change">Found <span><%= series.length %> categories</span> in total</p>
<label>Sorted by: Alphabetical Order</label>
Expand Down