-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.cshtml
41 lines (40 loc) · 1.59 KB
/
index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Description: => Context.GetString("SiteDescription")
ArchiveSources: => GetString("PostSources")
ArchiveFilter: => GetBool("IsPost")
ArchiveDestination: >
=> GetInt("Index") <= 1 ? $"index.html" : $"page/{GetInt("Index")}.html"
ArchivePageSize: 3
ArchiveOrderKey: Published
ArchiveOrderDescending: true
ArchiveTitle: => GetString("Title")
---
<div class="container-sm-height">
<div class="row row-sm-height">
<div class="col-md-6 right-border col-sm-height">
@Html.Partial("/_posts.cshtml", Document)
</div>
<div class="col-md-4 mt-4 mt-md-0 col-sm-height sidebar">
@{
IDocument[] tags = Outputs.Get("tags/index.html")?.GetChildren().OrderByDescending(x => x.GetChildren().Count()).Take(10).ToArray() ?? Array.Empty<IDocument>();
if (tags.Length > 0)
{
<div>
<h5>Tags</h5>
@foreach (IDocument tag in Outputs.Get("tags/index.html").GetChildren().OrderByDescending(x => x.GetChildren().Count()).Take(10))
{
string postCount = tag.GetChildren().Count().ToString();
<a href="@Context.GetLink(tag)" class="badge text-bg-light"> @tag.GetTitle() (@postCount)</a>
}
<div class="mt-3">
<div class="float-sm-end">
<a class="btn btn-sm btn-primary" href='@Context.GetLink(Outputs.Get("tags/index.html"))' role="button">All Tags <i class="fas fa-angle-double-right"></i></a>
</div>
<div class="clearfix"></div>
</div>
</div>
}
}
@Html.Partial("/_sidebar.cshtml")
</div>
</div>
</div>