|
|
|
@ -144,7 +144,8 @@ |
|
|
|
$sr_cid = $vo['category_id'] ?? ($vo['category'][0]['id'] ?? 0); |
|
|
|
$sr_thumb = is_array($vo['thumbnail'] ?? null) ? ($vo['thumbnail']['url'] ?? '') : ''; |
|
|
|
$sr_url = hcUrl('detail/index', ['id' => $vo['id'], 'cid' => $sr_cid]); |
|
|
|
$sr_file = $vo['url'] ?? ''; |
|
|
|
$sr_file = trim((string)($vo['url'] ?? '')); |
|
|
|
$has_sr_file = $sr_file !== ''; |
|
|
|
$sr_title = $vo['title'] ?? ''; |
|
|
|
$sr_type_name = $vo['sr_tab_name'] ?? 'Content'; |
|
|
|
$sr_show_desc = ($sr_kind === 'news' || $sr_kind === 'content'); |
|
|
|
@ -161,11 +162,11 @@ |
|
|
|
</span> |
|
|
|
</button> |
|
|
|
{elseif $sr_kind == 'download' /} |
|
|
|
<a class="sr-item__media" href="{$sr_file}" target="_blank" rel="noopener" title="Preview"> |
|
|
|
<a class="sr-item__media{if !$has_sr_file} is-disabled{/if}" href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} target="_blank" rel="noopener" title="Preview"{else /} aria-disabled="true" tabindex="-1" onclick="return false;"{/if}> |
|
|
|
<img src="{$sr_thumb}" alt="" width="300" height="200" loading="lazy" /> |
|
|
|
</a> |
|
|
|
{elseif $sr_kind == 'announce' /} |
|
|
|
<a class="sr-item__media" href="{$sr_file}" target="_blank" rel="noopener"> |
|
|
|
<a class="sr-item__media{if !$has_sr_file} is-disabled{/if}" href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} target="_blank" rel="noopener"{else /} aria-disabled="true" tabindex="-1" onclick="return false;"{/if}> |
|
|
|
<img src="{$sr_thumb}" alt="" width="300" height="200" loading="lazy" /> |
|
|
|
</a> |
|
|
|
{else /} |
|
|
|
@ -202,9 +203,9 @@ |
|
|
|
{if $sr_kind == 'video'} |
|
|
|
{$sr_title} |
|
|
|
{elseif $sr_kind == 'download' /} |
|
|
|
<a href="{$sr_file}" target="_blank" rel="noopener" title="Preview">{$sr_title}</a> |
|
|
|
<a href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} target="_blank" rel="noopener" title="Preview"{else /} class="is-disabled" aria-disabled="true" tabindex="-1" onclick="return false;"{/if}>{$sr_title}</a> |
|
|
|
{elseif $sr_kind == 'announce' /} |
|
|
|
<a href="{$sr_file}" target="_blank" rel="noopener">{$sr_title}</a> |
|
|
|
<a href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} target="_blank" rel="noopener"{else /} class="is-disabled" aria-disabled="true" tabindex="-1" onclick="return false;"{/if}>{$sr_title}</a> |
|
|
|
{else /} |
|
|
|
<a href="{$sr_url}">{$sr_title}</a> |
|
|
|
{/if} |
|
|
|
@ -219,7 +220,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
{if $sr_kind == 'download'} |
|
|
|
<a class="sr-item__more sr-item__more--download" href="{$sr_file}" download="{$sr_title}"> |
|
|
|
<a class="sr-item__more sr-item__more--download{if !$has_sr_file} is-disabled{/if}" href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} download="{$sr_title}"{else /} aria-disabled="true" tabindex="-1" onclick="return false;"{/if}> |
|
|
|
<span>Download</span> |
|
|
|
<img src="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20d='M16.667%209.333H22V22H2V9.333h5.333'%20stroke='rgb(46,53,58)'%20stroke-linejoin='round'%20stroke-width='1.5'/%3e%3cpath%20d='M16%2014l-4%204-4-4M12%202v16'%20stroke='rgb(239,67,53)'%20stroke-width='1.5'/%3e%3c/svg%3e" alt="" width="20" height="20" /> |
|
|
|
</a> |
|
|
|
@ -231,7 +232,7 @@ |
|
|
|
</span> |
|
|
|
</a> |
|
|
|
{elseif $sr_kind == 'announce' /} |
|
|
|
<a class="sr-item__more" href="{$sr_file}" target="_blank" rel="noopener"> |
|
|
|
<a class="sr-item__more{if !$has_sr_file} is-disabled{/if}" href="{if $has_sr_file}{$sr_file}{else /}javascript:;{/if}"{if $has_sr_file} target="_blank" rel="noopener"{else /} aria-disabled="true" tabindex="-1" onclick="return false;"{/if}> |
|
|
|
<span>Explore more</span> |
|
|
|
<svg viewBox="0 0 16.502 6.66113" xmlns="http://www.w3.org/2000/svg" width="16.501953" height="6.661133" fill="none"> |
|
|
|
<path d="M0 2.83057L16 2.83057L16 3.83057L0 3.83057L0 2.83057ZM15.2929 3.33057L12.818 0.855693C12.62 0.657703 12.62 0.346575 12.818 0.148586C13.016 -0.0494041 13.3271 -0.0494046 13.5251 0.148585L16.3536 2.97701C16.5515 3.175 16.5515 3.48613 16.3536 3.68412L13.5251 6.51255C13.3271 6.71054 13.016 6.71054 12.818 6.51255C12.62 6.31456 12.62 6.00343 12.818 5.80544L15.2929 3.33057Z" fill="rgb(102,102,102)" fill-rule="nonzero" /> |
|
|
|
|