This commit is contained in:
rulingcom 2022-10-20 10:45:23 +08:00
parent be17e78244
commit 6fa6085c3e
10 changed files with 201 additions and 217 deletions

View File

@ -25,8 +25,7 @@
if ( $('.header-banner').length != 0) {
$('.layout-header').css('height', '');
var scrollTop = $(window).scrollTop();
var scrollBottom = $('html').height() - $(window).height() - $('.kenjohn').height();
if (scrollTop>5 && scrollBottom>0) { /* 要滑動到選單的距離 */
if (scrollTop>5) { /* 要滑動到選單的距離 */
if (parseInt($('.layout-content').css('margin-top'))==0 && $('.layout-content.topcontent').length != 0 && $('.layout-content.topcontent').offset().top<400){
$('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height());
}

View File

@ -70,9 +70,8 @@
.w-ba-banner .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
height: 0;
top: 50%;
}
.next-button,.prev-button{
cursor: pointer;

View File

@ -171,7 +171,7 @@
$("*[data-yt-binded=0]").each(function(){
init_yt_banner(this);
})
if (typeof onYouTubeIframeAPIReady !== 'function'){
if (typeof onYouTubeIframeAPIReady !== 'function'){
$(document).ready(function() {
$(document).on('touchstart click mousedown',".jarallax-video-audio",function(){
$(this).trigger('click');
@ -283,21 +283,26 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
delete yt_players[id][k];
})
iframes.each(function(i,iframe){
var yt_id = $(iframe).attr("id");
var yt_player = yt_players[id][$(iframe).attr("id")];
var $iframe = $(iframe);
var yt_id = $iframe.attr("id");
var yt_player = yt_players[id][yt_id];
if(yt_player){
}else{
yt_player = new YT.Player($(iframe).attr("id"), {
yt_player = new YT.Player(yt_id, {
events: {
'onReady': function(event){
var yt_player = event.target;
var height = $(yt_player.getIframe()).height();
var banner_wrap = $(iframe).parents('.w-ba-banner__wrap').eq(0);
var banner_wrap = $iframe.parents('.w-ba-banner__wrap').eq(0);
var carousel_wrap = banner_wrap.find(".cycle-carousel-wrap");
if(carousel_wrap.length){
carousel_wrap.css("top","3em");
height += parseInt(carousel_wrap.css('font-size')) * 3;
}
var overlay_in_slide = $iframe.parent().siblings('.ad-overlay,.banner-overlay');
if(overlay_in_slide.length != 0){
height += overlay_in_slide.outerHeight(true);
}
banner_wrap.height(height).css({"padding-bottom":"","padding-top":""});
var init_key = find_out_yt_event_relation_key(yt_player, false);
if(init_key){
@ -330,8 +335,8 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
'onStateChange': onPlayerStateChange
}
});
yt_players[id][$(iframe).attr("id")] = yt_player;
$(iframe).data("yt_player",yt_player);
yt_players[id][yt_id] = yt_player;
$iframe.data("yt_player",yt_player);
}
})
}
@ -357,7 +362,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
}
{{extra_state_chnage_script}}
}
}
}
$(document).ready(function(){
window.onYouTubePlayerAPIReady = function() {
onYouTubeIframeAPIReady.apply(this,arguments);
@ -401,18 +406,6 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
$('[data-subpart-id="{{subpart-id}}"] .prev-button').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
})
var resize_timeout_id;
$(window).resize(function(){
if(resize_timeout_id){
window.clearTimeout(resize_timeout_id);
}
resize_timeout_id = window.setTimeout(function(){
var banner_wrap = $(".w-ba-banner__wrap[data-overlay=\".w-ad-banner__overlay_{{subpart-id}}\"]");
var opts = banner_wrap.data('cycle.opts');
var height = opts.slides.filter('.active').height() || opts.slides.height();
banner_wrap.height(height).css("padding-bottom","");
},300);
})
})
</script>
<style type="text/css">
@ -461,13 +454,6 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
.w-ba-banner .controlplay{
width: auto;
}
.w-ba-banner .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.next-button,.prev-button{
cursor: pointer;
}

View File

@ -10,7 +10,7 @@
flex-wrap: wrap;
display: flex;
width: 100%;
align-items: center;
align-items: flex-start;
}
.ask-question .controls > *{
display: block;
@ -28,7 +28,7 @@
.ask-question .form-horizontal .control-group .controls{
margin: 0;
display: inline-flex;
align-items: center;
align-items: flex-start;
overflow: hidden;
position: relative;
min-width: 10em;
@ -36,7 +36,7 @@
padding-left: 0;
width: 100%;
padding: 0.5em;
justify-content: center;
justify-content: flex-start;
}
.ask-question .form-horizontal input[type="text"],.ask-question .form-horizontal select{
width: 97%;
@ -46,6 +46,9 @@
padding: 1em 0 0 0;
text-align: center;
}
.ask-question .controls > input[type="radio"]:not(:first-child) {
margin-left: 0.5em;
}
</style>
<link href="/assets/custom_field.css" media="screen" rel="stylesheet">
<script src="/assets/validator"></script>

View File

@ -2,7 +2,7 @@
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<link rel="stylesheet" type="text/css" href="/assets/gallery_card.css">
<% OrbitHelper.render_css_in_head(["gallery_card.css"]) %>
<div class="row widget-content" data-level="0" data-list="images">
<div class="card card-flip h-100">
<div class="card-front">

View File

@ -41,9 +41,8 @@
.widget-link.widget-4 .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
height: 0;
top: 50%;
}
.widget-link.widget-4 .button-mid .fa{
cursor: pointer;

View File

@ -42,9 +42,8 @@
.widget-link.widget-5 .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
height: 0;
top: 50%;
}
.widget-link.widget-5 .button-mid .fa{
cursor: pointer;

View File

@ -43,9 +43,8 @@
.widget-link.widget-6 .button-mid{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
height: 0;
top: 50%;
}
.widget-link.widget-6 .button-mid .fa{
cursor: pointer;

View File

@ -5,10 +5,10 @@
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="1">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="2">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="2">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>

View File

@ -5,10 +5,10 @@
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="1">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="2">
<ul class="sitemenu-list level-2 {{dropdown}}" data-list="children" data-level="2">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>