Skip to content

Commit

Permalink
feat: Allow custom paths to icons to show instead of expecting a hard…
Browse files Browse the repository at this point in the history
…-coded location
  • Loading branch information
pojntfx committed Mar 22, 2024
1 parent 26f3c1a commit dd9dbc3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
6 changes: 3 additions & 3 deletions cmd/ps-gen-projects/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type InputCategory struct {
type InputProject struct {
Slug string `yaml:"slug"`
Background string `yaml:"background"`
Icon bool `yaml:"icon"`
Icon string `yaml:"icon"`
}

func main() {
Expand Down Expand Up @@ -128,8 +128,8 @@ func main() {
}

icon := ""
if inputProject.Icon {
icon = *cdn + owner + repo + "/" + project.GetDefaultBranch() + "/docs/icon-light.png"
if inputProject.Icon != "" {
icon = *cdn + owner + repo + "/" + project.GetDefaultBranch() + "/" + inputProject.Icon
}

outputCategory.Projects = append(outputCategory.Projects, OutputProject{
Expand Down
31 changes: 17 additions & 14 deletions data/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@
projects:
- slug: pojntfx/weron
background: var(--pf-global--palette--black-850)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/go-nbd
background: var(--pf-global--palette--gold-600)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/stfs
background: var(--pf-global--palette--blue-400)
- slug: pojntfx/tapisk
background: var(--pf-global--palette--light-green-700)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/liwasc
background: var(--pf-global--palette--cyan-500)
- slug: pojntfx/bofied
background: var(--pf-global--palette--light-blue-600)
- slug: pojntfx/r3map
icon: true
icon: docs/icon-light.png
background: var(--pf-global--palette--gold-600)
- slug: pojntfx/ram-dl
icon: true
icon: docs/icon-light.png
background: var(--pf-global--palette--black-850)
- slug: pojntfx/htorrent
icon: docs/icon.svg
background: var(--pf-global--palette--cyan-500)
- title: Apps
projects:
- slug: pojntfx/connmapper
background: var(--pf-global--palette--light-green-600)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/multiplex
background: var(--pf-global--palette--gold-600)
icon: true
icon: docs/icon.svg
- slug: pojntfx/keygaen
background: var(--pf-global--palette--blue-500)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/keystoregaen
background: var(--pf-global--palette--black-850)
- slug: pojntfx/html2goapp
Expand All @@ -44,14 +47,14 @@
background: var(--pf-global--palette--light-green-600)
- slug: pojntfx/hydrapp
background: var(--pf-global--palette--green-700)
icon: true
icon: docs/icon.svg
- slug: pojntfx/hydrun
background: var(--pf-global--palette--purple-600)
- slug: pojntfx/alpimager
background: var(--pf-global--palette--black-850)
- slug: pojntfx/octarchive
background: var(--pf-global--palette--gold-600)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/pojde
background: var(--pf-global--palette--light-green-700)
- slug: pojntfx/grpc-examples
Expand All @@ -60,10 +63,10 @@
projects:
- slug: pojntfx/saltpanelo
background: var(--pf-global--palette--blue-400)
icon: true
- slug: pojntfx/dudirekta
icon: docs/icon-light.png
- slug: pojntfx/panrpc
background: var(--pf-global--palette--light-blue-600)
icon: true
icon: docs/icon.svg
- slug: pojntfx/unisockets
background: var(--pf-global--palette--gold-600)
- slug: pojntfx/tinynet
Expand Down Expand Up @@ -116,7 +119,7 @@
projects:
- slug: pojntfx/deliverance
background: var(--pf-global--palette--black-850)
icon: true
icon: docs/icon-light.png
- slug: pojntfx/minitel
background: var(--pf-global--palette--blue-400)
- slug: pojntfx/box
Expand Down

0 comments on commit dd9dbc3

Please sign in to comment.