update template

This commit is contained in:
rulingcom 2021-10-13 07:31:14 +00:00
parent fd4b122040
commit bae9a717f2
13 changed files with 203 additions and 303 deletions

View File

@ -11,17 +11,6 @@
.s-annc__sub-img.pull-left {
margin-right: 2em;
}
strong.carousel__description {
color: white;
}
.carousel_images{
{{carousel_display_style}}
}
@media (max-width: 767px){
.carousel_images{
width: 100%;
}
}
</style>
<article class="s-annc show-announcement">
<h1 class="s-annc__show-title">{{title}}</h1>
@ -51,7 +40,7 @@
<div class="s-annc__subtitle">{{subtitle_ann}}</div>
<div class="s-annc__post-body">{{body}}</div>
</section>
<div id="sub_anncs_list">{{sub_anncs_text}}</div>
<ul class="s-annc__related-wrap list-unstyled no-print">
<li class="s-annc__related-file">
<i class="fa fa-fw fa-paperclip"></i>
@ -69,169 +58,8 @@
</ul>
</article>
<div class="carousel_images">
<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>
{{carousel_html}}
{{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($) {
@ -250,110 +78,6 @@
// 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>

View File

@ -0,0 +1,32 @@
<div class="i-archive index-archive-5 index-archive-10">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="i-archive__list list-unstyled" id="index-archive-group" data-list="categories" data-level="0">
<h4 class="i-archive__category-title">{{category-title}}</h4>
<table class="i-items table table-bordered">
<thead class="thead row">
<tr>
<th class="col-sm-2 date-thead">{{serial_number-head}}</th>
<th class="col-sm-7 title-thead">{{title-head}}</th>
<th class="col-sm-3 file-thead">{{file-head}}</th>
</tr>
</thead>
<tbody class="tbody i-archive__category-list" data-list="archives" data-level="1">
<tr class="archive-items">
<td class="i-archive__serial_number col-sm-2">{{idx}}</td>
<td class="head col-sm-7">
{{archive-title}}
<span class="i-archive__status-wrap" data-list="statuses" data-level="2">
<span class="i-archive__status label status {{status-class}}">{{status}}</span>
</span>
</td>
<td class="i-archive__file-list col-sm-3" data-list="files" data-level="2">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</td>
</tr>
</tbody>
</div>
</table>
</div>
</div>

View File

@ -0,0 +1,34 @@
<div class="i-archive index-archive-9">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="i-archive__list list-unstyled" id="index-archive-group" data-list="categories" data-level="0">
<h4 class="i-archive__category-title">{{category-title}}</h4>
<table class="i-items table table-bordered">
<thead class="thead">
<tr>
<th class="col-sm-2 title-thead">{{serial_number-head}}</th>
<th class="col-sm-7 title-thead">{{title-head}}</th>
<th class="col-sm-3 file-thead">{{file-head}}</th>
</th>
</thead>
<tbody class="tbody" >
<span data-list="archives" data-level="1">
<span data-list="files" data-level="2">
<tr class="archive-items">
<td class="col-sm-2">
<span class="i-archive__serial_number">{{serial_number}}</span>
</td>
<td class="col-sm-7">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
</td>
<td class="col-sm-3">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</td>
</tr>
</span>
</span>
</tbody>
</table>
</div>
</div>

View File

@ -6,23 +6,23 @@
<h4 class="i-archive__category-title">{{category-title}}</h4>
<div class="i-items">
<div class="thead row">
<div class="col-sm-2 date-thead">上傳日期</div>
<div class="col-sm-3 title-thead">標題</div>
<div class="col-sm-2 date-thead">{{date-head}}</div>
<div class="col-sm-4 title-thead">{{title-head}}</div>
<div class="col-sm-3 description-thead">{{description-head}}</div>
<div class="col-sm-2 file-thead">檔案下載</div>
<div class="col-sm-3 file-thead">{{file-head}}</div>
</div>
<div class="tbody">
<div class="i-archive__category-list list-unstyled" data-list="archives" data-level="1">
<div class="archive-items clearfix">
<div class="date col-sm-2">{{created_at}}</div>
<div class="head col-sm-3">
<div class="head col-sm-4">
{{archive-title}}
<span class="i-archive__status-wrap" data-list="statuses" data-level="2">
<span class="i-archive__status label status {{status-class}}">{{status}}</span>
</span>
</div>
<div class="description col-sm-3" style="border-right: 0.05em solid #333;">{{description}}</div>
<div class="i-archive__file-list col-sm-2" data-list="files" data-level="2">
<div class="i-archive__file-list col-sm-3" data-list="files" data-level="2">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</div>
</div>
@ -34,11 +34,6 @@
</div>
<script>
if( window.location.href.indexOf('/en/') > -1 ) {
$('.date-thead').replaceWith('<div class="col-sm-2 date-thead-en">Updated At</div>')
$('.title-thead').replaceWith('<div class="col-sm-7 title-thead-en">Title</div>')
$('.file-thead').replaceWith('<div class="col-sm-3 file-thead-en">Download file</div>')
}
$(document).ready(function(){
if(window.innerWidth >= 768){
$(".archive-items .date").each(function(i,d){

View File

@ -6,16 +6,16 @@
<h4 class="i-archive__category-title">{{category-title}}</h4>
<div class="i-items">
<div class="thead row">
<div class="col-sm-2 date-thead">上傳日期</div>
<div class="col-sm-3 title-thead">標題</div>
<div class="col-sm-2 date-thead">{{date-head}}</div>
<div class="col-sm-4 title-thead">{{title-head}}</div>
<div class="col-sm-3 description-thead">{{description-head}}</div>
<div class="col-sm-2 file-thead">檔案下載</div>
<div class="col-sm-3 file-thead">{{file-head}}</div>
</div>
<div class="tbody">
<div class="i-archive__category-list list-unstyled" data-list="archives" data-level="1">
<div class="archive-items clearfix">
<div class="date col-sm-2">{{created_at}}</div>
<div class="head col-sm-3">
<div class="head col-sm-4">
<dl class="i-archive__file" data-list="files" data-level="2">
<div class="file-name">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
@ -26,7 +26,7 @@
</dl>
</div>
<div class="description col-sm-3">{{description}}</div>
<div class="i-archive__file-list col-sm-2" data-list="files" data-level="2">
<div class="i-archive__file-list col-sm-3" data-list="files" data-level="2">
<div class="file-item">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</div>
@ -37,12 +37,4 @@
</div>
</div>
</div>
</div>
<script>
if( window.location.href.indexOf('/en/') > -1 ) {
$('.date-thead').replaceWith('<div class="col-sm-2 date-thead-en">Updated At</div>')
$('.title-thead').replaceWith('<div class="col-sm-7 title-thead-en">Title</div>')
$('.file-thead').replaceWith('<div class="col-sm-3 file-thead-en">Download file</div>')
}
</script>
</div>

View File

@ -0,0 +1,30 @@
<div class="i-archive index-archive-9">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="i-archive__list list-unstyled" id="index-archive-group" data-list="categories" data-level="0">
<h4 class="i-archive__category-title">{{category-title}}</h4>
<table class="i-items table table-bordered">
<thead class="thead">
<tr>
<th class="col-sm-8 title-thead">{{title-head}}</th>
<th class="col-sm-4 file-thead">{{file-head}}</th>
</th>
</thead>
<tbody class="tbody" >
<span data-list="archives" data-level="1">
<span data-list="files" data-level="2">
<tr class="archive-items">
<td class="col-sm-8">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
</td>
<td class="col-sm-4">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</td>
</tr>
</span>
</span>
</tbody>
</table>
</div>
</div>

View File

@ -1 +1,94 @@
{"frontend":[{"filename":"archive_index1","name":{"zh_tw":"1. 列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )","en":"1. List (widget-title, category, filename, download link)"},"thumbnail":"thumb.png"},{"filename":"archive_index2","name":{"zh_tw":"2. 手風琴式列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )","en":"2. Accordion list (widget-title, category, filename, download link)"},"thumbnail":"thumb.png"},{"filename":"archive_index3","name":{"zh_tw":"3. 列表( 無檔案名稱 ) ( 模組標題, 類別標題, 下載連結 )","en":"3. List(no filename) (widget-title, category, download link)"},"thumbnail":"thumb.png"},{"filename":"archive_index4","name":{"zh_tw":"4. 手風琴式列表( 無檔案名稱 ( 模組標題, 類別標題, 下載連結 )","en":"4. Accordion list(no filename) (widget-title, category, download link)"},"thumbnail":"thumb.png"},{"filename":"archive_index7","name":{"zh_tw":"7. 表格列表 ( 模組標題, 類別標題, 檔案名稱, 檔案簡介, 下載連結 )","en":"7. Table list (widget-title, category, filename, download link)"},"thumbnail":"ar5.png"},{"filename":"archive_index8","name":{"zh_tw":"8. 表格列表 ( 模組標題, 檔案名稱, 檔案簡介, 下載連結 )","en":"8. Table list (widget-title, filename, download link)"},"thumbnail":"ar5.png"}],"widgets":[{"filename":"archive_widget1","name":{"zh_tw":"1. 列表 ( 模組標題, 類別標題, 檔案名稱, 下載頁面連結 )","en":"1. List (widget-title, category, link of download page)"},"thumbnail":"thumb.png"},{"filename":"archive_widget2","name":{"zh_tw":"2. 手風琴式列表 ( 模組標題, 類別標題, 下載頁面連結 )","en":"2. Accordion list (widget-title, category, link of download page)"},"thumbnail":"thumb.png"}]}
{
"frontend": [
{
"filename": "archive_index1",
"name": {
"zh_tw": "1. 列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )",
"en": "1. List (widget-title, category, filename, download link)"
},
"thumbnail": "thumb.png"
},
{
"filename": "archive_index2",
"name": {
"zh_tw": "2. 手風琴式列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )",
"en": "2. Accordion list (widget-title, category, filename, download link)"
},
"thumbnail": "thumb.png"
},
{
"filename": "archive_index3",
"name": {
"zh_tw": "3. 列表( 無檔案名稱 ) ( 模組標題, 類別標題, 下載連結 )",
"en": "3. List(no filename) (widget-title, category, download link)"
},
"thumbnail": "thumb.png"
},
{
"filename": "archive_index4",
"name": {
"zh_tw": "4. 手風琴式列表( 無檔案名稱 ( 模組標題, 類別標題, 下載連結 )",
"en": "4. Accordion list(no filename) (widget-title, category, download link)"
},
"thumbnail": "thumb.png"
},
{
"filename": "archive_index7",
"name": {
"zh_tw": "7. 表格列表 ( 模組標題, 類別標題, 上傳日期, 檔案名稱, 檔案簡介, 下載連結 )",
"en": "7. Table list (widget-title, category, Updated At, filename, download link)"
},
"thumbnail": "ar5.png"
},
{
"filename": "archive_index8",
"name": {
"zh_tw": "8. 表格列表 ( 模組標題, 上傳日期, 檔案名稱, 檔案簡介, 下載連結 )",
"en": "8. Table list (widget-title, Updated At, filename, download link)"
},
"thumbnail": "ar5.png"
},
{
"filename": "archive_index9",
"name": {
"zh_tw": "9. 表格列表 - 簡約 ( 模組標題, 檔案名稱, 下載連結 )",
"en": "9. Table list - Simple (widget-title, download link)"
},
"thumbnail": "ar9.png"
},
{
"filename": "archive_index10",
"name": {
"zh_tw": "10. 表格列表 ( 模組標題, 類別標題, 編號, 檔案名稱, 下載連結 )",
"en": "10. Table list (widget-title, category, Serial Number, filename, download link)"
},
"thumbnail": "ar5.png"
},
{
"filename": "archive_index11",
"name": {
"zh_tw": "11. 表格列表 - 簡約 - 展開檔案 ( 模組標題, 類別標題, 編號, 檔案名稱, 下載連結 )",
"en": "11. Table list - Simple - Unfold Files (widget-title, category, Serial Number, filename, download link)"
},
"thumbnail": "ar9.png"
}
],
"widgets": [
{
"filename": "archive_widget1",
"name": {
"zh_tw": "1. 列表 ( 模組標題, 類別標題, 檔案名稱, 下載頁面連結 )",
"en": "1. List (widget-title, category, link of download page)"
},
"thumbnail": "thumb.png"
},
{
"filename": "archive_widget2",
"name": {
"zh_tw": "2. 手風琴式列表 ( 模組標題, 類別標題, 下載頁面連結 )",
"en": "2. Accordion list (widget-title, category, link of download page)"
},
"thumbnail": "thumb.png"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB