Skip to content

Commit bb4093e

Browse files
committed
feat: update landing page and docs design
1 parent acff4ab commit bb4093e

17 files changed

+137
-91
lines changed

src/Web/Homepage/codeblocks/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```php
1+
```php app/sqlite.config.php
22
return new SQLiteConfig(
33
path: env('DB_PATH', __DIR__ . '/../database.sqlite'),
44
);
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
```php
1+
```php src/Books/BooksCommand.php
22
final readonly class BooksCommand
33
{
4-
use HasConsole;
5-
64
public function __construct(
75
private BookRepository $repository,
6+
private Console $console,
87
) {}
98

109
#[ConsoleCommand]
1110
public function find(): void
1211
{
13-
$book = $this->search(
14-
'Find your book',
15-
$this->repository->find(...),
16-
);
12+
$book = $this->search('Find your book', $this->repository->find(...));
13+
14+
// …
1715
}
1816

1917
#[ConsoleCommand(middleware: [CautionMiddleware::class])]
2018
public function delete(string $title, bool $verbose = false): void
21-
{ /* … */ }
19+
{
20+
// …
21+
}
2222
}
2323
```

src/Web/Homepage/codeblocks/controller.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```php
1+
```php src/Books/BookController.php
22
final readonly class BookController
33
{
44
#[Post('/books')]

src/Web/Homepage/codeblocks/event-handler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```php
1+
```php src/Books/BookObserver.php
22
final readonly class BookObserver
33
{
44
#[EventHandler]

src/Web/Homepage/codeblocks/markdown-initializer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```php
1+
```php src/Blog/MarkdownInitializer.php
22
final readonly class MarkdownInitializer implements Initializer
33
{
44
public function initialize(Container $container): MarkdownConverter
@@ -7,7 +7,7 @@ final readonly class MarkdownInitializer implements Initializer
77
->addLanguage(new TempestViewLanguage());
88

99
$environment = new Environment()
10-
->addRenderer(Code::class, new InlineCodeBlockRenderer($highlighter));
10+
->addRenderer(Code::class, new CodeBlockRenderer($highlighter));
1111

1212
return new MarkdownConverter($environment);
1313
}

src/Web/Homepage/codeblocks/model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```php
1+
```php src/Books/Book.php
22
final class Book
33
{
44
#[Length(min: 1, max: 120)]
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
```console
2-
<dim>./tempest static:generate</dim>
3-
4-
/framework/01-getting-started <dim>....</dim> <em>/public/framework/01-getting-started/index.html</em>
5-
/framework/02-the-container <dim>........</dim> <em>/public/framework/02-the-container/index.html</em>
6-
/framework/03-controllers <dim>............</dim> <em>/public/framework/03-controllers/index.html</em>
7-
/framework/04-views <dim>........................</dim> <em>/public/framework/04-views/index.html</em>
8-
/framework/05-models <dim>......................</dim> <em>/public/framework/05-models/index.html</em>
9-
<comment>…</comment>
1+
```console ">_ ./tempest static:generate"
2+
/framework/01-getting-started <dim>..</dim> <em>/public/framework/01-getting-started/index.html</em>
3+
/framework/02-the-container <dim>......</dim> <em>/public/framework/02-the-container/index.html</em>
4+
/framework/03-controllers <dim>..........</dim> <em>/public/framework/03-controllers/index.html</em>
5+
/framework/04-views <dim>......................</dim> <em>/public/framework/04-views/index.html</em>
6+
/framework/05-models <dim>....................</dim> <em>/public/framework/05-models/index.html</em>
107
```
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
```html
1+
```html app/Website/x-base.view.php
22
<!DOCTYPE html>
33
<html lang="en" class="h-dvh flex flex-col">
4-
<head>
4+
<head>
5+
<!-- Conditional elements -->
56
<title :if="isset($title)">{{ $title }} — Books</title>
67
<title :else>Books</title>
7-
8+
<!-- Built-in Vite integration -->
89
<x-vite-tags />
9-
10-
<x-slot name="head" />
11-
</head>
12-
<body class="antialiased flex flex-col grow">
13-
<x-slot />
14-
<x-slot name="scripts" />
15-
</body>
10+
</head>
11+
<body class="antialiased flex flex-col grow">
12+
<x-slot /> <!-- Main slot -->
13+
<x-slot name="scripts" /> <!-- Named slot -->
14+
</body>
1615
</html>
1716
```
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
```html
1+
```html app/Books/index.view.php
22
<x-base :title="$this->seo->title">
3-
<ul>
4-
<li :foreach="$this->books as $book">
5-
{{ $book->title }}
3+
<ul>
4+
<li :foreach="$this->books as $book">
5+
<!-- Title -->
6+
<span>{{ $book->title }}</span>
67

7-
<span :if="$this->showDate($book)">
8-
<x-tag>
9-
{{ $book->publishedAt }}
10-
</x-tag>
11-
</span>
12-
</li>
13-
</ul>
8+
<!-- Metadata -->
9+
<span :if="$this->showDate($book)">
10+
<x-badge variant="outline">
11+
{{ $book->publishedAt }}
12+
</x-badge>
13+
</span>
14+
</li>
15+
</ul>
1416
</x-base>
1517
```
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
```html
2-
<!-- x-book.view.php-->
3-
1+
```html src/Books/x-book.view.php
42
<article>
5-
<h1>{{ $book->title }}</h1>
6-
7-
{!! $book->body !!}
3+
<h1>{{ $book->title }}</h1>
4+
{!! $book->body !!}
85
</article>
96
```

0 commit comments

Comments
 (0)