+ <% if params[:skip] %>
+ Show Calendar
+ <% else %>
+ Hide Calendar
+
+ Go to current Page
<% end %>
diff --git a/lib/pagy/calendar.rb b/lib/pagy/calendar.rb
index 81ea964ef..64da94b12 100644
--- a/lib/pagy/calendar.rb
+++ b/lib/pagy/calendar.rb
@@ -48,7 +48,7 @@ def label_for(page, opts = {})
protected
- # The page for the passed time
+ # The page that includes time
def page_at(time)
raise OutOfRangeError unless time.between?(@initial, @final)
diff --git a/lib/pagy/calendar/helper.rb b/lib/pagy/calendar/helper.rb
index b2336125b..906118791 100644
--- a/lib/pagy/calendar/helper.rb
+++ b/lib/pagy/calendar/helper.rb
@@ -2,11 +2,14 @@
class Pagy # :nodoc:
class Calendar # :nodoc:
- class Helper < Hash # :nodoc:
+ # Initializes the calendar objects, reducing complexity in the extra
+ # The returned calendar is a simple hash of units/objects with an added helper
+ # returning the last_object_at(time) used in the extra
+ class Helper < Hash
class << self
private
- def create(conf, period, params)
+ def init(conf, period, params)
new.send(:init, conf, period, params)
end
end
@@ -27,7 +30,7 @@ def init(conf, period, params)
conf[unit][:page] = @params[unit_page_param]
end
calendar = {}
- last_obj = nil
+ object = nil
@units.each_with_index do |unit, index|
params_to_delete = @units[(index + 1), @units.size].map { |sub| conf[sub][:page_param] } + [@page_param]
conf[unit][:params] = lambda do |unit_params| # delete page_param from the sub-units
@@ -35,25 +38,23 @@ def init(conf, period, params)
params_to_delete.each { |p| unit_params.delete(p.to_s) }
unit_params
end
- conf[unit][:period] = last_obj&.send(:active_period) || @period
- calendar[unit] = last_obj = Calendar.send(:create, unit, conf[unit])
+ conf[unit][:period] = object&.send(:active_period) || @period
+ calendar[unit] = object = Calendar.send(:create, unit, conf[unit])
end
- [replace(calendar), last_obj.from, last_obj.to]
+ [replace(calendar), object.from, object.to]
end
- def last_object_at(date)
- conf = Marshal.load(Marshal.dump(@conf))
- units_params = {}
- last_obj = nil
- @units.each do |unit|
- conf[unit][:period] = last_obj&.send(:active_period) || @period
- conf[unit][:page] = current_page = Calendar.send(:create, unit, conf[unit]).send(:page_at, date)
- units_params[:"#{unit}_#{@page_param}"] = current_page
+ def last_object_at(time)
+ conf = Marshal.load(Marshal.dump(@conf))
+ page_params = {}
+ @units.inject(nil) do |object, unit|
+ conf[unit][:period] = object&.send(:active_period) || @period
+ conf[unit][:page] = page_params[:"#{unit}_#{@page_param}"] \
+ = Calendar.send(:create, unit, conf[unit]).send(:page_at, time)
conf[unit][:params] ||= {}
- conf[unit][:params].merge!(units_params)
- last_obj = Calendar.send(:create, unit, conf[unit])
+ conf[unit][:params].merge!(page_params)
+ Calendar.send(:create, unit, conf[unit])
end
- last_obj
end
end
end
diff --git a/lib/pagy/extras/calendar.rb b/lib/pagy/extras/calendar.rb
index 5bc053f83..b87f12c45 100644
--- a/lib/pagy/extras/calendar.rb
+++ b/lib/pagy/extras/calendar.rb
@@ -21,15 +21,15 @@ def pagy_calendar(collection, conf)
conf[:pagy] = {} unless conf[:pagy] # use default Pagy object when omitted
unless conf.key?(:active) && !conf[:active]
- calendar, from, to = Calendar::Helper.send(:create, conf, pagy_calendar_period(collection), params)
+ calendar, from, to = Calendar::Helper.send(:init, conf, pagy_calendar_period(collection), params)
collection = pagy_calendar_filter(collection, from, to)
end
pagy, results = send(conf[:pagy][:backend] || :pagy, collection, conf[:pagy]) # use backend: :pagy when omitted
[calendar, pagy, results]
end
- def pagy_calendar_url_at(calendar, date)
- pagy_url_for(calendar.send(:last_object_at, date), 1)
+ def pagy_calendar_url_at(calendar, time)
+ pagy_url_for(calendar.send(:last_object_at, time), 1)
end
# This method must be implemented by the application
From b4761c03c6d1a8841fec4fb1fff7d86f37d95c92 Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Tue, 13 Dec 2022 12:06:49 +0700
Subject: [PATCH 06/29] Dropped docker env support
---
.devcontainer/devcontainer.json | 48 -----
.vscode/launch.json | 44 -----
.vscode/settings.json | 90 ---------
.vscode/tasks.json | 134 --------------
docker/.gitignore | 2 -
docker/Dockerfile | 101 -----------
docker/Dockerfile.docs | 20 --
docker/README.md | 202 ---------------------
docker/docker-compose.override-example.yml | 82 ---------
docker/docker-compose.yml | 74 --------
docker/setup-env.sh | 14 --
11 files changed, 811 deletions(-)
delete mode 100644 .devcontainer/devcontainer.json
delete mode 100644 .vscode/launch.json
delete mode 100644 .vscode/settings.json
delete mode 100644 .vscode/tasks.json
delete mode 100644 docker/.gitignore
delete mode 100644 docker/Dockerfile
delete mode 100644 docker/Dockerfile.docs
delete mode 100644 docker/README.md
delete mode 100644 docker/docker-compose.override-example.yml
delete mode 100644 docker/docker-compose.yml
delete mode 100755 docker/setup-env.sh
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
deleted file mode 100644
index adbcd0870..000000000
--- a/.devcontainer/devcontainer.json
+++ /dev/null
@@ -1,48 +0,0 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
-// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/docker-existing-docker-compose
-// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
-
-// Pagy: we try to use VSC config as less as possible, limiting it to the VSC specific stuff
-// in order to get docker/docker-compose files/config as portable as possible between editors, IDEs or CLI.
-// This file should giver you all the basic extensions and setting for developing pagy
-// Full details https://github.com/ddnexus/pagy/tree/master/docker
-
-// IMPORTANT: Run the `Remote-Containers: Rebuild Container...` VSCode command
-// each time you modify this file.
-{
- "dockerComposeFile": [
- "../docker/docker-compose.yml",
- "../docker/docker-compose.override.yml"
- ],
- "extensions": [
- "antfu.browse-lite",
- "castwide.solargraph",
- "cnshenj.vscode-task-manager",
- "davidanson.vscode-markdownlint",
- "dbaeumer.vscode-eslint",
- "eamodio.gitlens",
- "jdforsythe.add-new-line-to-files",
- "kaiwood.endwise",
- "mhutchie.git-graph",
- "misogi.ruby-rubocop",
- "msjsdiag.debugger-for-edge",
- "msjsdiag.debugger-for-edge",
- "rangav.vscode-thunder-client",
- "rebornix.ruby",
- "shardulm94.trailing-spaces",
- "shevtsov.vscode-cy-helper",
- "streetsidesoftware.code-spell-checker",
- "tht13.html-preview-vscode",
- "wingrunr21.vscode-ruby",
- "yzhang.markdown-all-in-one",
- ],
- "name": "pagy-dev",
- "runServices": [
- "pagy-dev",
- "pagy-docs"
- ],
- // "shutdownAction": "none",
- "service": "pagy-dev",
- "settings": {},
- "workspaceFolder": "/pagy"
-}
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 6935cde25..000000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version" : "0.2.0",
- "configurations" : [
- {
- "name" : "Debug Active File",
- "type" : "Ruby",
- "request" : "launch",
- "program" : "${file}",
- "programArgs" : [],
- "useBundler" : true,
- },
- {
- "name" : "Attach to rdebug-ide",
- "type" : "Ruby",
- "request" : "attach",
- "remoteHost" : "0.0.0.0",
- "remotePort" : "1234",
- "remoteWorkspaceRoot" : "${workspaceRoot}"
- },
- {
- "name" : "Pagy IRB",
- "preLaunchTask" : "preLaunchTask - debugger wait for pagy IRB",
- "type" : "Ruby",
- "request" : "attach",
- "remoteHost" : "0.0.0.0",
- "remotePort" : "1234",
- "remoteWorkspaceRoot" : "${workspaceRoot}",
- "cwd" : "${workspaceRoot}",
- },
- {
- "name" : "pagy_standalone_app.ru",
- "preLaunchTask" : "preLaunchTask - debugger wait for pagy_standalone_app",
- "type" : "Ruby",
- "request" : "attach",
- "remoteHost" : "0.0.0.0",
- "remotePort" : "1234",
- "remoteWorkspaceRoot" : "${workspaceRoot}",
- "cwd" : "${workspaceRoot}",
- },
- ]
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 29cab56f2..000000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "cSpell.words": [
- "activerecord",
- "arel",
- "autorun",
- "backport",
- "blocklist",
- "bulma",
- "Chainable",
- "Codecov",
- "ddnexus",
- "Demichelis",
- "devcontainer",
- "Domizio",
- "downarrow",
- "entrypoint",
- "Gitter",
- "haml",
- "htmlvalidate",
- "javascripts",
- "Kaminari",
- "Koshy",
- "meilisearch",
- "minimalistic",
- "mongoid",
- "navless",
- "navs",
- "overridable",
- "Padrino",
- "pagy",
- "pluralizations",
- "prepended",
- "rackup",
- "rebased",
- "rubygem",
- "screencast",
- "screencasts",
- "searchkick",
- "solargraph",
- "stylesheet",
- "turbolinks",
- "uikit",
- "uncommenting",
- "unscope",
- "unstyled",
- "uparrow",
- "Webpacker"
- ],
- "cypressHelper.commandForOpen": "npx cypress open --project=/pagy/e2e",
- "cypressHelper.commandForRun": "npx cypress run --project=/pagy/e2e",
- "cypressHelper.menuItems": {
- "FindCustomCommandReferences": true,
- "FindStepDefinitionReferences": true,
- "GenerateCustomCommandTypes": true,
- "GoToCustomCommand": true,
- "mockAutocomplete": false,
- "OpenCypress": true,
- "RunCypress": true,
- "SchemaGenerator": true
- },
- "diffEditor.ignoreTrimWhitespace": false,
- "markdownlint.config": {
- "blanks-around-fences": true,
- "MD024": false,
- "MD025": false,
- "MD026": false,
- "MD033": false,
- "MD046": false
- },
- "markdownlint.run": "onType",
- "ruby.format": "rubocop",
- "ruby.lint": {
- "rubocop": {
- "useBundler": true // enable rubocop via bundler
- },
- "standard": false
- },
- "ruby.useBundler": true, //run non-lint commands with bundle exec
- "ruby.useLanguageServer": true, // use the internal language server (see below)
- "solargraph.useBundler": true,
- "taskManager.exclude": "^preLaunchTask",
- "terminal.integrated.profiles.linux": {
- "bash": {
- "icon": "terminal-bash",
- "path": "bash"
- }
- },
- "trailing-spaces.highlightCurrentLine": false,
- "trailing-spaces.trimOnSave": true
-}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index e37d88fe8..000000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "test: All",
- "type": "shell",
- "command": "rake",
- "group": "test",
- },
- {
- "label": "test: All With HTML Reports",
- "type": "shell",
- "command": "rake",
- "options": {
- "env": {
- "HTML_REPORTS": "true"
- }
- },
- "group": "test"
- },
- {
- "label": "preLaunchTask - debugger wait for pagy IRB",
- "type": "shell",
- "command": "rdebug-ide",
- "args": [
- "--host=0.0.0.0",
- "--port=1234",
- "--dispatcher-port=1234",
- "--",
- "/usr/local/bundle/bin/bundle",
- "exec",
- "irb",
- "--simple-prompt",
- "-Ilib",
- "-rpagy"
- ],
- "isBackground": true,
- // Fake watch script setup used to wait the debugger to attach
- // All this is needed so VSCode just lets it run.
- "problemMatcher": [
- {
- "pattern": [
- {
- "regexp": ".",
- "file": 1,
- "location": 2,
- "message": 3
- }
- ],
- "background": {
- "activeOnStart": true,
- "beginsPattern": ".",
- "endsPattern": ".",
- }
- }
- ]
- },
- {
- "label": "IRB Pagy",
- "type": "shell",
- "command": "irb",
- "args": [
- "-Ilib",
- "-rpagy"
- ],
- "options": {
- "shell": {
- "executable": "bash",
- "args": [
- "-c"
- ]
- }
- },
- "presentation": {
- "reveal": "always",
- "close": true
- },
- "group": "test"
- },
- {
- "label": "preLaunchTask - debugger wait for pagy_standalone_app",
- "type": "shell",
- "command": "rdebug-ide",
- "args": [
- "--host=0.0.0.0",
- "--port=1234",
- "--dispatcher-port=1234",
- "--",
- "/usr/local/bundle/bin/rackup",
- "-o0.0.0.0",
- "-p8080",
- "apps/pagy_standalone_app.ru",
- ],
- "isBackground": true,
- // Fake watch script setup used to wait the debugger to attach
- // All this is needed so VSCode just lets it run.
- "problemMatcher": [
- {
- "pattern": [
- {
- "regexp": ".",
- "file": 1,
- "location": 2,
- "message": 3
- }
- ],
- "background": {
- "activeOnStart": true,
- "beginsPattern": ".",
- "endsPattern": ".",
- }
- }
- ]
- },
- {
- "label": "E2E Test: run in terminal",
- "type": "shell",
- "command": "/pagy/e2e/cy",
- "args": [
- "run"
- ],
- "group": "test"
- },
- {
- "label": "E2E Test: open cypress",
- "type": "shell",
- "command": "/pagy/e2e/cy",
- "args": [
- "open"
- ],
- "group": "test"
- }
- ]
-}
diff --git a/docker/.gitignore b/docker/.gitignore
deleted file mode 100644
index 6ab8f81e5..000000000
--- a/docker/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/.env
-/docker-compose.override.yml
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index 3538743c2..000000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,101 +0,0 @@
-ARG ruby_version=3
-
-FROM ruby:$ruby_version AS pagy-dev
-
-RUN apt-get update && apt-get install --no-install-recommends -y locales \
- && sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
- && locale-gen \
- && apt-get install --no-install-recommends -y \
- git \
- nano \
- libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
- libcanberra-gtk* \
- && rm -rf /var/lib/apt/lists/* \
- && apt-get clean
-
-ARG user
-ARG group
-ARG uid
-ARG gid
-ARG password=rubydev
-ARG term=xterm-256color
-ARG node_version=v16.10.0
-
-RUN mkdir /opt/node \
- && curl https://nodejs.org/dist/${node_version}/node-${node_version}-linux-x64.tar.xz \
- | tar xfJ - --strip-components 1 -C /opt/node
-
-ENV \
- PATH=/opt/node/bin:${PATH} \
- BUNDLE_PATH=/usr/local/bundle \
- GEM_HOME=/usr/local/bundle \
- BUNDLE_APP_CONFIG=/usr/local/bundle \
- BUNDLE_BIN=/usr/local/bundle/bin \
- LS_OPTIONS='--color=auto' \
- EDITOR=nano \
- SHELL=/bin/bash \
- TERM=$term \
- LANG=en_US.UTF-8 \
- LANGUAGE=en_US.UTF-8 \
- LC_ALL=en_US.UTF-8
-
-# setup users and .bashrc
-# - same pasword for user and root
-# - color prompt for user and root
-# - create dirs and chown them
-RUN groupadd --gid=$gid --force $group \
- && useradd --uid=$uid --gid=$gid --shell=/bin/bash --create-home $user \
- && echo $user:$password | chpasswd \
- && echo root:$password | chpasswd \
- && sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/' /home/$user/.bashrc \
- && sed -i 's/\\u@\\h\\\[\\033\[00m\\\]:\\\[\\033\[01;34m\\\]\\w\\\[\\033\[00m\\\]/\\u \\\[\\033\[01;34m\\\]\\w\\\[\\033\[00m\\\] /' /home/$user/.bashrc \
- && echo "export PROMPT_COMMAND='history -a' && export HISTFILE=/home/$user/.bash_history" >> /home/$user/.bashrc \
- && cp /home/$user/.bashrc /root/.bashrc \
- && mkdir -p \
- /home/$user/.config \
- /home/$user/.local/share \
- /pagy/node_modules \
- && touch /pagy/node_modules/.keep \
- && chown -R $uid:$gid \
- $BUNDLE_PATH \
- /home/$user \
- /pagy/node_modules
-WORKDIR /pagy
-
-VOLUME \
- /home/$user \
- $BUNDLE_PATH
-
-
-# Stage for user customization. Add here what you may need
-# and create your own a docker-compose.override.yml out of the
-# docker-compose.override-example.yml.
-FROM pagy-dev AS pagy-custom-dev
-RUN apt-get update && apt-get install --no-install-recommends -y \
- docker.io \
- && rm -rf /var/lib/apt/lists/* && apt-get autoremove -y && apt-get clean -y
-
-
-# Stage for enabling also hardware acceleration (WebGL) for NVIDIA cards: Host and container use nouveau driver.
-# This is useful only if you want to use a browser installed in the container or shared from the host
-FROM pagy-custom-dev AS pagy-custom-nouveau-dev
-RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
- && apt-get update && apt-get install --no-install-recommends -y \
- mesa-utils mesa-utils-extra xserver-xorg-video-nouveau \
- && rm -rf /var/lib/apt/lists/* && apt-get clean -y
-
-
-# Stage for enabling also hardware acceleration (WebGL) for NVIDIA cards: Host and container use NVIDIA driver.
-# This is useful only if you want to use a browser installed in the container or shared from the host
-# IMPORTANT: you must run the setup-env.sh and rebuild this stage when you update the host's NVIDIA driver
-FROM pagy-custom-dev AS pagy-custom-nvidia-dev
-ARG nvidia_version
-ADD https://http.download.nvidia.com/XFree86/Linux-x86_64/${nvidia_version}/NVIDIA-Linux-x86_64-${nvidia_version}.run /tmp/NVIDIA-installer.run
-RUN apt-get update && apt-get install --no-install-recommends -y kmod \
- && nvidia_opts='--accept-license --no-runlevel-check --no-questions --no-backup --ui=none --no-kernel-module --no-nouveau-check' ; \
- sh /tmp/NVIDIA-installer.run -A | grep -q -- '--install-libglvnd' && nvidia_opts="$nvidia_opts --install-libglvnd" ; \
- sh /tmp/NVIDIA-installer.run -A | grep -q -- '--no-nvidia-modprobe' && nvidia_opts="$nvidia_opts --no-nvidia-modprobe" ; \
- sh /tmp/NVIDIA-installer.run -A | grep -q -- '--no-kernel-module-source' && nvidia_opts="$nvidia_opts --no-kernel-module-source" ; \
- sh /tmp/NVIDIA-installer.run $nvidia_opts || { echo 'ERROR: Installation of NVIDIA driver failed.' >&2 ; exit 1 ; } ; \
- rm /tmp/NVIDIA-installer.run \
- && apt-get remove -y kmod && rm -rf /var/lib/apt/lists/* && apt-get autoremove -y && apt-get clean -y
diff --git a/docker/Dockerfile.docs b/docker/Dockerfile.docs
deleted file mode 100644
index b36b88bc8..000000000
--- a/docker/Dockerfile.docs
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM ruby:2-alpine
-
-WORKDIR /opt
-
-# one step to exclude .build_deps from docker cache
-RUN apk update \
- && apk add --no-cache --virtual .build_deps make build-base \
- && echo "source 'https://rubygems.org'" > Gemfile \
- && echo "gem 'github-pages', '218', group: :jekyll_plugins" >> Gemfile \
- && bundle install \
- && apk del .build_deps
-
-ENV LANG=en_US.UTF-8 \
- LANGUAGE=en_US.UTF-8 \
- LC_ALL=en_US.UTF-8
-
-CMD ["jekyll", "serve", "-H", "0.0.0.0", "-P", "4000"]
-
-EXPOSE 4000 35729
-VOLUME /opt/site
diff --git a/docker/README.md b/docker/README.md
deleted file mode 100644
index 7e8f863e6..000000000
--- a/docker/README.md
+++ /dev/null
@@ -1,202 +0,0 @@
-# Pagy Docker Environment
-
-This dir contains the docker files to setup a complete development environment without installing anything on your system.
-
-You can use it to develop changes, run ruby and E2E tests, and check the live preview of the documentation.
-
-## Prerequisites
-
-- recent `docker`
-- recent `docker-compose`
-- basic knowledge of `docker`/`docker-compose`
-
-## Caveats
-
-It works well on Linux. Other platforms are not tested but should work as well.
-
-## Optional
-
-- `Visual Studio Code` or `RubyMine` (the repo contains a complete and ready to use setup that will make your life super easy)
-
-# Pagy Development Environment
-
-The pagy docker environment has been designed to be a complete setup for development. It provides the infrastructure required (right version of ruby, development gems, jekyll server, env variables, tests, cypress, etc.) without the hassle to install and maintain anything in your system.
-
-Here are a few highlights:
-- The `pagy-dev` container is run as your user (same name, UID and GID) and the local `pagy` dir is mounted at the container dir `/pagy` so you can edit the files in your local pagy dir or in the container: they are the same files edited by the same user.
-- The gems are installed and persisted in the container `BUNDLE_PATH=/usr/local/bundle` and that dir is `chown`ed to your user, and mounted as the docker volume `pagy_bundle`: no need to rebuild the image no mixup with your own ruby/rubies.
-- Your container user `HOME` is persisted in the `pagy_user_home` volume, so you can even get back to the shell history in future sessions.
-- The `node_modules` dir is persisted in the `pagy_node_modules` volume: no mixup with your local `node`
-- The `opt/site` is persisted in the `docs_site` volume and updated live at `http://0.0.0.0:4000`, so you can check how the documentation looks while editing it.
-
-## :pushpin: Dir Map
-
-- Exec docker-related commands from your local `/docker` dir (repo `docker` dir)
-- Exec commands from the container `/pagy` dir (repo root dir)
-
-## Build
-
-Run in the local terminal:
-
-```sh
-/docker $ ./setup-env.sh && DOCKER_BUILDKIT=1 docker-compose build
-```
-
-**Notice**: the `setup-env.sh` creates an `.env` file with what is needed to build the docker images with `docker-compose`. You can further customize the `.env` file after it is created.
-
-## If you don't use any specific IDE
-
-**Notice**: see [VSCode](#vscode) or [RubyMine](#rubymine) for specific setups.
-
-In order to complete the setup, you need to issue a couple of commands from the container terminal, so first open a bash session:
-
-```sh
-/docker $ docker-compose run --rm pagy-dev bash
-```
-
-Then run the following commands in it:
-
-```shell
-/pagy $ bundle install
-/pagy $ npm ci
-```
-
-### Use the services
-
-Start the services:
-
-```sh
-/docker $ docker-compose up
-```
-
-Open a shell in the running `pagy-dev` service (useful to interactively run commands):
-
-```shell
-/docker $ docker-compose exec pagy-dev bash
-```
-
-then run from the container shell a few useful commands:
-
-```sh
-# IRB with the `pagy` gem loaded and ready to try
-/pagy $ irb -I lib -r pagy
-# run the `test`, `rubocop`, `coverage_summary` and `manifest:check` tasks in one command
-/pagy $ rake
-# get also the coverage report (check it by opening the `coverage/index.html` in a browser)
-/pagy $ HTML_REPORTS=true rake
-# get list of tests available (so you can run them individually)
-/pagy $ rake -D test_*
-# run the e2e tests in the terminal
-/pagy/e2e $ npm run test
-# open cypress and run the test in its GUI
-/pagy/e2e $ npm run test-open
-```
-
-Check the live docs site at `http://localhost:4000`. It reflects in real-time any update you do to the `*.md` page files (no page reload needed).
-
-Stop the services:
-
-```sh
-/docker $ docker-compose down
-```
-
-Or run a service only for the execution of a specific command (it does not require `up` and `down`):
-
-```shell
-# run all the ruby tests, including rubocop and coverage tasks
-/docker $ docker-compose run --rm pagy-dev rake
-# run the e2e tests in the terminal
-/docker $ docker-compose run --rm pagy-dev npm -w e2e run test
-# open cypress and run the test in its GUI
-/docker $ docker-compose run --rm pagy-dev npm -w e2e run test-open
-```
-
-## VSCode
-
-The Pagy repository comes with the VSCode files that setup a complete **Development Environment** on your local installation almost automatically.
-
-1. Read the comments in the `docker/docker-compose.override-example.yml` file and create your own `docker-compose.override.
- yml` before anything else.
-2. You need the [Remote Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. Installation instructions:
- 1. Open VS Code, and hit: `Ctrl+P`
- 2. Paste `ext install ms-vscode-remote.remote-containers`
- 3. Hit `Enter`
-3. Run the `Remote-Containers: Open Folder in Container...` command and pick your local `pagy` repository dir (VSCode will prepare the environment).
-4. Run `bundle install` in the container terminal to complete the ruby setup.
-5. Run `npm ci` in the container terminal to complete the e2e setup.
-6. Open Cypress from the container terminal with `cypress open` go to Settings and choose VSCode as the File Opener.
-
-### Setup Solargraph
-
-- Run in container terminal `bundle exec yard gems`
-- VSCode command `Solargraph: Rebuild all gem documentation`
-- VSCode command `Solargraph: Download current Ruby documentation`
-- VSCode command `Solargraph: Restart Solargraph`
-
-### Ready to use
-
-- Rubocop linting and formatting
-- Solargraph intellisense
-- One-click-run all the tasks from the `Task Manager` list (find its Icon in the Activity Bar)
-- Ready to use generic and pagy-specific debugger launch configurations
-- The most useful extensions for developing pagy (take a look in the `Pagy Dev Container: Pagy - Installed` Extension group)
-- [Intelligent code completion](https://docs.cypress.io/guides/tooling/IDE-integration#Intelligent-Code-Completion) for Cypress and the custom Pagy commands already setup
-- Eslint + VSCode Eslint extension configured for Cypress
-
-### Useful commands
-
-- Instead of typing `irb -I lib -r pagy` you can run IRB from the command palette `Run Terminal Command...`
-- Run all the `test`, `rubocop`, `coverage_summary` and `manifest:check` tasks by picking the `test: All` from the `Task Manager`
-- Run the `test: All With HTML Reports` from the `Task Manager` to get also a nice HTML coverage report. Check it by opening the `coverage/index.html` in a browser.
-- Check the live docs site at `http://localhost:4000`. It updates in real-time any update you do to the `*.md` page files (no page reload needed).
-
-## RubyMine
-
-Pagy offers an unconventional setup for RubyMine that makes it work as it was installed directly in the container (VSCode style). That means that RubyMine will be using a regular local SDK from the container. That usage is simpler and works also where you can find quite a few problems with the traditional remote docker-compose SDK.
-
-
-
-The pagy docker-compose setup works well for the pagy docker environment, and it works also with VSCode or with different level of integration with other IDEs or CLI. Unfortunately I've got quite a lot of problems to run it as a standard [Docker-compose as a remote interpreter](https://www.jetbrains.com/help/ruby/using-docker-compose-as-a-remote-interpreter.html#set_compose_remote_interpreter), so I abandoned the official remote way and found this way. You can try the official way if you feel adventurous :).
-
-
-
-### Custom setup
-
-In order to make RubyMine work inside the container, you need to take a look at the `docker/docker-compose.override-example.yml`: it contains a working example and the comments that should allow you to customize it for your own system.
-
-
-
-The basic target/stage for using RubyMine from the container is the (`docker-custom-dev`: the default). That enables 98% of capabilities of RubyMine. The only small limitation is that the link won't work from inside RubyMine, since there is no browser installed in the container, nor drivers to share one from your host. However that is the simplest target and the one you should probably pick.
-
-If you are really picky and want to have 100% of browser features, the `Dockerfile` includes also stages for NVIDIA cards. That are bigger builds but you can run also any browser from inside RubyMine, even if the browser is installed on the host. That is what I use for my own development environment (see the `docker/docker-compose.override-example.yml`).
-
-
-
-After you create your own overriding, you should build normally (see [Build](#build)). It will build the `pagy-custom-dev` and everything should work. As soon as you run `docker-compose up` Rubymine should open from the container and you can create a local SDK.
-
-Open the terminal and run this in order to complete the setup:
-
-```shell
-/pagy $ bundle install
-/pagy $ npm ci
-```
-
-**IMPORTANT**: If the Ruby SDK does not find all the gems after installing them, then you may want to check whether the `GEM_PATH` environment variable contains also `/usr/local/bundle/ruby/3.0.0` (`Tools`>`Show Gem Environment`) and add it if needed. To add it you an create a `New local with custom configurator...` SDK, adding the `env GEM_PATH=/usr/local/bundle/ruby/3.0.0:/home/dd/.local/share/gem/ruby/3.0.0:/usr/local/lib/ruby/gems/3.0.0` as `Custom configurator`.
-
-### Run configurations
-
-A few run configurations are provided for interacting with `docker-compose` and the development, giving you the menus to run the more important tasks and tools. RubyMine will pick them up automatically. They work in this setup, but they might have to be adapted if you want to use them in a traditional remote docker-compose SDK.
-
-### Caveats
-
-The coverage has an advanced Simplecov setup and RubyMine may not handle it. If the usual RubyMine coverage tools don't work, you can trigger the coverage by running the task without the RubyMine coverage, or use`rake` or `HTML_REPORTS=true rake` in the terminal.
-
-# Clean up
-
-When you want to get rid of everything related to the `pagy` docker development on your system, here is a list of the commands to find them:
-
-- Volumes: `docker volume ls | grep pagy`
-- Images: `docker images | grep -E 'pagy|cypress'`
-- Image dependencies: if you are not using them for other containers, you may also want to check `docker images | grep -E 'ruby|alpine|debian'`
-- Containers: `docker ps -a | grep pagy`
-- Networks: `docker network ls | grep pagy`
diff --git a/docker/docker-compose.override-example.yml b/docker/docker-compose.override-example.yml
deleted file mode 100644
index 38699a2be..000000000
--- a/docker/docker-compose.override-example.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# Duplicate and rename the copy of this file as 'docker-compose.override.yml' so it will
-# automatically get loaded from docker-compose, overriding the main 'docker-compose.yml' file.
-
-# Docker in Docker
-# Customize the "group_add" entry for Docker in Docker.
-
-# Ubuntu 21.04
-# The file works almost as is with RubyMine and VSCode (see the sections below).
-# It might require some adjustment if you use a different OS.
-
-# JetBrains RubyMine
-# This file is a working example to use a local installation of RubyMine as it was installed inside the container.
-# Notice: RubyMine may also be able to handle docker-compose run configuration without the need of this setup:
-# in that case you have to create a remote docker-compose Ruby SDK and follow the official JetBrains doc.
-
-# VSCode + Remote Containers Extension
-# The file is a working example to use VSCode + the Remote Containers Extension.
-# Search for "VSCode" in the comments below in order to enable/disable what it needs.
-
-version: "3.8"
-services:
- pagy-dev:
- build:
- # Pick the stage to build
- target: pagy-custom-dev
-# Needed only for running a browser from the container
-# target: pagy-custom-nvidia-dev # nvidia proprietary driver
-# shm_size: 2gb # Building shared memory (usually not needed)
-# shm_size: 2gb # Runtime shared memory (recommended to use google chrome normally)
- init: true
- environment:
- # Share ENV with the host
-# - DISPLAY # Just a ref: already defined in the main docker-compose.yml
- - XAUTHORITY
- - DBUS_SESSION_BUS_ADDRESS
- # Needed only for full sharing of graphic and sound e.g. with a browser from the container
-# devices:
-# - /dev/dri:/dev/dri
-# - /dev/snd:/dev/snd
-
- volumes:
- # share Google Chrome installed on host (configure RubyMine to find it at the right path)
- - /opt/google/chrome:/opt/google/chrome
- # Time sync with host
- - /etc/localtime:/etc/localtime:ro
- # X11 and Dbus related
- - $XAUTHORITY:$XAUTHORITY
- - /tmp/.X11-unix:/tmp/.X11-unix
- - /var/run/dbus:/var/run/dbus
- - /run/user/$UID/bus:/run/user/$UID/bus
- # JetBrains IDEs from the container (disable if you don't use JetBrains IDEs)
- - /home/$USER/.local/share/JetBrains:/home/$USER/.local/share/JetBrains # JetBrains applications
- - /home/$USER/.config/JetBrains:/home/$USER/.config/JetBrains # JetBrains configuration
- - /home/$USER/jb:/home/$USER/jb # JetBrains CLI launchers (JetBrains Toolbox > Settings)
- # Git global config
- - /home/$USER/.gitconfig:/home/$USER/.gitconfig # .gitconfig file
- - /home/$USER/.git-credentials:/home/$USER/.git-credentials # .git-credentials file
- - /home/$USER/.config/git:/home/$USER/.config/git:ro # Host global git config
- - /home/$USER/.ssh:/home/$USER/.ssh:ro # Keys for github
- # Cosmetics
- - /home/$USER/.local/share/fonts:/home/$USER/.local/share/fonts:ro # User Fonts
- - /usr/share/fonts:/usr/share/fonts:ro # System Fonts
- - /usr/share/themes:/usr/share/themes:ro # System Themes
- - /usr/share/icons:/usr/share/icons:ro # System Icons and cursors
- # Docker in docker
- - /var/run/docker.sock:/var/run/docker.sock # Docker-in-docker setup
- group_add: # Docker-in-docker setup
- # Find your docker-host group with: `stat -c '%g' /var/run/docker.sock`
- # and add it here to allow permission on the docker socket
- - 135
-
- # May be useful for certain customizations (but it allows only one instance of RubyMine)
- # network_mode: host
-
- privileged: true # Needed for easy connection to dbus (e.g. cypress open)
-
- # Start RubyMine at `docker-compose up` (disable for VSCode)
- command: ["/home/$USER/jb/rubymine"]
-
- pagy-docs:
- # shutdown the docs service when you close RubyMine
- depends_on: [pagy-dev]
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
deleted file mode 100644
index 1a54b40b3..000000000
--- a/docker/docker-compose.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-# Complete Pagy development environment and live documentation server at http://0.0.0.0:4000
-
-# USAGE
-# cd docker
-# docker-compose up
-
-# Use your own docker-compose.override.yml if you need to customize any key/value in this file:
-# The override is git-ignored and it gets loaded automatically every time you use a docker-compose command
-
-version: "3.8"
-services:
- pagy-dev:
- image: pagy-dev-${RUBY_VERSION:-3}:latest
- build:
- context: .
- # The following args get set from ENV variables (use setup-env.sh to create the .env file)
- args:
- user: $USER
- group: $GROUP
- uid: $UID
- gid: $GID
- password: $PASSWORD
- term: $TERM
- ruby_version: ${RUBY_VERSION:-3}
- nvidia_version: $NVIDIA_VERSION # optional
- target: pagy-dev
- container_name: pagy-dev
- hostname: pagy-dev
- user: $USER
- volumes:
- - ..:/pagy # repo dir mount
- - user_home:/home/$USER # home dir
- - bundle:/usr/local/bundle # gem dir
- - node_modules:/pagy/node_modules # node_modules dir
- environment:
- - HTML_REPORTS # HTML reports of test coverage from local ENV
- - CYPRESS_CACHE_FOLDER=/home/$USER/.cache/Cypress
- - CYPRESS_baseUrl=http://0.0.0.0:4567
- - DISPLAY
- stdin_open: true
- tty: true
-
- pagy-docs:
- image: pagy-docs:latest
- build:
- context: .
- dockerfile: Dockerfile.docs
- container_name: pagy-docs
- environment:
- - JEKYLL_GITHUB_TOKEN
- ports:
- - "4000:4000"
- - "35729:35729"
- volumes:
- - ../docs:/opt/docs
- - docs_site:/opt/site
- command: |
- jekyll serve \
- --incremental \
- --livereload \
- --watch \
- --force-polling \
- --host 0.0.0.0 \
- --baseurl '' \
- --source /opt/docs \
- --destination /opt/site
- stdin_open: true
- tty: true
-
-volumes:
- bundle:
- user_home:
- node_modules:
- docs_site:
diff --git a/docker/setup-env.sh b/docker/setup-env.sh
deleted file mode 100755
index 4e7b01ca6..000000000
--- a/docker/setup-env.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-cat > .env << EOF
-COMPOSE_PROJECT_NAME=pagy
-USER=$(id -un)
-GROUP=$(id -gn)
-UID=$(id -u)
-GID=$(id -g)
-TERM=$TERM
-PASSWORD=rubydev
-RUBY_VERSION=3
-NVIDIA_VERSION=$(head -n1
Date: Tue, 13 Dec 2022 12:29:47 +0700
Subject: [PATCH 07/29] fixup .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index f24dcc58c..01b74066b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
node_modules/
/pkg/
/tmp/
+/.pnpm/*
From 8d3b33191d71bb20fffed50ee23a79a94790725a Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Thu, 9 Jun 2022 13:10:44 +0700
Subject: [PATCH 08/29] Removed support for deprecated pagy_massage_params
---
lib/pagy/extras/standalone.rb | 7 ++++---
lib/pagy/url_helpers.rb | 20 ++------------------
test/mock_helpers/app.rb | 8 --------
test/pagy/frontend_test.rb | 10 +---------
4 files changed, 7 insertions(+), 38 deletions(-)
diff --git a/lib/pagy/extras/standalone.rb b/lib/pagy/extras/standalone.rb
index fa5b78b0b..6a5ab593a 100644
--- a/lib/pagy/extras/standalone.rb
+++ b/lib/pagy/extras/standalone.rb
@@ -8,6 +8,7 @@ class Pagy # :nodoc:
# even in the irb/rails console without any app or config.
module StandaloneExtra
# Extracted from Rack::Utils and reformatted for rubocop
+ # :nocov:
module QueryUtils
module_function
@@ -32,6 +33,7 @@ def build_nested_query(value, prefix = nil)
end
end
end
+ # :nocov:
# Return the URL for the page. If there is no pagy.vars[:url]
# it works exactly as the regular #pagy_url_for, relying on the params method and Rack.
@@ -45,9 +47,8 @@ def pagy_url_for(pagy, page, absolute: false, html_escaped: false)
params = pagy.params.is_a?(Hash) ? pagy.params.clone : {} # safe when it gets reused
params[page_param] = page
params[items_param] = vars[:items] if vars[:items_extra]
- query_string = "?#{QueryUtils.build_nested_query(pagy_deprecated_params(pagy, params))}" # remove in 6.0
- # params = pagy.params.call(params) if pagy.params.is_a?(Proc) # add in 6.0
- # query_string = "?#{Rack::Utils.build_nested_query(params)}" # add in 6.0
+ params = pagy.params.call(params) if pagy.params.is_a?(Proc)
+ query_string = "?#{Rack::Utils.build_nested_query(params)}"
query_string = query_string.gsub('&', '&') if html_escaped # the only unescaped entity
"#{vars[:url]}#{query_string}#{vars[:fragment]}"
end
diff --git a/lib/pagy/url_helpers.rb b/lib/pagy/url_helpers.rb
index de832e2ab..0fed33b55 100644
--- a/lib/pagy/url_helpers.rb
+++ b/lib/pagy/url_helpers.rb
@@ -14,26 +14,10 @@ def pagy_url_for(pagy, page, absolute: false, html_escaped: false)
params = request.GET.merge(params)
params[page_param] = page
params[items_param] = vars[:items] if vars[:items_extra]
- query_string = "?#{Rack::Utils.build_nested_query(pagy_deprecated_params(pagy, params))}" # remove in 6.0
- # params = pagy.params.call(params) if pagy.params.is_a?(Proc) # add in 6.0
- # query_string = "?#{Rack::Utils.build_nested_query(params)}" # add in 6.0
+ params = pagy.params.call(params) if pagy.params.is_a?(Proc)
+ query_string = "?#{Rack::Utils.build_nested_query(params)}"
query_string = query_string.gsub('&', '&') if html_escaped # the only unescaped entity
"#{request.base_url if absolute}#{request.path}#{query_string}#{vars[:fragment]}"
end
-
- private
-
- # Transitional code to handle params deprecations. It will be removed in version 6.0
- def pagy_deprecated_params(pagy, params) # remove in 6.0
- if pagy.params.is_a?(Proc) # new code
- pagy.params.call(params)
- elsif respond_to?(:pagy_massage_params) # deprecated code
- Warning.warn '[PAGY WARNING] The pagy_massage_params method has been deprecated and it will be ignored from version 6. ' \
- 'Set the :params variable to a Proc with the same code as the pagy_massage_params method.'
- pagy_massage_params(params)
- else
- params # no massage params
- end
- end
end
end
diff --git a/test/mock_helpers/app.rb b/test/mock_helpers/app.rb
index 101bf193d..a80d97c7e 100644
--- a/test/mock_helpers/app.rb
+++ b/test/mock_helpers/app.rb
@@ -22,14 +22,6 @@ def test_i18n_call
I18n.t('test')
end
- class Overridden < MockApp
- # deprecated but still used for testing deprecations
- def pagy_massage_params(params) # remove in 6.0
- params.delete('delete_me')
- params.merge!('add_me' => 'add_me')
- end
- end
-
class Calendar < MockApp
def pagy_calendar_period(collection)
collection.minmax.map(&:in_time_zone)
diff --git a/test/pagy/frontend_test.rb b/test/pagy/frontend_test.rb
index cdaa5725b..be0a56cd9 100644
--- a/test/pagy/frontend_test.rb
+++ b/test/pagy/frontend_test.rb
@@ -159,16 +159,8 @@ def i18n_load(*locales)
end
end
- describe '#pagy_get_params and #pagy_massage_params r' do
+ describe '#pagy_get_params and r' do
it 'overrides params' do
- overridden = MockApp::Overridden.new(params: { delete_me: 'delete_me', a: 5 })
- pagy = Pagy.new count: 1000, page: 3, params: { b: 4 }, fragment: '#fragment'
- assert_output nil, /\[PAGY WARNING\]/ do
- _(overridden.pagy_url_for(pagy, 5)).must_equal "/foo?a=5&b=4&page=5&add_me=add_me#fragment"
- end
- assert_output nil, /\[PAGY WARNING\]/ do
- _(overridden.pagy_url_for(pagy, 5, html_escaped: true)).must_equal "/foo?a=5&b=4&page=5&add_me=add_me#fragment"
- end
app = MockApp.new(params: { delete_me: 'delete_me', a: 5 })
pagy = Pagy.new(count: 1000,
page: 3,
From 7b519e3785eb2899865df8c867001b51aec5df85 Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Thu, 9 Jun 2022 13:14:44 +0700
Subject: [PATCH 09/29] Removed activesupport hard dependency
---
.env | 4 ----
docs/api/calendar.md | 2 ++
pagy.gemspec | 4 ----
3 files changed, 2 insertions(+), 8 deletions(-)
delete mode 100644 .env
diff --git a/.env b/.env
deleted file mode 100644
index 050153681..000000000
--- a/.env
+++ /dev/null
@@ -1,4 +0,0 @@
-# VSCode has an issue (https://github.com/microsoft/vscode-remote-release/issues/512),
-# and does not see this the way it should, i.e. in the regular docker/.env file
-# so we duplicate it here
-COMPOSE_PROJECT_NAME=pagy
diff --git a/docs/api/calendar.md b/docs/api/calendar.md
index 2726b016d..7a4770b11 100644
--- a/docs/api/calendar.md
+++ b/docs/api/calendar.md
@@ -5,6 +5,8 @@ title: Pagy::Calendar
This is a `Pagy` subclass that provides pagination filtering by time: year, quarter, month, week, day (and supports your own [custom time units](#custom-units)).
+**Notice**: It requires the `activesupport` gem, which you have to require in your Gemfile only if your app does not use Rails.
+
**Notice**: The `Pagy::Calendar::*` subclasses provide support for the [calendar extra](../extras/calendar.md) and are meant to be used with standard, non-calendar Pagy classes and never alone (because they could generate a very high number of items per page). The class APIs are documented here, however you should not need to use them directly because they are required and used internally by the extra.
## Overview
diff --git a/pagy.gemspec b/pagy.gemspec
index 45fed5544..36629757c 100644
--- a/pagy.gemspec
+++ b/pagy.gemspec
@@ -20,9 +20,5 @@ Gem::Specification.new do |s|
'bug_tracker_uri' => 'https://github.com/ddnexus/pagy/issues',
'changelog_uri' => 'https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md',
'live_support' => 'https://gitter.im/ruby-pagy/Lobby' }
- # Avoid breaking changes for the rare apps that use Pagy::Calendar without Rails
- # It will be removed and replaced by a simple requirement in the calendar doc in Pagy 6.0
- # because it is only used by the calendar extra, and it's not a core dependency
- s.add_dependency('activesupport')
s.required_ruby_version = '>= 2.5'
end
From 16a1519e798fbf691e5fc045dc3a4a11fd44b68f Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Thu, 9 Jun 2022 15:49:37 +0700
Subject: [PATCH 10/29] Removed deprecated support for Time instances
---
e2e/pagy_app.ru | 4 +-
e2e/snapshots.js | 350 +--
lib/pagy/calendar.rb | 7 +-
lib/pagy/calendar/day.rb | 2 +-
lib/pagy/calendar/week.rb | 2 +-
test/files/calendar_collection.yml | 2526 +++++++++++++----
test/mock_helpers/app.rb | 2 +-
test/mock_helpers/collection.rb | 32 +-
test/pagy/calendar_test.rb | 4 -
.../pagy/extras/frontend_helpers_json_test.rb | 6 +-
test/pagy/extras/frontend_helpers_oj_test.rb | 6 +-
test/pagy/extras/i18n_calendar_extra_test.rb | 6 +-
test/pagy/extras/overflow_test.rb | 5 +-
13 files changed, 2237 insertions(+), 715 deletions(-)
diff --git a/e2e/pagy_app.ru b/e2e/pagy_app.ru
index 270d5dbe7..386e64942 100644
--- a/e2e/pagy_app.ru
+++ b/e2e/pagy_app.ru
@@ -57,11 +57,11 @@ class PagyApp < Sinatra::Base
end
def pagy_calendar_period(collection)
- collection.minmax.map { |t| t.getlocal(0) } # 0 utc_offset means 00:00 local time
+ collection.minmax
end
def pagy_calendar_filter(collection, from, to)
- collection.select_page_of_records(from.utc, to.utc) # storage in UTC
+ collection.select_page_of_records(from, to) # storage in UTC
end
get("/#{PAGY_JS}") do
diff --git a/e2e/snapshots.js b/e2e/snapshots.js
index cd8b8a1c4..964da29fe 100644
--- a/e2e/snapshots.js
+++ b/e2e/snapshots.js
@@ -1,423 +1,423 @@
module.exports = {
"Test all calendar navs for all styles": {
"Test /bootstrap-calendar #nav": {
- "1": "
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
2021-10-21 13:18:23 UTC | 2021-10-21 23:14:50 UTC | 2021-10-23\n 01:06:02 UTC | 2021-10-25 18:54:35 UTC | 2021-10-26 02:22:17 UTC | 2021-10-28\n 22:59:49 UTC | 2021-10-30 15:02:25 UTC
2021-11-02 04:03:39 UTC | 2021-11-04 22:41:23 UTC | 2021-11-06\n 00:34:29 UTC | 2021-11-06 23:56:16 UTC | 2021-11-07 06:22:04 UTC | 2021-11-07\n 19:46:08 UTC | 2021-11-08 09:31:13 UTC | 2021-11-09 17:22:03 UTC | 2021-11-11\n 05:29:54 UTC | 2021-11-13 09:41:04 UTC | 2021-11-16 07:48:22 UTC | 2021-11-16\n 12:43:44 UTC | 2021-11-17 16:03:07 UTC | 2021-11-20 02:39:01 UTC | 2021-11-21\n 02:01:24 UTC | 2021-11-23 19:24:43 UTC | 2021-11-26 11:47:22 UTC | 2021-11-28\n 06:30:04 UTC
2022-01-01 19:18:06 UTC | 2022-01-03 08:36:27 UTC | 2022-01-03\n 23:31:01 UTC | 2022-01-05 02:14:57 UTC | 2022-01-06 09:26:03 UTC | 2022-01-07\n 20:22:22 UTC | 2022-01-10 04:04:28 UTC | 2022-01-11 17:17:55 UTC | 2022-01-14\n 05:21:54 UTC | 2022-01-16 01:18:58 UTC | 2022-01-18 08:42:56 UTC | 2022-01-19\n 00:45:04 UTC | 2022-01-20 08:18:54 UTC | 2022-01-22 05:26:38 UTC | 2022-01-24\n 10:57:50 UTC | 2022-01-26 09:47:02 UTC | 2022-01-28 20:44:30 UTC | 2022-01-31\n 16:19:50 UTC
2023-11-02 02:52:55 UTC | 2023-11-02 06:00:32 UTC | 2023-11-03\n 08:39:06 UTC | 2023-11-04 23:51:22 UTC | 2023-11-07 16:11:33 UTC | 2023-11-10\n 10:55:29 UTC | 2023-11-12 01:20:18 UTC | 2023-11-12 04:22:50 UTC | 2023-11-12\n 08:38:58 UTC | 2023-11-13 15:43:40 UTC
2023-10-01 11:54:24 UTC | 2023-10-03 07:36:32 UTC | 2023-10-05\n 05:13:57 UTC | 2023-10-06 16:07:06 UTC | 2023-10-09 00:03:52 UTC | 2023-10-09\n 02:32:01 UTC | 2023-10-10 16:39:07 UTC | 2023-10-12 13:28:16 UTC | 2023-10-14\n 04:29:14 UTC | 2023-10-17 03:30:24 UTC | 2023-10-20 03:13:15 UTC | 2023-10-20\n 20:47:06 UTC | 2023-10-21 13:59:34 UTC | 2023-10-23 21:38:48 UTC | 2023-10-24\n 06:07:13 UTC | 2023-10-25 22:51:17 UTC | 2023-10-26 21:12:50 UTC | 2023-10-28\n 05:52:20 UTC | 2023-10-29 22:11:01 UTC | 2023-10-30 12:29:25 UTC
-
-
-
-
-
-
-{% if site.google_analytics %}
-
-{% endif %}
-
-
diff --git a/docs/api.md b/docs/api.md
deleted file mode 100644
index d44165325..000000000
--- a/docs/api.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: API
----
-# API
-
-The public API of Pagy is composed by 3 groups of modules:
-
-## Core modules
-
-The low level structure needed for standard usage. It's composed of just one class and two modules:
-
-- The [Pagy](api/pagy.md) core class that implements the pagination logic
-- The [Pagy::Backend](api/backend.md) module to include in your controllers
-- The [Pagy::Frontend](api/frontend.md) module to include in your helpers
-
-## Support modules/classes
-
-These modules/classes provide support for special environments or features that go beyond the standard usage:
-
-- The [Pagy::Calendar](api/calendar.md) subclass that that paginates the collection by calendar units (year, quarter, month, week, day) used by the [calendar](extras/calendar.md) extra.
-- The [Pagy::Countless](api/countless.md) subclass that provides the pagination without a count used by the [countless](extras/countless.md) extra. (It saves one count query per request).
-- The [Pagy::Console](api/console.md) module that provides easy interaction with pagy in the IRB/rails console
-- The [Pagy::I18n](api/i18n.md) module that provides multi-language translation of the pagy strings
-
-## Extras
-
-Pagy provides also a growing number of optional extensions/extras that can handle special features, collections or environments. See the [extras](extras.md) doc for the full list.
diff --git a/docs/api/backend.md b/docs/api/backend.md
index 29af97458..f3d297ea9 100644
--- a/docs/api/backend.md
+++ b/docs/api/backend.md
@@ -1,5 +1,9 @@
---
title: Pagy::Backend
+categories:
+- Core
+- Module
+description: This module provides the base functionality for the backend.
---
# Pagy::Backend
@@ -7,14 +11,16 @@ This module _(see [source](https://github.com/ddnexus/pagy/blob/master/lib/pagy/
For overriding convenience, the `pagy` method calls two sub-methods that you may need to override in order to customize it for any type of collection (e.g. different ORM types, Array, elasticsearch results, etc.).
-**Notice**: Keep in mind that the whole module is basically providing a single functionality: getting a Pagy instance and the paginated items. You could re-write the whole module as one single and simpler method specific to your need, eventually gaining a few IPS in the process. If you seek a bit more performance you are encouraged to [write your own Pagy methods](#writing-your-own-pagy-methods).
+!!!primary `Pagy::Backend` returns `pagy` instances
+Keep in mind that the whole module is basically providing a single functionality: getting a Pagy instance and the paginated items. You could re-write the whole module as one single and simpler method specific to your need, eventually gaining a few IPS in the process. If you seek a bit more performance you are encouraged to [write your own Pagy methods](#writing-your-own-pagy-methods).
+!!!
-Check also the [array](../extras/array.md), [searchkick](../extras/searchkick.md), [elasticsearch_rails](../extras/elasticsearch_rails.md) and [meilisearch](../extras/meilisearch.md) extras for specific backend customizations.
+Check also the [array](/docs/extras/array.md), [searchkick](/docs/extras/searchkick.md), [elasticsearch_rails](/docs/extras/elasticsearch_rails.md) and [meilisearch](/docs/extras/meilisearch.md) extras for specific backend customizations.
## Synopsis
+||| Controller
```ruby
-# in some controller
include Pagy::Backend
# optional overriding of some sub-method
@@ -27,6 +33,7 @@ def index
@pagy, @records = pagy(Product.some_scope, some_option: 'some option for this instance')
end
```
+|||
## Methods
@@ -34,7 +41,7 @@ All the methods in this module are prefixed with the `"pagy_"` string, to avoid
Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or perform any tricky gimmickry.
-### pagy(collection, vars=nil)
+==- `pagy(collection, vars=nil)`
This is the main method of this module. It takes a collection object (e.g. a scope), and an optional hash of variables (passed to the `Pagy.new` method) and returns the `Pagy` instance and the page of records. For example:
@@ -46,17 +53,21 @@ The built-in `pagy` method is designed to be easy to customize by overriding any
If you need to use multiple different types of collections in the same app or action, you may want to define some alternative and self contained custom `pagy` method. (see [Writing your own Pagy methods](#writing-your-own-pagy-methods))
-### pagy_get_vars(collection, vars)
+==- `pagy_get_vars(collection, vars)`
Sub-method called only by the `pagy` method, it returns the hash of variables used to initialize the Pagy object.
-Override it if you need to add or change some variable. For example you may want to add the `:i18n_key` in order to customize output _(see [How to customize the item name](../how-to.md#customize-the-item-name))_, or even cache the `count`.
+Override it if you need to add or change some variable. For example you may want to add the `:i18n_key` in order to customize
+output _(see [How to customize the item name](/docs/how-to.md#customize-the-item-name))_, or even cache the `count`.
-_IMPORTANT_: `:count` and `:page` are the only 2 required Pagy core variables, so be careful not to remove them from the returned hash.
-See also the [How To](../how-to.md) page for some usage example.
+!!!warning Don't remove `:count` and `:page`
+`:count` and `:page` are the only 2 required Pagy core variables, so be careful not to remove them from the returned hash.
+!!!
-### pagy_get_items(collection, pagy)
+See also the [How To](/docs/how-to.md) page for some usage examples.
+
+==- `pagy_get_items(collection, pagy)`
Sub-method called only by the `pagy` method, it returns the page items (i.e. the records belonging to the current page).
@@ -76,7 +87,11 @@ def pagy_get_items(array, pagy)
end
```
-**Notice**: in order to paginate arrays, you may want to use the [array extra](../extras/array.md).
+!!!info `Array` extra for Arrays
+In order to paginate arrays, you may want to use the [array extra](/docs/extras/array.md).
+!!!
+
+===
## Writing your own Pagy methods
@@ -86,13 +101,20 @@ In that case you can define a number of `pagy_*` custom methods specific for eac
For example: here is a `pagy` method that doesn't call any sub-method, that may be enough for your needs:
+||| Controller
```ruby
def pagy_custom(collection, vars={})
pagy = Pagy.new(count: collection.count(:all), page: params[:page], **vars)
[pagy, collection.offset(pagy.offset).limit(pagy.items)]
end
```
+|||
+
+You can easily write a `pagy` method for _any possible_ environment: please read how to [Paginate Any Collection](/docs/how-to.md#paginate-any-collection) for details.
+
+
+!!!success PRs Welcome
+If you write some useful backend customizations, please [let us know](https://github.com/ddnexus/pagy/discussions/categories/feature-requests) if you can submit a PR for a specific extra or if you need any help to do it.
+!!!
-You can easily write a `pagy` method for _any possible_ environment: please read how to [Paginate Any Collection](../how-to.md#paginate-any-collection) for details.
-**IMPORTANT**: If you write some useful backend customization, please [let us know](https://gitter.im/ruby-pagy/Lobby) if you can submit a PR for a specific extra or if you need any help to do it.
diff --git a/docs/api/calendar.md b/docs/api/calendar.md
index 7a4770b11..13da111b4 100644
--- a/docs/api/calendar.md
+++ b/docs/api/calendar.md
@@ -1,13 +1,20 @@
---
title: Pagy::Calendar
+category:
+- Feature
+- Class
---
# Pagy::Calendar
This is a `Pagy` subclass that provides pagination filtering by time: year, quarter, month, week, day (and supports your own [custom time units](#custom-units)).
-**Notice**: It requires the `activesupport` gem, which you have to require in your Gemfile only if your app does not use Rails.
+!!!primary Active Support Required
+It requires the `activesupport` gem, which you have to require in your Gemfile only if your app does not use Rails.
+!!!
-**Notice**: The `Pagy::Calendar::*` subclasses provide support for the [calendar extra](../extras/calendar.md) and are meant to be used with standard, non-calendar Pagy classes and never alone (because they could generate a very high number of items per page). The class APIs are documented here, however you should not need to use them directly because they are required and used internally by the extra.
+!!!primary Module to be used with `pagy` classes
+The `Pagy::Calendar::*` subclasses provide support for the [calendar extra](/docs/extras/calendar.md) and are meant to be used with standard, non-calendar Pagy classes and never alone (because they could generate a very high number of items per page). The class APIs are documented here, however you should not need to use them directly because they are required and used internally by the extra.
+!!!
## Overview
@@ -15,7 +22,9 @@ The pagy `Pagy::Calendar::*` instances split a time period into pages of equal t
Each page is also conveniently labeled in the navigation bar with the specific `Time` period it refers to.
-**IMPORTANT**: This classes respects the natural calendar units, not the duration of a unit. If you paginate by year, each page will be a calendar year starting January 1st and ending December 31st, not a period starting and ending at two arbitrary dates one year apart. All the classes follow the same principle. Time units with no records are displayed as empty pages.
+!!!primary Natural Calendar Unit Respected
+This classes respects the natural calendar units, not the duration of a unit. If you paginate by year, each page will be a calendar year starting January 1st and ending December 31st, not a period starting and ending at two arbitrary dates one year apart. All the classes follow the same principle. Time units with no records are displayed as empty pages.
+!!!
## Variables
@@ -75,13 +84,15 @@ Set the `Date.beginning_of_week` toto the symbol of the first day of the week (e
## Methods
-### label(opts = {})
+==- `label(opts = {})`
This method uses the `:format` variable to generate the current page label with the specific `TimeWithZone` period it refers to. It accepts an optional `:format` keyword argument for overriding.
+===
-### label_for(page, opts = {})
+==- `label_for(page, opts = {})`
This method takes a page number argument (`Integer` or `String`) and uses the `:format` variable to generate its label with the specific `Time` period it refers to. It accepts an optional `:format` keyword argument for overriding.
+===
## Custom units
diff --git a/docs/api/console.md b/docs/api/console.md
index d54dc2e85..1593a535a 100644
--- a/docs/api/console.md
+++ b/docs/api/console.md
@@ -1,5 +1,8 @@
---
title: Pagy::Console
+categories:
+- Support
+- Module
---
# Pagy::Console
@@ -15,7 +18,7 @@ pagy_extras :array, :metadata, ...
### then you can use it like inside an app
pagy, items = pagy_array((1..1000).to_a, page: 3)
pagy_navs(pagy)
-=> ""
+=> ""
pagy_metadata(pagy)
=>
@@ -38,11 +41,11 @@ pagy_metadata(pagy)
## Pagy::Console module
-The pagy console uses the [standalone extra](../extras/standalone.md) and sets the `Pagy::DEFAULT[:url]` variable default to `"http://www.example.com/subdir"` in order to activate the standalone mode.
+The pagy console uses the [standalone extra](/docs/extras/standalone.md) and sets the `Pagy::DEFAULT[:url]` variable default to `"http://www.example.com/subdir"` in order to activate the standalone mode.
Include the module in your console window in order to include also the `Pagy::Backend` and `Pagy::Frontend` modules.
-### pagy_extras(*extras)
+==- `pagy_extras(*extras)`
Simple utility method to save some typing in the console. It will require the extras arguments. For example:
@@ -51,3 +54,5 @@ pagy_extras :array, :bootstrap, :support, :headers, ...
```
You will be able to use any frontend or backend method implemented by pagy and the required extras right away.
+
+===
\ No newline at end of file
diff --git a/docs/api/countless.md b/docs/api/countless.md
index f2e5cb480..a3a182585 100644
--- a/docs/api/countless.md
+++ b/docs/api/countless.md
@@ -1,5 +1,8 @@
---
title: Pagy::Countless
+category:
+- Feature
+- Class
---
# Pagy::Countless
@@ -10,7 +13,7 @@ This is a `Pagy` subclass (see [source](https://github.com/ddnexus/pagy/blob/mas
- minimalistic UI, infinite scrolling, APIs that don't benefit from a nav-bar
- when the full nav-bar is not a requirement and/or performance is more desirable
-This class provides support for extras that don't need the full set of pagination support or need to avoid the `:count` variable (e.g. the [countless](../extras/countless.md) extra). The class API is documented here, however you should not need to use this class directly because it is required and used internally by the extra.
+This class provides support for extras that don't need the full set of pagination support or need to avoid the `:count` variable (e.g. the [countless](/docs/extras/countless.md) extra). The class API is documented here, however you should not need to use this class directly because it is required and used internally by the extra.
## Caveats
@@ -55,10 +58,12 @@ Retrieving these variables may be useful to supply a UI as complete as possible,
The construction of the final `Pagy::Countless` object is split into 2 steps: the regular `initialize` method and the `finalize` method, which will use the retrieved items number to calculate the rest of the pagination integers.
-### Pagy::Countless.new(vars)
+==- `Pagy::Countless.new(vars)`
The initial constructor takes the usual hash of variables, calculating only the requested `items` and the `offset`, useful to query the page of items.
-### finalize(fetched_size)
+==- `finalize(fetched_size)`
The actual calculation of all the internal variables for the pagination is calculated using the size of the fetched items. The method returns the finalized instance object.
+
+===
\ No newline at end of file
diff --git a/docs/api/frontend.md b/docs/api/frontend.md
index 846cbbbbf..f211f072f 100644
--- a/docs/api/frontend.md
+++ b/docs/api/frontend.md
@@ -1,17 +1,20 @@
---
title: Pagy::Frontend
+categories:
+- Core
+- Module
---
# Pagy::Frontend
This module provides a few methods to deal with the navigation aspect of the pagination. You will usually include it in some helper module, making its methods available (and overridable) in your views. _([source](https://github.com/ddnexus/pagy/blob/master/lib/pagy/frontend.rb))_
-You can extend this module with a few more nav helpers _(see the [extras](../extras.md) doc for more details)_
+You can extend this module with a few more nav helpers _(see the [extras](/categories/extras) doc for more details)_
## Synopsis
+||| View Helper
```ruby
-# typically in some helper
include Pagy::Frontend
# optional overriding of some sub-method
@@ -19,13 +22,15 @@ def pagy_nav(...)
...
end
```
+|||
-use some of its method in some view:
+||| View
```erb
<%== pagy_nav(@pagy, ...) %>
<%== pagy_info(@pagy, ...) %>
```
+|||
## Methods
@@ -33,13 +38,15 @@ All the methods in this module are prefixed with the `"pagy_"` string in order t
Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or tricky gimmickry.
-### pagy_nav(pagy, ...)
+==- `pagy_nav(pagy, ...)`
This method takes the Pagy object and returns the HTML string with the pagination links, which are wrapped in a `nav` tag and are ready to use in your view. For example:
+||| View
```erb
<%== pagy_nav(@pagy, ...) %>
```
+|||
The method accepts also a few optional keyword arguments:
@@ -49,9 +56,9 @@ The method accepts also a few optional keyword arguments:
The `nav.*` templates produce the same output, and can be used as an easier (but slower) way to customize it.
-See also [Using templates](../how-to.md#use-templates).
+See also [Using templates](/docs/how-to.md#use-templates).
-### pagy_info(pagy, pagy_id: ..., item_name: ..., i18n_key: ...)
+==- `pagy_info(pagy, pagy_id: ..., item_name: ..., i18n_key: ...)`
This method provides the info about the content of the current pagination. For example:
@@ -71,58 +78,50 @@ The method accepts also a few optional keyword arguments:
Notice the `:i18n_key` can be passed also to the constructor or be a less useful global variable (i.e. `Pagy::DEFAULT[:i18n_key]`
+||| View
```erb
<%== pagy_info(@pagy, item_name: 'Product'.pluralize(@pagy.count) %>
<%== pagy_info(@pagy, i18n_key: 'activerecord.model.product' %>
```
+|||
Displaying Products 476-500 of 1000 in total
-_(see [Customizing the item name](../how-to.md#customize-the-item-name))_
+_(see [Customizing the item name](/docs/how-to.md#customize-the-item-name))_
-### pagy_url_for(pagy, page, absolute: false, html_escaped: false)
+==- `pagy_url_for(pagy, page, absolute: false, html_escaped: false)`
This method is called internally in order to produce the url of a page by passing it its number. For standard usage it works out of the box and you can just ignore it.
-It works by merging the pagy `:params` hash with the raw `request.GET`, and adding the `:page_param` (`:page` by default) set to the passed `page`, and the `:items` if the `:items_extra` is enabled.
+See also [How to customize the URL](/docs/how-to.md#customize-the-url) and [How to customize the params](/docs/how-to.md#customize-the-params).
-Before producing the final URL (which can be `absolute` if you pass `absolute: true`), it passes the resulting params hash to the [pagy_massage_params](#pagy_massage_paramsparams) method, which can be overridden for total control of the params in the URL.
-
-The `query_string` can also be `html_escaped` to be used in html tags (avoiding the problem of concatenation of params that start with an html entity key).
-
-The `:fragment` variable is also appended to the URL if defined.
-
-See also [How to customize the URL](../how-to.md#customize-the-url).
-
-### pagy_massage_params(params)
-
-The `pagy_massage_params` method has been deprecated and it will be ignored from version 6. Use the `:params` variable instead.
-
-See also [How to customize the params](../how-to.md#customize-the-params).
-
-### pagy_link_proc(pagy, link_extra='')
+==- `pagy_link_proc(pagy, link_extra='')`
This method is called internally to get a very specialized and fast proc that produce the HTML links for the pages.
-For standard usage you may just need to read [How to customize the link attributes](../how-to.md#customize-the-link-attributes), for advanced usage see below.
+For standard usage you may just need to read [How to customize the link attributes](/docs/how-to.md#customize-the-link-attributes), for advanced usage see below.
+
+===
## Advanced Usage
You need this section only if you are going to override a `pagy_nav*` helper or a template AND you need to customize the HTML attributes of the link tags.
-**Important**: This method is not intended to be overridden, however you could just replace it in your overridden `pagy_nav*` helpers or templates with some generic helper like the rails `link_to`. If you intend to do so, be sure to have a very good reason, since using `pagy_link_proc` is a lot faster than the rails `link_to` (benchmarked at ~22x faster using ~18x less memory on a 20 links nav).
+!!! primary
+This method is not intended to be overridden, however you could just replace it in your overridden `pagy_nav*` helpers or templates with some generic helper like the rails `link_to`. If you intend to do so, be sure to have a very good reason, since using `pagy_link_proc` is a lot faster than the rails `link_to` (benchmarked at ~22x faster using ~18x less memory on a 20 links nav).
+!!!
This method returns a specialized proc that you call to produce the page links. The reason it is a two steps process instead of a single method call is performance. Indeed the method calls the potentially expensive `pagy_url_for` only once and generates the proc, then calling the proc will just interpolates the strings passed to it.
Here is how you should use it: in your helper or template call the method to get the proc (just once):
-```rb
+```ruby
link = pagy_link_proc( pagy [, extra_attributes_string ] )
```
Then call the `"link"` proc to get the links (multiple times):
-```rb
+```ruby
link.call( page_number [, text [, extra_attributes_string ] ] )
```
@@ -130,25 +129,35 @@ link.call( page_number [, text [, extra_attributes_string ] ] )
If you need to add some HTML attribute to the page links, you can pass some extra attribute string at many levels, depending on the scope you want your attributes to be added.
-**Important**: For performance reasons, the extra attributes strings must be formatted as valid HTML attribute/value pairs. _All_ the strings passed at any level will get inserted verbatim in the HTML of the link.
+!!!primary Attributes Must be Valid HTML
+For performance reasons, the extra attributes strings must be formatted as valid HTML attribute/value pairs. _All_ the strings passed at any level will get inserted *verbatim* in the HTML of the link.
+!!!
1. For all pagy objects: set the global variable `:link_extra`:
- ```rb
- # in the pagy.rb initializer file
+ ||| pagy.rb (initializer)
+ ```ruby
Pagy::DEFAULT[:link_extra] = 'data-remote="true"'
- # in any view
+ |||
+
+ ||| View
+ ```ruby
link = pagy_link_proc(pagy)
link.call(2)
#=> 2
```
+ |||
2. For one Pagy object: pass the `:link_extra` variable to a Pagy constructor (`Pagy.new` or `pagy` controller method):
+ ||| Controller
```ruby
- # in any controller
@pagy, @records = pagy(my_scope, link_extra: 'data-remote="true"')
- # in any view
+ ```
+ |||
+
+ ||| View
+ ```ruby
link = pagy_link_proc(pagy)
link.call(2)
#=> 2
@@ -156,38 +165,47 @@ If you need to add some HTML attribute to the page links, you can pass some extr
3. For all the `link.call`: pass an extra attributes string to the `pagy_link_proc`:
+ ||| View
```ruby
- # in any view
link = pagy_link_proc(pagy, 'class="page-link"')
link.call(2)
#=> 2
link.call(3)
#=> 3
```
+ |||
4. For a single `link.call`: pass an extra attributes string when you call the proc:
+ ||| View
```ruby
- # in any view
link.call(page_number, 'aria-label="my-label"')
#=> 2
```
+ |||
#### CAVEATS
We use only strings for performance, so the attribute strings get concatenated level after level, but not merged!
+!!! warning Do Not Pass Atributes Multiple Times
Be careful not to pass the same attribute at different levels multiple times. That would generate a duplicated HTML attribute which is illegal html (although handled by all mayor browsers by ignoring all the duplicates but the first).
+!!!
+!!!warning Do not add `class` attribute for `*js` helpers
Specifically do not add a `class` attribute that will end up in the `pagy_bootstrap_nav_js`, `pagy_semantic_nav_js` and `pagy_semantic_combo_nav_js`, which define already their own.
+!!!
-### pagy_t(key, vars={})
+==- `pagy_t(key, vars={})`
This method is similar to the `I18n.t` and its equivalent rails `t` helper. It is called internally (from helpers and templates) in order to get the interpolated strings out of a YAML dictionary file. _(see I18n below)_
+===
+
+
## I18n
-Pagy can provide i18n using its own recommended super fast implementation (see the [Pagy::I18n](i18n.md) doc) or can use the slower standard `i18n` gem (see the [i18n extra](../extras/i18n.md) doc).
+Pagy can provide i18n using its own recommended super fast implementation (see the [Pagy::I18n](i18n.md) doc) or can use the slower standard `i18n` gem (see the [i18n extra](/docs/extras/i18n.md) doc).
### Dictionaries/locales
@@ -195,4 +213,7 @@ Pagy provides many ready-to-use dictionaries for different locales/languages usa
All the pagy strings are are stored in the dictionary files of its [locales](https://github.com/ddnexus/pagy/blob/master/lib/locales), ready to be customized and/or used with or without the `I18n` gem. The files follow the same structure of the standard locale files for the `i18n` gem.
-**IMPORTANT**: if you are using pagy with some language missing from the [locales](https://github.com/ddnexus/pagy/blob/master/lib/locales), please, submit your translation!
+!!!success Missing Language PRs accepted
+If you are using pagy with some language missing from the [locales](https://github.com/ddnexus/pagy/blob/master/lib/locales), please, [submit your translation!](https://github.com/ddnexus/pagy/pulls)
+!!!
+
diff --git a/docs/api/i18n.md b/docs/api/i18n.md
index 6b726ebeb..bd90d8815 100644
--- a/docs/api/i18n.md
+++ b/docs/api/i18n.md
@@ -1,26 +1,30 @@
---
title: Pagy::I18n
+categories:
+- Feature
+- Module
---
# Pagy::I18n
This module provides the Pagy implementation of the i18n `translation` method used internally (`pagy_t`). It's ~18x faster and uses ~10x less memory than the standard `i18n` gem.
-See the [i18n extra](../extras/i18n.md) doc if you need to use the slower standard `i18n` gem instead.
+See [i18n extra](/docs/extras/i18n.md) if you need to use the slower standard `i18n` gem instead.
## Configuration
-**Notice**: If your app uses only the default `en` language or if you use the [i18n extra](../extras/i18n.md) you don't need to configure anything for this module.
+
+!!!success Configuration Not Required for: `en` / `i18n extra`
+If your app uses only the default `en` language or if you use the [i18n extra](/docs/extras/i18n.md) you don't need to configure anything for this module.
+!!!
+
If you need to load different built-in locales, and/or custom dictionary files or even non built-in language and pluralization, you can do it all by passing a few arguments to the `Pagy::I18n.load` method.
### Synopsis
+||| pagy.rb (initializer)
```ruby
-# in the pagy.rb initializer file
-
-# IMPORTANT: use only one load statement or you will get a FrozenError exception
-
# load the "de" built-in locale:
Pagy::I18n.load(locale: 'de')
@@ -41,8 +45,15 @@ Pagy::I18n.load({ locale: 'en' },
filepath: 'path/to/pagy-xyz.yml',
pluralize: lambda{ |count| ... } })
```
+|||
+
+!!!warning Use one load statement
+Use only one load statement or you will get a FrozenError exception
+!!!
-**Notice**: You should use a custom `:pluralize` proc only for pluralization types not included in the built-in pluralization rules (stored in the `Pagy::I18n::P11n::RULE` hash).
+!!!primary Customize only when required
+You should use a custom `:pluralize` proc only for pluralization types not included in the built-in pluralization rules (stored in the `Pagy::I18n::P11n::RULE` hash).
+!!!
The `:pluralize` proc should receive the `count` as a single argument and should return the plural type string (e.g. something like `'one'` or `'other'`, depending on the passed count).
@@ -50,9 +61,11 @@ The `:pluralize` proc should receive the `count` as a single argument and should
When you configure multiple locales (i.e. this does not apply to single locale apps), you must also set the locale at each request. You usually do that in the application controller, by checking the `:locale` param. For example, in a rails app you should do something like:
+||| Controller
```ruby
before_action { @pagy_locale = params[:locale] }
```
+|||
If the `@pagy_locale` is `nil` or missing pagy will serve the first locale you set in the configuration.
@@ -74,4 +87,4 @@ en:
...
```
-_(See also the [pagy_info method](frontend#pagy_infopagy-pagy_id--item_name--i18n_key-) and [How to customize the item name](../how-to.md#customize-the-item-name))_
+_(See also the [pagy_info method](frontend#pagy-info-pagy-pagy-id-item-name-i18n-key) and [How to customize the item name](/docs/how-to.md#customize-the-item-name))_
diff --git a/docs/api/index.yml b/docs/api/index.yml
new file mode 100644
index 000000000..24b1c628a
--- /dev/null
+++ b/docs/api/index.yml
@@ -0,0 +1,2 @@
+label: API
+icon: package-24
diff --git a/docs/api/javascript.md b/docs/api/javascript.md
index a8d259972..b305cc71f 100644
--- a/docs/api/javascript.md
+++ b/docs/api/javascript.md
@@ -1,48 +1,32 @@
---
title: Javascript
+categories:
+- Support
+image: null
---
# Javascript
## Overview
-A few helpers use javascript, and they are clearly recognizable by the `js` suffix:
+A few helpers use Javascript and offer some extra feature and require some extra setup.
-- `pagy*_nav_js`
-- `pagy*_combo_nav_js`
-- `pagy_items_selector_js`
+### Advantages
-If you use any of them you should follow this documentation, if not, consider that Javascript is not used anywhere else, so you can skip this.
+- Better performance and resource usage (see [Maximizing Performance](/docs/how-to.md#maximize-performance))
+- Client-side rendering
+- Optional responsiveness
-### How does it work?
+### Helpers
-All the `pagy*_js` helpers render their component on the client side. The helper methods serve just a minimal HTML tag that contains a `data-pagy` attribute. A small javascript file (that you must include in your assets) will take care to convert the data embedded in the `data-pagy` attribute and make it work in the browser.
++++ `pagy*_nav_js`
-You can pick and configure [a Javascript File](https://github.com/ddnexus/pagy/tree/master/lib/javascripts) depending on the environment of your app.
+![bootstrap_nav_js](/docs/assets/images/bootstrap_nav_js-g.png)
-**Notice** The javascript file is required only for the `pagy*_js` helpers. Just using `'data-remote="true"'` without any `pagy*_js` helper works without any javascript file.
-
-### Faster performance with the oj gem
-
-Although it's not a requirement, you should consider adding the `gem 'oj'` to your Gemfile. When available, Pagy will automatically use it to boost the performance. (Notice: It does nothing for normal, non-js helpers.)
-
-### CAVEATS
-
-#### Overriding
-
-Any `*_js` helper is composed by a HTML part and some javascript code that work in sync. Overriding is likely going to break in the future as soon as the relation between the helper and the functions will change in a next release (e.g. arguments, naming, etc.), so overriding is not recommended.
-
-#### HTML fallback
-
-Notice that if the client browser doesn't support Javascript or if it is disabled, certain helpers will serve nothing useful for the user. If your app does not require Javascript support and you still want to use javascript helpers, then you should consider implementing your own HTML fallback. For example:
-
-```erb
-
-```
-
-# Javascript Navs
-
-The following `pagy*_nav_js` helpers:
+
+
+ Helpers for other CSS frameworks:
+
- `pagy_nav_js`
- `pagy_bootstrap_nav_js`
@@ -51,121 +35,22 @@ The following `pagy*_nav_js` helpers:
- `pagy_materialize_nav_js`
- `pagy_semantic_nav_js`
-look like a normal `pagy*_nav` but have a few added features:
-
-1. Client-side rendering
-2. Optional responsiveness
-3. Better performance and resource usage _(see [Maximizing Performance](../how-to.md#maximize-performance))_
-
-Here is a screenshot (from the `bootstrap`extra) showing responsiveness at different widths:
-
-![bootstrap_nav_js](../assets/images/bootstrap_nav_js-g.png)
-
-## Installation instructions
-
-1. Load the Javascript assets.
-2. Add the relevant extra
-3. Use JS helper in a View
-
-See [extras](../extras.md) for general usage info.
-
-#### 1. Load / Initialise Pagy Javascript
-
-The strategy might vary, depending on what you're using: sprockets / or bundlers like (webpack-esbuild-rollup etc) / importmaps / propshaft etc - see [Javascript Readme Instructions](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/README.md) for installation and initialization details.
-
-#### 2. Add the relevant extra
-
-In the `pagy.rb` initializer, require the specific extra for the style you want to use:
-
-```ruby
-# you only need one of the following extras
-require 'pagy/extras/bootstrap'
-require 'pagy/extras/bulma'
-require 'pagy/extras/foundation'
-require 'pagy/extras/materialize'
-require 'pagy/extras/navs'
-require 'pagy/extras/semantic'
-require 'pagy/extras/uikit'
-```
-
-This will make available, the below helpers:
-
-#### 3. Use the JS helper in a View
-
-Use one of the `pagy*_nav_js` helpers in any view:
-
-```erb
-<%== pagy_nav_js(@pagy) %>
-<%== pagy_bootstrap_nav_js(@pagy) %>
-<%== pagy_bulma_nav_js(@pagy) %>
-<%== pagy_foundation_nav_js(@pagy) %>
-<%== pagy_materialize_nav_js(@pagy) %>
-<%== pagy_semantic_nav_js(@pagy) %>
-```
-
-## Variables
-
-| Variable | Description | Default |
-|:---------|:-------------------------------------------------------------------|:--------|
-| `:steps` | Hash variable to control multiple pagy `:size` at different widths | `false` |
-
-### :steps
-
-The `:steps` is an optional non-core variable used by the `pagy*_nav_js` navs. If it's `false`, the `pagy*_nav_js` will behave exactly as a static `pagy*_nav` respecting the single `:size` variable, just faster and lighter. If it's defined as a hash, it allows you to control multiple pagy `:size` at different widths.
-
-You can set the `:steps` as a hash where the keys are integers representing the widths in pixels and the values are the Pagy `:size` variables to be applied for that width.
-
-As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance, or even pass it to the `pagy*_nav_js` helper as an optional keyword argument.
-
-For example:
-
-```ruby
-# globally
-Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] }
+
-# or for a single instance
-pagy, records = pagy(collection, steps: { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } )
+
-# or use the :size as any static pagy*_nav
-pagy, records = pagy(collection, steps: false )
-```
+See [Pagy Navs](javascript/navs.md)
-```erb
-or pass it to the helper
-<%== pagy_nav_js(@pagy, steps: {...}) %>
-```
++++ `pagy*_combo_nav_js`
-The above statement means that from `0` to `540` pixels width, Pagy will use the `[2,3,3,2]` size, from `540` to `720` it will use the `[3,5,5,3]` size and over `720` it will use the `[5,7,7,5]` size. (Read more about the `:size` variable in the [How to control the page links](../how-to.md#control-the-page-links) section).
+![bootstrap_combo_nav_js](/docs/assets/images/bootstrap_combo_nav_js-g.png)
-**IMPORTANT**: You can set any number of steps with any arbitrary width/size. The only requirement is that the `:steps` hash must contain always the `0` width or a `Pagy::VariableError` exception will be raised.
+* Navigation and pagination info combined.
-#### Setting the right sizes
-
-Setting the widths and sizes can create a nice transition between widths or some apparently erratic behavior.
-
-Here is what you should consider/ensure:
-
-1. The pagy size changes in discrete `:steps`, defined by the width/size pairs.
-
-2. The automatic transition from one size to another depends on the width available to the pagy nav. That width is the _internal available width_ of its container (excluding eventual horizontal padding).
-
-3. You should ensure that - for each step - each pagy `:size` produces a nav that can be contained in its width.
-
-4. You should ensure that the minimum internal width for the container div be equal (or a bit bigger) to the smaller positive width. (`540` pixels in our previous example).
-
-5. If the container width snaps to specific widths in discrete steps, you should sync the quantity and widths of the pagy `:steps` to the quantity and internal widths for each discrete step of the container.
-
-#### Javascript Caveats
-
-In case of a window resize, the `pagy_*nav_js` elements on the page are re-rendered (when the container width changes), however if the container width changes in any other way that does not involve a window resize, then you should re-render the pagy element explicitly. For example:
-
-```js
-document.getElementById('my-pagy-nav-js').render();
-```
-
-# Javascript Combo Navs
-
-The following `pagy*_combo_nav_js` offer an alternative pagination UI that combines navigation and pagination info in a single compact element:
+
+
+ Helpers for other CSS frameworks:
+
- `pagy_combo_nav_js`
- `pagy_bootstrap_combo_nav_js`
@@ -174,92 +59,19 @@ The following `pagy*_combo_nav_js` offer an alternative pagination UI that combi
- `pagy_materialize_combo_nav_js`
- `pagy_semantic_combo_nav_js`
-They are the fastest and lightest `nav` on modern environments, recommended when you care about efficiency and server load _(see [Maximizing Performance](../how-to.md#maximize-performance))_.
-
-Here is a screenshot (from the `bootstrap` extra):
-
-![bootstrap_combo_nav_js](../assets/images/bootstrap_combo_nav_js-g.png)
-
-## Synopsis
-
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer, require the specific extra for the style you want to use:
-
-```ruby
-# you only need one of the following extras
-require 'pagy/extras/bootstrap'
-require 'pagy/extras/bulma'
-require 'pagy/extras/foundation'
-require 'pagy/extras/materialize'
-require 'pagy/extras/navs'
-require 'pagy/extras/semantic'
-require 'pagy/extras/uikit'
-```
-
-Use the `pagy*_combo_nav_js` helpers in any view:
-
-```erb
-<%== pagy_combo_nav_js(@pagy, ...) %>
-<%== pagy_bootstrap_combo_nav_js(@pagy, ...) %>
-<%== pagy_bulma_combo_nav_js(@pagy, ...) %>
-<%== pagy_foundation_combo_nav_js(@pagy, ...) %>
-<%== pagy_materialize_combo_nav_js(@pagy, ...) %>
-<%== pagy_semantic_combo_nav_js(@pagy, ...) %>
-```
-
-## Methods
-
-### pagy*_nav_js(pagy, ...)
-
-The method accepts also a few optional keyword arguments:
-
-- `:pagy_id` which adds the `id` HTML attribute to the `nav` tag
-- `:link_extra` which add a verbatim string to the `a` tag (e.g. `'data-remote="true"'`)
-- `:steps` the [:steps](#steps) variable
-
-**CAVEATS**: the `pagy_bootstrap_nav_js` and `pagy_semantic_nav_js` assign a class attribute to their links, so do not add another class attribute with the `:link_extra`. That would be illegal HTML and ignored by most browsers.
-
-### pagy*_combo_nav_js(pagy, ...)
-
-The method accepts also a couple of optional keyword arguments:
-
-- `:pagy_id` which adds the `id` HTML attribute to the `nav` tag
-- `:link_extra` which add a verbatim string to the `a` tag (e.g. `'data-remote="true"'`)
-
-**CAVEATS**: the `pagy_semantic_combo_nav_js` assigns a class attribute to its links, so do not add another class attribute with the `:link_extra`. That would be illegal HTML and ignored by most browsers.
-
-# Using AJAX
-
-If you AJAX-render any of the javascript helpers mentioned above, you should also execute `Pagy.init(container_element);` in the javascript template. Here is an example for an AJAX-rendered `pagy_bootstrap_nav_js`:
-
-In `pagy_remote_nav_js` controller action (notice the `link_extra` to enable AJAX):
-
-```ruby
-def pagy_remote_nav_js
- @pagy, @records = pagy(Product.all, link_extra: 'data-remote="true"')
-end
-```
+
-In `pagy_remote_nav_js.html.erb` template for non-AJAX render (first page-load):
+
-```erb
-
- <%= render partial: 'nav_js' %>
-
-```
+See [Pagy Combo Navs](javascript/combo-navs.md)
-In `_nav_js.html.erb` partial shared for AJAX and non-AJAX rendering:
++++ `pagy_items_selector_js`
-```erb
-<%== pagy_bootstrap_nav_js(@pagy) %>
-```
+![pagy_items_selector_js](/docs/assets/images/items_selector_js.png)
-In `pagy_remote_nav_js.js.erb` javascript template used for AJAX:
+* Choose items numbers, per page.
+* This helper is only available in one style.
-```js
-$('#container').html("<%= j(render 'nav_js')%>");
-Pagy.init(document.getElementById('container'));
-```
+See: [Items](../extras/items.md)
-**IMPORTANT**: The `document.getElementById('container')` argument will re-init the pagy elements just AJAX-rendered in the container div. If you miss it, it will not work.
++++
diff --git a/docs/api/javascript/ajax.md b/docs/api/javascript/ajax.md
new file mode 100644
index 000000000..6ec4bb443
--- /dev/null
+++ b/docs/api/javascript/ajax.md
@@ -0,0 +1,46 @@
+---
+title: AJAX
+image: null
+order: 1
+---
+# Using AJAX
+
+If you AJAX-render any of the javascript helpers mentioned above, you should also execute `Pagy.init(container_element);` in the javascript template. Here is an example for an AJAX-rendered `pagy_bootstrap_nav_js`:
+
+
+||| Controller
+
+```ruby
+def pagy_remote_nav_js
+ # notice the link_extra to enable Ajax
+ @pagy, @products = pagy(Product.all, link_extra: 'data-remote="true"')
+end
+```
+|||
+
+||| `pagy_remote_nav_js.html.erb` - non-AJAX render (first page-load):
+```erb
+
+ <%= render partial: 'nav_js' %>
+
+```
+|||
+
+||| `_nav_js.html.erb` partial - AJAX and non-AJAX rendering:
+```erb
+<%== pagy_bootstrap_nav_js(@pagy) %>
+```
+|||
+
+||| `pagy_remote_nav_js.js.erb`template - AJAX rendering:
+
+```js
+$('#container').html("<%= j(render 'nav_js')%>");
+Pagy.init(document.getElementById('container'));
+```
+|||
+
+!!!primary Don't forget to re-initialize!
+
+The `document.getElementById('container')` argument will re-init the pagy elements just AJAX-rendered in the container div. If you miss it, it will not work.
+!!!
diff --git a/docs/api/javascript/combo-navs.md b/docs/api/javascript/combo-navs.md
new file mode 100644
index 000000000..312a4120c
--- /dev/null
+++ b/docs/api/javascript/combo-navs.md
@@ -0,0 +1,64 @@
+---
+title: Combo Navs
+image: null
+order: 2
+---
+
+# Javascript Combo Navs
+
+The following `pagy*_combo_nav_js` offer an alternative pagination UI that combines navigation and pagination info in a single compact element:
+
+- `pagy_combo_nav_js`
+- `pagy_bootstrap_combo_nav_js`
+- `pagy_bulma_combo_nav_js`
+- `pagy_foundation_combo_nav_js`
+- `pagy_materialize_combo_nav_js`
+- `pagy_semantic_combo_nav_js`
+
+They are the fastest and lightest `nav` on modern environments, recommended when you care about efficiency and server load (see [Maximizing Performance](/docs/how-to.md#maximize-performance)).
+
+Here is a screenshot (from the `bootstrap` extra):
+
+![bootstrap_combo_nav_js](/docs/assets/images/bootstrap_combo_nav_js-g.png)
+
+## Synopsis
+
+See [Setup Javascript](setup.md).
+
+||| pagy.rb (initializer)
+```ruby
+# you only need one of the following extras
+require 'pagy/extras/bootstrap'
+require 'pagy/extras/bulma'
+require 'pagy/extras/foundation'
+require 'pagy/extras/materialize'
+require 'pagy/extras/navs'
+require 'pagy/extras/semantic'
+require 'pagy/extras/uikit'
+```
+|||
+
+||| Any View
+```erb
+
+<%== pagy_combo_nav_js(@pagy, ...) %>
+<%== pagy_bootstrap_combo_nav_js(@pagy, ...) %>
+<%== pagy_bulma_combo_nav_js(@pagy, ...) %>
+<%== pagy_foundation_combo_nav_js(@pagy, ...) %>
+<%== pagy_materialize_combo_nav_js(@pagy, ...) %>
+<%== pagy_semantic_combo_nav_js(@pagy, ...) %>
+```
+|||
+## Methods
+
+==- `pagy*_combo_nav_js(pagy, ...)`
+
+The method accepts also a couple of optional keyword arguments:
+
+- `:pagy_id` which adds the `id` HTML attribute to the `nav` tag
+- `:link_extra` which add a verbatim string to the `a` tag (e.g. `'data-remote="true"'`)
+
+!!!warning
+The `pagy_semantic_combo_nav_js` assigns a class attribute to its links, so do not add another class attribute with the `:link_extra`. That would be illegal HTML and ignored by most browsers.
+!!!
+===
diff --git a/docs/api/javascript/index.yml b/docs/api/javascript/index.yml
new file mode 100644
index 000000000..50d7a4fa4
--- /dev/null
+++ b/docs/api/javascript/index.yml
@@ -0,0 +1,2 @@
+---
+order: -10
diff --git a/docs/api/javascript/navs.md b/docs/api/javascript/navs.md
new file mode 100644
index 000000000..a82a1751f
--- /dev/null
+++ b/docs/api/javascript/navs.md
@@ -0,0 +1,143 @@
+---
+title: Navs
+image: null
+order: 3
+---
+
+# Javascript Navs
+
+The following `pagy*_nav_js` helpers:
+
+- `pagy_nav_js`
+- `pagy_bootstrap_nav_js`
+- `pagy_bulma_nav_js`
+- `pagy_foundation_nav_js`
+- `pagy_materialize_nav_js`
+- `pagy_semantic_nav_js`
+
+look like a normal `pagy*_nav` but have a few added features:
+
+1. Client-side rendering
+2. Optional responsiveness
+3. Better performance and resource usage (see [Maximizing Performance](/docs/how-to.md#maximize-performance))
+
+Here is a screenshot (from the `bootstrap`extra) showing responsiveness at different widths:
+
+![bootstrap_nav_js](/docs/assets/images/bootstrap_nav_js-g.png)
+
+## Synopsis
+
+See [Setup Javascript](setup.md).
+
+||| pagy.rb (initializer)
+```ruby
+# Use just one:
+require 'pagy/extras/bootstrap'
+require 'pagy/extras/bulma'
+require 'pagy/extras/foundation'
+require 'pagy/extras/materialize'
+require 'pagy/extras/navs'
+require 'pagy/extras/semantic'
+require 'pagy/extras/uikit'
+```
+|||
+
+||| Any View
+
+```erb
+
+<%== pagy_nav_js(@pagy) %>
+<%== pagy_bootstrap_nav_js(@pagy) %>
+<%== pagy_bulma_nav_js(@pagy) %>
+<%== pagy_foundation_nav_js(@pagy) %>
+<%== pagy_materialize_nav_js(@pagy) %>
+<%== pagy_semantic_nav_js(@pagy) %>
+```
+|||
+
+## Variables
+
+| Variable | Description | Default |
+|:---------|:-------------------------------------------------------------------|:--------|
+| `:steps` | Hash variable to control multiple pagy `:size` at different widths | `false` |
+
+=== How to use the :steps variable
+
+The `:steps` is an optional non-core variable used by the `pagy*_nav_js` navs. If it's `false`, the `pagy*_nav_js` will behave exactly as a static `pagy*_nav` respecting the single `:size` variable, just faster and lighter. If it's defined as a hash, it allows you to control multiple pagy `:size` at different widths.
+
+You can set the `:steps` as a hash where the keys are integers representing the widths in pixels and the values are the Pagy `:size` variables to be applied for that width.
+
+As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance, or even pass it to the `pagy*_nav_js` helper as an optional keyword argument.
+
+For example:
+
+||| pagy.rb (initializer)
+```ruby
+# globally
+Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] }
+```
+|||
+
+||| Controller
+```ruby
+# or for a single instance
+pagy, records = pagy(collection, steps: { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } )
+
+# or use the :size as any static pagy*_nav
+pagy, records = pagy(collection, steps: false )
+```
+|||
+
+```erb
+or pass it to the helper
+<%== pagy_nav_js(@pagy, steps: {...}) %>
+```
+
+The above statement means that from `0` to `540` pixels width, Pagy will use the `[2,3,3,2]` size, from `540` to `720` it will use the `[3,5,5,3]` size and over `720` it will use the `[5,7,7,5]` size. (Read more about the `:size` variable in the [How to control the page links](/docs/how-to.md#control-the-page-links) section).
+
+!!!primary :steps must contain `0` width
+You can set any number of steps with any arbitrary width/size. The only requirement is that the `:steps` hash must contain always the `0` width or a `Pagy::VariableError` exception will be raised.
+!!!
+
+#### Setting the right sizes
+
+Setting the widths and sizes can create a nice transition between widths or some apparently erratic behavior.
+
+Here is what you should consider/ensure:
+
+1. The pagy size changes in discrete `:steps`, defined by the width/size pairs.
+
+2. The automatic transition from one size to another depends on the width available to the pagy nav. That width is the _internal available width_ of its container (excluding eventual horizontal padding).
+
+3. You should ensure that - for each step - each pagy `:size` produces a nav that can be contained in its width.
+
+4. You should ensure that the minimum internal width for the container div be equal (or a bit bigger) to the smaller positive width. (`540` pixels in our previous example).
+
+5. If the container width snaps to specific widths in discrete steps, you should sync the quantity and widths of the pagy `:steps` to the quantity and internal widths for each discrete step of the container.
+
+===
+
+!!!warning Window Resizing
+The `pagy_*nav_js` elements are automatically re-rendered on window resize. However, if the container width changes *without* being triggered by a window resize, you need to explicitly re-render:
+
+```js
+document.getElementById('my-pagy-nav-js').render();
+```
+!!!
+
+## Methods
+
+==- `pagy*_nav_js(pagy, ...)`
+
+The method accepts also a few optional keyword arguments:
+
+- `:pagy_id` which adds the `id` HTML attribute to the `nav` tag
+- `:link_extra` which add a verbatim string to the `a` tag (e.g. `'data-remote="true"'`)
+- `:steps` variable
+
+!!!warning
+The `pagy_bootstrap_nav_js` and `pagy_semantic_nav_js` assign a class attribute to their links, so do not add another class attribute with the `:link_extra`. That would be illegal HTML and ignored by most browsers.
+!!!
+
+===
+
diff --git a/docs/api/javascript/setup.md b/docs/api/javascript/setup.md
new file mode 100644
index 000000000..4349c8ad3
--- /dev/null
+++ b/docs/api/javascript/setup.md
@@ -0,0 +1,216 @@
+---
+title: Setup
+image: null
+order: 4
+---
+
+# Javascript Setup
+
+!!!info Notice
+A javascript setup is required only for the `pagy*_js` helpers. Just using `'data-remote="true"'` in any other helper works out of the box.
+!!!
+
+!!! success
+Add the `oj` gem to your gemfile for faster performance.
+!!!
+
+### How does it work?
+
+All the `pagy*_js` helpers render their component on the client side. The helper methods render just a minimal HTML tag that contains a `data-pagy` attribute.
+
+Your app should serve a small javascript file that will take care of converting the data embedded in the `data-pagy` attribute and make it work in the browser.
+
+!!! info
+We don't publish a `npm` package, because it would not support automatic sync with the gem version.
+!!!
+
+### 1. Pick a Javascript File
+
++++ `pagy-module.js`
+
+!!! success
+Your app uses modern build tools
+!!!
+
+* ES6 module
+
+_ESM File: [pagy-module.js](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy-module.js); Types: [pagy-module.d.ts](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy-moduled.ts)_
+
++++ `pagy.js`
+!!! success
+Your app needs standard script or old browser compatibility
+!!!
+
+* It's an [IIFE](https://developer.mozilla.org/en-US/docs/Glossary/IIFE);
+* Minified (~2k).
+
+_JS File: [pagy.js](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy.js)_
+
+
+ Browser compatibility list:
+
+- and_chr 103
+- and_ff 101
+- and_qq 10.4
+- and_uc 12.12
+- android 103
+- chrome 103
+- chrome 102
+- chrome 101
+- edge 103
+- edge 102
+- firefox 102
+- firefox 101
+- firefox 91
+- ios_saf 15.5
+- ios_saf 15.4
+- ios_saf 15.2-15.3
+- ios_saf 14.5-14.8
+- ios_saf 14.0-14.4
+- ios_saf 12.2-12.5
+- kaios 2.5
+- op_mini all
+- op_mob 64
+- opera 87
+- opera 86
+- opera 85
+- safari 15.5
+
+!!! info
+You can generate custom targeted `pagy.js` files for the browsers you want to support by changing the [browserslist](https://github.com/browserslist/browserslist) query in `src/package.json`, then compile it with `npm run build -w src`.
+!!!
+
+
+
++++ `pagy-dev.js`
+
+!!! success
+You need to debug the javascript helpers
+!!!
+
+!!! warning Debug only!
+* Large size
+* It contains the source map to debug typescript
+* It works only on new browsers
+!!!
+
+_JS File: [pagy-dev.js](https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy-dev.js)_
++++
+
+### 2. Load the file
+
+Depending on your environment you have a few ways of loading the required JS file:
+
+#### Rails with assets pipeline
+
+In older versions of Rails, you can configure the assets to look into the installed pagy gem files:
+
++++ Sprockets
+||| pagy.rb (initializer)
+```ruby
+Rails.application.config.assets.paths << Pagy.root.join('javascripts') # uncomment.
+```
+|||
+
+||| manifest.js (or `application.js` for old sprocket sprockets):
+```js
+//= require pagy
+```
+|||
+
++++ Importmaps
+||| pagy.rb (initializer)
+```ruby
+Rails.application.config.assets.paths << Pagy.root.join('javascripts') #uncomment
+```
+|||
+
+||| app/assets/config/manifest.js
+```js
+//= link pagy-module.js
+```
+|||
+
+||| config/importmap.rb
+```ruby
+pin 'pagy-module'
+```
+|||
+
++++ Propshaft
+||| pagy.rb (initializer)
+```ruby
+Rails.application.config.assets.paths << Pagy.root.join('javascripts')
+```
+|||
+
+||| application.html.erb
+```erb
+<%= javascript_include_tag "pagy" %>
+```
+|||
++++
+
+#### Non-Rails apps
+
+* Just ensure `Pagy.root.join('javascripts', 'pagy.js')` is served with the page.
+
+### 3. Initialize Pagy
+
+After the file is loaded, you have to initialize `Pagy`:
+
++++ Stimulus JS
+||| pagy_initializer_controller.js
+```js
+import { Controller } from "@hotwired/stimulus"
+import Pagy from "pagy-module" // if using sprockets, you can remove above line, but make sure you have the appropriate directive if your manifest.js file.
+
+export default class extends Controller {
+ connect() {
+ Pagy.init(this.element)
+ }
+}
+```
+|||
+
+||| View
+```erb
+
+ <%== pagy_nav_js(@pagy) %>
+
+```
+|||
+
++++ Others
+```js
+// if you choose pagy-module.js
+import Pagy from "pagy-module"
+
+// plain javascript
+window.addEventListener(load, Pagy.init)
+
+// Turbo
+window.addEventListener(turbo:load, Pagy.init)
+
+// Turbolinks
+window.addEventListener(turbolinks:load, Pagy.init)
+
+// custom listener
+window.addEventListener(yourEventListener, Pagy.init)
+```
++++
+
+#### Caveats
+
+!!!warning HTML Fallback
+
+If Javascript is disabled in the client browser, certain helpers will be useless. Consider implementing your own HTML fallback:
+
+```erb
+
+```
+!!!
+
+!!!danger Overriding `*_js` helpers is not recommended
+The `pagy*_js` helpers are tightly coupled with the javascript code, so any partial overriding on one side, would be quite fragile and might break in a next release.
+!!!
diff --git a/docs/api/pagy.md b/docs/api/pagy.md
index 3717cf66c..1c30df9e3 100644
--- a/docs/api/pagy.md
+++ b/docs/api/pagy.md
@@ -1,14 +1,22 @@
---
title: Pagy
+categories:
+- Core
+- Class
---
# Pagy
-The scope of the `Pagy` class is keeping track of the all integers and variables involved in the pagination. It basically takes a few integers (such as the count of the collection, the page number, the items per page, ...), does some simple arithmetic and creates a very small object that allocates less than 3k of memory. _([source](https://github.com/ddnexus/pagy/blob/master/lib/pagy.rb))_
+The scope of the `Pagy` class is keeping track of the all integers and variables involved in the pagination. It basically takes a few integers (such as the count of the collection, the page number, the items per page, ...), does some simple arithmetic and creates a very small object that allocates less than 3k of memory ([source](https://github.com/ddnexus/pagy/blob/master/lib/pagy.rb)).
+
+||| Integers of Pagy
+:::code source="../../lib/pagy.rb" range="16-25" :::
+|||
## Synopsis
+||| pagy.rb (initializer)
```ruby
-# set global defaults and extra variables typically in the pagy.rb initializer
+# set global defaults and extra variables
# they will get merged with every new Pagy instance
Pagy::DEFAULT[:items] = 25
Pagy::DEFAULT[:some_var] = 'default value'
@@ -33,6 +41,7 @@ pagy.items
pagy.series
#=> [1, 2, "3", 4, 5, 6, 7, :gap, 40]
```
+|||
## Global Default
@@ -40,30 +49,34 @@ The `Pagy::DEFAULT` is a globally available hash used to set defaults variables.
You will typically use it in a `pagy.rb` initializer file to pass defaults values. For example:
+||| pagy.rb (initializer)
```ruby
Pagy::DEFAULT[:items] = 25
Pagy::DEFAULT[:my_option] = 'my option'
...
Pagy::DEFAULT.freeze
```
+|||
## Methods
-### Pagy.root
+==- `Pagy.root`
This method returns the `pathname` of the `pagy/lib` root dir. It is useful to get the absolute path of template, locale and javascript files installed with the gem.
-### Pagy.new(vars)
+==- `Pagy.new(vars)`
_Notice_: If you use the `Pagy::Backend` its `pagy` method will instantiate and return the Pagy object for you.
The `Pagy.new` method accepts a single hash of variables that will be merged with the `Pagy::DEFAULT` hash and will be used to create the object.
-### series(...)
+==- `series(...)`
This method is the core of the pagination. It returns an array containing the page numbers and the `:gap` items to be rendered with the navigation links (e.g. `[1, :gap, 7, 8, "9", 10, 11, :gap, 36]`). It accepts an optional `size` keyword argument (only useful for extras), defaulted on the `:size` variable.
-**Notice**: A `:gap` is added only where the series is missing at least two pages. When the series is missing only one page, the `:gap` is replaced with the page link of the actual missing page. That's because the page link uses the same space of the `...` gap but it is more useful.
+!!!primary Gap: added only when necessary
+A `:gap` is added only where the series is missing at least two pages. When the series is missing only one page, the `:gap` is replaced with the page link of the actual missing page. That's because the page link uses the same space of the `...` gap but it is more useful.
+!!!
The nav helpers and the templates basically loop through this array and render the correct item by simply checking its type:
@@ -73,15 +86,19 @@ The nav helpers and the templates basically loop through this array and render t
That is self-contained, simple and efficient.
-**Notice**: This method returns an empty array if the passed `size` (i.e. the `:size` variable by default) is set to an empty array. Useful to totally skip the generation of page links in the frontend.
+!!!primary
+This method returns an empty array if the passed `size` (i.e. the `:size` variable by default) is set to an empty array. Useful to totally skip the generation of page links in the frontend.
+!!!
-### label
+==- `label`
Experimental: Its only function in the `Pagy` class is supporting the API of various frontend methods that require labelling for `Pagy::Calendar` instances. It returns the current page label that will get displayed in the helpers/templates.
-### label_for(page)
+==- `label_for(page)`
Experimental: Its only function in the `Pagy` class is supporting the API of various frontend methods that require labelling for `Pagy::Calendar` instances. It returns the page label that will get displayed in the helpers/templates.
+===
+
## Variables
@@ -107,16 +124,16 @@ They are all integers:
### Other Variables
-| Variable | Description | Default |
-|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------|
-| `:size` | The size of the page links to show: array of initial pages, before current page, after current page, final pages. _(see also [How to control the page links](/docs/how-to.md#control-the-page-links))_ | `[1,4,4,1]` |
-| `:page_param` | The name of the page param name used in the url. _(see [How to customize the page param](/docs/how-to.md#customize-the-page-param))_ | `:page` |
-| `:params` | It can be a `Hash` of params to add to the URL, or a `Proc` that can edit/add/delete the request params _(see [How to customize the params](/docs/how-to.md#customize-the-params))_ | `{}` |
-| `:fragment` | The arbitrary fragment string (including the "#") to add to the url. _(see [How to customize the params](/docs/how-to.md#customize-the-params))_ | `""` |
-| `:link_extra` | The extra attributes string (formatted as a valid HTML attribute/value pairs) added to the page links _(see [How to customize the link attributes](/docs/how-to.md#customize-the-link-attributes))_ | `""` |
-| `:i18n_key` | The i18n key to lookup the `item_name` that gets interpolated in a few helper outputs (see [How to customize the item name](/docs/how-to.md#customize-the-item-name)) | `"pagy.item_name"` |
-| `:cycle` | Enable cycling/circular/infinite pagination: `true` sets `next` to `1` when the current page is the last page | `false` |
-| `:request_path` | Allows overriding the the request path for pagination links. If left blank, helpers will use `request.path`. | `""` |
+| Variable | Description | Default |
+|:--------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------|
+| `:size` | The size of the page links to show: array of initial pages, before current page, after current page, final pages. _(see also [How to control the page links](/docs/how-to.md#control-the-page-links))_ | `[1,4,4,1]` |
+| `:page_param` | The name of the page param name used in the url. _(see [How to customize the page param](/docs/how-to.md#customize-the-page-param))_ | `:page` |
+| `:params` | It can be a `Hash` of params to add to the URL, or a `Proc` that can edit/add/delete the request params _(see [How to customize the params](/docs/how-to.md#customize-the-params))_ | `{}` |
+| `:fragment` | The arbitrary fragment string (including the "#") to add to the url. _(see [How to customize the params](/docs/how-to.md#customize-the-params))_ | `""` |
+| `:link_extra` | The extra attributes string (formatted as a valid HTML attribute/value pairs) added to the page links _(see [How to customize the link attributes](/docs/how-to.md#customize-the-link-attributes))_ | `""` |
+| `:i18n_key` | The i18n key to lookup the `item_name` that gets interpolated in a few helper outputs (see [How to customize the item name](/docs/how-to.md#customize-the-item-name)) | `"pagy.item_name"` |
+| `:cycle` | Enable cycling/circular/infinite pagination: `true` sets `next` to `1` when the current page is the last page | `false` |
+| `:request_path` | Allows overriding the request path for pagination links. If left blank, helpers will use `request.path`. NB: Do not pass in a full URL, but the path: For example, given `https://ddnexus.github.io/pagy/docs/api/pagy/` the path to be passed in is: `pagy/docs/api/pagy/`. (See: [Customize the request path](/docs/how-to.md#customize-the-request-path) )| `request.path` |
There is no specific validation for non-instance variables.
@@ -124,21 +141,21 @@ There is no specific validation for non-instance variables.
Pagy exposes all the instance variables needed for the pagination through a few attribute readers. They all return integers (or `nil`), except the `vars` hash:
-| Reader | Description |
-|:---------------|:-------------------------------------------------------------------------------------------------------------------|
-| `count` | The collection `:count` |
-| `page` | The current page number |
-| `items` | The requested number of items for the page |
-| `pages` | The number of total pages in the collection (same as `last` but with cardinal meaning) |
-| `in` | The number of the items in the page |
-| `last` | The number of the last page in the collection (same as `pages` but with ordinal meaning) |
-| `offset` | The number of items skipped from the collection in order to get the start of the current page (`:outset` included) |
-| `from` | The collection-position of the first item in the page (`:outset` excluded) |
-| `to` | The collection-position of the last item in the page (`:outset` excluded) |
-| `prev` | The previous page number or `nil` if there is no previous page |
-| `next` | The next page number or `nil` if there is no next page |
-| `vars` | The variables hash |
-| `params` | The `:params` variable (`Hash` or `Proc`) |
+| Reader | Description |
+|:---------|:-------------------------------------------------------------------------------------------------------------------|
+| `count` | The collection `:count` |
+| `page` | The current page number |
+| `items` | The requested number of items for the page |
+| `pages` | The number of total pages in the collection (same as `last` but with cardinal meaning) |
+| `in` | The number of the items in the page |
+| `last` | The number of the last page in the collection (same as `pages` but with ordinal meaning) |
+| `offset` | The number of items skipped from the collection in order to get the start of the current page (`:outset` included) |
+| `from` | The collection-position of the first item in the page (`:outset` excluded) |
+| `to` | The collection-position of the last item in the page (`:outset` excluded) |
+| `prev` | The previous page number or `nil` if there is no previous page |
+| `next` | The next page number or `nil` if there is no next page |
+| `vars` | The variables hash |
+| `params` | The `:params` variable (`Hash` or `Proc`) |
| `request_path` | The request path used for pagination helpers. If blank, helpers will use `request.path` |
### Lowest limit analysis
@@ -168,7 +185,7 @@ Which means:
## Exceptions
-### Pagy::VariableError
+==- `Pagy::VariableError`
A subclass of `ArgumentError` that offers a few information for easy exception handling when some of the variable passed to the constructor is not valid.
@@ -182,6 +199,7 @@ end
Mostly useful if you want to rescue from bad user input (e.g. illegal URL manipulation).
-### Pagy::OverflowError
+==- `Pagy::OverflowError`
-A subclass of `Pagy::VariableError`: it is raised when the `:page` variable exceeds the maximum possible value calculated for the `:count`, i.e. the `:page` variable is in the correct range, but it's not consistent with the current `:count`. That may happen when the `:count` has been reduced after a page link has been generated (e.g. some record has been just removed from the DB). See also the [overflow](../extras/overflow.md) extra.
+A subclass of `Pagy::VariableError`: it is raised when the `:page` variable exceeds the maximum possible value calculated for the `:count`, i.e. the `:page` variable is in the correct range, but it's not consistent with the current `:count`. That may happen when the `:count` has been reduced after a page link has been generated (e.g. some record has been just removed from the DB). See also the [overflow](/docs/extras/overflow.md) extra.
+===
diff --git a/docs/assets/css/anchor_headings.css b/docs/assets/css/anchor_headings.css
deleted file mode 100644
index b08ef25e8..000000000
--- a/docs/assets/css/anchor_headings.css
+++ /dev/null
@@ -1,44 +0,0 @@
-h1 {
- margin-left: -20px;
- padding-left: 10px;
-}
-
-h2 {
- margin-left: -18px;
- padding-left: 10px;
-}
-
-h3 {
- margin-left: -16px;
- padding-left: 10px;
-}
-
-h4 {
- margin-left: -14px;
- padding-left: 10px;
-}
-
-h5 {
- margin-left: -12px;
- padding-left: 10px;
-}
-
-h6 {
- margin-left: -10px;
- padding-left: 10px;
-}
-
-h1 .octicon, h2 .octicon, h3 .octicon, h4 .octicon, h5 .octicon, h6 .octicon {
- visibility: hidden;
-}
-
-h1:hover .octicon, h2:hover .octicon, h3:hover .octicon, h4:hover .octicon, h5:hover .octicon, h6:hover .octicon {
- visibility: visible;
-}
-
-.octicon {
- fill: currentColor;
- padding: 0;
- margin-left: -16px;
- vertical-align: middle;
-}
diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss
deleted file mode 100644
index 63c180136..000000000
--- a/docs/assets/css/style.scss
+++ /dev/null
@@ -1,176 +0,0 @@
----
----
-
-@import "{{ site.theme }}";
-
-body {
- background-color: #f7f7f7;
- color: #51585F;
- padding-top: 30px;
- padding-bottom: 30px;
-}
-
-a:hover, a:focus {
- font-weight: normal;
- text-decoration: underline;
-}
-
-code {
- font-size: .8rem;
- padding: 4px 5px 2px;
- background-color: #FFF;
- border-radius: 3px;
- border: 1px solid #e5e5e5;
- box-shadow: 0 0 10px rgba(0,0,0,0.1);
-}
-
-pre {
- background-color: #FFF;
- box-shadow: 0 0 10px rgba(0,0,0,0.1);
- code {
- border: none;
- padding: 0;
- box-shadow: none;
- }
-}
-
-.highlight {
- border-radius: 5px;
- background-color: #FFF;
-}
-
-header {
- height: 100%;
- h1#site-title {
- margin-left: -10px;
- margin-bottom: .5rem;
- }
- p {
- margin-bottom: .5rem;
- }
-}
-
-h1 span {
- float: right;
- margin: 0 .05em;
-}
-
-#toc {
- height: calc(100% - 200px - 4em);
- overflow: auto;
- margin: 1.6em 0;
- white-space: nowrap;
- p {
- margin: .1em 0;
- }
- p.indent1 {
- margin-left: 2rem;
- }
- p#active {
- position: relative;
- font-weight: bold;
- display: inline-block;
- &:after {
- content: "\25B6";
- position: relative;
- left: .4rem;
- }
- }
-}
-
- a#gitter {
- &:hover {
- text-decoration: none;
- }
- p {
- border-radius: 3px;
- font-weight: bold;
- margin-top: .5em;
- border: solid 1px #267CB9;
- padding: 4px;
- text-align: center;
- background-color: #FFF;
- &:hover {
- background-color: #267CB9;
- color: #FFF;
- }
-
- }
-}
-
-footer {
- bottom: 0;
-}
-
-@media print, screen and (max-width: 960px) {
-
- header {
- padding-right: 0;
- }
-
-}
-
-.cse .gsc-control-cse,
-.gsc-control-cse {
- padding: 0 !important;
- border: none !important;
- //margin-bottom: 1em !important;
- //width: 300px !important;
- background: #f7f7f7 !important;
- color: #51585F !important;
- table {
- padding: 0 !important;
- margin: 0 !important;
- }
-
- td {
- border: 0 !important;
- padding: 0 !important;
-
- &.gsib_a {
- padding: 0 .5em !important;
- }
- &.gsc-search-button {
- margin: 0 !important;
- padding: 0 !important;
-
- }
- }
-}
-
-.gsc-input-box {
- border-radius: 3px 0 0 3px !important;
-}
-.gsc-input-box table{
- height: 28px !important;
-}
-
-table.gsc-search-box td.gsc-input {
- padding: 0 !important;
-}
-
-// remove the clear button (x)
-div.gsst_b {
- display: none !important;
-}
-
-// same fonts of the page
-input.gsc-input{
- font-family: 'Noto Sans' !important;
- font-size: 1em !important;
- font-style: normal !important;
- font-weight: 400 !important;
- color: #51585F !important;
- //width: 100% !important;
-
-}
-
-button.gsc-search-button-v2 {
- margin: 0 !important;
- //margin-bottom: .75px !important;
- height: 30px !important;
- border-radius: 0 3px 3px 0 !important;
- padding: 6px 12px !important;
-}
-
-img + em { font-size: .8rem}
diff --git a/docs/assets/images/items_selector_js.png b/docs/assets/images/items_selector_js.png
new file mode 100644
index 0000000000000000000000000000000000000000..f860fcb30415f1bf4453f03a963df5c08449055a
GIT binary patch
literal 9881
zcmchdbyyVNAMXbQ5tNWrx=}i$O9Z5mPU({FZuuhJ4FV$Fp>%_!bT_gzEGb=k&-ZtK
z&;9Q{_m6v@JFvs<&N4H5X3pol->>%xQ&N<|#306iAP7@NT0#YakYd4ehbPEj-F{eI
z4*ongmXnfz5dZ#sYb{Iw@1Q$KYdb>_)~|mbNJ&gsB;ZXn7a0Xfw5?|ZgtU(K5L5G5ILLI@!qX-S!A7TZ*`@qW|ALarWmgghC0|BWnVHG>sDi9{PE%P^Pw%$m
zm1KA@edsr8Ndao+@Tipx+Qfg3Vopd*BqW(*DlUC}+!7MFxEL;1u7`y!>>jtRtmwa`
z#0kwtLbgIiK@LQD8u*qn){qM439Z(X|C`sL2$Qw~{7F46u8ilg;l8rQ
z->s{GerbeK4yVgAfz+X?#KrLNa8dgpQE55Ec31w_rIy|TdJbh}eouY{f#IR4U-OQn
zVG?@?KLJ5OOC2wKPJXJxEq_B4^11px+m@$xHrCdHz8604ULunI6SBa%z
zYf(8t3K1vxpEVkYl8Grdw_K7ECrj9${H3cf=Ux*}P)@=7doh@cldJ#7kMT)<2C}ky
zw-l{4HG_*5UY?SuangB8{WYAN!^6Y#{EaWuun{c2PVmv7e@|j-G%dKx-R+FkipgwUAtpzr6z^$0Ld1r=_J=
zIKD92iGIV*soQS!cYn6B@zKuSo`C;ad}$wwuefS@a@KXxIM@A_gkJMWTq+3(3DUQ0
z?F)u=1diu5>eCcvUY>fDTDmiL)_X59bg$*JJ?Uui
zp>T2{)v2AB2sx;uV~*5Xi|mn!Pj~vlLX>Wu_QG5-`0R^}(X@7UL538I?HM;Ld~Pob
zi|wRXrR@{)bb%Wz#fp3QeDVw-PsZ@*C>tAF%!tIB?mZ%A`h5iw^y5bz>E|Q@`tC}_
zH1D;wf7Z8;{2mo`I6l6gLL(Z@Ud!??*J|9l8UDn`hKc?#RT!vD4+5
z{zc%>?e)&!mMsz~R!EKvFRA6&+?3i!l^W|&iWNMD{((VOy_VyNO{Vj6Oy@hF;NW1S
zx6(>Di^rDQ^Bcund;28)-61ix6sp?lnX##fE(~U?hnYf?@1Z#gkE^M)A8LC~Y+1@5
z5S>IXEiG}wei>I+tcE^Fn>>V{QG0p&T8z@DT0W1PZHTfMHK0_reB8S=w@AWkqTlWp
z<-f47aI;u8Z_3C*d&X!N865^b%VW|zGc#k9T(D&>Ma0XQ^uA!Cq@;x1#6to~g-oLCv$Y
zoJoXuBq7>hH&t^Vml>v}W{i7d$4X5ZhX>6g>)Mp>$|Z)hRCTSbj1&qcFfb^Lk|!8G
z45+0?WH7WLR#sL1
z^{Wv}Mu~L0U!*xBOwG0(>i@Dml|{c*)P47^@(^1H1=1(COC29@EDH^Na!A9<+U6M~
z3N6XX`*@GH`Jh6626bwRiiAIV3Aj_M#hoAnW4?&m)`s60Q+4q>$l2=%qwuAcA|JU5kixVT=<%gJ#o)xJy+O30U!tD}`hJ$*$i?}ObndNzj3l9r|JVb{pz
zPeZTR7`AuU9z&o;Hzo+$vOI3{hj8%mr^aV)qzwlLgGRF+ymyq67MhxVY_lg<+USX@LS6&(pvEu6Qxs2e7E`AlJHXLHTY-a;4DKTu{;H;)qj-FDabgN0?t
zk(WB|lkni)I%Y;@g07NQQPH<5uT7`B=)l&@gNEu0d3q*VIAaVV(o&>=-rh-Osa>?p
zpn1?DoHy{TbfdTZZM2?#Lcz|97q=r>my|4I`TsnD0tiZH%CycEmuDxse6A;Y?3tdj
zlow-9=(qR`m~vKIb3;P@56HKP-D?{gTewe9ZaM0N1fLTT*;`w8v%Guvj-1@iVkE2m
zCEohx8WvPuZp%@9q7w9&e=g>ladp#g?@`&a%e`sAS`s7NFbQe`5k?r#;O_y)ZCMm#
zF-gh%x(d6*B)a;=DkE{EZxt0--g0C)jI^})&t0S5!)GtM9ni_BiB;8Gk$j1?}=s
zw14h}ePze1{_1|~*`Od+!`th!tHwrm(IjbFED8~LPejVn#aed=Qb(?oq?YCB
zL(m&26()S*Ov3Zmh|q1|IS$UBy5<=7)|X@vrTnu!mhcWQB_$+hm2O+rweaNmuMl
zOl+0kTE4>+odz>E5~rCohcebfQ1&&^3_|E=Y2Qd_&wC~2pTA-f5fOn;CKQg6^Lbp|
zGkV|dNAt2R7;vRAd-C&V-3po>
zxj-Y2j*3{V7ai+ekkwPbM4w^9ycA$2$F*lTSorZlS=liGp(8A;XZiXy5)u+mM)~{M
zF9=PQYIGu22a1q)^cgQm^7AbcMLcE6a=hsHo?MV(tepc_dy5+<)SyA=UMBPV9R#VPJ)r^edLl!-Z;*Y!N
zejiKHW)p~Fg-kw$sHv%M-HzasVhXk>4^7#^(+m^~7rsA^XLYp;WOGRQT{=8lEF5J9
z%KurEuEL?%Scv)r%~jj}h&nH-|B-r%ad;~NgBf>qhWMz^2J-8Fsm6Y7v`zodh
zy=D=n;d?XGGf>@-XPOuI@I-xZ7DG!$<~ei~cDLTU;6IrhmymFt20P&D$>?5NYE5Z!
z={W)e=k6{?);oIt8NV}^+Ui|hUGG~;nSsC_Hda=8M#h_)bL&Tsgj;B5Q!*M-Q?+z;
zbyZa-w-sxuTpw>9vBVb@m7ze5*c4}_KvDm!ec3}thlz>VzLgdlet7@AxENg%>Fds%
zR#s`ql8iDn(|Bc3&EE!cSA#q{8{ypp(B|`Y5GRH49y|KCiU#Rj{-oo
z9cE!!wWNLiB)5zi-ZyuCagm%Xave*OF?=}rV84q8QN~H*!eEc0vtweg7uoq};p%q`bo7(Kk`gTXgvE-S3Q!Ig=jIwXrg#vNQsDOKi{;C&rI-U;1AXf
z0APRU3(0G|!SyH(;3<9;T3%e--`W%SlRZ8kMNUTka&re(P*_SsOPeQCsPH!p8S-{J
zC@L>)PH>uC8tfe#dn+qjlAnJ*p8I{FNkDWp&A?Bv20s5|+WJ2KG3LaKdH-O4U0toY
zsfdlGrK=lhUu#}K$l>APpRuYxW9*>jJTJjVLJBM?*|QkUHsK~l)RsDq2KH3;7{XT?
zeKQdSjZX=crHYJ$votq1gJZ(yY%YdgPO|grksS<^%-GMjne06?cr2bE~$Ed
zqT;ZnjCcPr+(xR8fp)~;=dZ3Md9b8PEVPVMKv;Lxi;EUF#atHl49nwFd7A3#W@g(s
zPyWeVtUn#<6!lNOse63!v&;q@8Z)CVT1h=AA;H$(-e2dUth_ubCdU3?Z?)a{973P*
zk9}T}*k2Xfdi%)v?+ASD&m$hwf4q*-XqY3ZpG=sgC0wU*sppdkbYUh~@ZR?WjX+;TZO;}a8~U^U^8
z;u5;vo4YBJNA$!eCFLmf`~C29c5}Kr<>BDs&~EZD@_KJBBV%c0a`R0re$UD(fkDB=
zjrcOIJef^TXrhDiHGgB#&PhU{S$TOm%-9&HS?C};H{PyDyDSqO7KKNIM`CLt>>r)o*0vHrk}zP398h(f
z5$uPH3mc!M0eWrqg8~=@`+ZV-`uYmLQQF&E2u@p^_GvcV*RSm(Mp1DdOqX;ww_k^Q7&HZWXrDV0LLI?0&{r3LR@T^-*YTv*q*^pr$K4y7;XKw34Q
zki5d5+R-4
zzwENfIm*b$Su+LY@SCK^6gHDs#eVo~1uzDz5NWy!=LrffGawpoKL`JpaQuIK?WaFx
z;P;@&o>rEZhgPYt&Y6}eD%sK1^^TD-$ks+aI9R6W7Dx2S4x6Yy!}r{TFIegYlTtWO
zMElB;yVvjuggvioy2i&JyHX(M|IbhpKvd3d*_O^2ZM+?TYg9Ltpuw&(6*^HaAgGP{2C#
z>sPy_hVepYE31-(goK|ze-;%L<>ah2I&VLA8$-jc`TUuBa-yc4_H<-KF`RgLq!T?;
z5+Eku$>n8X>yeh)2a-uHPC77Po}DM6Vf$Ucudkn`Xq0OsxZFC%bEQ6H32E!-FoF_S
zTs%KHiAP3u0E5-I9q5pc0{_6oRJybCiJP1I>C=d=uC6pLiwdo3W60_pKFHh|nhj@NyM9WPpnCY4@fE4)MPVJ`Bd(fx_*vx8PU>8C^&>(y
zeNr5pZ@IbMeSIOr6m0q}eAY8%!rm7i-roCrd&YJO3JP2nBO4BUYinzu21CbZyQ*?>
zzdJhK5)l!RWIQ~0JyvBxLh@r`S}!Z>s;NnV42{2w#^!X7wj13qhy~G(Yyb0>tE??7
zsu>ls*0_%@C4g|kB)C))0&I2tda)cF9LA=nd!~TcMCm%)o#c>d^1bCbblaOMPEIDY
zx3`DWKuYTBm`{Ko@V&k8tE5|AZ|hf
zJtHrhLg1f{WlNRYl1*{Dmf7@@-u!))F}!tBTwK1~V3v^|mDyAf9aw$+_4?@#XQxIc
zZsKQpOc@+Y8AEC9vESck^LaAXk54blsq6hHF5dm!UhwT3<%7YqvXae%dqs6S*e~E2
z0Jx~m&0SBpEh{eWo|cuB#f4B%Q5}X$ii>ZTC_SyT00T;|H{^gmHsDJr=b9h@BSO2Z
ztf*M2u??v$4|*)FIXd=h*51zRJ^dvXO>PB%G2RG1C1vGCmuuNaCeB|D`-{1JBFKqM
zoJUnHMxtNt%TG@HsCoJKvY1QgWNMZdzSL?zq-F6XIuLNI+RW|=f>I}^zapmu$24so
zCr)een~&d{yV&}Uh9%(HGqfJvX`iqeG%oZHsi^C5(et#8im#i^L`O#lWHt{=Ma>xQ
zEb#MX3OFZQgc1s~uC!iaYr3<6^RRhgztmFOR8TOQxa15oZK`VvjGG5S*Pz9tQS=x`
zG789u%*ChyQ!-J<3C|WZ@xFi@lRt;tule4(=ofy%q*dBq^Q!K5}QI~#!uc%-SwTZ%0y>O|7k2fzP3*@5+xv
zc5@?CP#9KG32I}vv0#v*63ZbO=UC8r24GdH@&`>c@3<5LcITO|Tgim#7-m1CT*bw^
zTc^-oUmgNOzWlp8bNgmZ#0VE+f3sUT_*<1C?^+&lV6OISaX!hGL#`DZEXTP5-BR|K9eh)%}s(s{e)jVJ>_N0dwYA6
z6I|w_x((KSb%2UFWRHfg4qF>*YVu|lP%$vwB8r_?LFJOqT+_XPrv*2@%ouL;K6)5g
zz6HpSVy+(TlHU(z>SFViILYc;96k$}EoqCzmSyW!$Ev&c9
z5L^5+Ak%x!hQ}Ou-ESooGP5(KpsX+lhCI-!TIOhWpWMe5zwwqL;!JWo@?$iYmu>;1
zh{qoDN@*i7uu$~0RWVb*%-Y)8(vsh1jvd0m!Qpd+p*&d1$vsW}ye04H#XZhQWd~}wKtRR^Oz@N3}$_>@uj^kFO@i4#G
zsk?HUhlRF$IbSHL-EVGc^78iPCmk7_-tSjSzvr`%vu^g6%Qno~eVGOTaa)e1yF0IW
zqsJ~M;AIVFB$tjP8R^FgHz=a8npMrU=BDhM0NKg!mb>bpzES#x6Z@{kn^g)5u&>|h
z^>RrZkm(T<6SJF`nI#3+vZTpIL`C!os{&|6vkQFk?(RH=2LNp4TD6aPH8eCV*sombv`tnjC=Ndg#mg&hWc++O3GqJ=YyM9x%lt{o4%-83r=k+
zBTbHo>NqMWudqE0QCMgJbxcS;MWSR8e#BLfZ-E>TR=w8IrfF$uX>1HzZgvOdgNl~c
z7f-R8;hC^5VknUyFAndL$+<|IGc$C@eIzq@p4V*t6wf0$$EHyAebzJ8<}hj28aJ
zX1(poD@sZT^6~NcyLE%~b~mB$VP8WP2!E0HUue$H&wzIW!9`$Ld
z(@ylBTVG$Vnv$3o(A!n8G7~bLS^a`wM1+J`b9IsuS})jS{qA{#hSOPezT23p#GUYeQax!bH_K){c^qPx4fl0R`HIf@4yH#sZLKuPK2slAxd
z8o=c+Jlq%xVR>3y#}EAc+F$51y>)G_W@cK8XARRb!6ks7bvRNSd2tEw(EO#k&@lL*
zsieftvW{3tjH6;?+%vQpzsI+I3212V?bbxq41!Jn%YmqTG|VewfMj_82kkxd7#0Z
z2$P>PSAtmleXBDgHTCDhQF~77KF8A8o9&G)M?TVz@TTTwP|alJvVYdq8WFG}$BhB-
zJU2&6LxTxv&(A~bBb`~^n(^_tTU!P7xGO77joCL4&n`;e-p}>Mp8upJtCdS81ugye;I7uzv(&8#aMpi6044Bq&Ty-{@R|UV2W(p4$=m;
z0}TgZNSFUmKV(QJnYAAama;N=Jw0DJ>(Z%jVvxh-%01}x>zdkGD}5+WNlIm9TOR4l
zDDU1!|4)LKH~N_vx6D2|GV-j3E+RcWo$Vt=czaSmi`Ko5A^9rW-uESQ6PoU!5N*rd
zmv1nml9M&?fQn-0;b|d$o|c)=ZCuSq8XXolK6|60S|E>(fzjl+{+M117Z*1^KAwez
z1ynGhQyqPMEJ$l}f8E8^m6y8~kU|HdWyj{k#Jq3cI(YYJm~}4=>b@Rd
zX^avos;ul|5fBh~{rdI%{QT1AX^=Ils8GLp1vLN3fG-a>Hv|0&5k7uZZEZ&~x1m*1
zsz+sUanH=mM=`NOlJn^J_=$BGt|xz^qsc-0F8enXDUgH_j%5EfuKvu5h6Z0)Z+HC7
zfLdBp6YdVFsToiIv?uciQpet&?UL?CX=!O&Tc8BBjI1>Dw(DS#OnwWl4YYV_Z!6UY
zMPPe1KdPu`t8@EY38qw(?3K6+zWWdOTWz9gBNNpgzrR;kdw~$~M21dJv)u=cxEKBl
z#soFqb90i0>7JdtfSYlGlN0>@`t|G0?i*&ujzKL0tq!m3)YKP1cKhnGyE!=_2mJYC
zXjflVRh5;M1zd{B^?0AMQY=k^xRk;dMmqdW}5ZbS*((#sG60~m9(Oo<&EO69i9vX%y4>h_N7E#b=
zW{qy-+q~dVr_MCAR4-AD&LZcPevj|9Y^ow
z>68sE=;#m-B)K2u8>5!-a0r^q)ol{fLY*~7`z{hfV1FGfsF;K@@u`2uTu^dJS$MrxUqNj@)goZ$^ZO(@kHfO}f
zj!hp+`wVks46ig=u#JWrW4gL}3oiEd_7b#LZn3r+MKHi%_5flqO)f3@93RJleHJ}?
z$!QwOnKA5l0;AI)b*-Y{>YQA6cK7%bv%DfQ`5}|vTW~kJfW8$7I3~f6x0LXuwxq&;
zERAhalQNg*=fgIG?5%Wrzi84>b8HfK%ovaKFH-`B_SK$Bz>{+QL
zQHg`l(M$1bnQRVDC<+mSlrxv=^XG91eK9v9S>B*OgFMlzN#Gr=ik_aHpV%5m&p%}H
zeOcbU#XY1gWY({HXV#A+pdbzgs)9OzJAVL`G9A9T#2bD4YrqkHkSADo5q)#h1lkjO
zVglq_Gs7guJt(WJehLCn+1dU-@A<$Hu?jB_TW>23+R2ah;D!kE;i}fma>n5J6azyO
z-Wd=IS!izGPrccDG9CB$=1M`Hd3LeN@1S>Bmq8)T+}w(qh9)y1V|Hl?z6bL;xWPQk
z`15~2q*sn{hQ4HqhBO@bab#bxueSUgInz4oX(0Tu)1wuw%R<_YS2K#DbV{=GB0e*1Mzy>|)wFs}z
z%aiEsE*mO?1Jws2DP59%?Y8zc%VjC0mz=ahXM-!gXopKOMm1VG&xTR|ZY|6&9KZTq
zA8PRS?Vqm3$=eHx$o8bMu{k~vczKT_udWuf57(fgidTFTayWJXEp+vd1ghtCv1&^S
zvp%22%DWZ9R3RBf#f!>ye+yF){O5!`JUlu-oO;IB8K8h$i)TPybczvu7Vr9Au{ty|
zU{b9GIzK+fy#0**h+?#88}c{NyqioukK>^lv$oX(2ZQ~z!&QFxk-X{DIS4923Rmy7
z8Ghsg#Dx`C>3EaC!di}I+c*^;>4+A?Y@yjGdBO7SsX=58F(6S_R%&W$ZtQ7Sx;z=J
zqQ}R8vuY%7Azs!ZpJ_Vdgd!f#+Aj$?!5iAzvf|^7K|o`)mJ0$o5T6W_+#%!)@Bq#_
zG3c0@+8AH&^YlaoD#?aNN?F+`eKhgf`5u4uwiOMR`4=|YO~U8&7AXCHB@{Y%I|@B}77q0f8>uc}hY{s6y;TXWz8_e0SU*yP8rruLYK
zK=?ZBO~ij7owD-F$Q!Ja^#H
<%== pagy_bootstrap_nav_js(@pagy, ...) %>
<%== pagy_bootstrap_combo_nav_js(@pagy, ...) %>
```
+|||
-or with a template:
-
+||| View (template)
```erb
<%== render partial: 'pagy/bootstrap_nav', locals: {pagy: @pagy} %>
```
+|||
-See [Javascript](../api/javascript.md) if you use `pagy_bootstrap_nav_js` or `pagy_bootstrap_combo_nav_js`.
+See: [Javascript](/docs/api/javascript.md) if you use `pagy_bootstrap_nav_js` or `pagy_bootstrap_combo_nav_js`.
## Files
@@ -41,22 +42,30 @@ See [Javascript](../api/javascript.md) if you use `pagy_bootstrap_nav_js` or `pa
## Methods
-This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize them by direct overriding in your own view helper.
+This extra adds 3 nav helpers to the `Pagy::Frontend` module.
-### pagy_bootstrap_nav(pagy, ...)
+!!!info Overriding Helpers
+You can customize them by overriding in your own view helper(s).
+!!!
+
+==- `pagy_bootstrap_nav(pagy, ...)`
This method is the same as the `pagy_nav`, but customized for Bootstrap.
-See the [pagy_nav(pagy, ...)](../api/frontend.md#pagy_navpagy-) documentation.
+See: [pagy_nav(pagy, ...)](/docs/api/frontend.md#pagy-nav-pagy).
+
+The `bootstrap_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](/docs/how-to.md#use-templates).
+
+=== `pagy_bootstrap_nav_js(pagy, ...)`
-The `bootstrap_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](../how-to.md#use-templates).
+![bootstrap_combo_nav_js](/docs/assets/images/bootstrap_nav_js-g.png)
-### pagy_bootstrap_nav_js(pagy, ...)
+See: [Javascript Navs](/docs/api/javascript/navs.md).
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+=== `pagy_bootstrap_combo_nav_js(pagy, ...)`
-### pagy_bootstrap_combo_nav_js(pagy, ...)
+![bootstrap_combo_nav_js](/docs/assets/images/bootstrap_combo_nav_js-g.png)
-![bootstrap_combo_nav_js](../assets/images/bootstrap_combo_nav_js-g.png)
+See: [Javascript Combo Navs](/docs/api/javascript/combo-navs.md).
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
diff --git a/docs/extras/bulma.md b/docs/extras/bulma.md
index 03a54e173..dfa48ef8c 100644
--- a/docs/extras/bulma.md
+++ b/docs/extras/bulma.md
@@ -1,36 +1,37 @@
---
title: Bulma
+categories:
+- Frontend
+- Extras
+image: none
---
# Bulma Extra
-This extra adds nav helper and templates for the Bulma CSS [pagination component](https://bulma.io/documentation/components/pagination).
+This extra adds nav helpers and templates for the Bulma CSS [pagination component](https://bulma.io/documentation/components/pagination).
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/bulma'
```
+|||
-Render the navigation links in some view...
-with a fast helper:
-
+||| View (helpers)
```erb
<%== pagy_bulma_nav(@pagy, ...) %>
<%== pagy_bulma_nav_js(@pagy, ...) %>
<%== pagy_bulma_combo_nav_js(@pagy, ...) %>
```
+|||
-or with a template:
-
+||| View (template)
```erb
<%== render partial: 'pagy/bulma_nav', locals: {pagy: @pagy} %>
```
+|||
-See [Javascript](../api/javascript.md) if you use `pagy_bulma_nav_js` or `pagy_bulma_combo_nav_js`.
+See [Javascript](/docs/api/javascript.md) if you use `pagy_bulma_nav_js` or `pagy_bulma_combo_nav_js`.
## Files
@@ -41,22 +42,28 @@ See [Javascript](../api/javascript.md) if you use `pagy_bulma_nav_js` or `pagy_b
## Methods
-This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize them by direct overriding in your own view helper.
+This extra adds 3 nav helpers to the `Pagy::Frontend` module.
+
+!!!info Overriding Helpers
+You can customize them by overriding in your own view helper(s).
+!!!
-### pagy_bulma_nav(pagy)
+==- `pagy_bulma_nav(pagy)`
This method is the same as the `pagy_nav`, but customized for Bulma.
-See the [pagy_nav(pagy, ...)](../api/frontend.md#pagy_navpagy-) documentation.
+See the [pagy_nav(pagy, ...)](/docs/api/frontend.md#pagy-nav-pagy) documentation.
+
+The `bulma_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](/docs/how-to.md#use-templates).
-The `bulma_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](../how-to.md#use-templates).
+==- `pagy_bulma_nav_js(pagy, ...)`
-### pagy_bulma_nav_js(pagy, ...)
+See the [Javascript Navs](/docs/api/javascript/navs.md) documentation.
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+=== `pagy_bulma_combo_nav_js(pagy, ...)`
-### pagy_bulma_combo_nav_js(pagy, ...)
+![bulma_combo_nav_js](/docs/assets/images/bulma_combo_nav_js-g.png)
-![bulma_combo_nav_js](../assets/images/bulma_combo_nav_js-g.png)
+See the [Javascript Combo Navs](/docs/api/javascript/combo-navs.md) documentation.
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
diff --git a/docs/extras/calendar.md b/docs/extras/calendar.md
index 20224c613..45ef84534 100644
--- a/docs/extras/calendar.md
+++ b/docs/extras/calendar.md
@@ -1,13 +1,16 @@
---
title: Calendar
+categories:
+- Backend
+- Extras
+image: none
---
# Calendar Extra
-
-Add pagination filtering by calendar time unit: year, quarter, month, week, day (and your own [custom time units](../api/calendar.md#custom-units)).
+Add pagination filtering by calendar time unit: year, quarter, month, week, day (and your own [custom time units](/docs/api/calendar.md#custom-units)).
This extra adds single or multiple chained calendar navs that act as calendar filters on the collection records, placing each record in its time unit.
-![calendar_app](../assets/images/calendar-app.png)
+![calendar_app](/docs/assets/images/calendar-app.png)
_Screenshot from the single-file self-contained [pagy_calendar_app.ru](https://github.com/ddnexus/pagy/blob/master/apps/pagy_calendar_app.ru) demo_
## Use cases
@@ -18,36 +21,34 @@ On the other hand it does not make much sense for the result of a search that hi
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-Require and configure it in the `pagy.rb` initializer:
-
+||| initializer (pagy.rb)
```ruby
require 'pagy/extras/calendar'
-# Optional: customize the default
```
+|||
-Implement and use it in your controllers:
-
+||| controller
```ruby
-# Define the pagy_calendar_period method in your application
+# e.g. application_controller.rb
def pagy_calendar_period(collection)
return_period_array_using(collection)
end
-# Define the pagy_calendar_filter method in your application
+# e.g. application_controller.rb
def pagy_calendar_filter(collection, from, to)
return_filtered_collection_using(collection, from, to)
end
-# Use it in your actions:
-@calendar, @pagy, @records = pagy_calendar(collection, year: { size: [1, 1, 1, 1], ... },
+# some action:
+def index
+ @calendar, @pagy, @records = pagy_calendar(collection, year: { size: [1, 1, 1, 1], ... },
month: { size: [0, 12, 12, 0], ... },
pagy: { items: 10, ...})
+end
```
+|||
-Use the calendar and pagy objects in your views:
-
+||| view (template)
```erb
<%== pagy_nav(@calendar[:year]) %>
@@ -61,10 +62,13 @@ Use the calendar and pagy objects in your views:
<%== pagy_nav(@pagy) %>
```
+|||
-See also a few examples about [How to wrap existing pagination with pagy_calendar](../how-to.md#wrap-existing-pagination-with-pagy_calendar).
+See also a few examples about [How to wrap existing pagination with pagy_calendar](/docs/how-to.md#wrap-existing-pagination-with-pagy_calendar).
-**Notice** For a complete and detailed example, see the [pagy_calendar_app.ru](https://github.com/ddnexus/pagy/blob/master/apps/pagy_calendar_app.ru).
+!!!primary Demo App
+For a complete and detailed example, see the [pagy_calendar_app.ru](https://github.com/ddnexus/pagy/blob/master/apps/pagy_calendar_app.ru).
+!!!
## Usage
@@ -72,24 +76,26 @@ Since the time can be stored or calculated in many different ways in different c
The whole usage boils down to these steps:
-1. Define the [pagy_calendar_period](#pagy_calendar_periodcollection) method in your controller
-2. Define the [pagy_calendar_filter](#pagy_calendar_filtercollection-from-to) method in your controller
-3. Configure the [pagy_calendar](#pagy_calendarcollection-configuration) method in your action
+1. Configure the [pagy_calendar](#pagy-calendar-collection-configuration) method in your action
+2. Define the [pagy_calendar_period](#pagy-calendar-period-collection) method in your controller
+3. Define the [pagy_calendar_filter](#pagy-calendar-filter-collection-from-to) method in your controller
4. Use it in your UI
You can play with a quick demo app, working without any additional configuration with:
+||| shell
```shell
git clone --depth 1 https://github.com/ddnexus/pagy
cd pagy
rackup -o 0.0.0.0 -p 8080 apps/pagy_calendar_app.ru
```
+|||
-Then point your browser to `http://0.0.0.0:8080`.
+Then point your browser to http://0.0.0.0:8080.
## Variables and Accessors
-See [Pagy::Calendar](../api/calendar.md#variables)
+See [Pagy::Calendar](/docs/api/calendar.md#variables)
## Files
@@ -99,7 +105,7 @@ See [Pagy::Calendar](../api/calendar.md#variables)
All the methods in this module are prefixed with the `"pagy_calendar"` string in order to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions.
-### pagy_calendar(collection, configuration)
+==- `pagy_calendar(collection, configuration)`
This method wraps one or more levels of calendar filtering on top of another backend pagination method (e.g. `pagy`, `pagy_arel`, `pagy_array`, `pagy_searchkick`, `pagy_elasticsearch_rails`, `pagy_meilisearch`, ...).
@@ -107,9 +113,11 @@ It filters the `collection` by the selected time units in the `configuration` (e
It returns an array with one more item than the usual two:
+||| controller
```ruby
@calendar, @pagy, @results = pagy_calendar(...)
```
+|||
The `@calendar` contains the hash of the generated `Pagy::Calendar::*` objects that can be used in the UI.
@@ -129,7 +137,9 @@ The calendar configuration determines the calendar objects generated. These are
You can add one or more levels with keys like `:year`, `:quarter`, `:month`, `:week`, `:day`. Each key must be set to the hash of the variables that will be used to initialize the relative `Pagy::Calendar::*` object. Use an empty hash for default values. E.g.: `year: {}, month: {}, ...`.
-**Restrictions**: The `:page`, `:page_param`, `:params` and `:period` variables for the calendar objects are managed automatically by the extra. Setting them explicitly has no effect. (See also [Calendar params](#calendar-params) for solutions in case of conflicts)
+!!!warning Do not set `:page`, `:page_param`, `:params` and `:period` keys
+The `:page`, `:page_param`, `:params` and `:period` variables for the calendar objects are managed automatically by the extra. Setting them explicitly has no effect. (See also [Calendar params](#calendar-params) for solutions in case of conflicts)
+!!!
#### Pagy configuration
@@ -153,11 +163,13 @@ The calendar is active by default, however you can add an optional `:active` boo
Take a look at the [pagy_calendar_app.ru](https://github.com/ddnexus/pagy/blob/master/apps/pagy_calendar_app.ru) for a simple example of a manual toggle in the UI.
-### pagy_calendar_period(collection)
+==- `pagy_calendar_period(collection)`
-**This method must be implemented by the application.**
+!!!primary Must implement
+This method must be implemented by the application.
+!!!
-It receives a `collection` argument that must not be changed by the method, but can be used to return the starting and ending local `TimeWithZone` objects array defining the calendar `:period`. See the [Pagy::Calendar Variables](../api/calendar.md#variables) for details.
+It receives a `collection` argument that must not be changed by the method, but can be used to return the starting and ending local `TimeWithZone` objects array defining the calendar `:period`. See the [Pagy::Calendar Variables](/docs/api/calendar.md#variables) for details.
Depending on the type of storage, the `collection` argument can contain a different kind of object:
@@ -165,6 +177,7 @@ Depending on the type of storage, the `collection` argument can contain a differ
If you use `ActiveRecord` the `collection` is going to be an `ActiveRecord::Relation` object. You can use it to return the starting and ending local `TimeWithZone` objects array. Here are a few examples with the `created_at` field (but you can pull the time from anywhere):
+||| controller
```ruby
# Simpler version (2 queries)
def pagy_calendar_period(collection)
@@ -187,8 +200,9 @@ def pagy_calendar_period(collection)
params.fetch_values(:starting, :ending).map { |time| Time.parse(time).in_time_zone }
end
```
+|||
-See also [Time conversion](../api/calendar.md#time-conversions) for details.
+See also [Time conversion](/docs/api/calendar.md#time-conversions) for details.
#### Search frameworks storage
@@ -196,9 +210,11 @@ _If you use `ElasticSearchRails`, `Searchkick`, `Meilisearch` the `collection` a
So you should use what you need from the `collection` array and do your own `Model.search(...)` in order to get the starting and ending local `TimeWithZone` objects array to return.
-### pagy_calendar_filter(collection, from, to)
+==- `pagy_calendar_filter(collection, from, to)`
-**This method must be implemented by the application.**
+!!!primary Must implement
+This method must be implemented by the application.
+!!!
It receives the main `collection` and must return a filtered version of it using the `from` and `to` **local Time** objects.
@@ -210,19 +226,22 @@ Depending on the type of storage, the `collection` argument can contain a differ
If you use `ActiveRecord` the `collection` is going to be an `ActiveRecord::Relation` object that you can easily filter. Here is an example with the `created_at` field again (but you can use anything, of course):
+||| controller
```ruby
def pagy_calendar_filter(collection, from, to)
collection.where(created_at: from...to) # 3-dots range excluding the end value
end
```
+|||
-See also [Time conversion](../api/calendar.md#time-conversions) for details.
+See also [Time conversion](/docs/api/calendar.md#time-conversions) for details.
#### Search frameworks storage
_If you use `ElasticSearchRails`, `Searchkick`, `Meilisearch` the `collection` argument is just the Array of the captured search arguments that you passed to the `Model.pagy_search` method. That array is what pagy uses internally to setup its variables before passing it to the standard `Model.search` method to do the actual search._
So in order to filter the actual search with the `from` and `to` local `TimeWithZone` objects, you should simply return the same array with the filtering added to its relevant item. Pagy will use it to do the actual (filtered) search.
+===
## Customization
@@ -249,19 +268,20 @@ You can use the calendar objects with any `pagy_*nav` and `pagy_*nav_js` helpers
The `pagy_*combo_nav_js` keeps into account only page numbers and not labels, so it is not very useful (if at all) with `Pagy::Calendar::*` objects.
-### pagy_calendar_url_at(@calendar, time)
+==- `pagy_calendar_url_at(@calendar, time)`
This helper takes the `@calendar` and a `TimeWithZone` objects and returns the url complete with all the params for the pages in each bars that include the passed time.
For example: `pagy_calendar_url_at(@calendar, Time.zone.now)` will select the the bars pointing to today. You can see a working example in the [pagy_calendar_app.ru](https://github.com/ddnexus/pagy/blob/master/apps/pagy_calendar_app.ru) file.
If `time` is outside the pagination range it raises a `Pagy::Calendar::OutOfRangeError`.
+===
### Label format
-Each page link in the calendar navs is conveniently labeled with the specific `Time` period it refers to. You can change the time format to your needs by setting the `:format` variable to a standard `strftime` format. (See the [Pagy::Calendar variables](../api/calendar.md#variables))
+Each page link in the calendar navs is conveniently labeled with the specific `Time` period it refers to. You can change the time format to your needs by setting the `:format` variable to a standard `strftime` format. (See the [Pagy::Calendar variables](/docs/api/calendar.md#variables))
-You can also get the [current page label](../api/calendar.md#labelopts--) with e.g.: `@calendar[:month].label`, which might be useful to use in your UI.
+You can also get the [label method](/docs/api/calendar.md#methods) with e.g.: `@calendar[:month].label`, which might be useful to use in your UI.
### I18n localization
@@ -270,8 +290,10 @@ Pagy implements its own faster version of the i18n `translate` method (i.e. `pag
You have a couple of options:
- Use the [i18n extra](i18n.md), which delegates the translation and localization to the `I18n` gem. Notice however that you would lose the performance gain offered by the built-in `pagy_t` translation.
-- Uncomment the block in the calendar section in the [pagy.rb](https://github.com/ddnexus/pagy/blob/master/lib/config/pagy.rb) initializer, which will add the localization from the `I18n` gem without using the [i18n extra](../extras/i18n.md), so preserving the builtin `pagy_t` translation.
+- Uncomment the block in the calendar section in the [pagy.rb](https://github.com/ddnexus/pagy/blob/master/lib/config/pagy.rb) initializer, which will add the localization from the `I18n` gem without using the [i18n extra](/docs/extras/i18n.md), so preserving the builtin `pagy_t` translation.
## Caveats
-- Calendar pages with no records are accessible but empty: you may want to display some message when `@records.empty?`.
+!!!warning Display Message when empty
+Calendar pages with no records are accessible but empty: you may want to display some message when `@records.empty?`.
+!!!
diff --git a/docs/extras/countless.md b/docs/extras/countless.md
index ebd0ec30c..1e49b404d 100644
--- a/docs/extras/countless.md
+++ b/docs/extras/countless.md
@@ -1,57 +1,84 @@
---
title: Countless
+categories:
+- Backend
+- Extras
---
-# Countless Extra
-
-This extra uses the `Pagy::Countless` subclass in order to save one count query per request. It is especially useful when used with large DB tables, where [Caching the count](../how-to.md#cache-the-count) may not be an option, or when there is no need to have a classic UI. Please read also the [Pagy::Countless doc](../api/countless.md) for a fuller understanding of its features and limitations.
-## Synopsis
+# Countless Extra
-See [extras](../extras.md) for general usage info.
+Save one count query per request using the [Pagy::Countless subclass](/docs/api/countless.md) internally.
-In the `pagy.rb` initializer:
+## Setup
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/countless'
-# optionally enable the minimal mode by default
-# Pagy::DEFAULT[:countless_minimal] = true
```
+|||
+
+
+## Modes
+
+This extra can be used in two different modes by enabling the `:countless_minimal` variable (or not).
+
++++ Default mode
+
+!!! success
+Your app needs a full classic pagination UI
+!!!
+
+### Usage
-In a controller:
+
+||| Controller (eager loading)
```ruby
-# default mode (eager loading)
@pagy, @records = pagy_countless(some_scope, ...)
-
-# OR
-# enable minimal mode for this instance (lazy loading)
-@pagy, @records = pagy_countless(some_scope, countless_minimal: true, ...)
```
+|||
-## Modes
-
-This extra can be used in two different modes by enabling or not the `:countless_minimal` variable.
+This mode retrieves `items + 1`, and uses the number of retrieved items to calculate the variables. It then removes the extra item from the result.
-### Default mode
+!!! info
+- The `@records` collection is an eager-loaded `Array` of records.
+- The `@pagy` object can be used with any supported helper.
+!!!
++++ Minimal mode
-This is the preferred automatic way to save one query per request, while keep using the classic pagination UI helpers.
+!!! success
+Your app uses no or limited pagination UI
+!!!
-By default this extra will try to finalize the `pagy` object with all the available variables in a countless pagination. It will do so by retrieving `items + 1`, and using the resulting number to calculate the variables, while eventually removing the extra item from the result.
+### Set Up countless_minimal mode
+
-That means:
+||| pagy.rb (initializer)
+```ruby
+require 'pagy/extras/countless'
+# optionally enable the minimal mode by default
+# Pagy::DEFAULT[:countless_minimal] = true
+```
+|||
-- The `pagy` object will know whether the current page is the last one or there will be a next page so you can use it right away with any supported helper
-- The returned paginated collection (`@records`) will be an `Array` instead of a scope (so the records are already eager-loaded from the DB)
+### Usage
+
-### Minimal mode
+||| Controller (lazy loading)
+```ruby
+@pagy, @records = pagy_countless(some_scope, countless_minimal: true, ...)
+```
+|||
-This is the preferred mode used to implement navless and automatic incremental/infinite-scroll pagination, where there is no need to use any UI.
+This mode is enabled by the `:countless_minimal` variable.
-If you enable the `:countless_minimal` variable, then:
+!!! info
+- The `@records` collection is a regular scope.
+- The `@pagy` object cannot be used with any helpers.
+- The collection is over when `@records.size < @pagy.vars[:items]`.
+!!!
-- The returned `pagy` object will contain just a handful of variables and will miss the finalization, so you cannot use it with any helpers
-- The returned paginated collection (`@records`) will be a regular scope (i.e. no record has been load yet) so an eventual fragment caching can work as expected
-- You will need to check the size of the paginated collection (`@records`) in order to know if it is the last page or not. You can tell it by checking `@records.size < @pagy.vars[:items]`. Notice that IF the last page has exactly the `@pagy.vars[:items]` in it you will not be able to know it. In infinite scroll that would just try to load the next page returning 0 items, so it will be perfectly acceptable anyway.
++++
## Variables
@@ -65,16 +92,16 @@ If you enable the `:countless_minimal` variable, then:
## Methods
-All the methods in this module are prefixed with the `"pagy_countless"` string, to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions. The methods prefixed with the `"pagy_countless_get_"` string are sub-methods/getter methods that are intended to be overridden, not used directly.
+==- `pagy_countless(collection, vars=nil)`
-### pagy_countless(collection, vars=nil)
+This method is the same as the generic `pagy` method (see the [pagy doc](/docs/api/backend.md#pagy-collection-vars-nil)), however its returned objects will depend on the value of the `:countless_minimal` variable (see [Modes](#modes))
-This method is the same as the generic `pagy` method (see the [pagy doc](../api/backend.md#pagycollection-varsnil)), however its returned objects will depend on the value of the `:countless_minimal` variable (see [Modes](#modes))
+==- `pagy_countless_get_vars(_collection, vars)`
-### pagy_countless_get_vars(_collection, vars)
+This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_countless` method. (see the [pagy_get_vars doc](/docs/api/backend.md#pagy-get-vars-collection-vars)).
-This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_countless` method. (see the [pagy_get_vars doc](../api/backend.md#pagy_get_varscollection-vars)).
+==- `pagy_countless_get_items(collection, pagy)`
-### pagy_countless_get_items(collection, pagy)
+This sub-method is similar to the `pagy_get_items` sub-method, but it is called only by the `pagy_countless` method. (see the [pagy_get_items doc](/docs/api/backend.md#pagy-get-items-collection-pagy)).
-This sub-method is similar to the `pagy_get_items` sub-method, but it is called only by the `pagy_countless` method. (see the [pagy_get_items doc](../api/backend.md#pagy_get_itemscollection-pagy)).
+===
diff --git a/docs/extras/elasticsearch_rails.md b/docs/extras/elasticsearch_rails.md
index 37c5e0db9..d56a5d97b 100644
--- a/docs/extras/elasticsearch_rails.md
+++ b/docs/extras/elasticsearch_rails.md
@@ -1,108 +1,100 @@
---
title: Elasticsearch Rails
+categories:
+- Search
+- Backend
+- Extras
---
-# Elasticsearch Rails Extra
-
-This extra deals with the pagination of `ElasticsearchRails` response objects either by creating a `Pagy` object out of an (already paginated) `ElasticsearchRails` object or by creating the `Pagy` and `ElasticsearchRails` objects from the backend params.
-## Synopsis
+# Elasticsearch Rails Extra
-See [extras](../extras.md) for general usage info.
+Paginate `ElasticsearchRails` response objects.
-Require the extra in the `pagy.rb` initializer:
+## Setup
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/elasticsearch_rails'
```
+|||
-### Passive mode
+## Modes
-If you have an already paginated `Elasticsearch::Model::Response::Response` object, you can get the `Pagy` object out of it:
-
-```ruby
-@response = Model.search('*', from: 0, size: 10, ...)
-@pagy = Pagy.new_from_elasticsearch_rails(@response, ...)
-```
+This extra offers two ways to paginate `ElasticsearchRails` response objects.
-### Active Mode
++++ Active mode
-If you want Pagy to control the pagination, getting the page from the params, and returning both the `Pagy` and the `Elasticsearch::Model::Response::Response` objects automatically (from the backend params):
+!!! success Pagy searches and paginates
+You use the `pagy_search` method in place of the `search` method.
+!!!
-Extend your model:
+### Usage
+||| Model
```ruby
extend Pagy::ElasticsearchRails
```
+|||
-In a controller use `pagy_search` in place of `search`:
-
-```ruby
-response = Article.pagy_search(params[:q])
-@pagy, @response = pagy_elasticsearch_rails(response, items: 10)
-```
-
-## Files
-
-- [elasticsearch_rails.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/elasticsearch_rails.rb)
-
-## Passive Mode
-
-### Pagy.new_from_elasticsearch_rails(response, ...)
-
-This constructor accepts an `Elasticsearch::Model::Response::Response` as the first argument, plus the usual optional variable hash. It sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of the `Elasticsearch::Model::Response::Response` object.
-
+||| Controller (pagy_search)
```ruby
-@response = Model.search('*', from: 0, size: 10, ...)
-@pagy = Pagy.new_from_elasticsearch_rails(@response, ...)
+# get the collection in one of the following ways
+collection = Article.pagy_search(params[:q])
+collection = Article.pagy_search(params[:q]).records
+collection = Article.pagy_search(params[:q]).results
+# paginate it
+@pagy, @response = pagy_elasticsearch_rails(collection, items: 10)
```
+|||
-**Notice**: you have to take care of manually manage all the params for your search, however the method extracts/calculates the `:items`, `:page` and `:count` from the response object, so you don't need to pass that again. If you prefer to manage the pagination automatically, see below.
-
-## Active mode
++++ Passive mode
-### Pagy::ElasticsearchRails module
+!!! success You search and paginate
+Pagy creates its object out of your result.
+!!!
-Extend your model with the `Pagy::ElasticsearchRails` micro-module:
+### Usage
+||| Controller (search)
```ruby
-extend Pagy::ElasticsearchRails
+# standard response (already paginated)
+@response = Article.search('*', from: 0, size: 10, ...)
+# get the pagy object out of it
+@pagy = Pagy.new_from_elasticsearch_rails(@response, ...)
```
+|||
-The `Pagy::ElasticsearchRails` adds the `pagy_search` class method that you must use in place of the standard `search` method when you want to paginate the search response.
++++
-#### pagy_search(...)
+## Files
-This method accepts the same arguments of the `search` method and you must use it in its place. This extra uses it in order to capture the arguments, automatically merging the calculated `:from` and `:size` options before passing them to the standard `search` method internally.
+- [elasticsearch_rails.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/elasticsearch_rails.rb)
-### Variables
+## Variables
| Variable | Description | Default |
|:-----------------------------------|:------------------------------------------------|:-------------|
| `:elasticsearch_rails_pagy_search` | customizable name of the pagy search method | :pagy_search |
| `:elasticsearch_rails_search` | customizable name of the original search method | :search |
-### Methods
+## Methods
-This extra adds the `pagy_elasticsearch_rails` method to the `Pagy::Backend` to be used when you have to paginate a `ElasticsearchRails` object. It also adds a `pagy_elasticsearch_rails_get_variables` sub-method, used for easy customization of variables by overriding.
+==- `Pagy::ElasticsearchRails.pagy_search(...)`
-#### pagy_elasticsearch_rails(pagy_search_args, vars = {}})
+This method accepts the same arguments of the `search` method and you must use it in its place in active mode.
-This method is similar to the generic `pagy` method, but specialized for Elasticsearch Rails. (see the [pagy doc](../api/backend.md#pagycollection-varsnil))
+==- `Pagy.new_from_elasticsearch_rails(response, vars={})`
-It expects to receive a `Model.pagy_search(...)` result as the first argument and an optional hash of variables. It returns a paginated response.
+This constructor accepts an `Elasticsearch::Model::Response::Response`, plus the optional pagy variables. It automatically sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of it.
-You can use it in a couple of ways:
+==- `pagy_elasticsearch_rails(pagy_search_args, vars={})`
-```ruby
-@pagy, @response = pagy_elasticsearch_rails(Model.pagy_search(params[:q]), ...)
-...
-records = @response.records
-results = @response.results
+This method is similar to the generic `pagy` method, but specialized for Elasticsearch Rails (see the [pagy doc](/docs/api/backend.md#pagy-collection-vars-nil)).
-# or directly with the collection you need (e.g. records)
-@pagy, @records = pagy_elasticsearch_rails(Model.pagy_search(params[:q]).records, ...)
-```
+It expects to receive `YourModel.pagy_search(...)` result and returns the paginated response.
+
+==- `pagy_elasticsearch_rails_get_vars(array)`
-### pagy_elasticsearch_rails_get_vars(array)
+This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_elasticsearch_rails` method. (see the [pagy_get_vars doc](/docs/api/backend.md#pagy-get-vars-collection-vars)).
-This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_elasticsearch_rails` method. (see the [pagy_get_vars doc](../api/backend.md#pagy_get_varscollection-vars)).
+===
diff --git a/docs/extras/foundation.md b/docs/extras/foundation.md
index 147fd78c4..be891f6b6 100644
--- a/docs/extras/foundation.md
+++ b/docs/extras/foundation.md
@@ -1,36 +1,36 @@
---
title: Foundation
+categories:
+- Frontend
+- Extras
---
# Foundation Extra
-This extra adds nav helper and templates for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html).
+This extra adds nav helpers and templates for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html).
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/foundation'
```
+|||
-Render the navigation links in some view...
-with a fast helper:
-
+||| View (helper)
```erb
<%== pagy_foundation_nav(@pagy, ...) %>
<%== pagy_foundation_nav_js(@pagy, ...) %>
<%== pagy_foundation_combo_nav_js(@pagy, ...) %>
```
+|||
-or with a template:
-
+||| View (template)
```erb
<%== render partial: 'pagy/foundation_nav', locals: {pagy: @pagy} %>
```
+|||
-See [Javascript](../api/javascript.md) if you use `pagy_foundation_nav_js` or `pagy_foundation_combo_nav_js`.
+See [Javascript](/docs/api/javascript.md) if you use `pagy_foundation_nav_js` or `pagy_foundation_combo_nav_js`.
## Files
@@ -41,20 +41,20 @@ See [Javascript](../api/javascript.md) if you use `pagy_foundation_nav_js` or `p
## Methods
-This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize them by direct overriding in your own view helper.
-
-### pagy_foundation_nav(pagy)
+==- `pagy_foundation_nav(pagy)`
This method is the same as the `pagy_nav`, but customized for Foundation.
-See the [pagy_nav(pagy, ...)](../api/frontend.md#pagy_navpagy-) documentation.
+See the [pagy_nav(pagy, ...)](/docs/api/frontend.md#pagy-nav-pagy) documentation.
+
+The `foundation_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](/docs/how-to.md#use-templates).
-The `foundation_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [How to use templates](../how-to.md#use-templates).
+==- `pagy_foundation_nav_js(pagy, ...)`
-### pagy_foundation_nav_js(pagy, ...)
+See the [Javascript Navs](/docs/api/javascript/navs.md) documentation.
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+==- `pagy_foundation_combo_nav_js(pagy, ...)`
-### pagy_foundation_combo_nav_js(pagy, ...)
+See the [Javascript Combo Navs](/docs/api/javascript/combo-navs.md) documentation.
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
diff --git a/docs/extras/gearbox.md b/docs/extras/gearbox.md
index 9b1130f38..8b2b9a4fe 100644
--- a/docs/extras/gearbox.md
+++ b/docs/extras/gearbox.md
@@ -1,5 +1,8 @@
---
title: Gearbox
+categories:
+- Features
+- Extras
---
# Gearbox Extra
@@ -24,19 +27,20 @@ If you want to use the `gearbox` in some instances, you can temporarily set `ite
## Synopsis
-See [extras](../extras.md) for general usage info.
-
+||| pagy.rb (initializer)
```ruby
-# pagy.rb initializer
require 'pagy/extras/gearbox'
# optional: set a different default in the pagy.rb initializer
# Pagy::DEFAULT[:gearbox_extra] = false # will make it opt-in only
# Pagy::DEFAULT[:gearbox_items] = [15, 30, 60, 100] # default
Pagy::DEFAULT[:gearbox_items] = [10, 20, 50] # your own default
+```
+|||
-# controller action
-# or pass the :gearbox_items variable to a constructor to have it only for that instance
+||| Controller (action)
+```ruby
+# Optionally override the :gearbox_items variable to a constructor to have it only for that instance
@pagy, @records = pagy(Product.all, gearbox_items: [30, 60, 100], ...)
# You can still use instances with fixed pagination even after requiring the extra
@@ -51,6 +55,7 @@ Pagy::DEFAULT[:gearbox_items] = [10, 20, 50] # your own default
# use the passed gearbox_items: [30, 60, 100]
@pagy, @records = pagy(Product.all, items_extra: false, gearbox_items: [30, 60, 100])
```
+|||
## Files
diff --git a/docs/extras/headers.md b/docs/extras/headers.md
index 9c81fe52a..a891c6aac 100644
--- a/docs/extras/headers.md
+++ b/docs/extras/headers.md
@@ -1,9 +1,14 @@
---
title: Headers
+categories:
+- Backend
+- Extras
---
# Headers Extra
This extra implements the [RFC-8288](https://tools.ietf.org/html/rfc8288) compliant http response headers (and other helpers) useful for API pagination.
+
+## Advantages
- No need for an extra dependency
- No need to learn yet another interface
@@ -13,16 +18,13 @@ This extra implements the [RFC-8288](https://tools.ietf.org/html/rfc8288) compli
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/headers'
```
+|||
-In your controller action:
-
+||| Controller (action)
```ruby
# paginate as usual with any pagy_* backend constructor
pagy, records = pagy(Product.all)
@@ -30,11 +32,13 @@ pagy, records = pagy(Product.all)
pagy_headers_merge(pagy)
render json: records
```
+|||
### Suggestions
Instead of explicitly merging the headers before each rendering, if you use rails you can get them automatically merged (application-wide and when `@pagy` is available), by adding an `after_action` in your application controller:
+||| Controller (after_action)
```ruby
after_action { pagy_headers_merge(@pagy) if @pagy }
@@ -42,9 +46,11 @@ after_action { pagy_headers_merge(@pagy) if @pagy }
@pagy, records = pagy(Product.all)
render json: records
```
+|||
If your code in different actions is similar enough, you can encapsulate the statements in a custom `pagy_render` method in your application controller. For example:
+||| Controller (pagy_render)
```ruby
def pagy_render(collection, vars={})
pagy, records = pagy(collection, vars) # any pagy_* backend constructor works
@@ -55,6 +61,7 @@ end
# and use it in your standard actions:
pagy_render(Product.all)
```
+|||
## Files
@@ -65,8 +72,7 @@ pagy_render(Product.all)
This extra generates the standard `Link` header defined in the
[RFC-8288](https://tools.ietf.org/html/rfc8288), and adds 4 customizable headers useful for pagination: `Current-Page`, `Page-Items`, `Total-Pages` and `Total-Count` headers.
-Example of the default HTTP headers produced:
-
+||| Example of the default HTTP headers
```text
Link ; rel="first", ; rel="prev", ; rel="next", ; rel="last"
Current-Page 3
@@ -74,6 +80,7 @@ Page-Items 20
Total-Pages 50
Total-Count 1000
```
+|||
### Customize the header names
@@ -101,19 +108,31 @@ As usual, depending on the scope of the customization, you can set the variables
For example, the following will change the header names and will suppress the `:pages` ('Total-Pages') header:
+||| pagy.rb (initializer)
```ruby
-# globally
-Pagy::DEFAULT[:headers] = {page: 'Current-Page', items: 'Per-Page', pages: false, count: 'Total'}
+# global
+Pagy::DEFAULT[:headers] = {page: 'Current-Page',
+ items: 'Per-Page',
+ pages: false,
+ count: 'Total'}
+```
+|||
+
+||| Controller
+```ruby
# or for single instance
-pagy, records = pagy(collection, headers: {page: 'Current-Page', items: 'Per-Page', pages: false, count: 'Total'})
+pagy, records = pagy(collection,
+ headers: {page: 'Current-Page',
+ items: 'Per-Page',
+ pages: false,
+ count: 'Total'})
```
+|||
## Methods
-This extra adds a few methods to the `Pagy::Backend` (available in your controllers).
-
-### pagy_headers_merge(pagy)
+==- `pagy_headers_merge(pagy)`
This method relies on the `response` method in your controller returning a `Rack::Response` object.
@@ -121,11 +140,11 @@ You should use it before rendering: it simply merges the `pagy_headers` to the `
If your app doesn't implement the `response` object that way, you should override the `pagy_headers_merge` method in your controller or use the `pagy_headers` method directly.
-### pagy_headers(pagy)
+==- `pagy_headers(pagy)`
This method generates a hash of [RFC-8288](https://tools.ietf.org/html/rfc8288) compliant http headers to send with the response. It is internally used by the `pagy_headers_merge` method, so you usually don't need to use it directly. However, if you need to edit the headers that pagy generates (for example adding extra `Link` headers), you can override it in your own controller.
-### pagy_headers_hash(pagy)
+==- `pagy_headers_hash(pagy)`
This method generates a hash structure of the headers, useful only if you want to include the headers as metadata within your JSON. For example:
@@ -133,4 +152,7 @@ This method generates a hash structure of the headers, useful only if you want t
render json: records.as_json.merge!(meta: {pagination: pagy_headers_hash(pagy)})
```
-**Notice**: If you need a more complete set of metadata (e.g. if you use some javascript frontend) see the [metadata extra](metadata.md).
+!!!info Metadata
+For a more complete set of metadata you should use the [metadata extra](metadata.md).
+!!!
+===
diff --git a/docs/extras/i18n.md b/docs/extras/i18n.md
index 48eb00918..fdd33f83c 100644
--- a/docs/extras/i18n.md
+++ b/docs/extras/i18n.md
@@ -1,25 +1,28 @@
---
title: I18n
+categories:
+- Feature
+- Extras
---
# I18n Extra
The `i18n` extra delegates the translation of the pagy strings and [localization of the calendar time labels](calendar.md#i18n-localization) to the `i18n` gem (which should obviously be installed).
-A change in the global `I18n.locale` will automatically translate and localize all the Pagy output accordingly.
-
-You should have some very good reasons to use the `i18n` gem instead of the pagy implementation, because the `i18n` gem is ~18x slower and uses ~10x more memory than the [Pagy::I18n](../api/i18n) default implementation.
+A change in the global `I18n.locale` will automatically translate and localize all Pagy output accordingly.
-**Notice**: Having the `i18n` gem already installed and configured in your app might not count as a good reason, because, besides being faster and lighter, the [Pagy::I18n](../api/i18n) is super easy to configure and doesn't require any change in the `i18n` of the rest of your app.
+!!!warning Prefer Pagy i18n
+You should have some very good reasons to use the `i18n` gem instead of the pagy implementation, because the `i18n` gem is ~18x slower and uses ~10x more memory than the [Pagy::I18n](/docs/api/i18n) default implementation.
-## Synopsis
-
-See [extras](../extras.md) for general usage info.
+Having the `i18n` gem already installed and configured in your app might not count as a good reason, because, besides being faster and lighter, the [Pagy::I18n](/docs/api/i18n) is super easy to configure and doesn't require any change in the `i18n` of the rest of your app.
+!!!
-In the `pagy.rb` initializer:
+## Synopsis
+||| pagy.rb (initializer)
```ruby
-require 'pagy/extras/i18n'
+require 'pagy/extras/headers'
```
+|||
## Files
diff --git a/docs/extras/index.yml b/docs/extras/index.yml
new file mode 100644
index 000000000..7205070a1
--- /dev/null
+++ b/docs/extras/index.yml
@@ -0,0 +1,3 @@
+#expanded: true
+icon: plus-circle-24
+image: null
diff --git a/docs/extras/items.md b/docs/extras/items.md
index b0550e2f3..59ce76e59 100644
--- a/docs/extras/items.md
+++ b/docs/extras/items.md
@@ -1,28 +1,36 @@
---
title: Items
+categories:
+- Feature
+- Extras
---
# Items Extra
Allow the client to request a custom number of items per page with an optional selector UI. It is useful with APIs or user-customizable UIs.
-It works also with the [countless](countless.md), [searchkick](searchkick.md), [elasticsearch_rails](elasticsearch_rails.md) and [meilisearch](../extras/meilisearch.md) extras.
+It works also with the [countless](countless.md), [searchkick](searchkick.md), [elasticsearch_rails](elasticsearch_rails.md) and [meilisearch](/docs/extras/meilisearch.md) extras.
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
-require 'pagy/extras/items'
+require 'pagy/extras/items' # works without further configuration
+```
+|||
-# it will work without any further configuration
+||| Controller
+```ruby
# you can disable it explicitly for specific requests
@pagy, @records = pagy(Product.all, items_extra: false)
-# or...
+# or see below:
+```
+|||
+
+||| pagy.rb (initializer)
+```ruby
# disable it by default (opt-in)
Pagy::DEFAULT[:items_extra] = false # default true
# in this case you have to enable it explicitly when you want it
@@ -32,8 +40,9 @@ Pagy::DEFAULT[:items_extra] = false # default true
Pagy::DEFAULT[:items_param] = :custom_param # default :items
Pagy::DEFAULT[:max_items] = 200 # default 100
```
+|||
-See [Javascript](../api/javascript.md) (only if you use the `pagy_items_selector_js` UI)
+See [Javascript](/docs/api/javascript.md) (only if you use the `pagy_items_selector_js` UI)
## Files
@@ -57,31 +66,40 @@ You may want to customize the variables. Depending on the scope of the customiza
As a global default:
+||| pagy.rb (initializer)
+
```ruby
Pagy::DEFAULT[:items_param] = :custom_param
Pagy::DEFAULT[:max_items] = 50
```
+|||
For a single instance (overriding the global default):
+||| Controller
+
```ruby
pagy(scope, items_param: :custom_param, max_items: 50)
Pagy.new(count: 100, items_param: :custom_param, max_items: 50)
```
+|||
-**Notice**: you can override the items that the client sends with the params by passing the `:items` explicitly. For example:
+
+!!!info Override 'items' in Params
+You can override the items that the client sends with the params by passing the `:items` explicitly. For example:
```ruby
# this will ignore the params[:items] (or any custom :param_name)
# from the client for this instance, and serve 30 items
pagy(scope, items: 30)
```
+!!!
## Methods
The `items` extra adds the `pagy_items_selector_js` helper to the `Pagy::Frontend` module.
-### pagy_items_selector_js(pagy, ...)
+==- `pagy_items_selector_js(pagy, ...)`
This helper provides an items selector UI, which allows the user to select any arbitrary number of items per page (below the `:max_items` number) in a numeric input field. It looks like:
@@ -96,17 +114,26 @@ The method accepts also a few optional keyword arguments:
- `:i18n_key` the key to lookup in a dictionary
- `:link_extra` which add a verbatim string to the `a` tag (e.g. `'data-remote="true"'`)
-Notice the `:i18n_key` can be passed also to the constructor or be a less useful global variable (i.e. `Pagy::DEFAULT[:i18n_key]`
+
+!!!info Info
+The `:i18n_key` can be passed also to the constructor or be a less useful global variable (i.e. `Pagy::DEFAULT[:i18n_key]`
+
+||| some_view.html.erb
```erb
<%== pagy_items_selector_js(@pagy, item_name: 'Product'.pluralize(@pagy.count) %>
<%== pagy_items_selector_js(@pagy, i18n_key: 'activerecord.model.product' %>
```
+|||
+!!!
+
Show Products per page
-_(see [How to customize the item name](../how-to.md#customize-the-item-name))_
+_(see [How to customize the item name](/docs/how-to.md#customize-the-item-name))_
When the items number is changed with the selector, pagy will reload the pagination UI using the selected items per page. It will also request the _right_ page number calculated in order to contain the first item of the previously displayed page. That way the new displayed page will roughly show the same items in the collection before the items change.
This method can take an extra `id` argument, which is used to build the `id` attribute of the `nav` tag.
+
+===
\ No newline at end of file
diff --git a/docs/extras/materialize.md b/docs/extras/materialize.md
index 1e5c59684..b89614a61 100644
--- a/docs/extras/materialize.md
+++ b/docs/extras/materialize.md
@@ -1,5 +1,9 @@
---
title: Materialize
+categories:
+- Frontend
+- Extras
+image: none
---
# Materialize Extra
@@ -7,24 +11,21 @@ This extra adds 3 nav helpers for the Materialize CSS [pagination component](htt
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/materialize'
```
+|||
-Render the navigation links in some view...
-with a fast helper:
-
+||| View (helper)
```erb
<%== pagy_materialize_nav(@pagy, ...) %>
<%== pagy_materialize_nav_js(@pagy, ...) %>
<%== pagy_materialize_combo_nav_js(@pagy, ...) %>
```
+|||
-See [Javascript](../api/javascript.md) if you use `pagy_materialize_nav_js` or `pagy_materialize_combo_nav_js`.
+See [Javascript](/docs/api/javascript.md) if you use `pagy_materialize_nav_js` or `pagy_materialize_combo_nav_js`.
## Files
@@ -34,18 +35,20 @@ See [Javascript](../api/javascript.md) if you use `pagy_materialize_nav_js` or `
This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize them by direct overriding in your own view helper.
-### pagy_materialize_nav(pagy)
+==- `pagy_materialize_nav(pagy)`
This method is the same as the `pagy_nav`, but customized for Materialize.
-See the [pagy_nav(pagy, ...)](../api/frontend.md#pagy_navpagy-) documentation.
+See the [pagy_nav(pagy, ...)](/docs/api/frontend.md#pagy-nav-pagy) documentation.
+
+==- `pagy_materialize_nav_js(pagy, ...)`
-### pagy_materialize_nav_js(pagy, ...)
+See the [Javascript Navs](/docs/api/javascript/navs.md) documentation.
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+=== `pagy_materialize_combo_nav_js(pagy, ...)`
-### pagy_materialize_combo_nav_js(pagy, ...)
+![materialize_combo_nav_js](/docs/assets/images/materialize_combo_nav_js-g.png)
-![materialize_combo_nav_js](../assets/images/materialize_combo_nav_js-g.png)
+See the [Javascript Combo Navs](/docs/api/javascript/combo-navs.md) documentation.
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
diff --git a/docs/extras/meilisearch.md b/docs/extras/meilisearch.md
index 9bdf38558..da520fb07 100644
--- a/docs/extras/meilisearch.md
+++ b/docs/extras/meilisearch.md
@@ -1,106 +1,99 @@
---
title: Meilisearch
+categories:
+- Search
+- Backend
+- Extras
---
# Meilisearch Extra
-This extra deals with the pagination of `Meilisearch` results either by creating a `Pagy` object out of an (already paginated) `Meilisearch` results or by creating the `Pagy` and `Meilisearch` results from the backend params.
+Paginate `Meilisearch` results.
-## Synopsis
-
-See [extras](../extras.md) for general usage info.
-
-Require the extra in the `pagy.rb` initializer:
+## Setup
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/meilisearch'
```
+|||
-### Passive mode
+## Modes
-If you have an already paginated `Meilisearch` results, you can get the `Pagy` object out of it:
-
-```ruby
-@results = Model.ms_search(nil, hits_per_page: 10, page: 10, ...)
-@pagy = Pagy.new_from_meilisearch(@results, ...)
-```
+This extra offers two ways to paginate `Meilisearch` objects:
-### Active Mode
++++ Active mode
-If you want Pagy to control the pagination, getting the page from the params, and returning both the `Pagy` and the Meilisearch results automatically (from the backend params):
+!!! success Pagy searches and paginates
+You use the `pagy_search` method in place of the `ms_search` method.
+!!!
-Extend your model:
+### Usage
+
+||| Model
```ruby
extend Pagy::Meilisearch
-ActiveRecord_Relation.include Pagy::Meilisearch # <--- (optional) if you use `includes` makes it work as expected
+ActiveRecord_Relation.include Pagy::Meilisearch
```
+|||
-In a controller use `pagy_search` in place of `search`:
-
+||| Controller (pagy_search)
```ruby
-results = Article.pagy_search(params[:q])
-@pagy, @results = pagy_meilisearch(results, items: 10)
+# get the collection in one of the following ways
+collection = Article.pagy_search(params[:q])
+collection = Article.pagy_search(params[:q]).results
+# paginate it
+@pagy, @response = pagy_meilisearch(collection, items: 10)
```
+|||
-## Files
-
-- [meilisearch.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/meilisearch.rb)
++++ Passive Mode
-## Passive mode
+!!! success You search and paginate
+Pagy creates its object out of your result.
+!!!
-### Pagy.new_from_meilisearch
-
-This constructor accepts a Meilisearch as the first argument, plus the usual optional variable hash. It sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of the Meilisearch object.
+### Usage
+
+||| Controller (Search)
```ruby
-@results = Model.ms_search(nil, hits_per_page: 10, page: 5, ...)
+@results = Model.ms_search(nil, hits_per_page: 10, page: 10, ...)
@pagy = Pagy.new_from_meilisearch(@results, ...)
```
+|||
-**Notice**: you have to take care of manually manage all the params for your search, however the method extracts the `:items`, `:page` and `:count` from the results object, so you don't need to pass that again. If you prefer to manage the pagination automatically, see below.
-
-## Active Mode
++++
-### Pagy::Meilisearch module
-
-Extend your model with the `Pagy::Meilisearch` micro-module:
-
-```ruby
-extend Pagy::Meilisearch
-```
-
-The `Pagy::Meilisearch` adds the `pagy_search` class method that you must use in place of the standard `search` method when you want to paginate the search response.
-
-### pagy_search(...)
+## Files
-This method accepts the same arguments of the `search` method and you must use it in its place.
+- [meilisearch.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/meilisearch.rb)
-### Variables
+## Variables
| Variable | Description | Default |
|:---------------------------|:------------------------------------------------|:---------------|
| `:meilisearch_pagy_search` | customizable name of the pagy search method | `:pagy_search` |
-| `:meilisearch_search` | customizable name of the original search method | `:search` |
+| `:meilisearch_search` | customizable name of the original search method | `:ms_search` |
## Methods
-This extra adds the `pagy_meilisearch` method to the `Pagy::Backend` to be used when you have to paginate a Meilisearch object. It also adds a `pagy_meilisearch_get_vars` sub-method, used for easy customization of variables by overriding.
+==- `Pagy::Meilisearch.pagy_search(...)`
-### pagy_meilisearch(Model.pagy_search(...), vars={}})
+This method accepts the same arguments of the `ms_search` method and you must use it in its place in active mode.
-This method is similar to the generic `pagy` method, but specialized for Meilisearch. (see the [pagy doc](../api/backend.md#pagycollection-varsnil))
+==- `Pagy.new_from_meilisearch(results, vars={})`
-It expects to receive a `Model.pagy_search(...)` result and returns a paginated response. You can use it in a couple of ways:
+This constructor accepts a `Meiliserch` object, plus the optional pagy variables. It automatically sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of it.
-```ruby
-@pagy, @results = pagy_meilisearch(Model.pagy_search(params[:q]), ...)
-...
-@records = @results.results
+==- `pagy_meilisearch(pagy_search_args, vars={})`
-# or directly with the collection you need (e.g. records)
-@pagy, @records = pagy_meilisearch(Model.pagy_search(params[:q]).results, ...)
-```
+This method is similar to the generic `pagy` method, but specialized for Meilisearch. (see the [pagy doc](/docs/api/backend.md#pagy-collection-vars-nil))
+
+It expects to receive `YourModel.pagy_search(...)` result and returns the paginated response.
+
+==- `pagy_meilisearch_get_vars(array)`
-### pagy_meilisearch_get_vars(array)
+This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_meilisearch` method. (see the [pagy_get_vars doc](/docs/api/backend.md#pagy-get-vars-collection-vars)).
-This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_meilisearch` method. (see the [pagy_get_vars doc](../api/backend.md#pagy_get_varscollection-vars)).
+===
diff --git a/docs/extras/metadata.md b/docs/extras/metadata.md
index 3ba7411bf..2a175373c 100644
--- a/docs/extras/metadata.md
+++ b/docs/extras/metadata.md
@@ -1,5 +1,8 @@
---
title: Metadata
+categories:
+- Backend
+- Extras
---
# Metadata Extra
@@ -9,21 +12,21 @@ This extra makes that easy and efficient by adding a single method to the backen
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/metadata'
```
+|||
-In your controller action:
+||| Controller (action)
```ruby
pagy, records = pagy(Product.all)
render json: { data: records,
pagy: pagy_metadata(pagy, ...) }
```
+|||
## Files
@@ -39,7 +42,7 @@ As usual, depending on the scope of the customization, you can set the `:metadat
IMPORTANT: Don't rely on the broad default! You should explicitly set the `:metadata` variable with only the keys that you will actually use in the frontend, for obvious performance reasons. Besides you can also add other pagy method names not included in the default.
-### :scaffold_url key
+### The `:scaffold_url` key
This is a special url string that you can use as the scaffold to build real page urls in your frontend (instead of producing them on the backend).
@@ -55,12 +58,15 @@ page_url = scaffold_url.replace(/__pagy_page__/, page_number)
This is particularly useful when you want to build some dynamic pagination UI (e.g. similar to what the `pagy_*combo_js` generates), but right in your frontend app, saving backend resources with obvious performance benefits.
-**Notice**: for simple cases you might want to use the other few `:*_url` metadata directly, instead of using the `:scaffold_url`.
+
+!!!info `scaffold_url` not necessary for simple cases
+For simple cases you might want to use the other few `:*_url` metadata directly, instead of using the `:scaffold_url`.
+!!!
## Methods
This extra adds a single method to the `Pagy::Backend` (available in your controllers).
-### pagy_metadata(pagy, absolute: nil)
-
+==- `pagy_metadata(pagy, absolute: nil)`
This method returns a hash with the keys/values defined by the `:metadata` variable. When true, the `absolute` boolean argument will cause all the `:*_url` metadata to be absolute instead of relative.
+===
\ No newline at end of file
diff --git a/docs/extras/navs.md b/docs/extras/navs.md
index 5fdaa838f..ed762967c 100644
--- a/docs/extras/navs.md
+++ b/docs/extras/navs.md
@@ -1,5 +1,8 @@
---
title: Navs
+categories:
+- Frontend
+- Extras
---
# Navs Extra
@@ -9,23 +12,26 @@ Other extras (e.g. [bootstrap](bootstrap.md), [bulma](bulma.md), [foundation](fo
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/navs'
```
+|||
-Render the navigation links in some view...
-with a fast helper:
-
+||| View (helper)
```erb
<%== pagy_nav_js(@pagy, ...) %>
<%== pagy_combo_nav_js(@pagy, ...) %>
```
+|||
-See [Javascript](../api/javascript.md).
+||| View (template)
+```erb
+<%== render partial: 'pagy/nav', locals: {pagy: @pagy} %>
+```
+|||
+
+See [Javascript](/docs/api/javascript.md).
## Files
@@ -33,10 +39,12 @@ See [Javascript](../api/javascript.md).
## Methods
-### pagy_nav_js(pagy, ...)
+==- `pagy_nav_js(pagy, ...)`
+
+See [Javascript Navs](/docs/api/javascript/navs.md).
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+==- `pagy_combo_nav_js(pagy, ...)`
-### pagy_combo_nav_js(pagy, ...)
+See [Javascript Combo Navs](/docs/api/javascript/combo-navs.md).
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
diff --git a/docs/extras/overflow.md b/docs/extras/overflow.md
index 0652cfcaa..e9eda5020 100644
--- a/docs/extras/overflow.md
+++ b/docs/extras/overflow.md
@@ -1,15 +1,16 @@
---
title: Overflow
+categories:
+- Feature
+- Extras
---
# Overflow Extra
-This extra allows for easy handling of overflowing pages. It internally rescues from the `Pagy::OverflowError` offering a few different ready to use modes, quite useful for UIs and/or APIs. It works with `Pagy` and its subclasses, although with some little difference.
+This extra allows for easy handling of overflowing pages. It internally rescues from the `Pagy::OverflowError` offering a few different ready to use modes, quite useful for UIs and/or APIs. It works with `Pagy` and its subclasses some minor differences.
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/overflow'
@@ -25,6 +26,7 @@ require 'pagy/extras/overflow'
Pagy::DEFAULT[:overflow] = :exception
```
+|||
## Files
@@ -38,24 +40,29 @@ Pagy::DEFAULT[:overflow] = :exception
As usual, depending on the scope of the customization, you have a couple of options to set the variables:
+
```ruby
-# globally
+# globally: e,g, pagy.rb Initializer
Pagy::DEFAULT[:overflow] = :empty_page
-# or for a single instance
+# or for a single instance e.g. in a controller
@pagy, @records = pagy(scope, overflow: :empty_page)
```
## Modes
-These are the modes accepted by the `:overflow` variable:
+The modes accepted by the `:overflow` variable:
+
+- `:empty_page`
+- `:last_page`
+- `:exception`
-### :empty_page
++++ :empty_page
This is the default mode; it will paginate the actual requested page, which - being overflowing - is empty. It is useful with APIs, where the client expects an empty set of results in order to stop requesting further pages.
-Example for `Pagy` instance:
+||| `Pagy` instance example:
```ruby
# no exception passing an overflowing page
pagy = Pagy.new(count: 100, page: 100)
@@ -72,8 +79,9 @@ pagy.from #=> 0
pagy.to #=> 0
pagy.series #=> [1, 2, 3, 4, 5] (no string, so no current page highlighted in the UI)
```
+|||
-Example for `Pagy::Countless` instance:
+||| `Pagy::Countless` instance example:
```ruby
require 'pagy/countless'
@@ -93,8 +101,10 @@ pagy.from #=> 0
pagy.to #=> 0
pagy.series #=> [] (no pages)
```
+|||
-Example for `Pagy::Calendar::Month` instance:
+
+||| `Pagy::Calendar::Month` instance example:
```ruby
require 'pagy/calendar'
@@ -120,15 +130,20 @@ pagy = Pagy::Calendar::Month.new(order: :desc, period: [local_time, local_time +
pagy.from #=> 2021-10-01 00:00:00 -0900 (start time of initial unit)
pagy.to #=> 2021-10-01 00:00:00 -0900 (same as from: if used it gets no records)
```
+|||
+
-### :last_page
++++ :last_page
-**Notice**: Not available for `Pagy::Countless` instances since the last page is not known.
+!!!warning `:last_page` not available for `Pagy::Countless` instances
+...because the last page is not known.
+!!!
-It is useful in apps with an UI, in order to avoid to redirect to the last page.
+It is useful in apps with a UI, in order to avoid being redirect to the last page.
-Regardless the overflowing page requested, Pagy will set the page to the last page and paginate exactly as if the last page has been requested. For example:
+Regardless of the overflowing page requested, `Pagy` will set the page to the last page and paginate exactly as if the last page has been requested. For example:
+||| Controller
```ruby
pagy = Pagy.new(count: 100, page: 100, overflow: :last_page)
@@ -137,8 +152,9 @@ pagy.vars[:page] #=> 100 (requested page)
pagy.page #=> 5 (current/last page)
pagy.last == pagy.page #=> true
```
+|||
-### :exception
++++ :exception
This mode raises the `Pagy::OverflowError` as usual, so you can rescue from and implement your own custom mode even in presence of this extra.
@@ -149,13 +165,16 @@ rescue Pagy::OverflowError => e
...
end
```
++++
+
## Methods
-### overflow?
+==- `overflow?`
Use this method in order to know if the requested page is overflowing. The original requested page is available as `pagy.vars[:page]` (useful when used with the `:last_page` mode, in case you want to give some feedback about the rescue to the user/client).
+===
## Errors
-See [How to handle Pagy::OverflowError exceptions](../how-to.md#handle-pagyoverflowerror-exceptions)
+See [How to handle Pagy::OverflowError exceptions](/docs/how-to.md#handle-pagyoverflowerror-exceptions)
diff --git a/docs/extras/searchkick.md b/docs/extras/searchkick.md
index 19f35af99..8f5daac64 100644
--- a/docs/extras/searchkick.md
+++ b/docs/extras/searchkick.md
@@ -1,122 +1,102 @@
---
title: Searchkick
+categories:
+- Search
+- Backend
+- Extras
---
# Searchkick Extra
-This extra deals with the pagination of `Searchkick::Results` objects either by creating a `Pagy` object out of an (already paginated) `Searchkick::Results` object or by creating the `Pagy` and `Searchkick::Results` objects from the backend params.
+Paginate `Searchkick::Results` objects.
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-Require the extra in the `pagy.rb` initializer:
+## Setup
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/searchkick'
-Searchkick.extend Pagy::Searchkick # optional
+Searchkick.extend Pagy::Searchkick
```
+|||
-### Passive mode
+## Modes
-If you have an already paginated `Searchkick::Results` object, you can get the `Pagy` object out of it:
-
-```ruby
-@results = Model.search('*', page: 1, per_page: 10, ...)
-@pagy = Pagy.new_from_searchkick(@results, ...)
-```
+This extra offers two ways to paginate `Searchkick::Results` objects:
-### Active Mode
++++ Active mode
-If you want Pagy to control the pagination, getting the page from the params, and returning both the `Pagy` and the `Searchkick::Results` objects automatically (from the backend params):
+!!! success Pagy searches and paginates
+You use the `pagy_search` method in place of the `search` method.
+!!!
-Extend your model:
+### Usage
+||| Model
```ruby
extend Pagy::Searchkick
```
+|||
-In a controller use `pagy_search` in place of `search`:
-
+||| Controller (pagy_search)
```ruby
-results = Article.pagy_search(params[:q])
-@pagy, @results = pagy_searchkick(results, items: 10)
+# single model
+collection = Article.pagy_search(params[:q])
+# multi models
+collection = Searchkick.pagy_search(params[:q], models: [Article, Categories])
+# paginate it
+@pagy, @response = pagy_searchkick(collection, items: 10)
```
+|||
-#### Searchkick.search
++++ Passive mode
-Extend also the `Searchkick` module if you are going to use `Searchkick.pagy_search`:
-
-```ruby
-# config/initializers/pagy.rb
-Searchkick.extend Pagy::Searchkick
-```
+!!! success You search and paginate
+Pagy creates its object out of your result.
+!!!
-Use `pagy_search` in place of `search`:
+### Usage
+||| Controller (search)
```ruby
-results = Searchkick.pagy_search(params[:q], models: [Article, Categories])
-@pagy, @results = pagy_searchkick(results, items: 10)
+# standard response (already paginated)
+@results = Article.search('*', page: 1, per_page: 10, ...)
+# get the pagy object out of it
+@pagy = Pagy.new_from_searchkick(@results, ...)
```
+|||
+
++++
## Files
- [searchkick.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/searchkick.rb)
-## Passive mode
-
-### Pagy.new_from_searchkick(results, vars = {})
-
-This constructor accepts a `Searchkick::Results` as the first argument, plus the usual optional variable hash. It sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of the `Searchkick::Results` object.
-
-```ruby
-@results = Model.search('*', page: 2, per_page: 10, ...)
-@pagy = Pagy.new_from_searchkick(@results, ...)
-```
-
-**Notice**: you have to take care of manually manage all the params for your search, however the method extracts the `:items`, `:page` and `:count` from the results object, so you don't need to pass that again. If you prefer to manage the pagination automatically, see below.
-
-## Active Mode
-
-## Pagy::Searchkick module
-
-Extend your model with the `Pagy::Searchkick` micro-module:
-
-```ruby
-extend Pagy::Searchkick
-```
-
-The `Pagy::Searchkick` adds the `pagy_search` class method that you must use in place of the standard `search` method when you want to paginate the search response.
-
-### pagy_search(...)
-
-This method accepts the same arguments of the `search` method and you must use it in its place. This extra uses it in order to capture the arguments, automatically merging the calculated `:page` and `:per_page` options before passing them to the standard `search` method internally.
-
-### Variables
+## Variables
| Variable | Description | Default |
|:--------------------------|:------------------------------------------------|:---------------|
| `:searchkick_pagy_search` | customizable name of the pagy search method | `:pagy_search` |
| `:searchkick_search` | customizable name of the original search method | `:search` |
-### Methods
+## Methods
-This extra adds the `pagy_searchkick` method to the `Pagy::Backend` to be used when you have to paginate a `Searchkick::Results` object. It also adds a `pagy_searchkick_get_vars` sub-method, used for easy customization of variables by overriding.
+==- `Pagy::Searchkick.pagy_search(...)`
-#### pagy_searchkick(pagy_search_args, vars={}})
+This method accepts the same arguments of the `search` method and you must use it in its place in active mode.
-This method is similar to the generic `pagy` method, but specialized for Searchkick. (see the [pagy doc](../api/backend.md#pagycollection-varsnil))
+==- `Pagy.new_from_searchkick(results, vars={})`
-It expects to receive a `Model.pagy_search(...)` result and returns a paginated response. You can use it in a couple of ways:
+This constructor accepts a `Searchkick::Results` as the first argument, plus the optional pagy variables. It automatically sets the `:items`, `:page` and `:count` pagy variables extracted/calculated out of it.
-```ruby
-@pagy, @results = pagy_searchkick(Model.pagy_search(params[:q]), ...)
-...
-@records = @results.results
+==- `pagy_searchkick(pagy_search_args, vars={})`
-# or directly with the collection you need (e.g. records)
-@pagy, @records = pagy_searchkick(Model.pagy_search(params[:q]).results, ...)
-```
+This method is similar to the generic `pagy` method, but specialized for Searchkick. (see the [pagy doc](/docs/api/backend.md#pagy-collection-vars-nil))
+
+It expects to receive `YourModel.pagy_search(...)` result and returns the paginated response.
+
+==- `pagy_searchkick_get_vars(array)`
-#### pagy_searchkick_get_vars(array)
+This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_searchkick` method. (see the [pagy_get_vars doc](/docs/api/backend.md#pagy-get-vars-collection-vars)).
-This sub-method is similar to the `pagy_get_vars` sub-method, but it is called only by the `pagy_searchkick` method. (see the [pagy_get_vars doc](../api/backend.md#pagy_get_varscollection-vars)).
+===
diff --git a/docs/extras/semantic.md b/docs/extras/semantic.md
index 5855b0b43..f6fbd3163 100644
--- a/docs/extras/semantic.md
+++ b/docs/extras/semantic.md
@@ -1,5 +1,8 @@
---
title: Semantic
+categories:
+- Frontend
+- Extras
---
# Semantic UI Extra
@@ -7,22 +10,19 @@ This extra adds 3 nav helpers for Semantic UI CSS [pagination component](https:/
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/semantic'
```
+|||
-Render the navigation links in some view...
-with a fast helper:
-
+||| View
```erb
<%== pagy_semantic_nav(@pagy, ...) %>
<%== pagy_semantic_nav_js(@pagy, ...) %>
<%== pagy_semantic_combo_nav_js(@pagy, ...) %>
```
+|||
## Files
@@ -32,16 +32,18 @@ with a fast helper:
This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize them by direct overriding in your own view helper.
-### pagy_semantic_nav(pagy)
+==- `pagy_semantic_nav(pagy)`
This method is the same as the `pagy_nav`, but customized for Semantic UI.
-See the [pagy_nav(pagy, ...)](../api/frontend.md#pagy_navpagy-) documentation.
+See: [pagy_nav(pagy, ...)](/docs/api/frontend.md#pagy-nav-pagy).
+
+==- `pagy_semantic_nav_js(pagy, ...)`
-### pagy_semantic_nav_js(pagy, ...)
+See: [Javascript Navs](/docs/api/javascript/navs.md).
-See the [Javascript Navs](../api/javascript.md#javascript-navs) documentation.
+==- `pagy_semantic_combo_nav_js(pagy, ...)`
-### pagy_semantic_combo_nav_js(pagy, ...)
+See: [Javascript Combo Navs](/docs/api/javascript/combo-navs.md).
-See the [Javascript Combo Navs](../api/javascript.md#javascript-combo-navs) documentation.
+===
\ No newline at end of file
diff --git a/docs/extras/standalone.md b/docs/extras/standalone.md
index 14dd4ef01..420305fc4 100644
--- a/docs/extras/standalone.md
+++ b/docs/extras/standalone.md
@@ -1,9 +1,12 @@
---
title: Standalone
+categories:
+- Feature
+- Extras
---
# Standalone Extra
-This extra allows you to use pagy completely standalone, i.e. without any request object, nor Rack environment/gem, nor any defined `params` method, even in the irb/rails console without an app (see the [Pagy::Console](../api/console.md) module).
+This extra allows you to use pagy completely standalone, i.e. without any request object, nor Rack environment/gem, nor any defined `params` method, even in the irb/rails console without an app (see the [Pagy::Console](/docs/api/console.md) module).
You may need it in order to paginate a collection outside of a regular rack request or controller, like in an unconventional API module, or in the irb/rails console or for testing/playing with backend and frontend methods.
@@ -13,19 +16,21 @@ This extra will also create a dummy `params` method (if not already defined) in
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/standalone'
# optional: set a default url
Pagy::DEFAULT[:url] = 'http://www.example.com/subdir'
+```
+|||
+||| Controller
+```ruby
# pass a :url variable to work in standalone mode (no need of any request object nor Rack env)
-@pagy, @records = pagy(Product.all, url: 'http://www.example.com/subdir', params: {...})
+@pagy, @products = pagy(Product.all, url: 'http://www.example.com/subdir', params: {...})
```
+|||
## Files
@@ -37,14 +42,15 @@ Pagy::DEFAULT[:url] = 'http://www.example.com/subdir'
|:---------|:-----------------------------------------|:--------|
| `:url` | url string (can be absolute or relative) | `nil` |
-You can use the `:params` variable to add params to the final URLs.
+You can use the :params variable to add params to the final URLs.
## Methods
-### Overridden pagy_url_for
+==- Overridden `pagy_url_for`
The `standalone` extra overrides the `pagy_url_for` method used internally. If it finds a set `:url` variable it assumes there is no `request` object, so it uses the `:url` variable verbatim to produce the final URL, only adding the query string, composed by merging the `:page` param to the `:params` variable. If there is no `:url` variable set it works like usual, i.e. it uses the rake `request` object to extract the base_url, path from the request, merging the params returned from the `params` controller method, the `:params` variable and the `:page` param to it.
-### Dummy params method
+==- Dummy `params` method
This extra creates a dummy `params` method (if not already defined) in the module where you include the `Pagy::Backend` (usually a controller). The method is called by pagy to retrieve backend variables coming from the request, and expects a hash, so the dummy param method returns an empty hash avoiding an error.
+===
\ No newline at end of file
diff --git a/docs/extras/support.md b/docs/extras/support.md
index 94549cae3..b18a56652 100644
--- a/docs/extras/support.md
+++ b/docs/extras/support.md
@@ -1,5 +1,8 @@
---
title: Support
+categories:
+- Feature
+- Extras
---
# Support Extra
@@ -7,13 +10,11 @@ This extra adds support for features like countless or navless pagination, where
## Synopsis
-See [extras](../extras.md) for general usage info.
-
-In the `pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/support'
```
+|||
## Support for alternative pagination types and features
@@ -21,32 +22,31 @@ Besides the classic `pagy*_nav` pagination, the `pagy*_nav_js` and the `pagy*_co
### Countless
-You can totally avoid one query per render by using the [countless](countless.md) extra. It has a few limitation, but still supports navbar links (see also [Pagy::Countless](../api/countless.md) for more details).
+You can totally avoid one query per render by using the [countless](countless.md) extra. It has a few limitation, but still supports navbar links (see also [Pagy::Countless](/docs/api/countless.md) for more details).
### Navless/incremental
If you don't need the navbar you can just set the `:size` variable to an empty value and the page links will be skipped from the rendering. That works with `Pagy` and `Pagy:Countless` instances. All the `*nav` helpers will render only the `prev` and `next` links/buttons, allowing for a manual incremental pagination.
-You can also use the `pagy_prev_link` and `pagy_next_link` helpers provided by this extra, mostly useful if you also use the `countless` extra.
+You can also use the [`pagy_prev_link`](https://github.com/ddnexus/pagy/blob/dca8669a10cb3be13e053fe435301c22cc64406f/lib/pagy/extras/navs.rb#L46) and [`pagy_next_link`](https://github.com/ddnexus/pagy/blob/dca8669a10cb3be13e053fe435301c22cc64406f/lib/pagy/extras/navs.rb#L54) helpers provided by the [navs extra](navs), mostly useful if you also use the `countless` extra.
Here is a basic example that uses `pagy_countless` (saving one query per render):
-`pagy.rb` initializer:
-
+||| pagy.rb (initializer)
```ruby
require 'pagy/extras/countless'
```
+|||
-`incremental` controller action:
-
+||| incremental (controller action)
```ruby
def incremental
@pagy, @records = pagy_countless(Product.all, link_extra: 'data-remote="true"')
end
```
+|||
-`incremental.html.erb` template:
-
+||| incremental.html.erb (template)
```erb
@@ -61,9 +61,9 @@ end
```
+|||
-`_page_items.html.erb` partial shared for AJAX and non-AJAX rendering:
-
+||| _page_items.html.erb (partial)
```erb
<% @records.each do |record| %>