Comments (4)
- Address of the current page: from xxxx-xx-xx_xx:xx to yyyy-yy-yy_yy-yy
- Address of the next / previous page: Allow Steps 1 hour / day / ... or based on post volume (calculate the date range of the next 20 posts) and "everything after start date"
- Allow loading more items with ajax on the current page
- Maybe use history API and scroll position to update the url to page /
#item_id
links. Avoid cluttering the browser history with too many entries.
Alternatives for previous page:
- count 20 items backwards, take date of this item and store it in normal
since/PREVIOUS_DATE/ascending
format - store date of the first item of the current page + direction backwards like
before/CURRENT_DATE/ascending/
and calculate the minus 20 before the date on access.
from feedjack.
- Display 20 Items
- Text "123 older posts" (link: previous)
- Text "456 newer posts" (link: next)
Link next: since (last post on page)
Link previous: filter(date__lt=first_post.date).order_by("-id)[:20].order_by("id")
(order backward, get 20 posts, order forward)
Alternative: Use calculated permalinks ?from=date1&to=date2&order=asc
, which may change the number of posts in between. Integrate with endless scroll, which loads this via ajax on scrolling.
from feedjack.
Forward pagination with (or without) ajax works after commit 6cfeff3.
TODO:
- Add "X later items" 1e4b062 acfd6d4
- Add "previous" (needs to calculate items backwards and use the appropriate since= parameter)
- reverse ordering, then count posts_per_page items forward and use the date there as since= parameter. Leave asc= as it is.
- Add a "until" parameter 06c7250
The until=
parameter will be needed in the pagination for pages with less then posts_per_page
items.
When having 5 Items per page and these pages (previous, current, next) are:
``[1, 2] [3, 4, 5, 6, 7] [8,9]``
the previous page with respect to ordering (either 1 or 3) should only contain 2 items. so a since=
alone would for example produce
``[1, 2, 3, 4, 5]``
which contains 3 entries from the current page on the "previous page".
For forward pagination not having an until-parameter means that a page can get new items on reload, if it was incomplete before, which probably is okay.
from feedjack.
Completed with commit bf943e6.
from feedjack.
Related Issues (20)
- Use a base.html HOT 2
- Plans for this fork and relation to mk-fg HOT 10
- pip install fails HOT 5
- Add Tests
- Add "since yesterday" style links again
- Adapt old themes
- Fix Tags
- Nice default theme
- Find a New name
- Update the README
- Clean "1.0" release of the project
- Add title-field to Subscriber model HOT 1
- Show number of unread messages in the sidebar
- Clean the HTML content of feeds
- Add security headers against 3rd-party scripts
- Reader mode layout
- Set CSP headers
- Add date to the title of filtered views
- Set Meta referrer to same origin
- Feed filter improvements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feedjack.