This repository has been archived by the owner on Mar 29, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
5,593 additions
and
4,070 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -1,31 +1,16 @@ | ||
<?php | ||
/** | ||
* This file is part of the LivingMarkup package. | ||
* | ||
* (c) Matthew Heroux <matthewheroux@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
<?php require $_SERVER['DOCUMENT_ROOT'] . '/src/Autoloader.php'; ?> | ||
<!-- | ||
~ This file is part of the LivingMarkup package. | ||
~ | ||
~ (c) Matthew Heroux <matthewheroux@gmail.com> | ||
~ | ||
~ For the full copyright and license information, please view the LICENSE | ||
~ file that was distributed with this source code. | ||
--> | ||
|
||
require '../../vendor/autoload.php'; | ||
<html lang="en"> | ||
|
||
// instantiate Director | ||
$director = new LivingMarkup\Director(); | ||
|
||
// instantiate Builder | ||
$builder = new LivingMarkup\Builder\DynamicPageBuilder(); | ||
|
||
// define build parameters | ||
$parameters = [ | ||
'filename' => __DIR__ . DIRECTORY_SEPARATOR . 'input.html', | ||
'handlers' => [ | ||
'//img' => 'LivingMarkup\Component\Img', | ||
], | ||
'hooks' => [ | ||
'onRender' => 'RETURN_CALL', | ||
] | ||
]; | ||
|
||
// echo Director build PageBuilder | ||
echo $director->build($builder, $parameters); | ||
<body> | ||
<img src="livingMarkup_icon_logo.jpg" height="100" width="300" offset="100,-100" alt="Chicken Finger 12" /> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php require $_SERVER['DOCUMENT_ROOT'] . '/src/Autoloader.php'; ?> | ||
<html> | ||
<p>Praesent ullamcorper eros nec neque luctus, sed sodales risus euismod. Proin consectetur elementum urna at feugiat. | ||
Vivamus porttitor vulputate orci id consequat. Phasellus ut dui sagittis, elementum ante a, rutrum velit. Duis | ||
mollis feugiat purus nec porttitor. | ||
<redact> | ||
Nulla tempor nunc et libero malesuada, mattis rutrum odio euismod. Proin commodo ligula luctus justo | ||
viverra feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut purus mollis, feugiat massa | ||
mollis, placerat purus. | ||
</redact> | ||
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas vitae | ||
bibendum libero. Sed lacus ex, ornare non ligula dignissim, tincidunt ultrices mauris. Aliquam ac facilisis magna. | ||
Vivamus blandit pretium finibus. | ||
</p> | ||
|
||
<redact> | ||
<p>Donec ultricies rutrum nulla, vitae tempor ex porttitor nec. Donec nec sem metus. Nunc leo magna, pulvinar | ||
non tellus vel, tincidunt consectetur sem. Nulla tempor mauris at quam imperdiet rutrum. Pellentesque habitant | ||
morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus at gravida sem. Quisque blandit, | ||
magna vel ultrices faucibus, felis elit rhoncus eros, vel tempus elit nulla non orci. Cras arcu elit, | ||
pellentesque sed mollis nec, porttitor ut est. Ut elit orci, fringilla et commodo sed, tincidunt vehicula nisl. | ||
Suspendisse vitae dolor eget tellus maximus ornare. Nulla non vestibulum est.</p> | ||
|
||
<p> | ||
Quisque mauris tortor, varius sit amet massa non, molestie congue dui. Nulla facilisi. Proin ac dolor fermentum | ||
nisi elementum maximus. Donec nec odio vitae magna ultricies luctus vel id diam. Suspendisse venenatis <b>congue | ||
ultricies<?php echo 'PASSWORD'; ?></b>. Pellentesque non ex elementum, dapibus ipsum eu, feugiat arcu. | ||
Phasellus efficitur commodo ante vulputate aliquam. Sed posuere pulvinar quam, in elementum risus tristique a. | ||
Nullam dictum arcu eu mi lobortis, sodales tempor dolor fringilla. Nulla feugiat mollis nisl, non vulputate | ||
augue efficitur non. Nulla ac facilisis nisl, ac iaculis neque. | ||
</p> | ||
</redact> | ||
|
||
<p> | ||
Pellentesque scelerisque pharetra justo quis gravida. Cras mattis dui eu finibus luctus. Mauris non condimentum | ||
purus. Suspendisse suscipit elementum nunc, a iaculis erat posuere vel. Quisque mattis gravida ipsum non tincidunt. | ||
Sed ut posuere justo. Ut elementum ullamcorper ligula, ac lacinia nibh facilisis nec. Donec eu suscipit risus. Sed | ||
arcu leo, ultrices id mollis ut, consectetur in lectus. Aenean a sollicitudin odio. Nam rhoncus mattis mauris et | ||
commodo. Cras fringilla, est eget volutpat facilisis, dolor mauris porttitor mi, eget ullamcorper eros lectus sit | ||
amet risus. Morbi vel magna eu odio auctor maximus sed ut ante. Maecenas commodo enim in | ||
<redact>dui feugiat</redact> | ||
sollicitudin. | ||
</p> | ||
|
||
</html> |
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
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,30 @@ | ||
<?php | ||
/** | ||
* This file is part of the LivingMarkup package. | ||
* | ||
* (c) Matthew Heroux <matthewheroux@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace LivingMarkup\Component; | ||
|
||
class Redact extends Component | ||
{ | ||
public $char = '█'; | ||
|
||
// TODO: same sort of class would be useful for a search / highlighter function. | ||
|
||
/** | ||
* Renders with chars not between tag replaced with $char | ||
* | ||
* a black and white list of tags must consider redact element may be between tags | ||
* | ||
* @return string | ||
*/ | ||
public function onRender(): string | ||
{ | ||
return preg_replace("/<[^>]+>(*SKIP)(*F)|./", $this->char, $this->xml); | ||
} | ||
} |
This file was deleted.
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
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