ui: Use logos from challenge.info

This commit is contained in:
nemunaire 2022-05-31 19:11:28 +02:00
commit fafb778c9d
2 changed files with 12 additions and 19 deletions

View file

@ -17,6 +17,7 @@
Row,
} from 'sveltestrap';
import { challengeInfo } from '../stores/challengeinfo.js';
import { my } from '../stores/my.js';
import { teams } from '../stores/teams.js';
import { settings, time } from '../stores/settings.js';
@ -42,7 +43,11 @@
</div>
<Container class="d-flex justify-content-between p-1" style="max-height: inherit">
<a href="." style="max-width: 50%">
<img src="img/fic.png" alt="Forum International de la Cybersécurité" class="h-100"><img src="img/ec2.png" alt="European Cyber Cup" class="h-100 d-none d-md-inline ms-2">
{#if $challengeInfo && $challengeInfo.main_logo}
{#each $challengeInfo.main_logo as logo, i}
<img src={logo} alt={'Logo principal #' + i} class={'h-100' + (i > 0?' d-none d-md-inline ms-2':'')}>
{/each}
{/if}
</a>
<HeaderPartners />
</Container>

View file

@ -4,28 +4,15 @@
CarouselItem,
} from 'sveltestrap';
let partners = [
{
img: 'img/epita.png',
alt: 'Epita',
href: 'https://www.epita.fr/',
},
{
img: 'img/srs.png',
alt: 'Laboratoire SRS Épita',
href: 'https://srs.epita.fr/',
},
{
img: 'img/comcyber.png',
alt: 'Réserves de cyberdéfense',
},
];
import { challengeInfo } from '../stores/challengeinfo.js';
let activePartner = 0;
</script>
<Carousel items={partners} bind:activeIndex={activePartner} ride="carousel" pause="hover" interval={25000}>
{#if $challengeInfo && $challengeInfo.partners}
<Carousel items={$challengeInfo.partners} bind:activeIndex={activePartner} ride="carousel" pause="hover" interval={25000}>
<div class="carousel-inner h-100">
{#each partners as partner, index}
{#each $challengeInfo.partners as partner, index}
<CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end">
{#if partner.href}
<a href="{partner.href}" target="_blank" class="h-100">
@ -38,3 +25,4 @@
{/each}
</div>
</Carousel>
{/if}