Giter Club home page Giter Club logo

Comments (3)

OleVik avatar OleVik commented on August 28, 2024 1

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.

OleVik avatar OleVik commented on August 28, 2024

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.

OleVik avatar OleVik commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.