From 3a571c0d0335d45d5a25f1325a52d628d92dcab6 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 14 Jan 2025 16:40:43 +0800 Subject: [PATCH] tab index control ready --- themes/beauty/views/list/bydate.php | 6 +++-- themes/beauty/views/site/index.php | 6 +++-- www/css/beauty.css | 6 ++--- www/js/beauty.js | 41 ++++++++++++++++++++++++++--- 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/themes/beauty/views/list/bydate.php b/themes/beauty/views/list/bydate.php index 4001529..075c7cc 100644 --- a/themes/beauty/views/list/bydate.php +++ b/themes/beauty/views/list/bydate.php @@ -54,8 +54,10 @@ $cacheData = !empty($viewData['cacheData']) ? $viewData['cacheData'] : []; 清空缓存数据 - 点击关灯/开灯 - 联系我们 + + 点击关灯/开灯 + + 联系我们 diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 52f014f..fce6a6c 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -55,8 +55,10 @@ $main_view_cls = $menu_ext_status == 'opened' ? '' : 'full'; 清空缓存数据 - 点击关灯/开灯 - 联系我们 + + 点击关灯/开灯 + + 联系我们 .fancybox__content{width:100% !important;height:100% !important} +.light-switcher{display:inline-block;margin:0 10px;padding:3px} a:focus,button.btn:focus{outline-color:lightblue} -.lampshow .nav-tabs>li>a:focus,.lampshow .navbar-fixed-left a:focus{background-color:lightgray;color:#444} +.lampshow .nav>li>a:focus,.lampshow .navbar-fixed-left a:focus{background-color:lightgray;color:#444} .im_item a:focus{outline:none;border:2px solid blue;border-radius:12px} .lampshow .im_item a:focus{border-color:orange} .lampshow .expand-icon button:focus{background-color:lightgray} @@ -204,7 +204,7 @@ a:focus,button.btn:focus{outline-color:lightblue} .lampshow .right_sidebox{background-color:#222;color:#FFF} .lampshow .right_sidebox>h5{border-color: #363636} .lampshow .text_dark{color:#808080} -.lampshow .text_dark a, .lampshow .nav-tabs a{color:#f4f7fd} +.lampshow .text_dark a, .lampshow .nav a{color:#f4f7fd} .lampshow .nav-tabs a:hover{background-color:#CCC;color:#444} .lampshow .othervideos{background-color:inherit} .lampshow .btn-default{background-color:#EEE} diff --git a/www/js/beauty.js b/www/js/beauty.js index 8c8f48d..ecba848 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -1027,7 +1027,7 @@ var getNextSibling = function(el, way) { next = tagName == 'a' ? $(el).parent().prev() : $(el).prev(); if (next.length == 0) { - next = $('.navbar-fixed-left li.active a').first(); + next = $('.navbar-fixed-left li a').first(); if (next.length > 0) { next.focus(); } @@ -1037,8 +1037,27 @@ var getNextSibling = function(el, way) { }else if (way == 'up' && $(el).parents('.img_main').length > 0) { if ($(el).parent('li').length > 0) { next = $(el).parents('ul').prevAll('.nav').find('li').first(); - }else if ($(el).parent('div').length > 0) { - next = $(el).parent('div').prevAll('ul').first().find('li').first(); + if (next.length == 0) { + next = $(el).parents('ul').prev('.im_mainl').find('.im_item').first(); + } + }else if ($(el).parent('.im_item').length > 0) { + next = $(el).parent().prevAll('.im_item'); //6 images in one row + if (next.length >= 6) { + next = $(next.get(5)); + }else { + next = null; + } + + if (!next) { + next = $(el).parent('.im_item').prevAll('ul').first().find('li').first(); + if (next.length == 0) { + next = $(el).parents('.im_mainl').prev('.nav').find('li.active'); + } + } + } + + if (next && next.length == 0) { + next = $('.light-switcher').parent(); } }else if (way == 'down' && $(el).parents('.navbar-fixed-left').length > 0) { next = tagName == 'a' ? $(el).parent().nextAll('li:not(.menu-title)').first() : $(el).next(); @@ -1053,8 +1072,22 @@ var getNextSibling = function(el, way) { } } }else if ($(el).parent('.im_item').length > 0) { - next = $('div.pagination-con').find('li.active').next(); + next = $(el).parent().nextAll('.im_item'); //6 images in one row + if (next.length >= 6) { + next = $(next.get(5)); + }else { + next = null; + } + + if (!next && $(el).parents('.im_mainl').next('.nav').length > 0) { + next = $(el).parents('.im_mainl').next('.nav').find('li.active'); + }else if (!next && $('div.pagination-con').length > 0) { + next = $('div.pagination-con').find('li.active').next(); + } } + }else if (way == 'down' && $(el).hasClass('light-switcher')) { + next = $('.im_item').first(); + console.log('light switcher'); } if (next && next.length > 0) {