Add support for early access changelogs

This commit is contained in:
2023-03-27 19:31:06 +02:00
parent f5e2cbbc74
commit b7ef22b904
4 changed files with 718 additions and 521 deletions

View File

@ -8,7 +8,8 @@
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7"
"laravel/tinker": "^2.7",
"league/commonmark": "^2.4"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",

1149
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,74 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP Monitor</title>
<meta name="description" content="PHP Monitor: Lightweight, native Mac menu bar app that interacts with Laravel Valet. Helps you manage multiple PHP installations, locate config files and more.">
{{-- Web Fonts --}}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
{{-- Vite --}}
@vite('resources/css/app.css')
{{-- OG --}}
<meta property="og:title" content="PHP Monitor: Lightweight, native Mac menu bar app that interacts with Laravel Valet. Helps you manage multiple PHP installations, locate config files and more.">
<meta property="og:image" content="{{ url('/images/phpmon-social.png') }}">
{{-- Twitter --}}
<meta name="twitter:image:src" content="{{ url('/images/phpmon-social.png') }}">
<meta name="twitter:site" content="@nicoverbruggen">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="PHP Monitor: Lightweight, native Mac menu bar app that interacts with Laravel Valet. Helps you manage multiple PHP installations, locate config files and more.">
{{-- Favicons --}}
<link rel="apple-touch-icon" sizes="180x180" href="{{ url('/favicons/apple-touch-icon.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url('/favicons/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ url('/favicons/favicon-16x16.png') }}">
<link rel="manifest" href="{{ url('/favicons/site.webmanifest') }}">
<link rel="mask-icon" href="{{ url('/favicons/safari-pinned-tab.svg') }}" color="#5bbad5">
<link rel="shortcut icon" href="{{ url('/favicons/favicon.ico') }}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{{ url('/favicons/browserconfig.xml') }}">
<meta name="theme-color" content="#ffffff">
{{-- Fathom --}}
<script src="https://net.phpmon.app/script.js" data-site="HVPVBSJR" defer></script>
</head>
<body class="font-sans antialiased">
<div>
<div class="bg-blue-50 flex">
<header class="flex flex-col m-auto max-w-xl py-5 md:py-8 lg:py-10 p-4">
<div>
<x-logo size="100"></x-logo>
<h1 class="text-5xl font-bold mb-3">
PHP Monitor<br/>
<span class="text-blue-800">Early Access</span>
</h1>
</div>
</header>
</div>
<div class="px-4">
<style>
h1 {
font-size: 26px;
font-weight: bold;
}
h3 {
font-size: 15px;
font-weight: bold;
margin: 16px 0;
}
ul {
list-style: square;
margin-left: 20px;
}
ul li {
margin-bottom: 4px;
}
</style>
<div class="flex flex-col m-auto max-w-3xl py-4 md:py-10">
<h1>Changelog</h1>
{!! $content !!}
</div>
</div>
</div>
</body>
</html>

View File

@ -2,9 +2,22 @@
use Illuminate\Support\Facades\Route;
use App\Http\Redirection;
use League\CommonMark\CommonMarkConverter;
Route::get('/', fn () => view('homepage'));
Route::get('/early-access/release-notes', function () {
$path = public_path('builds/early-access/sponsors/changelog.md');
if (file_exists($path)) {
return view('changelog', [
'content' => (new CommonMarkConverter())
->convert(file_get_contents($path))
]);
} else {
abort(404);
}
});
collect([
Redirection::named('github', '/github', 'https://github.com/nicoverbruggen/phpmon'),
Redirection::named('releases', '/releases', 'https://github.com/nicoverbruggen/phpmon/releases'),