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",
|
||||
"url": "https://drolosoft.com/immich-photo-manager.html?lang=en",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
||||
"openSource": true,
|
||||
"projectLogo": "immich-photo-manager.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -573,6 +574,7 @@
|
||||
"projectDesc": "Terminal Session Persistence Tool",
|
||||
"url": "https://drolosoft.com/cmux-resurrect.html?lang=en",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
||||
"openSource": true,
|
||||
"projectLogo": "cmux-resurrect.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -600,6 +602,7 @@
|
||||
"projectDesc": "Bidirectional Server Control Plugin",
|
||||
"url": "https://github.com/drolosoft/gotify-commander",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
||||
"openSource": true,
|
||||
"projectLogo": "gotify-commander.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -726,6 +729,7 @@
|
||||
"projectDesc": "SAP Customer Data Cloud Demo",
|
||||
"url": "https://gigyademo.com/cdc-starter-kit/",
|
||||
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
||||
"openSource": true,
|
||||
"projectLogo": "sap.png",
|
||||
"logoIndex": 8,
|
||||
"location": "Online",
|
||||
|
||||
@@ -546,6 +546,7 @@
|
||||
"projectDesc": "Servidor MCP para Gestión de Fotos con IA",
|
||||
"url": "https://drolosoft.com/immich-photo-manager.html?lang=es",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/immich-photo-manager",
|
||||
"openSource": true,
|
||||
"projectLogo": "immich-photo-manager.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -573,6 +574,7 @@
|
||||
"projectDesc": "Herramienta de Persistencia de Sesiones de Terminal",
|
||||
"url": "https://drolosoft.com/cmux-resurrect.html?lang=es",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/cmux-resurrect",
|
||||
"openSource": true,
|
||||
"projectLogo": "cmux-resurrect.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -600,6 +602,7 @@
|
||||
"projectDesc": "Plugin Bidireccional de Control de Servidores",
|
||||
"url": "https://github.com/drolosoft/gotify-commander",
|
||||
"gitRepoUrl": "https://github.com/drolosoft/gotify-commander",
|
||||
"openSource": true,
|
||||
"projectLogo": "gotify-commander.png",
|
||||
"location": "Online",
|
||||
"startDate": "2026",
|
||||
@@ -726,6 +729,7 @@
|
||||
"projectDesc": "Demo de SAP Customer Data Cloud",
|
||||
"url": "https://gigyademo.com/cdc-starter-kit/",
|
||||
"gitRepoUrl": "https://github.com/gigya/cdc-starter-kit",
|
||||
"openSource": true,
|
||||
"projectLogo": "sap.png",
|
||||
"logoIndex": 8,
|
||||
"location": "Online",
|
||||
|
||||
@@ -100,6 +100,7 @@ type Project struct {
|
||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
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"`
|
||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||
Current bool `json:"current"`
|
||||
|
||||
@@ -105,6 +105,7 @@ type Project struct {
|
||||
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
|
||||
LogoIndex *int `json:"logoIndex,omitempty"` // Sprite sheet index (nil means no sprite)
|
||||
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"`
|
||||
StartDate string `json:"startDate,omitempty"` // Optional static start date
|
||||
Current bool `json:"current"`
|
||||
|
||||
@@ -68,6 +68,15 @@ func (m *Manager) loadTemplatesLocked() error {
|
||||
"replaceDrolosoft": func(s string) string {
|
||||
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": func(values ...interface{}) (map[string]interface{}, error) {
|
||||
if len(values)%2 != 0 {
|
||||
|
||||
@@ -194,6 +194,19 @@
|
||||
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 {
|
||||
display: inline-block;
|
||||
background: #3498db;
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.stars-badge {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* ===================================
|
||||
REMOVE ALL SHADOWS & BORDERS (Nuclear Option)
|
||||
=================================== */
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
</strong>
|
||||
{{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 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}}
|
||||
<br>
|
||||
<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