Hide SRS related stuff outside of srs.nemunai.re

This commit is contained in:
nemunaire 2022-08-02 11:59:53 +02:00
parent 9170607b0f
commit 58343c7be0
2 changed files with 15 additions and 7 deletions

View File

@ -12,8 +12,6 @@
%svelte.head%
</head>
<body>
<div style="position: fixed; bottom: 20px; right: 20px; z-index: -1; background-image: url('img/srstamps.png'); background-size: cover; width: 125px; height: 125px;">
</div>
<div id="svelte">%svelte.body%</div>
</body>
</html>

View File

@ -60,16 +60,24 @@
refresh_auth();
});
}
let isSRS = false;
$: {
isSRS = window.location.host === 'srs.nemunai.re' || ($user && ($user.groups.includes('ing-srs') || $user.groups.includes('teachers')))
}
</script>
<svelte:head>
<title>SRS: MCQ and others courses related stuff</title>
<title>ЕРІТА: MCQ and others courses related stuff</title>
</svelte:head>
{#if isSRS}
<div style="position: fixed; bottom: 20px; right: 20px; z-index: -1; background-image: url('img/srstamps.png'); background-size: cover; width: 125px; height: 125px;"></div>
{/if}
<nav class="navbar navbar-expand-sm navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href=".">
SRS
ЕРІТА
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#loggedMenu" aria-controls="loggedMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
@ -80,9 +88,11 @@
<li class="nav-item">
<a class="nav-link" href="adlin" target="_self">AdLin</a>
</li>
<li class="nav-item">
<a class="nav-link" href="fic" target="_self">FIC</a>
</li>
{#if isSRS}
<li class="nav-item">
<a class="nav-link" href="fic" target="_self">FIC</a>
</li>
{/if}
<li class="nav-item">
<a class="nav-link" class:active={rroute === 'surveys'} href="surveys">
Questionnaires