Git Product home page Git Product logo

paginate's Introduction

paginate's People

Contributors

daniel-samson avatar qwandor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

qwandor

paginate's Issues

Release v1.1.0

  • Fix style, tests and ci issues
  • Update tag / Create Release
  • Publish to crates
  • Update documentation

Build Failing

Describe the bug

Build failing due to cargo release not able to publish crate to crates.io registry.

Feature request: agnostic web pagination

Is your feature request related to a problem? Please describe.

I want to be able to pass pagination as a json object in a framework agnostic way. So if i am using bootstrap, tailwindcss, with react or vuejs, i can create can reuse their respective pagination components.

Describe the solution you'd like

Example json

{
  "meta": {
    "page": {
      "current-page": 2,
      "per-page": 15,
      "from": 16,
      "to": 30,
      "total": 50,
      "last-page": 4
    }
  },
  "links": {
    "first": "http://localhost/api/v1/posts?page[number]=1&page[size]=15",
    "prev": "http://localhost/api/v1/posts?page[number]=1&page[size]=15",
    "next": "http://localhost/api/v1/posts?page[number]=3&page[size]=15",
    "last": "http://localhost/api/v1/posts?page[number]=4&page[size]=15"
  },
  "data": [...]
}

Example rust

let baseUrl = "http://localhost/api/v1/posts?foo=bar";
let items: Pages = someProcess();
page = pages.toWeb(baseUrl, items);

Needs Documentation: More examples

Description

we should have more real world examples, for slices etc. Perhaps we need an example directory

Context

I think it would help users see the benefit of this crate compared to other crates

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.