Files
kupshop/web/templates/koza/page/page.competition.tpl
2025-08-02 16:30:27 +02:00

55 lines
1.5 KiB
Smarty

{extends "index.tpl"}
{block "content"}
<div class="html-page html-page-competition">
{$pageBlocks = $body.page.blocks}
{$pageBlocks[0].content nofilter}
<div id="years">
{foreach $pageBlocks as $block}
{if $block@first or !$block.name}{continue}{/if}
<a href="#{$block@index}">{$block.name}</a>
{/foreach}
</div>
<div id="awards">
{foreach $pageBlocks as $block}
{if $block@first or !$block.name}{continue}{/if}
<div class="year" id="{$block@index}">
<div class="yearDate">{$block.name}</div>
<div>
{$block.content nofilter}
</div>
</div>
{/foreach}
</div>
{get_photos assign="photos" type="pages" id=$body.page.id}
{if $photos|count}
<div class="row">
{foreach $photos as $key => $photo}
<div class="col-md-3">
<a href="{get_photo photo=$photo.img size=0}" class="thumbnail" rel="gallery">
<img src="{get_photo photo=$photo.img size=4}" alt="{$photo.img.descr}" class="img-responsive">
</a>
</div>
{/foreach}
</div>
{/if}
</div>
{/block}
<script>
{block onready append}
$('#years').on('click', 'a', function() {
var el = $(this).attr('href');
$('html, body').animate({
scrollTop: $(el).offset().top,
}, 500);
return false;
});
{/block}
</script>