Skip to content

Commit

Permalink
ci: fix doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Dec 20, 2023
1 parent e079229 commit 8820d32
Show file tree
Hide file tree
Showing 43 changed files with 6,922 additions and 9,689 deletions.
12 changes: 6 additions & 6 deletions scripts/generateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
));
}

// PHP Code Sniffer autoloading
if (!file_exists($phpCodeSnifferAutoloadPath = __DIR__ . '/../vendor/squizlabs/php_codesniffer/autoload.php')) {
throw new \LogicException('PHP Code Sniffer autoload file "' . $phpCodeSnifferAutoloadPath . '" does not exist');
// Tools autoloading
if (!file_exists($toolsAutoloadPath = __DIR__ . '/../tools/vendor/autoload.php')) {
throw new \LogicException('Tools autoload file "' . $toolsAutoloadPath . '" does not exist');
}

if (false === (include $phpCodeSnifferAutoloadPath)) {
if (false === (include $toolsAutoloadPath)) {
throw new \LogicException(sprintf(
'An error occured while including PHP Code Sniffer autoload file "%s"',
$phpCodeSnifferAutoloadPath
'An error occured while including tools autoload file "%s"',
$toolsAutoloadPath
));
}

Expand Down
236 changes: 138 additions & 98 deletions website/docs/usage/components/accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,62 @@ import HtmlCode from "../../../src/components/HtmlCode.tsx";
```php
<?php

echo $this->accordion(
echo $this->accordion([
[
[
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'headingOne'],
],
'body' => [
'content' => '<strong>This is the first item\'s accordion body.</strong> '.'It is shown by default, until the collapse plugin adds the appropriate classes '.'that we use to style each element. '.'These classes control the overall appearance, '.'as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default variables. '.'It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, '.'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseOne'],
],
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'headingOne'],
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'headingTwo'],
],
'body' => [
'content' => '<strong>This is the second item\'s accordion body.</strong> '.'It is hidden by default, until the collapse plugin adds the appropriate classes '.'that we use to style each element. '.'These classes control the overall appearance, '.'as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default variables. '.'It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, '.'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseTwo'],
],
'body' => [
'content' => '<strong>This is the first item\'s accordion body.</strong> ' .
'It is shown by default, until the collapse plugin adds the appropriate classes ' .
'that we use to style each element. ' .
'These classes control the overall appearance, ' .
'as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default variables. ' .
'It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, ' .
'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseOne'],
],
[
'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'headingThree'],
],
'body' => [
'content' => '<strong>This is the third item\'s accordion body.</strong> '.'It is hidden by default, until the collapse plugin adds the appropriate classes '.'that we use to style each element. '.'These classes control the overall appearance, '.'as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default variables. '.'It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, '.'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseThree'],
],
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'headingTwo'],
],
'body' => [
'content' => '<strong>This is the second item\'s accordion body.</strong> ' .
'It is hidden by default, until the collapse plugin adds the appropriate classes ' .
'that we use to style each element. ' .
'These classes control the overall appearance, ' .
'as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default variables. ' .
'It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, ' .
'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseTwo'],
],
],
['id' => 'accordionExample']
);

[
'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'headingThree'],
],
'body' => [
'content' => '<strong>This is the third item\'s accordion body.</strong> ' .
'It is hidden by default, until the collapse plugin adds the appropriate classes ' .
'that we use to style each element. ' .
'These classes control the overall appearance, ' .
'as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default variables. ' .
'It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, ' .
'though the transition does limit overflow.',
'attributes' => ['id' => 'collapseThree'],
],
],
], ['id' => 'accordionExample']);
```

</TabItem>
Expand Down Expand Up @@ -133,46 +153,52 @@ echo $this->accordion(
```php
<?php

echo $this->accordion(
echo $this->accordion([
[
[
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'flush-headingOne'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to '.'demonstrate the <code>.accordion-flush</code> class. '.'This is the first item\'s accordion body.',
'attributes' => ['id' => 'flush-collapseOne'],
],
'show' => false,
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'flush-headingOne'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to ' .
'demonstrate the <code>.accordion-flush</code> class. ' .
'This is the first item\'s accordion body.',
'attributes' => ['id' => 'flush-collapseOne'],
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'flush-headingTwo'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to '.'demonstrate the <code>.accordion-flush</code> class. '.'This is the second item\'s accordion body. '.'Let\'s imagine this being filled with some actual content.',
'attributes' => ['id' => 'flush-collapseTwo'],
],
'show' => false,
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'flush-headingTwo'],
],
[
'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'flush-headingThree'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to '.'demonstrate the <code>.accordion-flush</code> class. '.'This is the third item\'s accordion body. '.'Nothing more exciting happening here in terms of content, '.'but just filling up the space to make it look, at least at first glance, '.'a bit more representative of how this would look in a real-world application.',
'attributes' => ['id' => 'flush-collapseThree'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to ' .
'demonstrate the <code>.accordion-flush</code> class. ' .
'This is the second item\'s accordion body. ' .
'Let\'s imagine this being filled with some actual content.',
'attributes' => ['id' => 'flush-collapseTwo'],
],
],
[
'id' => 'accordionFlushExample',
'flush' => true,
]
);

'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'flush-headingThree'],
],
'body' => [
'content' => 'Placeholder content for this accordion, which is intended to ' .
'demonstrate the <code>.accordion-flush</code> class. ' .
'This is the third item\'s accordion body. ' .
'Nothing more exciting happening here in terms of content, ' .
'but just filling up the space to make it look, at least at first glance, ' .
'a bit more representative of how this would look in a real-world application.',
'attributes' => ['id' => 'flush-collapseThree'],
],
],
], [
'id' => 'accordionFlushExample',
'flush' => true,
]);
```

</TabItem>
Expand Down Expand Up @@ -218,45 +244,59 @@ echo $this->accordion(
```php
<?php

echo $this->accordion(
echo $this->accordion([
[
[
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'panelsStayOpen-headingOne'],
],
'body' => [
'content' => ' <strong>This is the first item\'s accordion body.</strong> '.'It is shown by default, until the collapse plugin adds the appropriate '.'classes that we use to style each element. These classes control the '.'overall appearance, as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default '.'variables. It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseOne'],
],
'header' => [
'content' => 'Accordion Item #1',
'attributes' => ['id' => 'panelsStayOpen-headingOne'],
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'panelsStayOpen-headingTwo'],
],
'body' => [
'content' => '<strong>This is the second item\'s accordion body.</strong> '.'It is hidden by default, until the collapse plugin adds the appropriate '.'classes that we use to style each element. These classes control the '.'overall appearance, as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default '.'variables. It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseTwo'],
],
'body' => [
'content' => ' <strong>This is the first item\'s accordion body.</strong> ' .
'It is shown by default, until the collapse plugin adds the appropriate ' .
'classes that we use to style each element. These classes control the ' .
'overall appearance, as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default ' .
'variables. It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseOne'],
],
[
'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'panelsStayOpen-headingThree'],
],
'body' => [
'content' => ' <strong>This is the third item\'s accordion body.</strong> '.'It is hidden by default, until the collapse plugin adds the appropriate '.'classes that we use to style each element. These classes control the '.'overall appearance, as well as the showing and hiding via CSS transitions. '.'You can modify any of this with custom CSS or overriding our default '.'variables. It\'s also worth noting that just about any HTML can go within '.'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseThree'],
],
],
[
'header' => [
'content' => 'Accordion Item #2',
'attributes' => ['id' => 'panelsStayOpen-headingTwo'],
],
'body' => [
'content' => '<strong>This is the second item\'s accordion body.</strong> ' .
'It is hidden by default, until the collapse plugin adds the appropriate ' .
'classes that we use to style each element. These classes control the ' .
'overall appearance, as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default ' .
'variables. It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseTwo'],
],
],
[
'id' => 'accordionPanelsStayOpenExample',
'always_open' => true,
]
);

'header' => [
'content' => 'Accordion Item #3',
'attributes' => ['id' => 'panelsStayOpen-headingThree'],
],
'body' => [
'content' => ' <strong>This is the third item\'s accordion body.</strong> ' .
'It is hidden by default, until the collapse plugin adds the appropriate ' .
'classes that we use to style each element. These classes control the ' .
'overall appearance, as well as the showing and hiding via CSS transitions. ' .
'You can modify any of this with custom CSS or overriding our default ' .
'variables. It\'s also worth noting that just about any HTML can go within ' .
'the <code>.accordion-body</code>, though the transition does limit overflow.',
'attributes' => ['id' => 'panelsStayOpen-collapseThree'],
],
],
], [
'id' => 'accordionPanelsStayOpenExample',
'always_open' => true,
]);
```

</TabItem>
Expand Down
Loading

0 comments on commit 8820d32

Please sign in to comment.