Skip to content

Commit 851c8fb

Browse files
committed
Update Agenda slide master with rotated vertical title
Modify the Agenda slide master to display the title vertically on the left side: - Title rotated 90 degrees, positioned at bottom left - Large size (100pt), bold, uppercase styling - Adjusted content area to accommodate the vertical title - Extra left padding for better visual balance
1 parent 92350f9 commit 851c8fb

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/SlideMasters/Agenda.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,29 @@ public function item(string $text): self
3232

3333
protected function render(): void
3434
{
35+
// Render the title rotated 90 degrees on the left side
3536
if (! empty($this->slideTitle)) {
36-
$titleBox = $this->renderTitle();
37-
$yOffset = $titleBox->height + 75;
38-
} else {
39-
$yOffset = 75;
37+
TextBox::make($this, $this->slideTitle)
38+
->bold()
39+
->rotate(90)
40+
->width(720)
41+
->height(200)
42+
->centerVertically()
43+
->x(-270)
44+
->size(100)
45+
->uppercase()
46+
->render();
4047
}
4148

4249
if (empty($this->items)) {
4350
return;
4451
}
4552

53+
// Content area starts from the left with padding
54+
$yOffset = 75;
55+
$xOffset = $this->horizontalPadding + 50; // Extra padding for rotated title
56+
$contentWidth = $this->presentation->width - $xOffset - $this->horizontalPadding;
57+
4658
$box = null;
4759

4860
foreach ($this->items as $item) {
@@ -51,8 +63,8 @@ protected function render(): void
5163
->paragraphStyle('bodyText')
5264
->size(24)
5365
->height($this->presentation->height - $yOffset - 75)
54-
->width($this->presentation->width - (2 * $this->horizontalPadding))
55-
->position($this->horizontalPadding, $yOffset)
66+
->width($contentWidth)
67+
->position($xOffset, $yOffset)
5668
->alignLeft()
5769
->alignTop()
5870
->render()

0 commit comments

Comments
 (0)