Skip to content

Commit c1cfce9

Browse files
committed
wip
1 parent 0ee04d4 commit c1cfce9

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

src/Web/Homepage/codeblocks/config.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
```php
2-
return new PostgresConfig(
3-
host: env('DB_HOST'),
4-
port: env('DB_PORT'),
5-
username: env('DB_USERNAME'),
6-
password: env('DB_PASSWORD'),
7-
database: env('DB_DATABASE'),
2+
return new SQLiteConfig(
3+
path: env('DB_PATH', __DIR__ . '/../database.sqlite'),
84
);
95
```
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
```php
2-
final readonly class PackagesCommand
2+
final readonly class BooksCommand
33
{
44
use HasConsole;
55

66
public function __construct(
7-
private PackageRepository $repository,
7+
private BookRepository $repository,
88
) {}
99

1010
#[ConsoleCommand]
1111
public function find(): void
1212
{
13-
$package = $this->search(
14-
'Find your package',
13+
$book = $this->search(
14+
'Find your book',
1515
$this->repository->find(...),
1616
);
1717
}
1818

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

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

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ final readonly class MarkdownInitializer implements Initializer
33
{
44
public function initialize(Container $container): MarkdownConverter
55
{
6-
$environment = new Environment();
7-
$highlighter = new Highlighter(new CssTheme());
8-
9-
$highlighter->addLanguage(new TempestViewLanguage());
10-
11-
$environment
12-
->addRenderer(FencedCode::class, new CodeBlockRenderer($highlighter))
6+
$highlighter = new Highlighter(new CssTheme())
7+
->addLanguage(new TempestViewLanguage());
8+
9+
$environment = new Environment()
1310
->addRenderer(Code::class, new InlineCodeBlockRenderer($highlighter));
1411

1512
return new MarkdownConverter($environment);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```console
2+
./tempest static:generate
3+
4+
- <em>/framework/01-getting-started</em> > <u>/public/framework/01-getting-started/index.html</u>
5+
- <em>/framework/02-the-container</em> > <u>/public/framework/02-the-container/index.html</u>
6+
- <em>/framework/03-controllers</em> > <u>/public/framework/03-controllers/index.html</u>
7+
- <em>/framework/04-views</em> > <u>/public/framework/04-views/index.html</u>
8+
- <em>/framework/05-models</em> > <u>/public/framework/05-models/index.html</u>
9+
- <comment>…</comment>
10+
```

src/Web/Homepage/codeblocks/templating-component.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<!DOCTYPE html>
33
<html lang="en" class="h-dvh flex flex-col">
44
<head>
5-
<title :if="isset($title)">{{ $title }} — Bookish</title>
6-
<title :else>Bookish</title>
5+
<title :if="isset($title)">{{ $title }} — Books</title>
6+
<title :else>Books</title>
77

88
<x-vite-tags />
99

src/Web/Homepage/codeblocks/templating-view.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
```html
22
<x-base :title="$this->seo->title">
33
<ul>
4-
<li :foreach="$this->posts as $post">
5-
{{ $post->title }}
4+
<li :foreach="$this->books as $book">
5+
{{ $book->title }}
66

7-
<span :if="$this->showDate($post)">
7+
<span :if="$this->showDate($book)">
88
<x-tag>
9-
{{ $post->date }}
9+
{{ $book->publishedAt }}
1010
</x-tag>
1111
</span>
1212
</li>

src/Web/Homepage/home.view.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
]"
9999
link-label="Get started"
100100
:link-uri="uri([ChapterController::class, 'index'])"
101-
:snippets="['config', 'query', 'markdown-initializer']"
101+
:snippets="['config', 'static-pages', 'query', 'markdown-initializer']"
102102
></x-home-section>
103103
</main>
104104
</div>

0 commit comments

Comments
 (0)