【Joe】主题新增分页功能
侧边栏壁纸
  • 累计撰写 74 篇文章
  • 累计收到 21 条评论

【Joe】主题新增分页功能

逍遥博客
2021-11-11 / 0 评论 / 1 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年09月22日,已超过224天没有更新,若内容或图片失效,请留言反馈。

效果图:
Test

1.文件路径:usr/themes/Joe/public 新建一个文件 重命名为【pagination.php】
代码如下:

<?php if ($this->options->JPageStatus === 'default') : ?>
    <?php 
        $this->pageNav(
            '<svg class="icon icon-prev" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>',
            '<svg class="icon icon-next" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M822.272 146.944l-396.8 396.8c-19.456 19.456-51.2 19.456-70.656 0-18.944-19.456-18.944-51.2 0-70.656l396.8-396.8c19.456-19.456 51.2-19.456 70.656 0 18.944 19.456 18.944 45.056 0 70.656z"/><path d="M745.472 940.544l-396.8-396.8c-19.456-19.456-19.456-51.2 0-70.656 19.456-19.456 51.2-19.456 70.656 0l403.456 390.144c19.456 25.6 19.456 51.2 0 76.8-26.112 19.968-51.712 19.968-77.312.512zm-564.224-63.488c0-3.584 0-7.68.512-11.264h-.512v-714.24h.512c-.512-3.584-.512-7.168-.512-11.264 0-43.008 21.504-78.336 48.128-78.336s48.128 34.816 48.128 78.336c0 3.584 0 7.68-.512 11.264h.512v714.24h-.512c.512 3.584.512 7.168.512 11.264 0 43.008-21.504 78.336-48.128 78.336s-48.128-35.328-48.128-78.336z"/></svg>',
            1,
            '...',
            array(
                'wrapTag' => 'ul',
                'wrapClass' => 'joe_pagination',
                'itemTag' => 'li',
                'textTag' => 'a',
                'currentClass' => 'active',
                'prevClass' => 'prev',
                'nextClass' => 'next'
            )
        );
    ?>
<?php else : ?>
    <div class="j-joe_load" data-type="article">
        <div class="joe_load">查看更多</div>
    </div>
<?php endif ?>

2.文件路径:usr/themes/Joe 修改index.php

2.注释掉原来的代码 新增分页代码

3.修改 usr/themes/Joe/functions.ph 如果没有找到这个文件 就修改pusr/themes/Joe/public/custom.php

4.修改usr/themes/Joe-master/assets/js/joe.index.min.js

如果改完没有变化 还是加载的形式的话 或者有了按钮 但是点击其他页面的按钮 还是显示第一页的内容 就按CTRL+F5刷新缓存 或者清除浏览器缓存试试

0

评论 (0)

取消
Blog逍遥阁博客