Closed kneerunjun closed 1 month ago
page=0 panics page=4 (beyond the the max number of pages) gives the entire set of blogs - which violates the max page number. This should actually send 404 resource not found While this scenario is unlikely since unless the user gets hold of the url and decides to send an modified url with a page number. But just cause the scenario is ulikely does not mean the server should not handle it.
When currPage == pages - end delimiting the slice of blogs is creating a panic it should not have this delimiting - only the start section
nav-next needs change in how it access the next and prev urls - BaseHref
Top nav Blogs
menu should be linked to index of blogs
On the index page its time to put some page navigation buttons on the bottom of the enlisting. Such an array of buttons is agnostic of whethere its diary listings or blog listings
https://github.com/Gills-Chlorophyll/webfront/blob/df2bceeaf3fc60d10eeb03bdfd3761f2ea5e66c8/data.diary.go#L98 When error Result needs to be nil
Current page button needs to be deactivated - indicating its the current page you are on. Else cannot avoid nuisance clicking
After prelim testing - we have found that index of blogs is working fine, also the nav-next on bottom of each blog is working well as well
Index pages gives aglimpse of whats in the blog, with only a limited items on the page. When cliked on the glimpse it takes you to the actual page