Skip to content

Commit

Permalink
update structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Wsine committed Nov 12, 2023
1 parent 182d4cc commit 16c5123
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 21 deletions.
3 changes: 3 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Hi friend 👋

Welcome to my blog! Here are something about life and productivity. Hope you enjoy~
5 changes: 5 additions & 0 deletions content/social.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Email: [[email protected]](mailto:[email protected])

Github: [@Wsine](https://github.com/Wsine)

Sspai: [@正弦定理](https://sspai.com/u/wsine/posts)
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>
{{ partial "header.html" . }}
{{ block "main" . }}{{ end }}
<br>
<div style="margin-bottom: 5rem"></div>
{{ partial "footer.html" . }}
</body>
</html>
Empty file removed layouts/_default/list.html
Empty file.
26 changes: 12 additions & 14 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{{ define "main" }}
<h2>Hi friend 👋</h2>
<p>
Welcome to my blog, here are something about life and productivity. hope you enjoy.
</p>

{{ range .Site.RegularPages.GroupByDate "2006" }}
<h3>{{ .Key }}</h3>
<table>
{{ range .Pages }}
<tr>
<td style="width: 20%">{{ .Date.Format "Jan 02" }}</td>
<td><a href="{{ .RelPermalink }}" style="text-decoration: none; color: inherit">{{ .Title }}</a></td>
</tr>
{{ end }}
</table>
<!-- Welcome contents -->
{{ .Content }}

<!-- Blog contents -->
<h2>Latest Articles</h2>
<ul>
{{ range (where .Site.RegularPages "Section" "posts").Limit 10 }}
<li>
<a href="{{ .RelPermalink }}" style="color: inherit">{{ .Title }}</a>
</li>
{{ end }}
</ul>
<a href="/posts" style="text-decoration: none">→ Read more...</a>

{{ end }}
5 changes: 5 additions & 0 deletions layouts/page/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ define "main" }}

{{ .Content }}

{{ end }}
5 changes: 2 additions & 3 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<header>
<h1><a href="/" style="color: inherit; text-decoration: none">Wsine's Blog</a></h1>
<nav>
<a href="mailto:[email protected]">Email</a> /
<a href="https://github.com/Wsine" target="_blank">Github</a> /
<a href="https://sspai.com/u/wsine/posts" target="_blank">Sspai</a> /
<a href="/">Home</a> /
<a href="/social">Social</a> /
<a href="/feed.xml">Subscribe</a>
</nav>
</header>
16 changes: 16 additions & 0 deletions layouts/posts/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ define "main" }}

{{ range (where .Site.RegularPages "Section" "posts").GroupByDate "2006" }}
<h3>{{ .Key }}</h3>
<ul>
{{ range .Pages }}
<li>
<span style="display: inline-block; width: 5rem">{{ .Date.Format "Jan 02" }}</span>
<a href="{{ .RelPermalink }}" style="color: inherit">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}


{{ end }}
5 changes: 2 additions & 3 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{{ define "main" }}

<h1 name="#top">{{ .Title }}</h1>
<p style="text-align: right"><b>{{ .Date.Format "02 Jan 2006" }}</b></p>
<p name="#top"><b>Posted on: {{ .Date.Format "2006 Jan 02" }}</b></p>

{{ .Content }}

<p style="text-align: right"><a href="#top">Back to Top</a></p>
<p style="text-align: right"><a href="#top">Back to Top</a></p>

{{ end }}

0 comments on commit 16c5123

Please sign in to comment.