mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-06-30 23:12:16 +02:00
Update: hidden uninotes
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
<script>
|
||||
(function () {
|
||||
// Hide UniNotes menu item for everyone except hyzen
|
||||
document.querySelectorAll('.menu__item').forEach(function (li) {
|
||||
var a = li.querySelector('a');
|
||||
if (a && a.getAttribute('href') === '/uninotes/') {
|
||||
li.classList.add('menu__item--uninotes');
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var btn = document.getElementById('theme-toggle');
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
(function(){
|
||||
var t = localStorage.getItem('theme');
|
||||
if (t) { document.documentElement.setAttribute('data-theme', t); }
|
||||
if (localStorage.getItem('f4_username') === 'hyzen') {
|
||||
document.documentElement.classList.add('hyzen-user');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
@@ -38,4 +38,12 @@ $s.Page.Title $semesterName }}{{ $currentIdx = $i }}{{ end }} {{ end }}
|
||||
<a class="page-nav__next-link" href="{{ $next.Page.RelPermalink }}">{{ $next.Page.Title }} →</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
<script>
|
||||
(function () {
|
||||
if (localStorage.getItem('f4_username') !== 'hyzen') {
|
||||
window.location.replace('/login/?next=' + encodeURIComponent(window.location.pathname));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{ end }} {{ end }}
|
||||
|
||||
@@ -54,4 +54,12 @@ $d.code $subjectCode }}{{ $currentIdx = $i }}{{ end }} {{ end }}
|
||||
<a class="page-nav__next-link" href="{{ $nextPage.RelPermalink }}">{{ $nextCode }} →</a>
|
||||
{{ end }} {{ end }}
|
||||
</nav>
|
||||
<script>
|
||||
(function () {
|
||||
if (localStorage.getItem('f4_username') !== 'hyzen') {
|
||||
window.location.replace('/login/?next=' + encodeURIComponent(window.location.pathname));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{ end }} {{ end }} {{ end }} {{ end }}
|
||||
|
||||
@@ -126,4 +126,12 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
if (localStorage.getItem('f4_username') !== 'hyzen') {
|
||||
window.location.replace('/login/?next=' + encodeURIComponent(window.location.pathname));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
|
||||
@@ -49,4 +49,12 @@ gt (len $sortedUnitDicts) 1 }}
|
||||
<a class="page-nav__next-link" href="{{ $next.page.Params.uniturl }}">{{ $next.label }} →</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }} {{ end }} {{ end }} {{ partial "page/page-end.html" . }} {{ end }}
|
||||
{{ end }} {{ end }} {{ end }} {{ partial "page/page-end.html" . }}
|
||||
<script>
|
||||
(function () {
|
||||
if (localStorage.getItem('f4_username') !== 'hyzen') {
|
||||
window.location.replace('/login/?next=' + encodeURIComponent(window.location.pathname));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
@@ -75,4 +75,12 @@
|
||||
{{ if $hasLive }}</a>{{ else }}</div>{{ end }}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
if (localStorage.getItem('f4_username') !== 'hyzen') {
|
||||
window.location.replace('/login/?next=' + encodeURIComponent(window.location.pathname));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user