fix error

This commit is contained in:
rulingcom 2021-11-14 03:23:33 +00:00
parent b7c155e53c
commit 5464c7c5f8
41 changed files with 54 additions and 166 deletions

View File

@ -12,7 +12,7 @@
var scrollBottom = $('html').height() - $(window).height() - $('.kenjohn').height(); var scrollBottom = $('html').height() - $(window).height() - $('.kenjohn').height();
if (scrollTop>5 && scrollBottom>0) { /* 要滑動到選單的距離 */ if (scrollTop>5 && scrollBottom>0) { /* 要滑動到選單的距離 */
if (parseInt($('.layout-content').css('margin-top'))==0){ if (parseInt($('.layout-content').css('margin-top'))==0){
$('.layout-content').css('margin-top',$('.kenjohn').height()); $('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height());
} }
$('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */ $('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */
} else { } else {
@ -827,7 +827,7 @@ function transdate(){
var theTop; var theTop;
if (stop){ if (stop){
$(".kenjohn").addClass('navFixed'); $(".kenjohn").addClass('navFixed');
$('.layout-content').css('margin-top',$('.kenjohn').height()); $('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height());
if (parseInt($('.layout-content').css('margin-top')==0)){ if (parseInt($('.layout-content').css('margin-top')==0)){
theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top+10; theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top+10;
}else{ }else{

View File

@ -54,7 +54,6 @@
if (typeof onYouTubeIframeAPIReady !== 'function'){ if (typeof onYouTubeIframeAPIReady !== 'function'){
if(window.yt_players == undefined) if(window.yt_players == undefined)
window.yt_players = {}; window.yt_players = {};
$(".w-ba-banner__wrap[data-overlay=\".w-ad-banner__overlay_{{subpart-id}}\"]");
function onYouTubeIframeAPIReady(){ function onYouTubeIframeAPIReady(){
$(".w-ba-banner").each(function(i,banner){ $(".w-ba-banner").each(function(i,banner){
var iframes = $(banner).find("iframe"); var iframes = $(banner).find("iframe");
@ -74,7 +73,6 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
delete yt_players[id][k]; delete yt_players[id][k];
}) })
iframes.each(function(i,iframe){ iframes.each(function(i,iframe){
console.log($(iframe).attr("id"))
var yt_player = yt_players[id][$(iframe).attr("id")]; var yt_player = yt_players[id][$(iframe).attr("id")];
if(yt_player){ if(yt_player){
}else{ }else{
@ -82,8 +80,8 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
events: { events: {
'onReady': function(event){ 'onReady': function(event){
var height = $(event.target.getIframe()).height(); var height = $(event.target.getIframe()).height();
var banner_wrap = $(".w-ba-banner__wrap[data-overlay=\".w-ad-banner__overlay_{{subpart-id}}\"]"); var banner_wrap = $(".w-ba-banner__wrap[data-overlay=\".w-ad-banner__overlay_"+id+"\"]");
banner_wrap.height(height).css({"padding-bottom":"4em","padding-top":""}); banner_wrap.height(height).css({"padding-bottom":"","padding-top":""});
banner_wrap.find(".cycle-carousel-wrap").css("top","3em"); banner_wrap.find(".cycle-carousel-wrap").css("top","3em");
delete (event.target.B || event.target.H).onStateChange; delete (event.target.B || event.target.H).onStateChange;
var onStateChange_idx = event.target.l.i.onStateChange; var onStateChange_idx = event.target.l.i.onStateChange;
@ -123,6 +121,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
} }
{{extra_state_chnage_script}} {{extra_state_chnage_script}}
} }
}
$(document).ready(function(){ $(document).ready(function(){
window.onYouTubePlayerAPIReady = function() { window.onYouTubePlayerAPIReady = function() {
onYouTubeIframeAPIReady.apply(this,arguments); onYouTubeIframeAPIReady.apply(this,arguments);
@ -143,8 +142,10 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
controlplay.find(".pause-slide").removeClass("active"); controlplay.find(".pause-slide").removeClass("active");
} }
}) })
/*
var height = opts.slides.filter('.active').height() || opts.slides.height(); var height = opts.slides.filter('.active').height() || opts.slides.height();
banner_wrap.height(height).css("padding-bottom",""); banner_wrap.height(height)*/
banner_wrap.css("padding-bottom","");
{{extra_document_ready_script}} {{extra_document_ready_script}}
$('.pause-slide').off('click').click(function(){ $('.pause-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause'); $(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
@ -175,7 +176,6 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
},300); },300);
}) })
}) })
}
</script> </script>
<style type="text/css"> <style type="text/css">
.w-ba-banner .controlplay .resume-slide.active i{ .w-ba-banner .controlplay .resume-slide.active i{

View File

@ -6,13 +6,20 @@
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a> <a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div> </div>
<div style="position: absolute;top: 50%;bottom: 50%;width:100%;"> <div style="position: absolute;top: 50%;bottom: 50%;width:100%;">
<button class="btn-left" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>" style="float: left;height: 2.5em; width: 2.5em;background: url(/assets/left-01.png) no-repeat;border: 0;background-size: contain;position: absolute;transition:.3s; left: 0.6%;"><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %></span></button> <button class="btn-left" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>" style="float: left;height: 2.5em; width: 2.5em;background: border: 0;background-size: contain;position: absolute;transition:.3s; left: 0.6%;color: #ffffff;
<button class="btn-right" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>" style="float: right;;height: 2.5em; width: 2.5em;background: url(/assets/right-01.png) no-repeat;background-size: contain;border: 0;position: absolute;transition:.3s;right: 0.6%;"><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %></span></button> background: rgba(0, 0, 0, 0.2);
</div> border-radius: 50%;
border: none;"><i class="fa fa-angle-left prev-button" aria-hidden="true" style="font-size: 1.5rem;"></i><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %></span></button>
<button class="btn-right" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>" style="float: right;;height: 2.5em; width: 2.5em;background-size: contain;border: 0;position: absolute;transition:.3s;right: 0.6%;color: #ffffff;
background: rgba(0, 0, 0, 0.2);
border-radius: 50%;
border: none;"><i class="fa fa-angle-right next-button" aria-hidden="true" style="font-size: 1.5rem;"></i><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %></span></button>
</div>
<ul class="w-annc__list row" data-level="0" data-list="announcements"> <ul class="w-annc__list row" data-level="0" data-list="announcements">
<li class="w-annc__item col-md-4"> <li class="w-annc__item col-md-4">
<div class="w-annc__img-wrap bullseye"> <div class="w-annc__img-wrap bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}"> <img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
<div class="transitionfade"></div>
</div> </div>
<div class="w-annc__content-wrap"> <div class="w-annc__content-wrap">
<div class="w-annc__meta"> <div class="w-annc__meta">

View File

@ -1,159 +1,32 @@
<div class="w-annc w-annc widget-announcement-19" style="position:relative;"> <div class="i-annc index-announcement-18">
<div class="w-annc__more-wrap clearfix"> <style>
<h2 class="w-annc__widget-title"> @media (min-width: 992px){
<span>{{widget-title}}</span> li.i-annc__item.col-md-4:nth-child(3n) {
</h2> clear: left;
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a> }
</div> }
<div style="position: absolute;top: 50%;bottom: 50%;width:100%;"> </style>
<button class="btn-left" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>" style="filter: invert(1);float: left;height: 2em; width: 2em;background:#0000004d url(/assets/left-01.png) no-repeat;border: 0;background-size: contain;position: absolute;transition:.3s; left: 0.6%;"><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %></span></button> <h3 class="i-annc__page-title">{{widget-title}}</h3>
<button class="btn-right" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>" style="filter: invert(1);float: right;;height: 2em; width: 2em;background:#0000004d url(/assets/right-01.png) no-repeat;background-size: contain;border: 0;position: absolute;transition:.3s;right: 0.6%;"><span style="display: none;"><%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %></span></button> <ul class="i-annc__list row" data-level="0" data-list="announcements">
</div> <li class="i-annc__item col-md-4">
<ul class="w-annc__list row" data-level="0" data-list="announcements"> <div class="i-annc__content-wrap">
<li class="w-annc__item col-md-4"> <div class="i-annc__meta">
<div class="w-annc__content-wrap"> <span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<div class="w-annc__meta"> <span class="i-annc__postdate">{{postdate}}</span>
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label {{status-class}}">{{status}}</span>
</span> </span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d"> <span class="i-annc__category-wrap">
<i class="fa fa-calendar-o"></i> <i class="fa fa-clone"></i>
<span class="w-annc__postdate">{{postdate}}</span> <span class="i-annc__category">{{category}}</span>
</span>
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span> </span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div> </div>
<h4 class="w-annc__entry-title"> <h4 class="i-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a> <a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4> </h4>
<p class="w-annc__subtitle">{{subtitle}}</p> <p class="i-annc__subtitle">{{subtitle}}</p>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
function combineul_{{subpart-id}}(){
var parents = $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').parent();
parents.each(function(i,v){
for(var i=1;i<$(v).find('ul.w-annc__list').length;i++)
$(v).find('ul.w-annc__list').eq(0).find('>li').eq(-1).after($(v).find('ul.w-annc__list').eq(i).html());
var ullength = $(v).find('ul.w-annc__list').length;
for(var i = 1;i < ullength;i++)
$(v).find('ul.w-annc__list').eq(-1).remove();
})
};
var num;
var lilength = $('[data-subpart-id=\"{{subpart-id}}\"] li.w-annc__item').length;
function reorganize_{{subpart-id}}(num){
var uls = $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').toArray();
var currentul = uls.findIndex(function(v){
return $(v).hasClass("active") && !$(v).hasClass("hidden_item");
})
if(currentul == -1)
currentul = 0;
var li_active_idx = 0;
if(currentul != 0)
li_active_idx = $(uls[currentul]).find("li.w-annc__item").eq(0).index("li.w-annc__item");
combineul_{{subpart-id}}();
var parents = $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').parent();
parents.each(function(i,v){
var lilength = $(v).find('li.w-annc__item').length;
var ul_length = Math.ceil(lilength/num);
for(var ii=1;ii< ul_length;ii++){
var clone_ul = $(v).find('ul.w-annc__list').eq(-1).clone();
clone_ul.empty();
clone_ul.removeClass("active");
clone_ul.css("display","");
$(v).find('ul.w-annc__list').eq(-1).after(clone_ul.prop("outerHTML"));
var lihtml="";
if(ii != (ul_length-1)){
for(var j=0;j<num;j++){
lihtml += $(v).find('li.w-annc__item').eq(ii*num+j).prop("outerHTML");
};
}else{
for(var j=0;j< lilength - num *(ul_length-1) ;j++){
lihtml += $(v).find('li.w-annc__item').eq(ii*num+j).prop("outerHTML");
};
};
$(v).find('ul.w-annc__list').eq(-1).html(lihtml);
}
if(ul_length != 1 )
for(var i=0;i< lilength -num ; i++)
$(v).find('ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
})
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').css("display","none");
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').css('padding','0');
$('[data-subpart-id=\"{{subpart-id}}\"] button').css('z-index','10');
// $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list >li').css('width','calc('+100/num+'% - '+100/10+'em)'); //20px=>li的margin
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list >li').css('float','left');
var active_ul = $("[data-subpart-id=\"{{subpart-id}}\"] li.w-annc__item").eq(li_active_idx).parents("ul.w-annc__list");
active_ul.addClass("active");
active_ul.removeClass("hidden_item");
active_ul.css("display","");
};
$(window).resize(function(){
if($(window).width()>1024){
reorganize_{{subpart-id}}(4);
num=4;
}else if($(window).width()>576){
reorganize_{{subpart-id}}(2);
num=2;
}else{
reorganize_{{subpart-id}}(1);
num=1;
}
})
$(document).ready(function(){
if($(window).width()>1024){
reorganize_{{subpart-id}}(2);
num=2;
}else if($(window).width()>576){
reorganize_{{subpart-id}}(2);
num=2;
}else{
reorganize_{{subpart-id}}(1);
num=1;
}
var flag=false;
$('.btn-left').click(function(){
if(!flag){
var uls = $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list:not(.hidden_item)').toArray();
var ul_length = uls.length;
var currentul = uls.findIndex(function(v){
return $(v).hasClass("active");
})
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').css('display','none');
if(currentul - 1 < 0)
currentul += ul_length;
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list:not(.hidden_item)').removeClass("active");
var active_item = $(uls[currentul-1]);
active_item.addClass("active");
active_item.find("li").css("display","block");
flag=true;
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list.active').eq(0).effect("slide", { direction: "right", mode: 'show', duration: 500},function(){flag=false;});
};
});
$('.btn-right').click(function(){
var lilength = $('[data-subpart-id=\"{{subpart-id}}\"] li.w-annc__item').length;
if(!flag){
var uls = $('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list:not(.hidden_item)').toArray();
var ul_length = uls.length;
var currentul = uls.findIndex(function(v){
return $(v).hasClass("active");
})
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list').css('display','none');
if(currentul + 1 > ul_length - 1)
currentul -= ul_length;
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list:not(.hidden_item)').removeClass("active");
var active_item = $(uls[currentul+1]);
active_item.addClass("active");
active_item.find("li").css("display","block");
flag=true;
$('[data-subpart-id=\"{{subpart-id}}\"] ul.w-annc__list.active').eq(0).effect("slide", { direction: "left", mode: 'show', duration: 500},function(){flag=false;});
};
});
});
</script>

View File

@ -289,6 +289,14 @@
"en": "18. 3-Column Standard Image + Text Lite (widget-title, title, subtitle(only display 15 words))" "en": "18. 3-Column Standard Image + Text Lite (widget-title, title, subtitle(only display 15 words))"
}, },
"thumbnail": "annc_widget4_thumbs.png" "thumbnail": "annc_widget4_thumbs.png"
},
{
"filename": "annc_widget19",
"name": {
"zh_tw": "19. 標準文字列表三欄 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
"en": "19. 3-Column Standard Text List (widget-title, postdate, category, status, title, subtitle)"
},
"thumbnail": "annc_index9_thumbs.png"
} }
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,5 +1,5 @@
<div class="i-archive index-archive-1"> <div class="i-archive index-archive-1">
<h3 class="i-archive__page-title">{{page-title}}</h3> <h3 class="i-archive-title">{{page-title}}</h3>
<ul class="i-archive__list list-unstyled" data-list="categories" data-level="0"> <ul class="i-archive__list list-unstyled" data-list="categories" data-level="0">
<li class="i-archive__item"> <li class="i-archive__item">
<h4 class="i-archive__category-title">{{category-title}}</h4> <h4 class="i-archive__category-title">{{category-title}}</h4>

View File

@ -1,5 +1,5 @@
<div class="i-archive index-archive-3"> <div class="i-archive index-archive-3">
<h3 class="i-archive__page-title">{{page-title}}</h3> <h3 class="i-archive-title">{{page-title}}</h3>
<ul class="i-archive__list list-unstyled" data-list="categories" data-level="0"> <ul class="i-archive__list list-unstyled" data-list="categories" data-level="0">
<li class="i-archive__item"> <li class="i-archive__item">
<h4 class="i-archive__category-title">{{category-title}}</h4> <h4 class="i-archive__category-title">{{category-title}}</h4>