'js/libs/jquery/jquery.mousewheel.min.js',
'js/libs/jquery/jquery.hashchange.min.js',
'js/libs/jquery/jquery.scrollto.min.js',
- ],
+ ],
'aria' => ['js/libs/aria/radio.js',],
'bluebird' => ['js/libs/bluebird.min.js'],
'screenfull' => ['js/libs/screenfull.min.js'],
$list = $this->config->articlesList ?? [];
$nb = count($list);
+
+ usort($list, function ($a, $b) {
+ if ($a['page'] == $b['page']) {
+ $ea = explode('-', $a['id']);
+ $eb = explode('-', $b['id']);
+ if (is_numeric($ea[0]) && is_numeric($eb[0])) {
+ return $ea[0] - $eb[0];
+ }
+ return strcmp($a['id'], $b['id']);
+ }
+ return $a['page'] - $b['page'];
+ });
+
foreach ($list as $k => $item) {
$nextIndex = ($k + 1) % $nb;
$prevIndex = ($k - 1 + $nb) % $nb;