-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,9 @@ other = "专栏" | |
[settings] | ||
other = "设置" | ||
|
||
[stats] | ||
other = "统计" | ||
|
||
[table_of_contents] | ||
other = "目录" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,9 @@ other = "专栏" | |
[settings] | ||
other = "设置" | ||
|
||
[stats] | ||
other = "统计" | ||
|
||
[table_of_contents] | ||
other = "目录" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,9 @@ other = "專欄" | |
[settings] | ||
other = "設置" | ||
|
||
[stats] | ||
other = "統計" | ||
|
||
[table_of_contents] | ||
other = "目錄" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,9 @@ other = "專欄" | |
[settings] | ||
other = "設置" | ||
|
||
[stats] | ||
other = "統計" | ||
|
||
[table_of_contents] | ||
other = "目錄" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,9 @@ other = "專欄" | |
[settings] | ||
other = "設置" | ||
|
||
[stats] | ||
other = "統計" | ||
|
||
[table_of_contents] | ||
other = "目錄" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<div class="search-sidebar position-sticky px-2" style="top: 84px"> | ||
{{- partial "hooks/search/sidebar-begin" . }} | ||
{{- partial "sidebar/stats" . }} | ||
{{- partial "hooks/search/sidebar-end" . }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{- $icons := dict | ||
"authors" "user" | ||
"tags" "tags" | ||
"series" "columns" | ||
"categories" "folder" | ||
}} | ||
<div class="accordion stats"> | ||
<div class="accordion-item card row component"> | ||
<div class="accordion-header card-header border-0" id="stats-header"> | ||
<a class="accordion-button d-lg-none mb-2 collapsed shadow-none p-0 bg-transparent text-surface" type="button" data-bs-toggle="collapse" data-bs-target="#stats" aria-expanded="false" aria-controls="stats"> | ||
{{ i18n "stats" }} | ||
</a> | ||
</div> | ||
<div class="card-body collapse accordion-collapse accordion-body d-lg-block" id="stats" aria-labelledby="stats-header"> | ||
<div class="row row-cols-5"> | ||
<a class="stat col d-flex flex-column align-items-center" title="{{ i18n "posts" }}" href="{{ absURL "/" }}"> | ||
<i class="stat-icon fas fa-fw fa-2x fa-file-alt mb-2"></i> | ||
<span class="stat-count">{{ len $.Site.RegularPages }}</span> | ||
</a> | ||
{{- range $key, $value := $.Site.Taxonomies }} | ||
<a class="stat col d-flex flex-column align-items-center" title="{{ i18n $key }}" href="{{ absLangURL (urlize $key) }}"> | ||
<i class="stat-icon fas fa-fw fa-2x fa-{{ index $icons $key }} mb-2"></i> | ||
<span class="stat-count">{{ len $value.ByCount }}</span> | ||
</a> | ||
{{- end }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |