Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

[U] optimize style selection logic #1

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
<li><a class="placeholder"> </a></li>

<li><a href="https://oau.edu.kg" class="notcurrent">Events</a></li>
{{ if eq .Site.Title "Trans in Academia! 文章资料库" }}
<li><a href="https://lib.oau.edu.kg" class="current">Library</a></li>
<li><a href="https://uniguide.oau.edu.kg" class="notcurrent">UniGuide</a></li>
{{ end }}

{{ if eq .Site.Title "Transgender University Guidance" }}
<li><a href="https://lib.oau.edu.kg" class="notcurrent">Library</a></li>
<li><a href="https://uniguide.oau.edu.kg" class="current">UniGuide</a></li>
{{ $libClass := "notcurrent" }}
{{ $guideClass := "notcurrent" }}

{{ if eq .Site.Title "Trans in Academia! 文章资料库" }}
{{ $libClass = "current" }}
{{ else if or (eq .Site.Title "Transgender University Guidance") (eq .Site.Title "跨性别选校手册") (eq .Site.Title "跨性別選校手冊") }}
{{ $guideClass = "current" }}
{{ end }}

<li><a href="https://lib.oau.edu.kg" class="{{ $libClass }}">Library</a></li>
<li><a href="https://uniguide.oau.edu.kg" class="{{ $guideClass }}">UniGuide</a></li>

<button onclick="toggle()">👁</button>
</div>
Expand Down