-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified: include/Module/Article/Assets/dist/editor.js modified: include/Module/Article/Assets/src/editor.js modified: include/Module/Editor/Assets/dist/main.js modified: include/Module/Editor/Assets/src/parts/App.tsx modified: include/Module/Editor/Blocks.php new file: include/Module/Editor/Blocks/button/render.php new file: include/Module/Editor/Blocks/carousel-control-next/render.php new file: include/Module/Editor/Blocks/carousel-control-prev/render.php new file: include/Module/Editor/Blocks/carousel-indicators/render.php new file: include/Module/Editor/Blocks/carousel-inner/render.php new file: include/Module/Editor/Blocks/carousel-item/render.php new file: include/Module/Editor/Blocks/carousel/render.php modified: include/Module/Editor/Blocks/image/render.php new file: include/Module/Editor/Blocks/nav-item/render.php new file: include/Module/Editor/Blocks/nav-link/render.php new file: include/Module/Editor/Blocks/navbar-brand/render.php new file: include/Module/Editor/Blocks/navbar-collapse/render.php new file: include/Module/Editor/Blocks/navbar-nav/render.php new file: include/Module/Editor/Blocks/navbar-toggler/render.php new file: include/Module/Editor/Blocks/navbar/render.php modified: include/Module/Editor/Blocks/text/render.php
- Loading branch information
Showing
21 changed files
with
124 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<button <?= !empty($className) ? 'class="' . $className . '"' : '' ?> type="button" <?= implode(" ", array_map(function($key, $value) { return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</button> | ||
|
4 changes: 4 additions & 0 deletions
4
include/Module/Editor/Blocks/carousel-control-next/render.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<button class="carousel-control-prev" type="button" <?= isset($attributes['data-bs-target']) ? " data-bs-target=\"" . $attributes['data-bs-target'] . "\"" : "" ?> data-bs-slide="prev"> | ||
<span class="carousel-control-prev-icon" aria-hidden="true"></span> | ||
<span class="visually-hidden">Previous</span> | ||
</button> |
5 changes: 5 additions & 0 deletions
5
include/Module/Editor/Blocks/carousel-control-prev/render.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<button class="carousel-control-next" type="button" <?= isset($attributes['data-bs-target']) ? " data-bs-target=\"" . $attributes['data-bs-target'] . "\"" : "" ?> data-bs-slide="next"> | ||
<span class="carousel-control-next-icon" aria-hidden="true"></span> | ||
<span class="visually-hidden">Next</span> | ||
</button> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
$class = " class=\"" . implode(" ", $classes ?? []) . "\""; | ||
?> | ||
|
||
<div class="carousel-indicators"> | ||
<?= renderComponents($components) ?> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$class = " class=\"" . implode(" ", $classes ?? []) . "\""; | ||
?> | ||
|
||
<div class="carousel-inner"><?= renderComponents($components) ?></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
<div class="carousel-item<?= $__index == 0 ? " active" : "" ?>" <?= implode(" ", array_map(function($attr) use ($attributes) { return $attr . "=\"" . $attributes[$attr] . "\""; }, array_keys($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
$class = " class=\"" . implode(" ", $classes ?? []) . "\""; | ||
?> | ||
|
||
<div class="carousel slide" <?= isset($attributes['id']) ? 'id="' . $attributes['id'] . '"' : '' ?>> | ||
<?= renderComponents($components) ?> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
$class = " class=\"" . implode(" ", $classes ?? []) . "\""; | ||
|
||
?> | ||
|
||
<img<?= $class ?> <?= implode(" ", array_map(function($attr) use ($attributes) { return $attr . "=\"" . $attributes[$attr] . "\""; }, array_keys($attributes))) ?> /> | ||
<img<?= !empty($className) ? ' class="' . $className . '"' : '' ?> <?= implode(" ", array_map(function($attr) use ($attributes) { return $attr . "=\"" . $attributes[$attr] . "\""; }, array_keys($attributes))) ?> /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<li class="nav-item" <?= implode(" ", array_map(function ($key, $value) { | ||
return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a <?= !empty($className) ? ' class="' . $className . '"' : '' ?> <?= implode(" ", array_map(fn($k, $v) => "$k=\"$v\"", array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
?> | ||
|
||
<a class="navbar-brand" <?= implode(" ", array_map(function ($key, $value) { | ||
return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
?> | ||
|
||
<div class="collapse navbar-collapse" <?= implode(" ", array_map(function ($key, $value) { | ||
return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
?> | ||
|
||
<ul class="navbar-nav me-auto mb-2 mb-lg-0" <?= implode(" ", array_map(function ($key, $value) { | ||
return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<?= renderComponents($components) ?> | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
?> | ||
|
||
<button class="navbar-toggler" <?= implode(" ", array_map(function ($key, $value) { | ||
return $key . '="' . $value . '"'; }, array_keys($attributes), array_values($attributes))) ?>> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<nav | ||
<?= !empty($className) ? "class='" . $className . "'" : "" ?> role="navigation"><?= renderComponents($components) ?> | ||
</nav> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<?php | ||
|
||
?> | ||
|
||
<p><?= renderComponents($components) ?></p> | ||
if (isset($tagName)) { | ||
echo "<$tagName>" . renderComponents($components) . "</$tagName>"; | ||
} else { | ||
echo renderComponents($components); | ||
} |