feat: GitHub stars badge on open-source projects via shields.io
- New openSource field in project model distinguishes OS from private - shields.io badge shows live star count for open-source projects - SoundInbox marked as NOT open source (no badge, no stars) - Immich Photo Manager, Cmux Resurrect, Gotify Commander, CDC Starter Kit → open source - Stars badge hidden in print view
This commit is contained in:
@@ -546,6 +546,7 @@
|
|||||||
"projectDesc": "AI-Powered Photo Library MCP Server",
|
"projectDesc": "AI-Powered Photo Library MCP Server",
|
||||||
"url": "https://drolosoft.com/immich-photo-manager.html?lang=en",
|
"url": "https://drolosoft.com/immich-photo-manager.html?lang=en",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "immich-photo-manager.png",
|
"projectLogo": "immich-photo-manager.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -573,6 +574,7 @@
|
|||||||
"projectDesc": "Terminal Session Persistence Tool",
|
"projectDesc": "Terminal Session Persistence Tool",
|
||||||
"url": "https://drolosoft.com/cmux-resurrect.html?lang=en",
|
"url": "https://drolosoft.com/cmux-resurrect.html?lang=en",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "cmux-resurrect.png",
|
"projectLogo": "cmux-resurrect.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -600,6 +602,7 @@
|
|||||||
"projectDesc": "Bidirectional Server Control Plugin",
|
"projectDesc": "Bidirectional Server Control Plugin",
|
||||||
"url": "https://github.com/drolosoft/gotify-commander",
|
"url": "https://github.com/drolosoft/gotify-commander",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "gotify-commander.png",
|
"projectLogo": "gotify-commander.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -726,6 +729,7 @@
|
|||||||
"projectDesc": "SAP Customer Data Cloud Demo",
|
"projectDesc": "SAP Customer Data Cloud Demo",
|
||||||
"url": "https://gigyademo.com/cdc-starter-kit/",
|
"url": "https://gigyademo.com/cdc-starter-kit/",
|
||||||
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "sap.png",
|
"projectLogo": "sap.png",
|
||||||
"logoIndex": 8,
|
"logoIndex": 8,
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
|
|||||||
@@ -546,6 +546,7 @@
|
|||||||
"projectDesc": "Servidor MCP para Gestión de Fotos con IA",
|
"projectDesc": "Servidor MCP para Gestión de Fotos con IA",
|
||||||
"url": "https://drolosoft.com/immich-photo-manager.html?lang=es",
|
"url": "https://drolosoft.com/immich-photo-manager.html?lang=es",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "immich-photo-manager.png",
|
"projectLogo": "immich-photo-manager.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -573,6 +574,7 @@
|
|||||||
"projectDesc": "Herramienta de Persistencia de Sesiones de Terminal",
|
"projectDesc": "Herramienta de Persistencia de Sesiones de Terminal",
|
||||||
"url": "https://drolosoft.com/cmux-resurrect.html?lang=es",
|
"url": "https://drolosoft.com/cmux-resurrect.html?lang=es",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "cmux-resurrect.png",
|
"projectLogo": "cmux-resurrect.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -600,6 +602,7 @@
|
|||||||
"projectDesc": "Plugin Bidireccional de Control de Servidores",
|
"projectDesc": "Plugin Bidireccional de Control de Servidores",
|
||||||
"url": "https://github.com/drolosoft/gotify-commander",
|
"url": "https://github.com/drolosoft/gotify-commander",
|
||||||
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "gotify-commander.png",
|
"projectLogo": "gotify-commander.png",
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
"startDate": "2026",
|
"startDate": "2026",
|
||||||
@@ -726,6 +729,7 @@
|
|||||||
"projectDesc": "Demo de SAP Customer Data Cloud",
|
"projectDesc": "Demo de SAP Customer Data Cloud",
|
||||||
"url": "https://gigyademo.com/cdc-starter-kit/",
|
"url": "https://gigyademo.com/cdc-starter-kit/",
|
||||||
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
||||||
|
"openSource": true,
|
||||||
"projectLogo": "sap.png",
|
"projectLogo": "sap.png",
|
||||||
"logoIndex": 8,
|
"logoIndex": 8,
|
||||||
"location": "Online",
|
"location": "Online",
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ type Project struct {
|
|||||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||||
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
||||||
|
OpenSource bool `json:"openSource,omitempty"` // True if project is open source (shows stars badge)
|
||||||
Location string `json:"location"`
|
Location string `json:"location"`
|
||||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||||
Current bool `json:"current"`
|
Current bool `json:"current"`
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ type Project struct {
|
|||||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||||
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
|
||||||
|
OpenSource bool `json:"openSource,omitempty"` // True if project is open source (shows stars badge)
|
||||||
Location string `json:"location"`
|
Location string `json:"location"`
|
||||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||||
Current bool `json:"current"`
|
Current bool `json:"current"`
|
||||||
|
|||||||
@@ -68,6 +68,15 @@ func (m *Manager) loadTemplatesLocked() error {
|
|||||||
"replaceDrolosoft": func(s string) string {
|
"replaceDrolosoft": func(s string) string {
|
||||||
return strings.Replace(s, "drolosoft", `<a href="https://drolosoft.com" target="_blank" rel="noopener noreferrer">drolosoft</a>`, 1)
|
return strings.Replace(s, "drolosoft", `<a href="https://drolosoft.com" target="_blank" rel="noopener noreferrer">drolosoft</a>`, 1)
|
||||||
},
|
},
|
||||||
|
// githubRepo extracts "owner/repo" from a GitHub URL
|
||||||
|
"githubRepo": func(url string) string {
|
||||||
|
url = strings.TrimSuffix(url, "/")
|
||||||
|
parts := strings.Split(url, "github.com/")
|
||||||
|
if len(parts) == 2 {
|
||||||
|
return parts[1]
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
},
|
||||||
// dict creates a map from key-value pairs for passing to sub-templates
|
// dict creates a map from key-value pairs for passing to sub-templates
|
||||||
"dict": func(values ...interface{}) (map[string]interface{}, error) {
|
"dict": func(values ...interface{}) (map[string]interface{}, error) {
|
||||||
if len(values)%2 != 0 {
|
if len(values)%2 != 0 {
|
||||||
|
|||||||
@@ -194,6 +194,19 @@
|
|||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stars-badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 0.3em;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stars-badge img {
|
||||||
|
height: 18px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.maintained-badge {
|
.maintained-badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: #3498db;
|
background: #3498db;
|
||||||
|
|||||||
@@ -105,6 +105,10 @@
|
|||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stars-badge {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===================================
|
/* ===================================
|
||||||
REMOVE ALL SHADOWS & BORDERS (Nuclear Option)
|
REMOVE ALL SHADOWS & BORDERS (Nuclear Option)
|
||||||
=================================== */
|
=================================== */
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
</strong>
|
</strong>
|
||||||
{{if .Current}}<span class="live-badge"><iconify-icon icon="mdi:wifi" width="14" height="14"></iconify-icon>LIVE</span>{{end}}
|
{{if .Current}}<span class="live-badge"><iconify-icon icon="mdi:wifi" width="14" height="14"></iconify-icon>LIVE</span>{{end}}
|
||||||
{{if .GitRepoUrl}}<a href="{{.GitRepoUrl}}" target="_blank" rel="noopener noreferrer" class="github-badge"><iconify-icon icon="mdi:github" width="14" height="14"></iconify-icon>GitHub</a>{{end}}
|
{{if .GitRepoUrl}}<a href="{{.GitRepoUrl}}" target="_blank" rel="noopener noreferrer" class="github-badge"><iconify-icon icon="mdi:github" width="14" height="14"></iconify-icon>GitHub</a>{{end}}
|
||||||
|
{{if and .OpenSource .GitRepoUrl}}<a href="{{.GitRepoUrl}}/stargazers" target="_blank" rel="noopener noreferrer" class="stars-badge"><img src="https://img.shields.io/github/stars/{{githubRepo .GitRepoUrl}}?style=flat&logo=github&label=stars" alt="GitHub stars" loading="lazy"></a>{{end}}
|
||||||
{{if .MaintainedBy}}<span class="maintained-badge">{{$.UI.Sections.MaintainedBy}} {{.MaintainedBy}}</span>{{end}}
|
{{if .MaintainedBy}}<span class="maintained-badge">{{$.UI.Sections.MaintainedBy}} {{.MaintainedBy}}</span>{{end}}
|
||||||
<br>
|
<br>
|
||||||
<small>{{if .StartDate}}{{.StartDate}}{{if .Current}}{{if .DynamicDate}} / {{.DynamicDate}}{{else}} / {{$.UI.Sections.Present}}{{end}}{{end}}{{end}} - ({{.Location}})</small>
|
<small>{{if .StartDate}}{{.StartDate}}{{if .Current}}{{if .DynamicDate}} / {{.DynamicDate}}{{else}} / {{$.UI.Sections.Present}}{{end}}{{end}}{{end}} - ({{.Location}})</small>
|
||||||
|
|||||||
Reference in New Issue
Block a user