add structure for api queries
This commit is contained in:
parent
c608a13433
commit
c7bcf4383d
2 changed files with 14 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
{{ partial "body/gang.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer"}}
|
||||
|
|
|
|||
13
themes/basspistol2025/layouts/partials/body/gang.html
Normal file
13
themes/basspistol2025/layouts/partials/body/gang.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{/* prebuild/layouts/index.html */}}
|
||||
{{ $url := "https://s.basspistol.org/api/pinned-users" }}
|
||||
{{ $opts := dict
|
||||
"method" "post"
|
||||
"body" `{"complete": true}`
|
||||
"headers" (dict "Content-Type" "application/json")
|
||||
}}
|
||||
{{ with resources.GetRemote $url $opts }}
|
||||
{{ $monsters := unmarshal .Content }}
|
||||
{{ range $monsters }}
|
||||
I love {{ .username }} <br />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue