Skip to content

Commit

Permalink
Clean up sponsor listing
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Jan 29, 2024
1 parent f04673e commit 69de7ca
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 142 deletions.
1 change: 1 addition & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ along the way.
{{% /row %}}

{{% support %}}
{{% sponsors %}}
1 change: 1 addition & 0 deletions content/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
```

{{% sponsors %}}
35 changes: 25 additions & 10 deletions script/sponsors/sponsors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ const sponsorsOutput = `{{range .}}

var sponsorsOutputTpl = template.Must(template.New("sponsorsOutputTpl").Parse(sponsorsOutput))

// Static sponsors (predate Github Sponsors)
var staticSponsors = []sponsor{
{
Amount: 1000 * 100,
Name: "Kastelo",
AvatarURL: "https://cdn.kastelo.net/prm/civ3ci-shield-blue-padded-white-512.png",
LinkURL: "https://kastelo.net/",
},
{
Amount: 100 * 100,
Name: "REEF Solutions",
AvatarURL: "/img/reefsol.png",
LinkURL: "https://reefsolutions.com/",
},
}

type sponsor struct {
Amount int
Name string
Login string
AvatarURL string
LinkURL string
}

func main() {
src := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")},
Expand Down Expand Up @@ -70,16 +94,7 @@ func main() {
"cursor": (*githubv4.String)(nil),
}

type sponsor struct {
Amount int
Name string
Login string
AvatarURL string
LinkURL string
}

var sponsors []sponsor

sponsors := staticSponsors
for {
if err := client.Query(context.Background(), &query, vars); err != nil {
fmt.Println(err)
Expand Down
62 changes: 0 additions & 62 deletions static/img/reefsol-dark.svg

This file was deleted.

62 changes: 0 additions & 62 deletions static/img/reefsol-light.svg

This file was deleted.

Binary file added static/img/reefsol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 28 additions & 1 deletion themes/default/layouts/partials/github-sponsors.html
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
non-200 OK status code: 401 Unauthorized body: "{\"message\":\"Bad credentials\",\"documentation_url\":\"https://docs.github.com/graphql\"}"

<a href="https://kastelo.net/">
<img src="https://cdn.kastelo.net/prm/civ3ci-shield-blue-padded-white-512.png" class="img github-avatar" alt="Kastelo">
</a>

<a href="https://github.com/jonocodes/">
<img src="https://avatars.githubusercontent.com/u/1310468?u=fc0ea65212bad9dfe79f2362fa1f505aa49690e9&amp;v=4" class="img github-avatar" alt="Jono">
</a>

<a href="https://11sync.net/">
<img src="https://avatars.githubusercontent.com/u/157679563?v=4" class="img github-avatar" alt="11sync.net">
</a>

<a href="https://hireworks.tv/">
<img src="https://avatars.githubusercontent.com/u/129852174?u=37294477d8564bd07818f1a3c5f7c5af849fa54d&amp;v=4" class="img github-avatar" alt="Hireworks">
</a>

<a href="https://mobiussync.com/">
<img src="https://avatars.githubusercontent.com/u/74066406?v=4" class="img github-avatar" alt="Möbius Sync for iOS">
</a>

<a href="https://reefsolutions.com/">
<img src="/img/reefsol.png" class="img github-avatar" alt="REEF Solutions">
</a>

<a href="https://funnel.io/">
<img src="https://avatars.githubusercontent.com/u/16645447?v=4" class="img github-avatar" alt="funnel-io">
</a>
6 changes: 0 additions & 6 deletions themes/default/layouts/partials/static-sponsors.html

This file was deleted.

1 change: 0 additions & 1 deletion themes/default/layouts/shortcodes/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<h5 class="text-center">Sponsors</h5>
</div>
<div class="d-flex flex-column flex-md-row justify-content-center align-items-center">
{{ partial "static-sponsors.html" }}
{{ partial "github-sponsors.html" }}
</div>

0 comments on commit 69de7ca

Please sign in to comment.