Skip to content

Commit 45a18eb

Browse files
committed
Update index to 5 entries
1 parent 28ff9e7 commit 45a18eb

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

.vscode/statiq-blog.code-snippets

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,39 @@
5151
],
5252
"description": "Statiq blog post"
5353
},
54+
"Statiq Links of the Day"{
55+
"scope": "markdown",
56+
"prefix": "statiq-links-of-the-day",
57+
"body": [
58+
"Title: Links of the Day",
59+
"Published: $CURRENT_MONTH/$CURRENT_DATE/$CURRENT_YEAR",
60+
"IsPost: true",
61+
"Tags:",
62+
" - ${1:exampletag}",
63+
"Categories:",
64+
" - Links of the Day",
65+
"---",
66+
"# Links of the Day",
67+
"",
68+
"Summary",
69+
"- [Link 1](https://example.com)"
70+
],
71+
"description": "Statiq links of the day"
72+
},
5473
"Figure with Width": {
5574
"scope": "markdown",
5675
"prefix": "figure",
5776
"body": [
5877
"<?# Figure ${1:url} MaxWidth=${2:600} /?>"
5978
],
6079
"description": "Figure shortcode with width"
80+
},
81+
"Figure with Width and Description": {
82+
"scope": "markdown",
83+
"prefix": "figure-desc",
84+
"body": [
85+
"<?# Figure ${1:url} MaxWidth=${2:600} ?>${3:description}<?#/ Figure ?>"
86+
],
87+
"description": "Figure shortcode with width and description"
6188
}
62-
}
89+
}

input/index.cshtml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Description: => Context.GetString("SiteDescription")
2+
ArchiveSources: => GetString("PostSources")
3+
ArchiveFilter: => GetBool("IsPost")
4+
ArchiveDestination: >
5+
=> GetInt("Index") <= 1 ? $"index.html" : $"page/{GetInt("Index")}.html"
6+
ArchivePageSize: 5
7+
ArchiveOrderKey: Published
8+
ArchiveOrderDescending: true
9+
ArchiveTitle: => GetString("Title")
10+
---
11+
<div class="container-sm-height">
12+
<div class="row row-sm-height">
13+
<div class="col-md-6 right-border col-sm-height">
14+
@Html.Partial("/_posts.cshtml", Document)
15+
</div>
16+
<div class="col-md-4 mt-4 mt-md-0 col-sm-height sidebar">
17+
@{
18+
IDocument[] tags = Outputs.Get("tags/index.html")?.GetChildren().OrderByDescending(x => x.GetChildren().Count()).Take(10).ToArray() ?? Array.Empty<IDocument>();
19+
if (tags.Length > 0)
20+
{
21+
<div>
22+
<h5>Tags</h5>
23+
@foreach (IDocument tag in Outputs.Get("tags/index.html").GetChildren().OrderByDescending(x => x.GetChildren().Count()).Take(10))
24+
{
25+
string postCount = tag.GetChildren().Count().ToString();
26+
<a href="@Context.GetLink(tag)" class="badge text-bg-light"> @tag.GetTitle() (@postCount)</a>
27+
}
28+
<div class="mt-3">
29+
<div class="float-sm-end">
30+
<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>
31+
</div>
32+
<div class="clearfix"></div>
33+
</div>
34+
</div>
35+
}
36+
}
37+
38+
@Html.Partial("/_sidebar.cshtml")
39+
</div>
40+
</div>
41+
</div>

input/scss/_overrides.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
header.masthead {
2+
padding-top: 6rem;
3+
padding-bottom: 4rem;
4+
}

settings.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
SiteTitle: Hi! I'm nullforce
1+
SiteTitle: nullforce
2+
SiteDescription: Stuff that interests me
23
Copyright: Copyright © 2022-2024 nullforce. All rights reserved.
34

45
GenerateSearchIndex: true

0 commit comments

Comments
 (0)