Skip to content

Commit

Permalink
⚡ Chore: code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Oct 13, 2024
1 parent 581466f commit 39ccc51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.13-9471b94b" -}}
{{- .Scratch.Set "version" "v0.3.13-581466fd" -}}
{{- .Scratch.Set "this" dict -}}

{{- partial "init/detection-env.html" . -}}
Expand Down
14 changes: 8 additions & 6 deletions layouts/partials/single/collection-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
{{- range $key, $page := $pages -}}
{{- $capitalizeTitles := $page.Param "capitalizeTitles" -}}
{{- $title := cond $capitalizeTitles (title $page.LinkTitle) $page.LinkTitle -}}
{{- if $page.LinkTitle | eq $.LinkTitle -}}
{{- $currentKey = $key -}}
<li class="collection-item"><span class="active" title="{{ $title }}">{{ $title }}</span></li>
{{- else }}
<li class="collection-item"><a href="{{ $page.RelPermalink }}" title="{{ $title }}">{{ $title }}</a></li>
{{- end }}
<li class="collection-item">
{{- if $.Eq $page -}}
{{- $currentKey = $key -}}
<span class="active" title="{{ $title }}">{{ $title }}</span>
{{- else -}}
<a href="{{ $page.RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
{{- end -}}
</li>
{{- end -}}
</ul>
<div class="collection-nav-simple">
Expand Down

0 comments on commit 39ccc51

Please sign in to comment.