Comments (3)
A new option in v2.0.0-beta.1 lets you set a limit
on how many levels to iterate downwards, which means you can perform the cutoff earlier without splitting Pages. This means lower levels will render complete Events, but not higher levels. You can experiment with this setting either in the plugin-configuration, or set in the FrontMatter of a timeline.md
.
from grav-plugin-timeline.
I see the issue, there are three ways that this could be improved:
A) Lazy-load or otherwise offset resources until they come into view, like images, video, and the like.
B) Reduce the Timeline into smaller series, nesting it even further, for example a middle level for the 1400s, 1500s, etc, so that less Events are loaded at once.
C) I could implement pagination so that a set amount of Timelines and Events would be rendered for each Page.
What is your comfort-level with PHP and Twig? C) requires some API-changes to expose the Content->buildTree
-method to Twig, but I think that's an enhancement I should do anyway for greater extensibility. Pagination itself should implement the interfaces from the Pagination-plugin, so that this plugin can operate more based on Collections.
from grav-plugin-timeline.
I have reviewed the code to see whether it can accommodate your use-case, or larger timelines generally. Because the plugin relies on a hierarchical set of Events within each Timeline, which can be nested, there is no uniform iteration through the items as a whole. Therefore it cannot be paginated; each nested Timeline is not counted in the same set as its siblings.
That said, a viable approach is to go further in what you appear to be already doing - my lack of Spanish notwithstanding: Keep the current periods you have, potentially splitting them further following B). This maintains the total hierarchy of pages as you have elsewhere. An alternative is to make them distinct, that is to reduce the nesting, which would achieve the same result.
The upcoming version 2.0.0 will implement more methods for Twig, following C), but they would not impact performance much. The suggestions in A) definitely would, however, and especially if a page loads many media-elements including images and video. This would make the biggest overall impact, as the rest of the page tends to be text and HTML.
from grav-plugin-timeline.
Related Issues (15)
- Plugin showing meta headers HOT 1
- Issue using plugin HOT 7
- Collapsible HOT 1
- No timeline-templates to select HOT 1
- Using the timeline-event template throws exception HOT 7
- Date in frontmatter not showing in timeline. HOT 2
- not a bug, just sharing HOT 1
- Feature request no images in timeline overview. HOT 1
- Integration into an active theme HOT 3
- Calling "timeline_iteration" on template is deprecated since version 1.28 HOT 1
- Error installation : need carbon HOT 6
- Upcoming events on main page HOT 2
- Event page content output incorrect
- Timeline error on Creator.php HOT 1
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 grav-plugin-timeline.