AsiaV2c/modules/archive/archive_index7.html.erb

60 lines
2.5 KiB
Plaintext

<div class="i-archive index-archive-5">
<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>
<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-3 description-thead">{{description-head}}</div>
<div class="col-sm-2 file-thead">檔案下載</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">
{{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">
<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>
</div>
</div>
</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>')
}
$(document).ready(function(){
if(window.innerWidth >= 768){
$(".archive-items .date").each(function(i,d){
$(d).parent().eq(0).children().css("min-height",$(d).parent().height());
})
}else{
$(".archive-items >").css("min-height","");
}
})
$(window).resize(function(){
if(window.innerWidth >= 768){
$(".archive-items .date").each(function(i,d){
$(d).parent().eq(0).children().css("min-height",$(d).parent().height());
})
}else{
$(".archive-items >").css("min-height","");
}
})
</script>