Adjust templates.

This commit is contained in:
BoHung Chiu 2022-12-26 10:53:06 +08:00
parent 40b9c501df
commit 1eecd099f4
3 changed files with 66 additions and 1 deletions

View File

@ -48,5 +48,11 @@
$v.css('display', 'none');
}
})
$(document).ready(function(){
var location_id = window.location.hash;
if(location_id && location_id != '' && location_id.length > 1){
$(location_id).addClass('in');
}
})
</script>
</div>

View File

@ -0,0 +1,50 @@
<div class="i-archive index-archive-2 index-archive-14">
<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" data-list="archives" data-level="1">
<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;">
{{archive-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">
<ul class="i-archive-files-list" data-list="files" data-level="2">
<li>
<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>
</li>
</ul>
</div>
</div>
</div>
{{link_to_edit}}
</div>
<style>
.index-archive-12 dt.i-archive-item-list{
float: none;
width: auto;
}
</style>
<script>
$('.index-archive-12 .panel-heading').each(function(i, v){
var $v = $(v);
if($v.text().trim() == ''){
$v.css('display', 'none');
}
})
$(document).ready(function(){
var location_id = window.location.hash;
if(location_id && location_id != '' && location_id.length > 1){
$(location_id).addClass('in');
}
})
</script>
</div>

View File

@ -117,7 +117,16 @@
},
"force_cover": "true",
"thumbnail": "ar-tab1.png"
}
},
{
"filename" : "archive_index14",
"name" : {
"zh_tw" : "14. 手風琴式列表 - 有下拉 - 針對各筆資料 ( 模組標題, 標題, 檔案名稱, 下載連結 )",
"en" : "14. Accordion list - with drop down - For every data (widget-title, title, filename, download link)"
},
"force_cover": "true",
"thumbnail" : "ar2.png"
}
],
"widgets" : [
{