diff options
Diffstat (limited to 'www/layouts/home.html')
-rw-r--r-- | www/layouts/home.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/www/layouts/home.html b/www/layouts/home.html new file mode 100644 index 0000000..38f7604 --- /dev/null +++ b/www/layouts/home.html @@ -0,0 +1,78 @@ +{{ define "head"}} + {{ partial "css.html" "res/css/home.css" }} + {{ partial "css.html" "res/css/article.css" }} +{{ end }} + +{{ define "friend" }} + {{ $gh_url := printf "https://github.com/%s" .github}} + <div class="friend"> + <a rel="noopener noreferrer" href="{{ or .url $gh_url }}"> + <img class="friend-avatar" alt="Friend {{.name}}'s avatar" src="{{.avatar}}" width="80" + height="80" /><br />{{.name}}</a> + <a rel="noopener noreferrer" href="{{ $gh_url }}"> + {{- with resources.Get "res/img/gh.png" -}} + <img class="friend-github" src="{{ .RelPermalink }}" /> + {{- end -}} + </a><br /> + {{ if .tag }} + <span class="friend-tag">{{ .tag }}</span> + {{ end }} + </div> +{{ end }} + +{{ define "content"}} + <img id="avatar" src="/avatar.png" alt="My avatar" width="80" height="80" /> + <h1 id="title">Hello! This is <code>crupest</code> !</h1> + <hr /> + <section> + <p>Welcome to my home page! Nice to meet you here! 🥰</p> + <p>Feel free to contact me via my email address <a href="mailto:crupest@crupest.life">crupest@crupest.life</a>, + or just create an issue in any of my <a rel="noopener noreferrer" href="https://github.com/crupest">GitHub</a> + repos. I love talking with people a lot.</p> + <div id="links" class="mono-link"> + goto: + <ul> + <li><a href="{{ absURL "/git/" }}">git</a></li> + {{ with .GetPage "/notes" }} + <li><a href="{{ .RelPermalink }}">notes</a></li> + {{ end }} + {{ with .GetPage "/notes/hurd" }} + <li><a href="{{ .RelPermalink }}">hurd</a></li> + {{ end }} + {{ with .GetPage "/notes/cheat-sheet" }} + <li><a href="{{ .RelPermalink }}">cheat-sheet</a></li> + {{ end }} + </ul> + </div> + </section> + <hr/> + {{ with .GetPage "/posts" }} + <section id="recent-posts"> + <h2>Recent Posts <a class="mono-link" href="{{ .RelPermalink }}">(all)</a></h2> + {{ partial "preview/posts.html" (dict + "h" "h3" + "pages" (.RegularPages.ByDate.Reverse.Limit 3)) + }} + </section> + {{ end }} + <hr/> + <section> + <h2 id="friends">My Friends <small>(more links are being collected ...)</small></h2> + <div id="friends-container"> + {{ block "friend" dict + "name" "wsm" + "avatar" "https://avatars.githubusercontent.com/u/74699943?v=4" + "github" "wushuming666" + }} + {{ end }} + {{ block "friend" dict + "name" "hsz" + "url" "https://www.hszsoft.com" + "avatar" "https://avatars.githubusercontent.com/u/63097618?v=4" + "github" "hszSoft" + "tag" "随性の程序员" + }} + {{ end }} + </div> + </section> +{{ end }} |