ui: Prefix $FILES$ by base path

This commit is contained in:
nemunaire 2022-06-10 19:43:10 +02:00
parent 4cce95245e
commit 01a9bb2e94
3 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,6 @@
<script> <script>
import { base } from '$app/paths';
import { import {
CardBody, CardBody,
Icon, Icon,
@ -8,7 +10,7 @@
</script> </script>
<CardBody class="text-indent ratio ratio-16x9"> <CardBody class="text-indent ratio ratio-16x9">
<iframe type="text/html" src="{uri.replace('$FILES$','/resolution')}" class="embed-responsive-item" title="Vidéo de résolution"> <iframe type="text/html" src="{uri.replace('$FILES$', base+'/resolution')}" class="embed-responsive-item" title="Vidéo de résolution">
Regardez la vidéo de résolution de ce défi&nbsp;: <a href="{uri.replace('$FILES$','/resolution')}">{uri.replace('$FILES$','/resolution')}</a>. Regardez la vidéo de résolution de ce défi&nbsp;: <a href="{uri.replace('$FILES$',base+'/resolution')}">{uri.replace('$FILES$',base+'/resolution')}</a>.
</iframe> </iframe>
</CardBody> </CardBody>

View File

@ -1,4 +1,6 @@
<script> <script>
import { base } from '$app/paths';
import { import {
Badge, Badge,
Button, Button,
@ -45,7 +47,7 @@
<a href="." style="max-width: 50%"> <a href="." style="max-width: 50%">
{#if $challengeInfo && $challengeInfo.main_logo} {#if $challengeInfo && $challengeInfo.main_logo}
{#each $challengeInfo.main_logo as logo, i} {#each $challengeInfo.main_logo as logo, i}
<img src={logo.replace('$FILES$', '/files/')} alt={'Logo principal #' + i} class={'h-100' + (i > 0?' d-none d-md-inline ms-2':'')}> <img src={logo.replace('$FILES$', base + '/files/')} alt={'Logo principal #' + i} class={'h-100' + (i > 0?' d-none d-md-inline ms-2':'')}>
{/each} {/each}
{/if} {/if}
</a> </a>

View File

@ -1,4 +1,6 @@
<script> <script>
import { base } from '$app/paths';
import { import {
Carousel, Carousel,
CarouselItem, CarouselItem,
@ -16,10 +18,10 @@
<CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end"> <CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end">
{#if partner.href} {#if partner.href}
<a href="{partner.href}" target="_blank" class="h-100"> <a href="{partner.href}" target="_blank" class="h-100">
<img src={partner.img.replace('$FILES$', '/files')} class="h-100" alt={partner.alt}> <img src={partner.img.replace('$FILES$', base + '/files')} class="h-100" alt={partner.alt}>
</a> </a>
{:else} {:else}
<img src={partner.img.replace('$FILES$', '/files')} class="h-100" alt={partner.alt}> <img src={partner.img.replace('$FILES$', base + '/files')} class="h-100" alt={partner.alt}>
{/if} {/if}
</CarouselItem> </CarouselItem>
{/each} {/each}