Skip to content

Commit d5becf6

Browse files
committed
Fix infinite image pathes
1 parent deddc65 commit d5becf6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

ux.symfony.com/src/Model/LiveDemo.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public function __construct(
2323
* @var string[]
2424
*/
2525
private array $tags = [],
26-
) {
26+
)
27+
{
2728
}
2829

2930
public function getIdentifier(): string
@@ -58,6 +59,6 @@ public function getTags(): array
5859

5960
public function getScreenshotFilename(?string $format = null): string
6061
{
61-
return 'images/live_demo/'.$this->identifier.($format ?? '').'.png';
62+
return 'images/live_demo/'.$this->identifier.($format ? ('-'.$format) : '').'.png';
6263
}
6364
}

ux.symfony.com/templates/demos/live_demo.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
description: demo.longDescription|striptags|u.truncate(200, '...')
1010
},
1111
image: {
12-
url: absolute_url(asset(demo.screenshotFilename)),
12+
url: absolute_url(asset(demo.screenshotFilename('1280x720')),
1313
width: 1280,
1414
height: 720,
1515
},

ux.symfony.com/templates/demos/live_memory/index.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
description: demo.description,
77
canonical: url(demo.route),
88
image: {
9-
url: absolute_url(asset(demo.screenshotFilename)),
10-
width: 640,
11-
height: 360,
9+
url: absolute_url(asset(demo.screenshotFilename('1280x720')),
10+
width: 1080,
11+
height: 720,
1212
},
1313
og: {
1414
title: demo.name ~ ' - Symfony UX Demo',

0 commit comments

Comments
 (0)