ui: Fix base url mess
This commit is contained in:
parent
74d77dce9f
commit
17839474e1
23 changed files with 66 additions and 43 deletions
|
|
@ -40,7 +40,7 @@
|
|||
message = "";
|
||||
|
||||
const response = await fetch(
|
||||
"/submit/" + exercice.id,
|
||||
"submit/" + exercice.id,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify(responses),
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
hinterror = "";
|
||||
|
||||
const response = await fetch(
|
||||
"/openhint/" + exercice.id,
|
||||
"openhint/" + exercice.id,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify({ id: hint.id }),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
wcsubmitted = true;
|
||||
|
||||
const response = await fetch(
|
||||
"/wantchoices/" + exercice_id,
|
||||
"wantchoices/" + exercice_id,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify({ id: Number(flag.id) }),
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
</Container>
|
||||
</div>
|
||||
<Container class="d-flex justify-content-between p-1" style="max-height: inherit">
|
||||
<a href="/">
|
||||
<img src="/img/fic.png" alt="Forum International de la Cybersécurité" class="h-100">
|
||||
<a href=".">
|
||||
<img src="img/fic.png" alt="Forum International de la Cybersécurité" class="h-100">
|
||||
</a>
|
||||
<HeaderPartners />
|
||||
</Container>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<Collapse {isOpen} navbar expand="md" on:update={handleUpdate}>
|
||||
<Nav navbar>
|
||||
<NavItem>
|
||||
<NavLink href="/">
|
||||
<NavLink href=".">
|
||||
<Icon name="box-seam" />
|
||||
Accueil
|
||||
</NavLink>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<NavTags />
|
||||
{#if $settings && $settings.end - $settings.start >= 0}
|
||||
<NavItem>
|
||||
<NavLink href="/rank">
|
||||
<NavLink href="rank">
|
||||
<Icon name="sort-down" />
|
||||
Classement
|
||||
</NavLink>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
{/if}
|
||||
<HeaderIssues />
|
||||
<NavItem>
|
||||
<NavLink href="/rules">
|
||||
<NavLink href="rules">
|
||||
<Icon name="signpost-split" />
|
||||
Aide
|
||||
</NavLink>
|
||||
|
|
@ -91,11 +91,11 @@
|
|||
{/if}
|
||||
<NavItem class="ms-2">
|
||||
{#if !$my}
|
||||
<Badge href="/register" color="warning">
|
||||
<Badge href="register" color="warning">
|
||||
Inscription
|
||||
</Badge>
|
||||
{:else if $my.team_id && $teams}
|
||||
<Badge href="/edit" style="background-color: {$teams[$my.team_id].color} !important; color: {$teams[$my.team_id].color};">
|
||||
<Badge href="edit" style="background-color: {$teams[$my.team_id].color} !important; color: {$teams[$my.team_id].color};">
|
||||
<span class="teamname">{$my.name}</span>
|
||||
</Badge>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@
|
|||
<div class="d-flex h-100 justify-content-center align-items-center">
|
||||
<ButtonGroup size="lg">
|
||||
<a
|
||||
href="/"
|
||||
href="."
|
||||
class="btn btn-light"
|
||||
>
|
||||
<Icon name="ui-checks-grid" />
|
||||
Accueil
|
||||
</a>
|
||||
<a
|
||||
href="/rank"
|
||||
href="rank"
|
||||
class="btn btn-light"
|
||||
>
|
||||
<Icon name="sort-down" />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
{#if $issues.length}
|
||||
<NavItem>
|
||||
<NavLink href="/issues">
|
||||
<NavLink href="issues">
|
||||
<Icon name="bug" />
|
||||
Problèmes
|
||||
<Badge color={badge_color}>{$issues_nb_responses}</Badge>
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@
|
|||
|
||||
let partners = [
|
||||
{
|
||||
img: '/img/epita.png',
|
||||
img: 'img/epita.png',
|
||||
alt: 'Epita',
|
||||
href: 'https://www.epita.fr/',
|
||||
},
|
||||
{
|
||||
img: '/img/srs.png',
|
||||
img: 'img/srs.png',
|
||||
alt: 'Laboratoire SRS Épita',
|
||||
href: 'https://srs.epita.fr/',
|
||||
},
|
||||
{
|
||||
img: '/img/comcyber.png',
|
||||
img: 'img/comcyber.png',
|
||||
alt: 'Réserves de cyberdéfense',
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<div>
|
||||
{#each Object.keys($tags).sort() as itag, index}
|
||||
{#if filter === "" || itag.toLowerCase().indexOf(filter.toLowerCase()) >= 0}
|
||||
<DropdownItem href="/tags/{itag}">
|
||||
<DropdownItem href="tags/{itag}">
|
||||
#{itag}
|
||||
<Badge>
|
||||
{#if $my && $my.team_id}{$tags[itag].solved}/{/if}{$tags[itag].count}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<DropdownMenu class="niceborder" end>
|
||||
<div>
|
||||
{#each Object.keys($themes) as th, index}
|
||||
<DropdownItem href="/{$themes[th].urlid}">
|
||||
<DropdownItem href="{$themes[th].urlid}">
|
||||
{$themes[th].name}
|
||||
{#if $max_solved > 1 && $themes[th].solved == $max_solved}
|
||||
<Badge color="danger">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
const response = await fetch('/chname', {
|
||||
const response = await fetch('chname', {
|
||||
method: "POST",
|
||||
body: JSON.stringify({newName: newTeamName}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
{/if}
|
||||
</strong>
|
||||
{:else if $my && $my.exercices[k]}
|
||||
<a href="/{theme.urlid}/{theme.exercices[k].urlid}" class:text-success={$my.exercices[k].solved}>
|
||||
<a href="{theme.urlid}/{theme.exercices[k].urlid}" class:text-success={$my.exercices[k].solved}>
|
||||
{theme.exercices[k].title}
|
||||
{#if theme.exercices[k].curcoeff > 1.0}
|
||||
<Icon name="gift" aria-hidden="true" />
|
||||
|
|
|
|||
Reference in a new issue