ydu_confs_rwd/modules/archive/_archive_widget2.html.erb

34 lines
1.2 KiB
Plaintext
Executable File

<div class="widget-archive widget1">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<div class="panel-group" id="widget-archive-group" data-list="categories" data-level="0">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#widget-archive-group" href="#collapse" class="collapsed">
{{category-title}}
</a>
</h4>
</div>
<div id="collapse" class="panel-collapse collapse">
<div class="panel-body">
<ul class="widget-archive-item-group" data-list="archives" data-level="1">
<li class="widget-archive-item-list">
<a href="{{archive_url}}">{{archive-title}}</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<p class="more">
<a class="btn btn-sm btn-info" href="{{more_url}}">More</a>
</p>
</div>
<script>
for (var i = 0; i < $('.widget-archive.widget1 .panel-title').length; i++) {
$('.widget-archive.widget1 .panel-title:eq(' + i + ') .collapsed').attr('href', '#collapse' + i);
$('.widget-archive.widget1 .panel-collapse:eq(' + i + ')').attr('id', 'collapse' + i);
};
</script>