Fix: login/signup forms. Update: code formating

This commit is contained in:
hyzen
2026-06-04 23:38:05 +05:30
parent cb0d929f7a
commit 16255bb690
63 changed files with 1544 additions and 1146 deletions

View File

@@ -1,4 +1,5 @@
{{ define "main" }}
{{/* Get semester and subjectcode from child pages since _index.md doesn't carry taxonomy params */}}
{{ $semester := "" }}
{{ $subjectcode := "" }}
@@ -12,6 +13,7 @@
{{ $subjectcode = cond (reflect.IsSlice $raw) (index $raw 0) $raw }}
{{ end }}
{{ end }}
<nav class="uninotes-breadcrumbs breadcrumbs">
<a href="/uninotes/">UniNotes</a>
{{ if $semester }}
@@ -28,36 +30,32 @@
{{ end }}
<span>{{ .Params.unit | default .Title }}</span>
</nav>
<div class="uninotes-meta">
{{ with $semester }}<span class="uninotes-meta__pill">{{ . }}</span>{{ end }}
{{ with $subjectcode }}<span class="uninotes-meta__pill">{{ . }}</span>{{ end }}
</div>
<h1>{{ .Params.unit | default .Title }}</h1>
<p class="unit-choice__subtitle">Choose type:</p>
{{/* Check if self/live pages exist */}}
{{ $hasSelf := false }}
{{/* Check if a live page exists at the expected URL */}}
{{ $hasLive := false }}
{{ range .Pages }}
{{ if eq (lower .Params.notecategory) "self" }}{{ $hasSelf = true }}{{ end }}
{{ if eq (lower .Params.notecategory) "live" }}{{ $hasLive = true }}{{ end }}
{{ end }}
<div class="unit-choice__options">
{{ if $hasSelf }}
<a class="unit-choice__card unit-choice__card--self" href="{{ .RelPermalink }}self/">
{{ else }}
<div class="unit-choice__card unit-choice__card--self unit-choice__card--unavailable">
{{ end }}
<div class="unit-choice__icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" fill="currentColor">
<path d="M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"/>
</svg>
</div>
<div class="unit-choice__label">Self</div>
<div class="unit-choice__desc">
{{ if $hasSelf }}Self-study notes
{{ else }}Not available{{ end }}
</div>
{{ if $hasSelf }}</a>{{ else }}</div>{{ end }}
<div class="unit-choice__desc">Self-study notes</div>
</a>
{{ if $hasLive }}
<a class="unit-choice__card unit-choice__card--live" href="{{ .RelPermalink }}live/">
@@ -76,4 +74,5 @@
</div>
{{ if $hasLive }}</a>{{ else }}</div>{{ end }}
</div>
{{ end }}