update template

This commit is contained in:
rulingcom 2022-08-08 15:26:39 +08:00
parent 78a0e21e88
commit 43c9ef5131
150 changed files with 3778 additions and 67 deletions

View File

@ -29,35 +29,33 @@
</div>
</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-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>
</div>
<ul class="controlplay"><a href="javascript:;" class="resume-slide active" title="<%= I18n.t("ad_banner.resume") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.resume") %>"></i></a><a href="javascript:;" class="pause-slide" title="<%= I18n.t("ad_banner.pause") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.pause") %>"></i></a></ul>
<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>
</div>
<ul class="controlplay"><a href="javascript:;" class="resume-slide active" title="<%= I18n.t("ad_banner.resume") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.resume") %>"></i></a><a href="javascript:;" class="pause-slide" title="<%= I18n.t("ad_banner.pause") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.pause") %>"></i></a></ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-label="<%= I18n.t("ad_banner.prev") %>"></i>
<i class="fa fa-angle-right next-button" aria-label="<%= I18n.t("ad_banner.next") %>"></i>
</ul>
</div>
<script>
var flag = 1;
$('.pause-slide').off('click').click(function(){
$('[data-subpart-id="{{subpart-id}}"] .pause-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
$(this).addClass('active')
$(this).parents('.controlplay').eq(0).find('.resume-slide').removeClass('active')
});
$('.resume-slide').off('click').click(function(){
$('[data-subpart-id="{{subpart-id}}"] .resume-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume');
$(this).addClass('active')
$(this).parents('.controlplay').eq(0).find('.pause-slide').removeClass('active')
});
$('.next-button').off('click').on('click',function(){
$('[data-subpart-id="{{subpart-id}}"] .next-button').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
})
$('.prev-button').off('click').on('click',function(){
$('[data-subpart-id="{{subpart-id}}"] .prev-button').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
})
</script>
<style type="text/css">
.w-ba-banner .controlplay .resume-slide.active i{

View File

@ -25,13 +25,12 @@
{{html}}
</div>
<div class="ad-overlay w-ad-banner__overlay_{{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 href="javascript:;" class="resume-slide active" title="<%= I18n.t("ad_banner.resume") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.resume") %>"></i></a><a href="javascript:;" class="pause-slide" title="<%= I18n.t("ad_banner.pause") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.pause") %>"></i></a></ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-label="<%= I18n.t("ad_banner.prev") %>"></i>
<i class="fa fa-angle-right next-button" aria-label="<%= I18n.t("ad_banner.next") %>"></i>
</ul>
</div>
<div class="w-ba-banner__caption w-ad-banner__pager-2 banner-pager banner_caption_{{subpart-id}}"></div>
<ul class="controlplay"><a href="javascript:;" class="resume-slide active" title="<%= I18n.t("ad_banner.resume") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.resume") %>"></i></a><a href="javascript:;" class="pause-slide" title="<%= I18n.t("ad_banner.pause") %>"><i aria-hidden="true" aria-label="<%= I18n.t("ad_banner.pause") %>"></i></a></ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-label="<%= I18n.t("ad_banner.prev") %>"></i>
<i class="fa fa-angle-right next-button" aria-label="<%= I18n.t("ad_banner.next") %>"></i>
</ul>
</div>
<script type="text/javascript">
var ad_trigger_time;
@ -46,10 +45,11 @@
}else{
var audio_div;
if ($self.hasClass('have-audio')){
audio_div = $('<button title="<%= I18n.t("ad_banner.muted") %>" class="jarallax-video-audio"><i class="fas fa-volume-up" aria-label="<%= I18n.t("ad_banner.muted") %>" aria-hidden="true"></i></button>');
audio_div = $('<button title="<%= I18n.t("ad_banner.muted") %>" class="jarallax-video-audio"><i class="fas fa-volume-up" aria-label="<%= I18n.t("ad_banner.muted") %>" aria-hidden="true"></i><p style=\"display: none;\"><%= I18n.t("ad_banner.muted") %></p></button>');
}else{
audio_div = $('<button title="<%= I18n.t("ad_banner.unmuted") %>" class="jarallax-video-audio"><i class="fas fa-volume-mute" aria-label="<%= I18n.t("ad_banner.unmuted") %>" aria-hidden="true"></i></button>');
audio_div = $('<button title="<%= I18n.t("ad_banner.unmuted") %>" class="jarallax-video-audio"><i class="fas fa-volume-mute" aria-label="<%= I18n.t("ad_banner.unmuted") %>" aria-hidden="true"></i><p style=\"display: none;\"><%= I18n.t("ad_banner.unmuted") %></p></button>');
}
audio_div.find('p').css('display','none'); //fix CSP
audio_div.click(function(event) {
var currentTime = new Date();
if (ad_trigger_time&&currentTime-ad_trigger_time<500){
@ -88,11 +88,19 @@
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
}
if(window.init_yt_banner == undefined){
function init_yt_banner(banner__slide){
var $banner__slide = $(banner__slide);
if( $banner__slide.data("yt-binded")== "0" ){
$banner__slide.data("yt-binded","1");
var obj = $banner__slide.find("iframe");
obj.attr("id", $banner__slide.data("youtube-id") + "_" + ad_banners_count);
ad_banners_count++;
}
}
}
$("*[data-yt-binded=0]").each(function(){
$(this).attr("data-yt-binded","1");
var obj = $(this).find("iframe");
obj.attr("id",$(this).data("youtube-id") + "_" + ad_banners_count);
ad_banners_count++;
init_yt_banner(this);
})
if (typeof onYouTubeIframeAPIReady !== 'function'){
$(document).ready(function() {
@ -102,11 +110,96 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
});
if(window.yt_players == undefined)
window.yt_players = {};
function find_out_yt_event_list_key(yt_player){
var defalt_key = 'o';
var all_keys = Object.keys(yt_player).filter(function(s){return s.length == 1});
var prop_nums_thresh = 6;
if(all_keys.indexOf(defalt_key) != -1){
if((yt_player[defalt_key] instanceof Object) && Object.keys(yt_player[defalt_key]).length > prop_nums_thresh){
return defalt_key;
}
}
var event_key;
all_keys.forEach(function(k){
if((yt_player[k] instanceof Object) && Object.keys(yt_player[k]).length > prop_nums_thresh){
event_key = k;
return false;
}
})
return event_key;
}
function find_out_yt_event_list_count_key(yt_player, event_list_key){
var defalt_key = 'v';
var all_keys = Object.keys(yt_player).filter(function(s){return s.length == 1});
var equal_count = yt_player[event_list_key].length;
if(all_keys.indexOf(defalt_key) != -1){
if(yt_player[defalt_key] == equal_count){
return defalt_key;
}
}
var count_key;
all_keys.forEach(function(k){
if(yt_player[k] == equal_count){
count_key = k;
return false;
}
})
return count_key;
}
function find_out_yt_event_list_array_key(event_dict){
var defalt_key = 'i';
var all_keys = Object.keys(event_dict);
if(all_keys.indexOf(defalt_key) != -1){
var tmp = event_dict[defalt_key];
if(Array.isArray(tmp) && tmp.indexOf('onStateChange') != -1){
return defalt_key;
}
}
var array_key;
all_keys.forEach(function(k){
var tmp = event_dict[k];
if(Array.isArray(tmp) && tmp.indexOf('onStateChange') != -1){
array_key = k;
return false;
}
})
return array_key;
}
function find_out_yt_event_relation_key(event_dict, is_obj){ // is_obj = true => store event idx array. false => store whether event init(true or false)
var defalt_key = 'j';
var all_keys = Object.keys(event_dict);
if(all_keys.indexOf(defalt_key) != -1){
var tmp = event_dict[defalt_key];
if((tmp instanceof Object) && tmp['onStateChange']){
if(!is_obj || (tmp['onStateChange'] instanceof Object)){
return defalt_key;
}
}
}
var relation_key;
all_keys.forEach(function(k){
var tmp = event_dict[k];
if((tmp instanceof Object) && tmp['onStateChange']){
if(!is_obj || (tmp['onStateChange'] instanceof Object)){
relation_key = k;
return false;
}
}
})
return relation_key;
}
function onYouTubeIframeAPIReady(){
$(".w-ba-banner").each(function(i,banner){
var iframes = $(banner).find("iframe");
$(".w-ba-banner").on('cycle-post-initialize', function(){
init_banner(this);
});
function init_banner(banner){
var $banner = $(banner);
$banner.find('.w-ad-banner__slide').each(function(j, banner__slide){
init_yt_banner(banner__slide);
})
var iframes = $banner.find("iframe");
if(iframes.length > 0){
var id = $(banner).attr("data-subpart-id");
var id = $banner.attr("data-subpart-id");
if(yt_players[id] == undefined)
yt_players[id] = {};
var remove_ids = [];
@ -121,28 +214,48 @@ 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")];
if(yt_player){
}else{
yt_player = new YT.Player($(iframe).attr("id"), {
events: {
'onReady': function(event){
var height = $(event.target.getIframe()).height();
var yt_player = event.target;
var height = $(yt_player.getIframe()).height();
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;
}
banner_wrap.height(height).css({"padding-bottom":"","padding-top":""});
banner_wrap.find(".cycle-carousel-wrap").css("top","3em");
try{
delete (event.target.B || event.target.H || event.target.I).onStateChange;
}catch(e){console.log("{onReady: true, onStateChange: true} missing!")};
var onStateChange_idx = event.target.l.i.onStateChange;
onStateChange_idx.reverse();
var event_size = 3;
onStateChange_idx.forEach(function(start_idx){
event.target.l.h.splice(start_idx,event_size);
});
event.target.l.i.onStateChange = [];
event.target.l.s = event.target.l.h.length;
event.target.addEventListener('onStateChange',onPlayerStateChange);
var init_key = find_out_yt_event_relation_key(yt_player, false);
if(init_key){
delete yt_player[init_key].onStateChange;
}
else{
console.log("{onReady: true, onStateChange: true} missing!");
}
var event_list_key = find_out_yt_event_list_key(yt_player);
if(event_list_key){
var event_dict = yt_player[event_list_key];
var array_key = find_out_yt_event_list_array_key(event_dict);
var count_key = find_out_yt_event_list_count_key(event_dict, array_key);
var relation_key = find_out_yt_event_relation_key(event_dict, true);
var onStateChange_idx = event_dict[relation_key].onStateChange;
onStateChange_idx.reverse();
var event_size = 3;
onStateChange_idx.forEach(function(start_idx){
event_dict[array_key].splice(start_idx,event_size);
});
event_dict[relation_key].onStateChange = [];
event_dict[count_key] = event_dict[array_key].length;
yt_player.addEventListener('onStateChange',onPlayerStateChange);
banner_wrap.trigger('resize');
}else{
console.log("YT player changes its variables!")
}
{{extra_ready_script}}
},
'onStateChange': onPlayerStateChange
@ -153,21 +266,24 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
}
})
}
}
$(".w-ba-banner").each(function(i,banner){
init_banner(banner);
})
}
function onPlayerStateChange(event){
var iframe = $(event.target.h),
var iframe = $(event.target.getIframe()),
cyclediv = iframe.parents("div.cycle-slideshow");
var widget = cyclediv.parents('.ba-banner-widget-youtube');
if(event.data == YT.PlayerState.PLAYING || event.data == YT.PlayerState.BUFFERING){
cyclediv[0].need_resume = !(cyclediv.hasClass("cycle-paused"));
cyclediv.cycle("pause");
widget.find('.banner-pager,.controlplay,.button-mid,.ad-overlay').css('visibility','hidden')
widget.find('.banner-pager,.controlplay,.button-mid,.ad-overlay,.banner-overlay').css('visibility','hidden')
ad_audio_button(iframe.parents(".w-ad-banner__slide").eq(0),false);
}else if(event.data == YT.PlayerState.UNSTARTED || event.data == YT.PlayerState.PAUSED || event.data == YT.PlayerState.ENDED){
if(cyclediv[0].need_resume)
cyclediv.cycle("resume");
widget.find('.banner-pager,.controlplay,.button-mid,.ad-overlay').css('visibility','')
widget.find('.banner-pager,.controlplay,.button-mid,.ad-overlay,.banner-overlay').css('visibility','')
ad_audio_button(iframe.parents(".w-ad-banner__slide").eq(0),true);
}
{{extra_state_chnage_script}}
@ -187,32 +303,33 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
}
})
banner_wrap.on('cycle-resumed',function(opts){
var controlplay = $(this).nextAll(".controlplay");
if(controlplay.length != 0){
controlplay.find(".resume-slide").addClass("active");
controlplay.find(".pause-slide").removeClass("active");
if(!($(this).data('paused'))){
var controlplay = $(this).nextAll(".controlplay");
if(controlplay.length != 0){
controlplay.find(".resume-slide").addClass("active");
controlplay.find(".pause-slide").removeClass("active");
}
}
})
/*
var height = opts.slides.filter('.active').height() || opts.slides.height();
banner_wrap.height(height)*/
if(banner_wrap.find('.cycle-slide-active iframe').length != 0)
banner_wrap.css("padding-bottom","");
banner_wrap.css("padding-bottom","");
{{extra_document_ready_script}}
$('.pause-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
$('[data-subpart-id="{{subpart-id}}"] .pause-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").data('paused', true).cycle('pause');
$(this).addClass('active');
$(this).parents('.controlplay').eq(0).find('.resume-slide').removeClass('active');
});
$('.resume-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume');
$('[data-subpart-id="{{subpart-id}}"] .resume-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").data('paused', false).cycle('resume');
$(this).addClass('active');
$(this).parents('.controlplay').eq(0).find('.pause-slide').removeClass('active');
});
$('.next-button').off('click').on('click',function(){
$('[data-subpart-id="{{subpart-id}}"] .next-button').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
})
$('.prev-button').off('click').on('click',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;
@ -232,7 +349,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
<style type="text/css">
.jarallax-video-audio{
z-index: 201;
font-size: 36px;
font-size: 2em;
color: #FFF;
text-align: center;
position: absolute;

View File

@ -0,0 +1,22 @@
<div class="w-annc widget-announcement-10">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="application_forms">
<li class="w-annc__item row">
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,22 @@
<div class="w-annc widget-announcement-11">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="application_forms">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="w-annc widget-announcement-12">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="application_forms">
<tr>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="w-annc widget-announcement-13">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="application_forms">
<tr>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,31 @@
<div class="w-annc widget-announcement-5">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list row" data-level="0" data-list="application_forms">
<li class="w-annc__item">
<div class="w-annc__content-wrap">
<div class="w-annc__meta">
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,26 @@
<div class="w-annc widget-announcement-6">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="application_forms">
<li class="w-annc__item row">
<span class="w-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-8">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,26 @@
<div class="w-annc widget-announcement-7">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="application_forms">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-8">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="w-annc widget-announcement-8">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="application_forms">
<tr>
<td class="w-annc__category">{{category}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="w-annc widget-announcement-9">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="application_forms">
<tr>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__category">{{category}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}">Read more</a>
</div>
</div>

View File

@ -0,0 +1,76 @@
{
"widgets": [
{
"filename": "application_form_widget5",
"name": {
"zh_tw": "5. 標準文字列表 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
"en": "5. Standard Text List (widget-title, postdate, category, status, title, subtitle)"
},
"thumbnail": "application_form_widget5_thumbs.png"
},
{
"filename": "application_form_widget6",
"name": {
"zh_tw": "6. 標準標題列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en": "6. Standard Title List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail": "application_form_widget6_thumbs.png"
},
{
"filename": "application_form_widget7",
"name": {
"zh_tw": "7. 標準標題列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en": "7. Standard Title List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail": "application_form_widget7_thumbs.png"
},
{
"filename": "application_form_widget8",
"name": {
"zh_tw": "8. 標準表格列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en": "8. Standard Table List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail": "application_form_widget8_thumbs.png"
},
{
"filename": "application_form_widget9",
"name": {
"zh_tw": "9. 標準表格列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en": "9. Standard Table List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail": "application_form_widget9_thumbs.png"
},
{
"filename": "application_form_widget10",
"name": {
"zh_tw": "10. 精簡標題列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en": "10. Simple Title List-1 (widget-title, status, title, postdate)"
},
"thumbnail": "application_form_widget10_thumbs.png"
},
{
"filename": "application_form_widget11",
"name": {
"zh_tw": "11. 精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en": "11. Simple Title List-2 (widget-title, postdate, status, title)"
},
"thumbnail": "application_form_widget11_thumbs.png"
},
{
"filename": "application_form_widget12",
"name": {
"zh_tw": "12. 精簡表格列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en": "12. Simple Table List (widget-title, status, title, postdate)"
},
"thumbnail": "application_form_widget12_thumbs.png"
},
{
"filename": "application_form_widget13",
"name": {
"zh_tw": "13. 精簡表格列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en": "13. Simple Table List (widget-title, postdate, status, title)"
},
"thumbnail": "application_form_widget13_thumbs.png"
}
]
}

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.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: 3.4 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.2 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.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

@ -14,7 +14,7 @@
<dl class="i-archive__file-list" data-list="files" data-level="2">
<dd class="i-archive__file-wrap">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
<span class="i-archive__file-type label label-primary">{{file-type}}</span>
<span class="i-archive__file-type label label-primary {{file-type}}">{{file-type}}</span>
</dd>
</dl>
</div>

View File

@ -0,0 +1,38 @@
<div class="i-archive index-archive-2">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="panel-group" id="index-archive-group" data-list="categories" data-level="0">
<div class="panel panel-default">
<div class="panel-heading" style="padding: 0.625em 0.9375em;">
<h4 class="panel-title">
<i class="fa fa-file-text" aria-hidden="true"></i>
<a data-toggle="collapse" data-parent="#index-archive-group" href="#collapse" class="collapsed" style="padding: 0;display: inline-block;">
{{category-title}}
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</a>
</h4>
</div>
<div id="collapse" class="panel-collapse collapse {{in_class}}">
<div class="panel-body">
<dl class="dl-horizontal i-archive-item-group" data-list="archives" data-level="1">
<dt class="i-archive-item-list">
<sapn class="i-archive-item-title">{{archive-title}}</span>
<span data-list="statuses" data-level="2">
<span class="label status {{status-class}}">{{status}}</span>
</span>
</dt>
<dl class="i-archive-files-list" data-list="files" data-level="2">
<dd>
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" title="{{file-name}}">{{file-name}}</a>
<span class="label label-primary {{file-type}}">{{file-type}}</span>
</dd>
</dl>
</dl>
</div>
</div>
</div>
{{link_to_edit}}
</div>
</div>

View File

@ -0,0 +1,41 @@
<div class="i-archive index-archive-13">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<ul class="archive-categories nav nav-tabs" role="tablist" data-list="categories" data-level="0" data-no-edit="true">
<li class="nav-item {{active_class}}" role="presentation">
<a href="#{{category-id}}" role="tab" data-toggle="tab" title="{{category-title}}" >{{category-title}}</a>
</li>
</ul>
<div class="tab-content" data-list="categories" data-level="0">
<div class="tab-pane {{active_class}}" id="{{category-id}}" role="tabpanel" aria-labelledby="{{category-id}}-tab">
<ul class="archives-ul" data-list="archives" data-level="1">
<li class="archive-li">
<p>
<span data-list="statuses" data-level="2">
<span class="label status {{status-class}}">{{status}}</span>
</span>
<a href="{{archive-file-url}}" target="_blank" title="{{archive-title}}">
{{archive-title}}
</a>
<span class="i-archive-files-list" data-list="files" data-level="2">
<a href="{{file-url}}" class="i-archive-files-item" title="{{file-name}}" data-toggle="tooltip" data-placement="bottom">
<span class="label label-primary {{file-type}}">{{file-type}}</span>
</a>
</span>
</p>
<div class="archive-description">{{description}}</div>
</li>
</ul>
{{link_to_edit}}
</div>
</div>
</div>
<style>
.index-archive-13 .archives-ul .archive-li{
list-style-type: disc;
}
.index-archive-13 .archive-description{
color: #9b9b9b;
}
</style>

View File

@ -13,7 +13,7 @@
<dl class="i-archive__file-list" data-list="files" data-level="2">
<dd class="i-archive__file-wrap">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
<span class="i-archive__file-type label label-primary">{{file-type}}</span>
<span class="i-archive__file-type label label-primary {{file-type}}">{{file-type}}</span>
</dd>
</dl>
</div>

View File

@ -71,6 +71,22 @@
"en": "11. Table list - Simple - Unfold Files (widget-title, category, Serial Number, filename, download link)"
},
"thumbnail": "ar9.png"
},
{
"filename": "archive_index12",
"name": {
"zh_tw": "12. 手風琴式列表 - 有下拉 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )",
"en": "12. Accordion list - with drop down (widget-title, category, filename, download link)"
},
"thumbnail": "ar2.png"
},
{
"filename": "archive_index13",
"name": {
"zh_tw": "13. 頁籤式 ( 模組標題, 類別標題, 標題, 檔案名稱, 下載連結, 描述 )",
"en": "13. Tab list (widget-title, category, title, filename, download link, description)"
},
"thumbnail": "ar-tab1.png"
}
],
"widgets": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,111 @@
<div class="widget-ask widget1">
<style type="text/css">
#new-ask-question .form-horizontal .control-group > *{
font-size: 1.125em;
}
.default_picker label{
display: none;
}
.ask-question .control-group{
flex-wrap: wrap;
display: flex;
width: 100%;
align-items: center;
}
.ask-question .controls > *{
display: block;
}
.ask-question .controls > script{
display: none;
}
.ask-question .form-horizontal .control-label{
width: 24%;
max-width: 15em;
min-width: 7em;
padding: 0;
text-align: center;
}
.ask-question .form-horizontal .control-group .controls{
margin: 0;
display: inline-flex;
align-items: center;
overflow: hidden;
position: relative;
min-width: 10em;
max-width: 25em;
padding-left: 0;
width: 100%;
padding: 0.5em;
justify-content: center;
}
.ask-question .form-horizontal input[type="text"],.ask-question .form-horizontal select{
width: 97%;
}
.ask-question .form-horizontal .form-actions{
position: relative;
padding: 1em 0 0 0;
text-align: center;
}
</style>
<link href="/assets/custom_field.css" media="screen" rel="stylesheet">
<script src="/assets/validator"></script>
<link href="/assets/ask/ask.css" media="screen" rel="stylesheet">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<div id="new-ask-question" class="ask-question">
{{switch_form}}
</div>
<script type='text/javascript'>
$('.ask-question .required').each(function() {
var text = $(this).text()
if (text[0]!='*'){
$(this).text('*' + text);
}
});
$(function(){
var fv = new FormValidator($("#new_ask_question"));
fv.validate_functions.check_email = function(value){
reg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
if (reg.test(value)) {
return true;
}else{
return false;
}
}
})
$(document).ready(function(){
function scrollIntoView(selector, offset = 0) {
window.scroll(0, document.querySelector(selector).offsetTop - offset);
}
var email_regex = "{{email_regex}}";
if(email_regex.length != 0){
email_regex = new RegExp(email_regex);
var submit_flag = false;
$(".ask-question-form").each(function(i, form){
var $form = $(form);
var email_field = $form.find('#ask_question_mail');
if($form.length != 0 && email_field.length != 0){
$form.submit(function(){
if(!submit_flag){
submit_flag = true;
if(email_regex.test(email_field.val())){
submit_flag = false;
}else{
email_field.css("border", "2px solid red");
scrollIntoView('#ask_question_mail');
alert("<%=t('ask.please_check_email_format')%>");
email_field.one("input",function(){
email_field.css("border", "");
})
submit_flag = false;
return false;
}
}
})
}
})
}
})
</script>
</div>

View File

@ -0,0 +1,18 @@
<div class="widget-asks widget1">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="table">
<thead>
<tr data-level="0" data-list="th" class="bg-primary">
<th>{{td}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="ask_questions">
<tr data-level="1" data-list="td">
<td>{{content}}</td>
</tr>
</tbody>
</table>
<div style="background: #337ab7; border: 1px solid rgb(204, 204, 204); padding: 5px 10px; text-align: right;"><span style="color:inherit;"><a href="{{more_href}}" title="{{more_title}}"><span style="color:#FFFFFF;">{{more_title}}</span></a></span></div>
</div>

20
modules/ask/info.json Normal file
View File

@ -0,0 +1,20 @@
{
"widgets" : [
{
"filename" : "ask_widget_form",
"name" : {
"zh_tw" : "1. 模組標題、發問介面",
"en" : "1. widget-title, question"
},
"thumbnail" : "thumb.png"
},
{
"filename" : "ask_widget_list",
"name" : {
"zh_tw" : "2. 模組標題、 發佈回覆列表",
"en" : "2. widget-title, published list"
},
"thumbnail" : "thumb.png"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
modules/calendar/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,63 @@
<div class="w-calendar widget-calendar-1" data-module="calendar">
<div class='month_template'>
<h4 class="widget-title ">
<span class="text"><span style="display: none;">placeholder</span></span>
<i class="fa fa-circle-o-notch fa-spin fa-fw loading hide"></i>
</h4>
<div class="w-calendar-nav">
<a href="#" class="w-calendar-nav-prev">
<i class="fa fa-chevron-left"></i>
<span class="w-calendar-nav-prev-text hide">Prev</span>
</a>
<a href="#" class="w-calendar-nav-next">
<i class="fa fa-chevron-right"></i>
<span class="w-calendar-nav-next-text hide">Next</span>
</a>
</div>
<table class="table table-condensed w-calendar-table">
<thead>
<tr data-list="week_title" data-level="0">
<th>{{week_title}}</th>
</tr>
</thead>
<tbody>
{{default_column}}
</tbody>
</table>
</div>
<div class="calendar-events" style="display: none;">
<div class="close_box">X</div>
<div class="event-header"></div>
<div class="event-containers">
</div>
</div>
</div>
<%= stylesheet_link_tag "calendar_widget1" %>
<script>
$(document).ready(function(){
if(document.getElementById("calendar-widget_module") == null){
var tag = document.createElement('script');
tag.setAttribute("id", "calendar-widget_module");
tag.src = "<%= asset_path('calendar_widget.js') %>";
tag.onload = function(){
$('div.widget-calendar-1[data-module=calendar][data-subpart-id="{{subpart-id}}"]').each(function(index){
var calendar = $(this),
cmi = new CalendarModuleMonth1(new Date(), calendar,calendar.data("subpart-id"),"{{more_url}}",false);
cmi.currentMonth();
calendar.find("div.w-calendar-nav a").on("click",function(){
var el = $(this);
if(el.hasClass("w-calendar-nav-prev")){
cmi.prevMonth();
}else if(el.hasClass("w-calendar-nav-next")){
cmi.nextMonth();
}
return false;
})
})
}
var head = document.getElementsByTagName("head");
head[0].appendChild(tag);
}
});
</script>

View File

@ -0,0 +1,79 @@
<div class="w-calendar widget-calendar-2" data-module="calendar">
<div class="w-calendar-title {{widget_title_class}}">
<span>{{calendar_title}}</span>
<span>{{widget_title}}</span>
</div>
<div class='month_template'>
<h4 class="widget-title">
<span class="text"><span style="display: none;">placeholder</span></span>
<i class="fa fa-circle-o-notch fa-spin fa-fw loading hide"></i>
</h4>
<div class="w-calendar-nav">
<a href="#" class="w-calendar-nav-prev">
<i class="fa fa-chevron-left"></i>
<span class="w-calendar-nav-prev-text hide">Prev</span>
</a>
<a href="#" class="w-calendar-nav-next">
<i class="fa fa-chevron-right"></i>
<span class="w-calendar-nav-next-text hide">Next</span>
</a>
</div>
<table class="table table-condensed w-calendar-table">
<thead>
<tr data-list="week_title" data-level="0">
<th>{{week_title}}</th>
</tr>
</thead>
<tbody>
{{default_column}}
</tbody>
</table>
</div>
<div class="calendar-events" style="display: none;">
<div class="event">
<div class="event-header">
<div class="date">
<div class="day"></div>
<div class="month"></div>
</div>
<div class="event-title">
<div class="event-inner-title"></div>
<div class="duration"></div>
</div>
</div>
<div class="event-wraper">
<div class="event-containers">
</div>
</div>
</div>
</div>
</div>
<%= stylesheet_link_tag "calendar_widget2" %>
<script>
$(document).ready(function(){
if(document.getElementById("calendar-widget_module2") == null){
var tag = document.createElement('script');
tag.setAttribute("id", "calendar-widget_module2");
tag.src = "<%= asset_path('calendar_widget2.js') %>";
tag.onload = function(){
$('div.widget-calendar-2[data-module="calendar"][data-subpart-id="{{subpart-id}}"]').each(function(index){
var calendar = $(this),
cmi = new CalendarModuleMonth2(new Date(), calendar,calendar.data("subpart-id"),"{{more_url}}",false);
cmi.currentMonth();
calendar.find("div.w-calendar-nav a").on("click",function(){
var el = $(this);
if(el.hasClass("w-calendar-nav-prev")){
cmi.prevMonth();
}else if(el.hasClass("w-calendar-nav-next")){
cmi.nextMonth();
}
return false;
})
})
}
var head = document.getElementsByTagName("head");
head[0].appendChild(tag);
}
});
</script>

View File

@ -0,0 +1,41 @@
<div id="orbit_calendar">
<div id="sec1">
<div class="btn-toolbar" id="navigation">
<div id="calendar-nav">
<div class="btn-group">
<button class="btn btn-default btn-sm" id="prev_month_btn">
<i class="icon-chevron-left"></i>
</button>
<button class="btn btn-default btn-sm" id="next_month_btn">
<i class="icon-chevron-right"></i>
</button>
<button class="btn btn-default btn-sm" id="today_btn"><%=t('calendar.today')%></button>
</div>
</div>
</div>
<div class="form-inline" id="range_selection"></div>
</div>
<div id='sec3' class="btn-toolbar">
<div class="btn-group calendar_mode">
<div data-list="modes_info" data-level="0">
<button class="btn btn-default mode_switch btn-sm {{active_class}}" data-mode="{{mode}}" >{{trans}}</button>
</div>
</div>
<button id="refresh_btn" class="btn btn-default btn-sm">
<i class="icons-cycle"></i>
</button>
</div>
<div id="view_holder">
<h3 id="current_title" class="current_day_title">
<span style="display: none;">placeholder</span>
</h3>
<div id="calendar"></div>
<div id="calendar_agenda"></div>
</div>
</div>
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
<div id="calendar-loading"></div>
<script type="text/javascript">
var calendar = new Calendar("#calendar","{{page_id}}");
</script>

View File

@ -0,0 +1,55 @@
<script type="text/javascript" src="<%= asset_path('calendar_widget.js') %>" id="calendar-index_module"></script>
{{style_tag}}
<div class="w-calendar widget-calendar-1 index2" data-module="calendar" data-page-id="{{page_id}}">
<div class='month_template'>
<h4 class="widget-title">
<span class="text"><span style="display: none;">placeholder</span></span>
<i class="fa fa-circle-o-notch fa-spin fa-fw loading hide"></i>
</h4>
<div class="w-calendar-nav">
<a href="#" class="w-calendar-nav-prev">
<i class="fa fa-chevron-left"></i>
<span class="w-calendar-nav-prev-text hide">Prev</span>
</a>
<a href="#" class="w-calendar-nav-next">
<i class="fa fa-chevron-right"></i>
<span class="w-calendar-nav-next-text hide">Next</span>
</a>
</div>
<table class="table table-condensed w-calendar-table">
<thead>
<tr data-list="week_title" data-level="0">
<th>{{week_title}}</th>
</tr>
</thead>
<tbody>
{{default_column}}
</tbody>
</table>
</div>
<div class="calendar-events" style="display: none;">
<div class="close_box">X</div>
<div class="event-header"></div>
<div class="event-containers">
</div>
</div>
</div>
<script>
$(document).ready(function(){
$("div.index2[data-module=calendar]").each(function(index){
var calendar = $(this),
cmi = new CalendarModuleMonth1(new Date(), calendar,calendar.data("page-id"),"",true);
cmi.currentMonth();
calendar.find("div.w-calendar-nav a").on("click",function(){
var el = $(this);
if(el.hasClass("w-calendar-nav-prev")){
cmi.prevMonth();
}else if(el.hasClass("w-calendar-nav-next")){
cmi.nextMonth();
}
return false;
})
})
})
</script>

View File

@ -0,0 +1,71 @@
<script type="text/javascript" src="<%= asset_path('calendar_widget2.js') %>" id="calendar-index_module2"></script>
{{style_tag}}
<div class="w-calendar widget-calendar-2 index3" data-module="calendar" data-page-id="{{page_id}}">
<div class="w-calendar-title {{widget_title_class}}">
<span>{{calendar_title}}</span>
<span>{{widget_title}}</span>
</div>
<div class='month_template'>
<h4 class="widget-title ">
<span class="text"><span style="display: none;">placeholder</span></span>
<i class="fa fa-circle-o-notch fa-spin fa-fw loading hide"></i>
</h4>
<div class="w-calendar-nav">
<a href="#" class="w-calendar-nav-prev">
<i class="fa fa-chevron-left"></i>
<span class="w-calendar-nav-prev-text hide">Prev</span>
</a>
<a href="#" class="w-calendar-nav-next">
<i class="fa fa-chevron-right"></i>
<span class="w-calendar-nav-next-text hide">Next</span>
</a>
</div>
<table class="table table-condensed w-calendar-table">
<thead>
<tr data-list="week_title" data-level="0">
<th>{{week_title}}</th>
</tr>
</thead>
<tbody>
{{default_column}}
</tbody>
</table>
</div>
<div class="calendar-events" style="display: none;">
<div class="event">
<div class="event-header">
<div class="date">
<div class="day"></div>
<div class="month"></div>
</div>
<div class="event-title">
<div class="event-inner-title"></div>
<div class="duration"></div>
</div>
</div>
<div class="event-wraper">
<div class="event-containers">
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$("div.index3[data-module=calendar]").each(function(index){
var calendar = $(this),
cmi = new CalendarModuleMonth2(new Date(), calendar,calendar.data("page-id"),"",true);
cmi.currentMonth();
calendar.find("div.w-calendar-nav a").on("click",function(){
var el = $(this);
if(el.hasClass("w-calendar-nav-prev")){
cmi.prevMonth();
}else if(el.hasClass("w-calendar-nav-next")){
cmi.nextMonth();
}
return false;
})
})
})
</script>

View File

@ -0,0 +1,46 @@
{
"frontend": [
{
"filename" : "index",
"name" : {
"zh_tw" : "1. 行事曆",
"en" : "1. Calendar"
},
"thumbnail" : "thumb.png"
},
{
"filename" : "index2",
"name" : {
"zh_tw" : "2. 行事曆(和widget樣式1同)",
"en" : "2. Calendar(same as widget style 1)"
},
"thumbnail" : "thumb.png"
},
{
"filename" : "index3",
"name" : {
"zh_tw" : "3. 行事曆加公告",
"en" : "3. Calendar with announcement"
},
"thumbnail" : "thumb.png"
}
],
"widgets" : [
{
"filename" : "calendar_widget1",
"name" : {
"zh_tw" : "1. 行事曆",
"en" : "1. Calendar"
},
"thumbnail" : "thumb.png"
},
{
"filename" : "calendar_widget2",
"name" : {
"zh_tw" : "2. 行事曆加公告",
"en" : "2. Calendar with announcement"
},
"thumbnail" : "thumb2.png"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,32 @@
<div class="w-annc widget-announcement-1">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item">
<div class="w-annc__img-wrap bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,22 @@
<div class="w-annc widget-announcement-10">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,21 @@
<div class="w-annc widget-announcement-11">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="w-annc widget-announcement-12">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="w-annc widget-announcement-13">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="w-annc widget-announcement-14">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<div class="w-annc__inner row">
<div class="w-annc__img-wrap col-xs-4 bullseye">
<img class="w-annc__img" src="{{main_picture}}" alt="{{main_picture_description}}" title="{{main_picture_description}}">
</div>
<ul class="w-annc__list col-xs-8" data-level="0" data-list="custom_announcements">
<li class="w-annc__item">
<div class="w-annc__content row">
<h4 class="w-annc__entry-title col-xs-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__postdate-wrap col-xs-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</div>
</li>
</ul>
</div>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,162 @@
<div class="w-annc widget-announcement-4 w-annc widget-announcement-15" style="position:relative;">
<div class="w-annc__more-wrap clearfix">
<h2 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h2>
<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%;">
<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%;"></button>
<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%;"></button>
</div>
<ul class="w-annc__list row" data-level="0" data-list="custom_announcements">
<li class="w-annc__item col-md-4">
<div class="w-annc__img-wrap bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="w-annc__content-wrap">
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
</div>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
function combineul(){
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(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();
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 1.125em');
$('[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+'% - '+20/16+'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(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(1);
num=1;
}
})
$(document).ready(function(){
if($(window).width()>1024){
reorganize(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(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: "left", 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

@ -0,0 +1,47 @@
<div class="w-annc widget-announcement-16">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<div class="slide-button">
<button class="cycle-prev btn btn-warning"> <i class="fa fa-angle-left"></i></button>
<button class="cycle-next btn btn-warning"> <i class="fa fa-angle-right"></i></button>
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多+" : "More NEWS" %></a>
</div>
<div class="w-annc__wrap cycle-slideshow"
data-level="0"
data-list="custom_announcements"
data-cycle-slides=".w-annc__item"
data-cycle-fx="carousel"
data-cycle-carousel-fluid=true
data-cycle-pause-on-hover="true"
data-cycle-speed="200"
data-cycle-carousel-visible="1"
data-cycle-prev=".cycle-prev"
data-cycle-next=".cycle-next"
data-cycle-swipe=true
data-cycle-swipe-fx="carousel"
>
<div class="w-annc__item">
<div class="w-annc__img-wrap">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="w-annc__content-wrap">
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,31 @@
<div class="w-annc widget-announcement-17">
<div class="search_block">
<p>Search</p>
<form accept-charset="UTF-8" action="{{more_url}}" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div>
<p>
<input id="search_query" name="keywords" placeholder="搜尋" type="text">
<input type="submit" value="搜尋">
</p>
</form>
</div>
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,86 @@
<div class="w-annc widget-announcement-18">
<div class="w-annc__more-wrap clearfix">
<h2 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h2>
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
<ul class="w-annc__list row" data-level="0" data-list="custom_announcements">
<li class="w-annc__item col-md-4">
<div class="w-annc__img-wrap">
<a href="{{link_to_show}}" title="{{title}}">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</a>
</div>
<div class="w-annc__content-wrap">
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<div class="w-annc__subtitle">{{subtitle}}</div>
<div class="w-annc_read_more"><a href="{{link_to_show}}" title="{{title}}">{{read_more_text}}</a></div>
</div>
</li>
</ul>
</div>
<style type="text/css">
.widget-announcement-18 [data-list="custom_announcements"] li > *{
background: #ffffff;
width: 100%;
float: left;
}
.widget-announcement-18 [data-list="custom_announcements"] .w-annc__img{
width: 100%;
}
.widget-announcement-18 [data-list="custom_announcements"] .w-annc__content-wrap{
padding: 0 1em;
}
.widget-announcement-18 .w-annc__title {
line-height: 1.3;
font-size: 1.2rem;
}
.widget-announcement-18 .w-annc__widget-title {
float: left;
}
.widget-announcement-18 .w-annc__more {
margin-top: 1.5em;
}
.widget-announcement-18 .w-annc__list > .w-annc__item:nth-child(3n+1) {
clear: both;
}
.widget-announcement-18 li.w-annc__item{
float: left;
}
.widget-announcement-18 .w-annc__img-wrap {
padding: 0 0 1em 0;
}
.w-annc_read_more{
display: inline-block;
padding: 1em;
}
.w-annc_read_more a{
float: left;
background: #4a97c2;
color: #ffffff;
padding: 0 0.5em;
border-radius: 0.3em;
border: 0.5em solid #4a97c2;
}
.w-annc__subtitle {
padding-bottom: 0.3em;
}
.w-annc_read_more a:hover{
background: #327397;
border: 0.5em solid #327397;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("[data-subpart-id=\"{{subpart-id}}\"] .w-annc__subtitle").each(function(i,v){
var subtitle = $(v).text();
if(subtitle.length > 15){
$(v).text(subtitle.slice(0,15) + "...");
}
})
})
</script>

View File

@ -0,0 +1,34 @@
<div class="w-annc widget-announcement-2">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<div class="w-annc__img-wrap col-sm-4 bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="w-annc__content-wrap col-sm-8">
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,34 @@
<div class="w-annc widget-announcement-3">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<div class="w-annc__content-wrap col-sm-8">
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
<div class="w-annc__img-wrap col-sm-4 bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,107 @@
<div class="w-annc widget-announcement-4">
<div class="w-annc__more-wrap clearfix">
<h2 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h2>
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
<ul class="w-annc__list row" data-level="0" data-list="custom_announcements">
<li class="w-annc__item col-md-4">
<div class="w-annc__img-wrap bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="w-annc__content-wrap">
<div class="w-annc__meta">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label {{status-class}}">{{status}}</span>
</span>
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
</div>
<style type="text/css">
[data-subpart-id="{{subpart-id}}"] .bullseye{
overflow: hidden;
}
</style>
<script>
function combineul(){
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(num){
combineul();
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();
})
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
};
$(window).resize(function(){
if($(window).width()>1024){
reorganize(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(1);
num=1;
}
})
$(document).ready(function(){
if($(window).width()>1024){
reorganize(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(1);
num=1;
}
})
</script>

View File

@ -0,0 +1,31 @@
<div class="w-annc widget-announcement-5">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list row" data-level="0" data-list="custom_announcements">
<li class="w-annc__item">
<div class="w-annc__content-wrap">
<div class="w-annc__meta">
<span class="w-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<span class="w-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
</div>
<h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="w-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,26 @@
<div class="w-annc widget-announcement-6">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<span class="w-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-8">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,26 @@
<div class="w-annc widget-announcement-7">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="custom_announcements">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-8">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="w-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="w-annc__category">{{category}}</span>
</span>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="w-annc widget-announcement-8">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="w-annc__category">{{category}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="w-annc widget-announcement-9">
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<table class="w-annc__table table">
<thead>
<tr>
<th class="w-annc__th w-annc__th--date">{{date-head}}</th>
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
<th class="w-annc__th w-annc__th--category">{{category-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="w-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="w-annc_content">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="w-annc__category">{{category}}</td>
</tr>
</tbody>
</table>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,25 @@
<div class="i-annc index-announcement-1 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__category">{{category}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,22 @@
<div class="i-annc index-announcement-10">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<span class="i-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<h4 class="i-annc__entry-title col-sm-8">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="i-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="i-annc__category">{{category}}</span>
</span>
</li>
</ul>>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,18 @@
<div class="i-annc index-announcement-11">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<h4 class="i-annc__entry-title col-sm-9">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="i-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,18 @@
<div class="i-annc index-announcement-12">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<span class="i-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<h4 class="i-annc__entry-title col-sm-9">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</li>
</ul>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,23 @@
<div class="i-annc index-announcement-13 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,23 @@
<div class="i-annc index-announcement-14 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,25 @@
<div class="i-annc index-announcement-15 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__view-count">{{view_count}}</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,39 @@
<div class="i-annc index-announcement-16 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--title">{{link-head}}</th>
<th class="i-annc__th i-annc__th--title">{{file-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__postdate" date-format="%Y-%m-%d">{{postdate}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__links">
<ul data-list="bulletin_links" data-level="1">
<li>
<a class="i-annc__title" href="{{link_url}}">{{link_title}}</a>
</li>
</ul>
</td>
<td class="i-annc__files">
<ul data-list="bulletin_files" data-level="1">
<li>
<a class="i-annc__title" href="{{file_url}}">{{file_title}}</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,27 @@
<div class="i-annc index-announcement-1 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--department">{{department-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__category">{{category}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
<td class="i-annc__department"><span class="i-annc__department-content">{{department}}</span></td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,27 @@
<div class="i-annc index-announcement-2 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__category">{{category}}</td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
<td class="i-annc__view-count">{{view_count}}</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,25 @@
<div class="i-annc index-announcement-3 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__category">{{category}}</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,27 @@
<div class="i-annc index-announcement-4 {{display}}">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<table class="i-annc__table table table-striped">
<thead>
<tr>
<th class="i-annc__th i-annc__th--date">{{date-head}}</th>
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
<th class="i-annc__th i-annc__th--category">{{view-count-head}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="custom_announcements">
<tr>
<td class="i-annc__postdate"><span class="i-annc__postdate-content" date-format="%Y-%m-%d">{{postdate}}</span></td>
<td class="i-annc__content">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</td>
<td class="i-annc__category">{{category}}</td>
<td class="i-annc__view-count">{{view_count}}</td>
</tr>
</tbody>
</table>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,30 @@
<div class="i-annc index-announcement-5">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<div class="i-annc__img-wrap col-sm-4">
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}">
</div>
<div class="i-annc__content-wrap col-sm-8">
<div class="i-annc__meta">
<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 class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<span class="i-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="i-annc__category">{{category}}</span>
</span>
</div>
<h4 class="i-annc__entry-title">
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="i-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,30 @@
<div class="i-annc index-announcement-6">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<div class="i-annc__content-wrap col-sm-8">
<div class="i-annc__meta">
<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 class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<span class="i-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="i-annc__category">{{category}}</span>
</span>
</div>
<h4 class="i-annc__entry-title">
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="i-annc__subtitle">{{subtitle}}</p>
</div>
<div class="i-annc__img-wrap col-sm-4">
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}">
</div>
</li>
</ul>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,83 @@
<div class="i-annc index-announcement-7">
<h3 class="i-annc__page-title">{{page-title}}</h3>
<ul class="i-annc__list row" data-level="0" data-list="custom_announcements">
<li class="i-annc__item col-md-4">
<div class="i-annc__img-wrap bullseye">
<img class="i-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div>
<div class="i-annc__content-wrap">
<div class="i-annc__meta">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label {{status-class}}">{{status}}</span>
</span>
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<span class="i-annc__category-wrap">
<i class="fa fa-tasks"></i>
<span class="i-annc__category">{{category}}</span>
</span>
</div>
<h4 class="i-annc__entry-title">
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="i-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</ul>
</div>
{{pagination_goes_here}}
<script>
var lilength = $('.i-annc.index-announcement-7 li.i-annc__item').length;
function combineul(){
for(var i=1;i<$('.i-annc.index-announcement-7 ul.i-annc__list').length;i++)
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(0).find('>li').eq(-1).after($('.i-annc.index-announcement-7 ul.i-annc__list').eq(i).html());
var ullength = $('.i-annc.index-announcement-7 ul.i-annc__list').length;
for(var i = 1;i < ullength;i++)
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).remove();
};
function reorganize(num){
combineul();
for(var i=1;i< Math.ceil(lilength/num);i++){
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).after('<ul class="i-annc__list row" data-level="0" data-list="custom_announcements"></ul>')
var lihtml="";
if(i != (Math.ceil(lilength/num)-1)){
for(var j=0;j<num;j++)
lihtml += "<li class='i-annc__item col-md-4'>"+$('.i-annc.index-announcement-7 li.i-annc__item').eq(i*num+j).html()+"</li>"
}else{
for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++)
lihtml += "<li class='i-annc__item col-md-4'>"+$('.i-annc.index-announcement-7 li.i-annc__item').eq(i*num+j).html()+"</li>"
};
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(-1).html(lihtml);
};
if(Math.ceil(lilength/num) != 1 )
for(var i=0;i< lilength -num ; i++ )
$('.i-annc.index-announcement-7 ul.i-annc__list').eq(0).find("li.i-annc__item").eq(num).remove();
$('.i-annc.index-announcement-7 ul.i-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
};
$(document).ready(function(){
if($(window).width()>1024){
reorganize(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(1);
num=1;
}
});
$(window).resize(function(){
if($(window).width()>1024){
reorganize(3);
num=3;
}else if($(window).width()>576){
reorganize(2);
num=2;
}else{
reorganize(1);
num=1;
}
})
</script>

View File

@ -0,0 +1,26 @@
<div class="i-annc index-announcement-8">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list row" data-level="0" data-list="custom_announcements">
<li class="i-annc__item">
<div class="i-annc__content-wrap">
<div class="i-annc__meta">
<span class="i-annc__postdate-wrap" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
<span class="i-annc__category-wrap">
<i class="fa fa-tasks"></i>
<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>
</div>
<h4 class="i-annc__entry-title">
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<p class="i-annc__subtitle">{{subtitle}}</p>
</div>
</li>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,22 @@
<div class="i-annc index-announcement-9">
<h1 class="i-annc__page-title">{{page-title}}</h1>
<ul class="i-annc__list" data-level="0" data-list="custom_announcements">
<li class="i-annc__item row">
<span class="i-annc__category-wrap col-sm-2">
<i class="fa fa-tasks"></i>
<span class="i-annc__category">{{category}}</span>
</span>
<h4 class="i-annc__entry-title col-sm-8">
<span class="i-annc__status-wrap" data-list="statuses" data-level="1">
<span class="i-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="i-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
<span class="i-annc__postdate-wrap col-sm-2" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="i-annc__postdate">{{postdate}}</span>
</span>
</li>
</ul>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,288 @@
{
"frontend": [
{
"filename" : "annc_index1",
"name" : {
"zh_tw" : "1. 標準標題列表-1A ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en" : "1. Standard Title List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail" : "annc_index1_thumbs.png"
},
{
"filename" : "annc_index2",
"name" : {
"zh_tw" : "2. 標準標題列表-1B ( 模組標題, 類別, 狀態, 標題, 日期, 瀏覽人次 )",
"en" : "2. Standard Title List-1B (widget-title, category, status, title, postdate, view-count)"
},
"thumbnail" : "annc_index2_thumbs.png"
},
{
"filename" : "annc_index3",
"name" : {
"zh_tw" : "3. 標準表格列表-2A ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en" : "3. Standard Table List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail" : "annc_index3_thumbs.png"
},
{
"filename" : "annc_index4",
"name" : {
"zh_tw" : "4. 標準表格列表-2B ( 模組標題, 日期, 狀態, 標題, 類別, 瀏覽人次 )",
"en" : "4. Standard Table List-2 (widget-title, postdate, status, title, category, view-count)"
},
"thumbnail" : "annc_index4_thumbs.png"
},
{
"filename" : "annc_index5",
"name" : {
"zh_tw" : "5. 左圖右文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "5. Balanced Image + Text(Left) (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_index5_thumbs.png"
},
{
"filename" : "annc_index6",
"name" : {
"zh_tw" : "6. 右圖左文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "6. Balanced Image + Text(Right) (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_index6_thumbs.png"
},
{
"filename" : "annc_index7",
"name" : {
"zh_tw" : "7. 三欄圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "7. 3-Column Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_index7_thumbs.png"
},
{
"filename" : "annc_index8",
"name" : {
"zh_tw" : "8. 標準文字列表 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
"en" : "8. Standard Text List (widget-title, postdate, category, status, title, subtitle)"
},
"thumbnail" : "annc_index8_thumbs.png"
},
{
"filename" : "annc_index9",
"name" : {
"zh_tw" : "9. 標準標題列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en" : "9. Standard Title List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail" : "annc_index9_thumbs.png"
},
{
"filename" : "annc_index10",
"name" : {
"zh_tw" : "10. 標準標題列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en" : "10. Standard Title List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail" : "annc_index10_thumbs.png"
},
{
"filename" : "annc_index11",
"name" : {
"zh_tw" : "11. 精簡標題列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en" : "11. Simple Title List-1 (widget-title, status, title, postdate)"
},
"thumbnail" : "annc_index11_thumbs.png"
},
{
"filename" : "annc_index12",
"name" : {
"zh_tw" : "12. 精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en" : "12. Simple Title List-2 (widget-title, postdate, status, title)"
},
"thumbnail" : "annc_index12_thumbs.png"
},
{
"filename" : "annc_index13",
"name" : {
"zh_tw" : "13. 精簡表格列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en" : "13. Simple Table List (widget-title, status, title, postdate)"
},
"thumbnail" : "annc_index13_thumbs.png"
},
{
"filename" : "annc_index14",
"name" : {
"zh_tw" : "14. 精簡表格列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en" : "14. Simple Table List (widget-title, postdate, status, title)"
},
"thumbnail" : "annc_index14_thumbs.png"
},
{
"filename" : "annc_index15",
"name" : {
"zh_tw" : "15. 精簡表格列表-3 ( 模組標題, 日期, 狀態, 標題, 瀏覽人次 )",
"en" : "15. Simple Table List (widget-title, postdate, status, title, view-count)"
},
"thumbnail" : "annc_index15_thumbs.png"
},
{
"filename" : "annc_index16",
"name" : {
"zh_tw" : "16. 連結 + 附件表格列表 ( 模組標題, 類別, 狀態, 標題 )",
"en" : "16. Table List including Links and attachments (widget-title, category, status, title, view-count)"
},
"thumbnail" : "annc_index16_thumbs.png"
},
{
"filename" : "annc_index17",
"name" : {
"zh_tw" : "17. 標準標題列表-1A ( 類別, 標題, 日期, 張貼人 )",
"en" : "1. Standard Title List-1 ( category, title, postdate, department)"
},
"thumbnail" : "annc_index1_thumbs.png"
}
],
"widgets" : [
{
"filename" : "annc_widget1",
"name" : {
"zh_tw" : "1. 標準圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "1. Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_widget1_thumbs.png"
},
{
"filename" : "annc_widget2",
"name" : {
"zh_tw" : "2. 左圖右文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "2. Balanced Image + Text(Left) (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_widget2_thumbs.png"
},
{
"filename" : "annc_widget3",
"name" : {
"zh_tw" : "3. 右圖左文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "3. Balanced Image + Text(Right) (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_widget3_thumbs.png"
},
{
"filename" : "annc_widget4",
"force_cover": "true",
"name" : {
"zh_tw" : "4. 三欄圖文 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "4. 3-Column Standard Image + Text (widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_widget4_thumbs.png"
},
{
"filename" : "annc_widget15",
"force_cover": "true",
"name" : {
"zh_tw" : "4.5. 三欄圖文-slide ( 模組標題, 圖片, 狀態, 日期, 類別, 標題, 副標題 )",
"en" : "4.5. 3-Column Standard Image + Text -slide(widget-title, image, status, postdate, category, title, subtitle)"
},
"thumbnail" : "annc_widget4_thumbs.png"
},
{
"filename" : "annc_widget5",
"name" : {
"zh_tw" : "5. 標準文字列表 ( 模組標題, 日期, 類別, 狀態, 標題, 副標題 )",
"en" : "5. Standard Text List (widget-title, postdate, category, status, title, subtitle)"
},
"thumbnail" : "annc_widget5_thumbs.png"
},
{
"filename" : "annc_widget6",
"name" : {
"zh_tw" : "6. 標準標題列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en" : "6. Standard Title List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail" : "annc_widget6_thumbs.png"
},
{
"filename" : "annc_widget7",
"name" : {
"zh_tw" : "7. 標準標題列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en" : "7. Standard Title List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail" : "annc_widget7_thumbs.png"
},
{
"filename" : "annc_widget8",
"name" : {
"zh_tw" : "8. 標準表格列表-1 ( 模組標題, 類別, 狀態, 標題, 日期 )",
"en" : "8. Standard Table List-1 (widget-title, category, status, title, postdate)"
},
"thumbnail" : "annc_widget8_thumbs.png"
},
{
"filename" : "annc_widget9",
"name" : {
"zh_tw" : "9. 標準表格列表-2 ( 模組標題, 日期, 狀態, 標題, 類別 )",
"en" : "9. Standard Table List-2 (widget-title, postdate, status, title, category)"
},
"thumbnail" : "annc_widget9_thumbs.png"
},
{
"filename" : "annc_widget10",
"name" : {
"zh_tw" : "10. 精簡標題列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en" : "10. Simple Title List-1 (widget-title, status, title, postdate)"
},
"thumbnail" : "annc_widget10_thumbs.png"
},
{
"filename" : "annc_widget11",
"name" : {
"zh_tw" : "11. 精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en" : "11. Simple Title List-2 (widget-title, postdate, status, title)"
},
"thumbnail" : "annc_widget11_thumbs.png"
},
{
"filename" : "annc_widget12",
"name" : {
"zh_tw" : "12. 精簡表格列表-1 ( 模組標題, 狀態, 標題, 日期 )",
"en" : "12. Simple Table List (widget-title, status, title, postdate)"
},
"thumbnail" : "annc_widget12_thumbs.png"
},
{
"filename" : "annc_widget13",
"name" : {
"zh_tw" : "13. 精簡表格列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en" : "13. Simple Table List (widget-title, postdate, status, title)"
},
"thumbnail" : "annc_widget13_thumbs.png"
},
{
"filename" : "annc_widget14",
"name" : {
"zh_tw" : "14. 一圖 + 標題列表 ( 模組標題, 圖片, 狀態, 標題, 日期 )",
"en" : "14. 1 Image + Title List (widget-title, image, status, title, postdate)"
},
"thumbnail" : "annc_widget14_thumbs.png"
},
{
"filename" : "annc_widget18",
"name" : {
"zh_tw" : "15. 三欄圖文精簡版 ( 模組標題, 標題, 副標題(只顯示15字) )",
"en" : "15. 3-Column Standard Image + Text Lite (widget-title, title, subtitle(only display 15 words))"
},
"thumbnail" : "annc_widget4_thumbs.png"
},
{
"filename" : "annc_widget16",
"name" : {
"zh_tw" : "16. 單欄圖文輪播 ( 模組標題, 圖片, 狀態, 日期, 類別, 標題 )",
"en" : "16. Image + Text slide (widget-title, image, status, postdate, category, title)"
},
"thumbnail" : "annc_widget1_thumbs.png"
},
{
"filename" : "annc_widget17",
"name" : {
"zh_tw" : "17. 含搜尋功能之精簡標題列表-2 ( 模組標題, 日期, 狀態, 標題 )",
"en" : "17. Simple Title List-2 (widget-title, postdate, status, title), including search"
},
"thumbnail" : "annc_widget11_thumbs.png"
}
]
}

View File

@ -0,0 +1,342 @@
<style type="text/css">
.full-size-img img {
width: 100%;
}
.full-size-img {
width: 100%;
}
</style>
<article class="s-annc show-announcement">
<h1 class="s-annc__show-title">{{title}}</h1>
<ul class="s-annc__meta-wrap list-unstyled no-print">
<li class="s-annc__date-wrap s-annc__meta--item">
<i class="fa fa-calendar-o"></i>
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
</li>
<li class="s-annc__author-wrap s-annc__meta--item">
<i class="fa fa-male"></i>
<span class="s-annc__author">{{update_user}}</span>
</li>
<li class="s-annc__tag-wrap s-annc__meta--item ">
<i class="fa fa-tags"></i>
<span data-list="tags" data-level="0">
<a href="{{url}}"><span class="s-annc__tag label label-default">{{tag}}</span></a>
</span>
</li>
</ul>
<section class="s-annc__post-wrap">
<div class="s-annc__sub-img {{hide_class}}">
<img src="{{img_src}}" alt="{{img_description}}"></img>
<span class="s-annc__img_description">{{img_description}}</span>
</div>
<div class="s-annc__subtitle">{{subtitle_ann}}</div>
<div class="s-annc__post-body">{{body}}</div>
</section>
<ul class="s-annc__related-wrap list-unstyled no-print">
<li class="s-annc__related-file">
<i class="fa fa-fw fa-paperclip"></i>
<div class="s-annc__related-file-list" data-list="custom_bulletin_files" data-level="0">
<a class="s-annc__flie-title btn btn-default btn-sm" href="{{file_url}}">{{file_title}}</a>
</div>
</li>
<li class="s-annc__related-link">
<i class="fa fa-fw fa-link"></i>
<div class="s-annc__related-link-list" data-list="custom_bulletin_links" data-level="0">
<a class="s-annc__link-title btn btn-default btn-sm" href="{{link_url}}" target="_blank">{{link_title}}</a>
</div>
</li>
</ul>
</article>
<div class="carousel_images" style="{{carousel_display_style}}">
<div class="w-ba-banner ba-banner-widget-1">
<div class="w-ba-banner__wrap cycle-slideshow"
data-list="bulletin_carousel_images"
data-level="0"
data-cycle-slides=".bulletin_carousel_slide"
data-cycle-log="false"
data-cycle-auto-height="0"
data-cycle-speed="300"
data-cycle-timeout="5000"
data-cycle-fx="fade"
data-pager-active-class="active-slide"
data-cycle-swipe=true
data-cycle-swipe-fx="scrollHorz"
>
<div class="w-ba-banner__slide bulletin_carousel_slide"
data-cycle-title="{{description_text}}"
>
<img class="w-ba-banner__image banner-responsive" src="{{src}}" alt="{{description_text}}">
<div class="ad-overlay w-ad-banner__overlay bulletin_carousel__overlay">
<p><strong class="carousel__description">{{description}}</strong></p>
</div>
<div class="transitionfade"></div>
</div>
</div>
<ul class="controlplay"><a class="resume-slide" title = "{{resume_btn_title}}"><i></i></a><a class="pause-slide" title = "{{pause_btn_title}}"><i></i></a></ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button" aria-hidden="true" title = "{{prev_btn_title}}"></i>
<i class="fa fa-angle-right next-button" aria-hidden="true" title = "{{next_btn_title}}"></i>
</ul>
</div>
<div style="position: relative;">
<h4><span class="active_slide">1</span>/{{carousel_count}}</h4>
<ul class="carousel_images_slide w-annc__list row list-unstyled" data-level="0" data-list="bulletin_carousel_images">
<li class="carousel_img_item col-sm-3">
<div class="carousel_img-wrap">
<img class="carousel_img" src="{{src}}" alt="{{description_text}}">
</div>
</li>
</ul>
<ul class="button-mid">
<i class="fa fa-angle-left prev-button prev_img" aria-hidden="true" title = "{{prev_btn_title}}"></i>
<i class="fa fa-angle-right next-button next_img" aria-hidden="true" title = "{{next_btn_title}}"></i>
</ul>
</div>
</div>
{{link_to_edit}}
<style type="text/css">
.carousel_img_item{
display: none;
float: left;
}
.controlplay {
position: absolute;
right: 1em;
top: 3%;
z-index: 200;
}
.controlplay a {
display: inline-block;
margin-right: 0.25em;
cursor: pointer;
padding: 5px 10px;
border: 1px solid rgba(255,255,255,0.5);
background: rgba(0,0,0,0.2);
}
.controlplay a i {
font-family: FontAwesome;
position: relative;
font-size: 1rem;
line-height: 1;
color: #FFF;
vertical-align: middle;
font-style: unset;
}
.controlplay .resume-slide i::before {
content: "\f04b";
}
.controlplay .pause-slide i::before {
content: "\f04c";
}
ul.button-mid .prev-button {
transition: 0.4s;
position: relative;
float: left;
left: 0.5rem;
width: 2.5rem;
height: 2.5rem;
font-size: 2.2rem;
color: #ffffff;
background: rgba(0,0,0,0.2);
text-align: center;
line-height: 2.5rem;
top: 50%;
position: absolute;
transform: translateY(-50%);
z-index: 999;
}
ul.button-mid .next-button {
float: right;
transition: 0.4s;
position: relative;
right: 0.5rem;
width: 2.5rem;
height: 2.5rem;
font-size: 2.2rem;
color: #fff;
background: rgba(0,0,0,0.2);
text-align: center;
line-height: 2.5rem;
top: 50%;
position: absolute;
transform: translateY(-50%);
z-index: 999;
}
.carousel_images_slide{
padding: 3em;
}
.carousel_img_item img{
cursor: pointer;
}
@media (max-width: 479px){
.carousel_img_item:nth-child(-n+1){
display: block;
width: 100%;
float: left;
}
.carousel_img_item{
width: 100%;
}
}
@media (min-width: 480px){
.carousel_img_item:nth-child(-n+2){
display: block;
width: 50%;
float: left;
}
.carousel_img_item{
width: 50%;
}
}
@media (min-width: 768px){
.carousel_img_item:nth-child(-n+3){
display: block;
width: 33%;
float: left;
}
.carousel_img_item{
width: 33%;
}
}
@media (min-width: 1280px){
.carousel_img_item:nth-child(-n+4){
display: block;
width: 25%;
float: left;
}
.carousel_img_item{
width: 25%;
}
}
</style>
<script>
(function($) {
function hideEmptyEl(el, elParent) {
if( el.length === 0) {
elParent.addClass('hide');
}
}
// Hiding parent element when children elements are not present
// Tags
hideEmptyEl($('.s-annc__tag'), $('.s-annc__tag-wrap'));
// Attachments
hideEmptyEl($('.s-annc__flie-title'), $('.s-annc__related-file'));
// Links
hideEmptyEl($('.s-annc__link-title'), $('.s-annc__related-link'));
$("img[src='']").remove();
$('.pause-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
});
$('.resume-slide').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume');
});
$('.next-button').off('click').on('click',function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
})
$('.prev-button').off('click').on('click',function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
})
window.active_slide = 0;
$('.prev_img').off('click').on('click',function(){
var carousel_images_slide = $('.carousel_images_slide');
var carousel_images_slide_first_child = carousel_images_slide.find(">li").eq(active_slide);
if(carousel_images_slide_first_child.length > 0){
var content_size = Math.floor((carousel_images_slide.outerWidth() - Number.parseInt(carousel_images_slide.css('font-size')) * 3) / carousel_images_slide_first_child.outerWidth(true));
content_size = Math.max(content_size,1);
if(carousel_images_slide.find(">li").length > content_size && active_slide > 0){
active_slide -= content_size;
carousel_images_slide.find(">li").css("display","none");
for(var i = active_slide; i < active_slide + content_size;i++){
carousel_images_slide.find(">li").eq(i).css("display","block");
}
}
}
})
$('.next_img').off('click').on('click',function(){
var carousel_images_slide = $('.carousel_images_slide');
var carousel_images_slide_first_child = carousel_images_slide.find(">li").eq(active_slide);
if(carousel_images_slide_first_child.length > 0){
var content_size = Math.floor((carousel_images_slide.outerWidth() - Number.parseInt(carousel_images_slide.css('font-size')) * 3) / carousel_images_slide_first_child.outerWidth(true));
content_size = Math.max(content_size,1);
var li_length = carousel_images_slide.find(">li").length;
if(li_length > content_size){
active_slide += content_size;
active_slide = Math.min(active_slide,li_length - 1);
carousel_images_slide.find(">li").css("display","none");
for(var i = active_slide; i < active_slide + content_size;i++){
carousel_images_slide.find(">li").eq(i).css("display","block");
}
}
}
})
$(".carousel_img_item img").off("click").on("click",function(){
$(".carousel_images .cycle-slideshow").cycle($(this).index(".carousel_img_item img"));
})
$(document).ready(function(){
$(".carousel_images .cycle-slideshow").cycle('pause');
var carousel_image_block_width = $('.carousel_images').width();
var heights = $(".bulletin_carousel_slide").map(function(i,v){
return $(v).height() * carousel_image_block_width / $(v).width();
})
var max_height = Math.max.apply(null,heights);
$(".bulletin_carousel_slide").each(function(i,v){
$(v).height(max_height);
})
$(".carousel_images .cycle-slideshow").cycle('resume');
$('.cycle-slideshow').on('cycle-after',function(){
$(".active_slide").text($('.bulletin_carousel_slide.cycle-slide-active').index());
})
})
$(window).on("load",function(){
$(".carousel_images .cycle-slideshow").cycle('pause');
var carousel_image_block_width = $('.carousel_images').width();
var heights = $(".bulletin_carousel_slide").map(function(i,v){
return $(v).height() * carousel_image_block_width / $(v).width();
})
var max_height = Math.max.apply(null,heights);
$(".bulletin_carousel_slide").each(function(i,v){
$(v).height(max_height);
})
$(".carousel_images .cycle-slideshow").cycle('resume');
})
$(window).resize(function(){
var carousel_images_slide = $('.carousel_images_slide');
var carousel_images_slide_first_child = carousel_images_slide.find(">li").eq(active_slide);
if(carousel_images_slide_first_child.length > 0){
var content_size = Math.floor((carousel_images_slide.outerWidth() - Number.parseInt(carousel_images_slide.css('font-size')) * 3) / carousel_images_slide_first_child.outerWidth(true));
content_size = Math.max(content_size,1);
carousel_images_slide.find(">li").css("display","none");
var active_count = carousel_images_slide.find(">li").length - active_slide;
if(active_count < content_size){
active_slide -= (content_size - active_count);
}
active_slide = Math.max(active_slide,0);
console.log(content_size)
for(var i = active_slide; i < active_slide + content_size;i++){
carousel_images_slide.find(">li").eq(i).css("display","block");
}
}
var carousel_image_block_width = $('.carousel_images').width();
$(".bulletin_carousel_slide").css("height",'');
var heights = $(".bulletin_carousel_slide").map(function(i,v){
return $(v).height() * carousel_image_block_width / $(v).width();
})
var max_height = Math.max.apply(null,heights);
$(".bulletin_carousel_slide").each(function(i,v){
$(v).height(max_height);
})
})
}(jQuery));
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Some files were not shown because too many files have changed in this diff Show More