Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
yequari | 0c0f9e1ce9 |
|
@ -51,3 +51,7 @@ menu:
|
||||||
class: email
|
class: email
|
||||||
url: mailto:yequari@32bit.cafe
|
url: mailto:yequari@32bit.cafe
|
||||||
weight: 30
|
weight: 30
|
||||||
|
caches:
|
||||||
|
getresource:
|
||||||
|
dir: :cacheDir/:project
|
||||||
|
maxAge: 0
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
---
|
---
|
||||||
title: "Now"
|
title: "Now"
|
||||||
date: 2023-04-17T15:00:46-07:00
|
date: 2023-04-17T15:00:46-07:00
|
||||||
|
layout: now
|
||||||
---
|
---
|
||||||
# Now
|
|
||||||
|
|
||||||
One day this page will pull some info from APIs to create a more interesting page but for now I just manually update it as needed.
|
One day this page will pull some info from APIs to create a more interesting page but for now I just manually update it as needed.
|
||||||
|
|
||||||
**Games I'm playing**: Cyberpunk 2077, Honkai Star Rail, Baldur's Gate 3
|
**Games I'm playing**: Cyberpunk 2077, Honkai Star Rail, Baldur's Gate 3
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>Now</h1>
|
||||||
|
{{ $data := dict }}
|
||||||
|
{{ $url := "http://localhost:8000/v1/now" }}
|
||||||
|
{{ with resources.GetRemote $url }}
|
||||||
|
{{ with .Err }}
|
||||||
|
{{ errorf "%s" . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $data = .Content | transform.Unmarshal }}
|
||||||
|
{{ $data.SummonerName }} -- {{ $data.SummonerLvl }}
|
||||||
|
{{ range $data.RankedMatchs }}
|
||||||
|
<p>
|
||||||
|
{{ .Champion }} - {{ if .Win }} Victory {{ else }} Defeat {{ end }} - {{ .Kills }}/{{ .Deaths }}/{{ .Assists }}
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "Unable to get remote resource %q" $url }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue