<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Tags::HTML::Pager - Tags helper for pager.

SYNOPSIS
     use Tags::HTML::Pager;

     my $obj = Tags::HTML::Pager-&gt;new(%params);
     $obj-&gt;process($pager_hr);
     $obj-&gt;process_css;

METHODS
  "new"
     my $obj = Tags::HTML::Pager-&gt;new(%params);

    Constructor.

    *       "css"

            'CSS::Struct::Output' object for process_css processing.

            Default value is undef.

    *       "css_colors"

            Colors for CSS style.

            Default value is: { 'actual_background' =&gt; 'black',
            'actual_color' =&gt; 'white', 'border' =&gt; 'black',
            'hover_background' =&gt; 'black', 'hover_color' =&gt; 'white',
            'other_background' =&gt; undef, 'other_color' =&gt; 'black', }

    *       "css_pager"

            Main CSS class of this block.

            Default value is 'pager'.

    *       "flag_prev_next"

            Flag, which mean print of prev_next buttons.

            Default value is 0.

    *       "flag_paginator"

            Flag, which mean print of paginator buttons.

            Default value is 1.

    *       "url_page_cb"

            Callback for creating of url for view page.

            Input argument is page variable with number of page.

            It's required parameter.

    *       "tags"

            'Tags::Output' object.

            Default value is undef.

  "process"
     $obj-&gt;process($pager_hr);

    Process Tags structure for output with pager.

    Returns undef.

  "process_css"
     $obj-&gt;process_css;

    Process CSS::Struct structure for output.

    Returns undef.

ERRORS
     new():
             Both paginator styles disabled.
             Missing 'url_page_cb' parameter.
             From Class::Utils::set_params():
                     Unknown parameter '%s'.
             From Tags::HTML::new():
                     Parameter 'tags' must be a 'Tags::Output::*' class.

     process():
             Missing 'pages_num' parameter in pages data structure.
             Missing 'actual_page' parameter in pages data structure.
             Pages data structure is missing.
             Parameter 'actual_page' is greater than parameter 'pages_num'.
                     actual_page: %s
                     pages_num: %s
             From Tags::HTML::process():
                     Parameter 'tags' isn't defined.

EXAMPLE
     use strict;
     use warnings;

     use CSS::Struct::Output::Indent;
     use Tags::HTML::Pager;
     use Tags::Output::Indent;

     # Object.
     my $css = CSS::Struct::Output::Indent-&gt;new;
     my $tags = Tags::Output::Indent-&gt;new;
     my $obj = Tags::HTML::Pager-&gt;new(
             'css' =&gt; $css,
             'tags' =&gt; $tags,
             'url_page_cb' =&gt; sub {
                     my $page = shift;
                     return 'https://example.com/?page='.$page;
             }
     );

     # Process pager.
     $obj-&gt;process({
             'actual_page' =&gt; 1,
             'pages_num' =&gt; 1,
     });
     $obj-&gt;process_css;

     # Print out.
     print $tags-&gt;flush;
     print "\n\n";
     print $css-&gt;flush;

     # Output:
     # &lt;div class="pager"&gt;
     #   &lt;p class="pager-paginator"&gt;
     #     &lt;strong class="pager-paginator-selected"&gt;
     #      1
     #     &lt;/strong&gt;
     #   &lt;/p&gt;
     # &lt;/div&gt;
     #
     # .pager a {
     #         text-decoration: none;
     # }
     # .pager-paginator {
     #         display: flex;
     #         flex-wrap: wrap;
     #         justify-content: center;
     #         padding-left: 130px;
     #         padding-right: 130px;
     #         float: both;
     # }
     # .pager-prev_next {
     #         display: flex;
     # }
     # .pager-paginator a, .pager-paginator strong, .pager-paginator span, .pager-next,
     # .pager-next-disabled, .pager-prev, .pager-prev-disabled {
     #         display: flex;
     #         height: 55px;
     #         width: 55px;
     #         justify-content: center;
     #         align-items: center;
     #         border: 1px solid black;
     #         margin-left: -1px;
     # }
     # .pager-prev, .pager-next {
     #         display: inline-flex;
     #         align-items: center;
     #         justify-content: center;
     # }
     # .pager-paginator a:hover, .pager-prev_next a:hover {
     #         color: white;
     #         background-color: black;
     # }
     # .pager-paginator a {
     #         color: black;
     # }
     # .pager-paginator-selected {
     #         background-color: black;
     #         color: white;
     # }

DEPENDENCIES
    Class::Utils, Error::Pure, Readonly, Tags::HTML, Unicode::UTF8.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Tags-HTML-Pager&gt;

AUTHOR
    Michal Josef �麖a�嶤k &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    穢 2022 Michal Josef �麖a�嶤k

    BSD 2-Clause License

VERSION
    0.02

</pre></body></html>