Skip to content

Commit 6ca2c83

Browse files
author
Yanik Kumar
committed
Added pre-release automation and beta ribbon
1 parent a2aec1e commit 6ca2c83

File tree

2 files changed

+77
-7
lines changed

2 files changed

+77
-7
lines changed

about.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,19 @@
218218
font-size: 0.98em;
219219
color: var(--muted);
220220
}
221+
.beta-ribbon {
222+
position: absolute;
223+
top: 0;
224+
right: 0;
225+
background: #ff9800;
226+
color: white;
227+
padding: 5px 10px;
228+
font-weight: bold;
229+
font-size: 14px;
230+
text-decoration: none;
231+
border-bottom-left-radius: 5px;
232+
z-index: 999;
233+
}
221234
@media (max-width: 600px) {
222235
header {
223236
flex-direction: column;
@@ -273,6 +286,7 @@
273286
</style>
274287
</head>
275288
<body>
289+
<a href="#" class="beta-ribbon"> Beta </a>
276290
<header>
277291
<div class="logo-row">
278292
<img

index.html

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,36 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>SproutPHP</title>
7-
<meta name="description" content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy." />
8-
<meta name="keywords" content="PHP, framework, SproutPHP, HTMX, web development, minimal, open source" />
7+
<meta
8+
name="description"
9+
content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy."
10+
/>
11+
<meta
12+
name="keywords"
13+
content="PHP, framework, SproutPHP, HTMX, web development, minimal, open source"
14+
/>
915
<meta name="author" content="Yanik Kumar, SproutPHP" />
1016
<meta property="og:title" content="SproutPHP - Minimal PHP Framework" />
11-
<meta property="og:description" content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy." />
17+
<meta
18+
property="og:description"
19+
content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy."
20+
/>
1221
<meta property="og:type" content="website" />
1322
<meta property="og:url" content="https://sproutphp.github.io/" />
14-
<meta property="og:image" content="https://sproutphp.github.io/img/SproutPHP_Logo.png" />
23+
<meta
24+
property="og:image"
25+
content="https://sproutphp.github.io/img/SproutPHP_Logo.png"
26+
/>
1527
<meta name="twitter:card" content="summary_large_image" />
1628
<meta name="twitter:title" content="SproutPHP - Minimal PHP Framework" />
17-
<meta name="twitter:description" content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy." />
18-
<meta name="twitter:image" content="https://sproutphp.github.io/img/SproutPHP_Logo.png" />
29+
<meta
30+
name="twitter:description"
31+
content="SproutPHP is a modern, minimalist PHP framework for rapid web development. Batteries-included, HTMX-ready, and developer-happy."
32+
/>
33+
<meta
34+
name="twitter:image"
35+
content="https://sproutphp.github.io/img/SproutPHP_Logo.png"
36+
/>
1937
<meta name="twitter:site" content="@SproutPHP" />
2038
<link rel="canonical" href="https://sproutphp.github.io/" />
2139
<link rel="icon" type="image/png" href="img/SproutPHP_Logo.png" />
@@ -66,6 +84,19 @@
6684
background: transparent;
6785
box-shadow: none;
6886
}
87+
.beta-ribbon {
88+
position: absolute;
89+
top: 0;
90+
right: 0;
91+
background: #ff9800;
92+
color: white;
93+
padding: 5px 10px;
94+
font-weight: bold;
95+
font-size: 14px;
96+
text-decoration: none;
97+
border-bottom-left-radius: 5px;
98+
z-index: 999;
99+
}
69100
.logo-row {
70101
display: flex;
71102
align-items: center;
@@ -313,6 +344,7 @@
313344
</style>
314345
</head>
315346
<body>
347+
<a href="#" class="beta-ribbon"> Beta </a>
316348
<header>
317349
<div class="logo-row">
318350
<img
@@ -378,7 +410,7 @@
378410
class="main-logo"
379411
/>
380412
<div class="main-title">SproutPHP</div>
381-
<div class="main-version">v0.1.7-beta.1 (pre-release)</div>
413+
<code class="main-version sproutphp-version"> ... </code>
382414
<div class="main-desc">
383415
Welcome to <b>SproutPHP</b>, the seed-to-plant minimal PHP framework
384416
🌱<br />
@@ -401,6 +433,11 @@
401433
>❤️ Sponsor</a
402434
>
403435
</div>
436+
<div class="alert warning">
437+
🚧 SproutPHP is currently in beta (<code class="sproutphp-version"
438+
>...</code
439+
>). Expect changes and improvements.
440+
</div>
404441
</main>
405442
<footer
406443
class="footer"
@@ -494,6 +531,25 @@
494531
.catch(() => {
495532
document.getElementById("star-count").textContent = "—";
496533
});
534+
535+
// Fetch latest release version
536+
fetch("https://api.github.com/repos/SproutPHP/framework/releases")
537+
.then((response) => response.json())
538+
.then((data) => {
539+
if (Array.isArray(data) && data.length > 0 && data[0].tag_name) {
540+
var version = data[0].tag_name;
541+
if (data[0].prerelease) {
542+
version += " (pre-release)";
543+
}
544+
var versionSpans = document.querySelectorAll(".sproutphp-version");
545+
versionSpans.forEach(function (span) {
546+
span.textContent = version;
547+
});
548+
}
549+
})
550+
.catch(() => {
551+
// Optionally handle error
552+
});
497553
</script>
498554
</body>
499555
</html>

0 commit comments

Comments
 (0)