update template

This commit is contained in:
rulingcom 2021-09-03 03:34:32 +00:00
parent 63736e71a2
commit db27a67366
18 changed files with 231 additions and 80 deletions

View File

@ -367,6 +367,8 @@ background: linear-gradient(
height: 1025px; height: 1025px;
top: 164%; top: 164%;
background: linear-gradient(338deg, transparent 63px, #fff 0); background: linear-gradient(338deg, transparent 63px, #fff 0);
-pie-background: linear-gradient(338deg, transparent 63px, #fff 0);
behavior: url("/assets/ie_support/PIE2/PIE.htc");
} }
@media screen and (min-width:769px) and (max-width:1025px){ @media screen and (min-width:769px) and (max-width:1025px){
height: 990px; height: 990px;
@ -376,6 +378,8 @@ background: linear-gradient(
top: 186%; top: 186%;
height: 10405px; height: 10405px;
background: linear-gradient(338deg, transparent 38px, #fff 0); background: linear-gradient(338deg, transparent 38px, #fff 0);
-pie-background: linear-gradient(338deg, transparent 38px, #fff 0);
behavior: url("/assets/ie_support/PIE2/PIE.htc");
} }
@media(max-width:$screen-xs){ @media(max-width:$screen-xs){
height: 2131px; height: 2131px;

View File

@ -7,7 +7,7 @@
z-index: 0; z-index: 0;
.w-ad-banner { .w-ad-banner {
max-width: 75em; //max-width: 75em;
margin: auto; margin: auto;
} }
} }

View File

@ -1,5 +1,5 @@
<div class="w-ba-banner ad-banner-widget-1 ba-banner-widget-1"> <div class="w-ad-banner w-ba-banner ad-banner-widget-1 ba-banner-widget-1">
<div class="w-ba-banner__wrap cycle-slideshow" <div class="w-ad-banner__wrap w-ba-banner__wrap cycle-slideshow"
data-list="images" data-list="images"
data-level="0" data-level="0"
data-cycle-slides=".w-ba-banner__slide" data-cycle-slides=".w-ba-banner__slide"
@ -15,7 +15,7 @@
data-cycle-swipe=true data-cycle-swipe=true
data-cycle-swipe-fx="scrollHorz" data-cycle-swipe-fx="scrollHorz"
> >
<div class="w-ba-banner__slide {{class}}" <div class="w-ad-banner__slide w-ba-banner__slide {{class}}"
data-link="{{link}}" data-link="{{link}}"
data-cycle-title="{{title}}" data-cycle-title="{{title}}"
data-cycle-desc="{{context}}" data-cycle-desc="{{context}}"
@ -23,13 +23,13 @@
data-target="{{target}}" data-target="{{target}}"
> >
<a href="{{link}}" target="{{target}}" title="{{alt_title}}"> <a href="{{link}}" target="{{target}}" title="{{alt_title}}">
<img class="w-ba-banner__image banner-responsive" src="{{image_link}}" alt="{{alt_title}}"> <img class="w-ad-banner__image w-ba-banner__image banner-responsive" src="{{image_link}}" alt="{{alt_title}}">
</a> </a>
</div> </div>
</div> </div>
<div class="ad-overlay w-ba-banner__caption w-ad-banner__caption w-ad-banner__overlay_{{subpart-id}}"></div> <div class="w-ad-banner__caption ad-overlay w-ba-banner__caption w-ad-banner__caption w-ad-banner__overlay_{{subpart-id}}"></div>
<div class="w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0"> <div class="w-ad-banner__pager-1 w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0">
<li><button title="Slide {{slide_number}}"><span style="display: none;">Slide {{slide_number}}</span></button></li> <li><button title="Slide {{slide_number}}"><span style="display: none;">Slide {{slide_number}}</span></button></li>
</div> </div>
<ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul> <ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul>
@ -60,10 +60,23 @@
</script> </script>
<style type="text/css"> <style type="text/css">
.controlplay .resume-slide.active i{ .w-ba-banner .controlplay .resume-slide.active i{
color: #32D9C3; color: #32D9C3;
} }
.controlplay .pause-slide.active i{ .w-ba-banner .controlplay .pause-slide.active i{
color: #ff4500; color: #ff4500;
} }
.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;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<div class="w-ba-banner ba-banner-widget-1 ba-banner-widget-youtube"> <div class="w-ad-banner ad-banner-widget-2 w-ba-banner ba-banner-widget-1 ba-banner-widget-youtube">
<div class="w-ba-banner__wrap cycle-slideshow" <div class="w-ad-banner__wrap w-ba-banner__wrap cycle-slideshow"
data-list="images" data-list="images"
data-level="0" data-level="0"
data-cycle-slides=".w-ba-banner__slide" data-cycle-slides=".w-ba-banner__slide"
@ -25,11 +25,11 @@
{{html}} {{html}}
</div> </div>
<div class="ad-overlay w-ad-banner__overlay_{{subpart-id}}"></div> <div class="ad-overlay w-ad-banner__overlay_{{subpart-id}}"></div>
<div class="w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}"></div> <div class="w-ba-banner__caption w-ad-banner__pager-2 banner-pager banner_caption_{{subpart-id}}"></div>
<ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul> <ul class="controlplay"><a class="resume-slide active" title = "<%= (I18n.locale.to_s =="zh_tw") ? "繼續播放" : "resume" %>"><i></i></a><a class="pause-slide" title = "<%= (I18n.locale.to_s =="zh_tw") ? "暫停播放" : "pause"%>"><i></i></a></ul>
<ul class="button-mid"> <ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>" style="cursor: pointer;"></i> <i class="fa fa-angle-left prev-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "上一張" : "prev" %>"></i>
<i class="fa fa-angle-right next-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>" style="cursor: pointer;"></i> <i class="fa fa-angle-right next-button" aria-hidden="true" title = "<%= (I18n.locale.to_s =="zh_tw") ? "下一張" : "next" %>"></i>
</ul> </ul>
</div> </div>
</div> </div>
@ -178,10 +178,23 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
} }
</script> </script>
<style type="text/css"> <style type="text/css">
.controlplay .resume-slide.active i{ .w-ba-banner .controlplay .resume-slide.active i{
color: #32D9C3; color: #32D9C3;
} }
.controlplay .pause-slide.active i{ .w-ba-banner .controlplay .pause-slide.active i{
color: #ff4500; color: #ff4500;
} }
.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;
}
</style> </style>

View File

@ -25,10 +25,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('.i-annc__table').DataTable({ $('.i-annc__table').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -27,10 +27,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('.i-annc__table').DataTable({ $('.i-annc__table').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -25,10 +25,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('.i-annc__table').DataTable({ $('.i-annc__table').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -39,10 +39,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('.i-annc__table').DataTable({ $('.i-annc__table').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -76,11 +76,16 @@ for ( var i = 0; i < $('tr[data-list="pd_title"]').length ; i++ ) {
} }
} }
$('.tab-pane table').DataTable({ $('.tab-pane table').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false, paging: false,
order: false ordering: false,
}); info: false,
order: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -26,10 +26,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('table.activities-index').DataTable({ $('table.activities-index').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -22,10 +22,15 @@
{{pagination_goes_here}} {{pagination_goes_here}}
<script> <script>
$('table.courses-index').DataTable({ $('table.courses-index').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -16,10 +16,15 @@
<script> <script>
$('thead th.col-md-2:nth-child(2)').addClass('min-tablet-l'); $('thead th.col-md-2:nth-child(2)').addClass('min-tablet-l');
$('thead th.col-md-2:nth-child(5)').addClass('min-tablet'); $('thead th.col-md-2:nth-child(5)').addClass('min-tablet');
$('table.personal-honor').DataTable({ $('table.personal-honor').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -31,10 +31,15 @@ for ( var i = 0; i < $('thead th').length ; i++ ) {
} }
} }
$('table.personal-lab').DataTable({ $('table.personal-lab').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -31,10 +31,15 @@ for ( var i = 0; i < $('thead th').length ; i++ ) {
} }
} }
$('table.personal-researchs').DataTable({ $('table.personal-researchs').each(function(){
searching: false, if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
paging: false, $(this).DataTable({
ordering: false, searching: false,
info: false paging: false,
}); ordering: false,
info: false,
autoWidth: false
});
}
});;
</script> </script>

View File

@ -0,0 +1,57 @@
<div id="{{update_id}}" class="bus_widget1" data-list="bus_infos" data-level="0">
<div class="bus_info" id="{{bus_id}}">
<div class="row mt-10">
<div class="col-sm-12 bus_title">
<i class="fa fa-bus"></i>
<strong>{{bus_title}}</strong>
</div>
</div>
<div class="row bus_data" data-list="bus_data" data-level="1">
<div class="col-sm-6">
<div>
<strong class="route_name">{{route_name}}:</strong>
<span class="bus_time">{{time_to_arrive}}</span>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function update_bus(ele){
var $self = $(ele);
var bus_info_ids = $.map($self.find('.bus_info'),function(v){
return $(v).attr('id');
});
$.{{update_method}}( "{{update_url}}",
{
bus_info_ids: bus_info_ids
}, function( data ) {
$.each(data,function(k,v){
var bus_info = $self.find('#'+k);
var bus_route_names = $.map(bus_info.find('.route_name'),function(v1){
return $(v1).text().slice(0,-1)
});
var bus_time_span = bus_info.find('.bus_time');
$.each(v,function(k,v1){
var i = bus_route_names.indexOf(v1.route_name);
if (i>=0){
bus_time_span.eq(i).html(v1.time_to_arrive);
}
})
})
window.setTimeout(function(){
update_bus(ele);
},{{update_interval}});
});
}
function update_interval_bus(ele) {
window.setTimeout(function(){
update_bus(ele);
},{{update_interval}});
}
update_interval_bus($('#{{update_id}}[data-list="bus_infos"]')[0]);
</script>
<style type="text/css">
.bus_widget1 {margin-top: 1em;}
.bus_info {line-height: 1.8;}
</style>

View File

@ -0,0 +1,14 @@
{
"frontend": [
],
"widgets" : [
{
"filename" : "ruling_bus_widget1",
"name" : {
"zh_tw" : "1. 公車呈現樣式1",
"en" : "1. Bus layout 1"
},
"thumbnail" : "bus1_thumbs.png"
}
]
}

View File

@ -3,7 +3,7 @@
<a id="accesskey_sitemenu" accesskey="S" href="/<%= "#{locale.to_s}" %>/accesskey" title="Sitemenu">:::</a> <a id="accesskey_sitemenu" accesskey="S" href="/<%= "#{locale.to_s}" %>/accesskey" title="Sitemenu">:::</a>
<h3 class="sitemenu-title">{{widget_title}}</h3> <h3 class="sitemenu-title">{{widget_title}}</h3>
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0"> <ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1"> <li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a> <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" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;"> <li class="sitemenu-item level-2" style="position: relative;">

View File

@ -3,7 +3,7 @@
<a id="accesskey_sitemenu" accesskey="S" href="/<%= "#{locale.to_s}" %>/accesskey" title="Sitemenu">:::</a> <a id="accesskey_sitemenu" accesskey="S" href="/<%= "#{locale.to_s}" %>/accesskey" title="Sitemenu">:::</a>
<h3 class="sitemenu-title">{{widget_title}}</h3> <h3 class="sitemenu-title">{{widget_title}}</h3>
<ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0"> <ul data-list="pages" class="sitemenu-list level-1 list-unstyled" data-level="0">
<li class="sitemenu-item level-1"> <li class="sitemenu-item level-1 {{active_class}}">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a> <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" data-list="children" data-level="1">
<li class="sitemenu-item level-2" style="position: relative;"> <li class="sitemenu-item level-2" style="position: relative;">