-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
27 changed files
with
992 additions
and
613 deletions.
There are no files selected for viewing
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
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
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,49 @@ | ||
|
||
<?php include __DIR__ . '/inc/header.php'; ?> | ||
|
||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item active" aria-current="page"><a href="<?php echo $url; ?>">TypeSchema</a> / <?php echo $type; ?></li> | ||
</ol> | ||
</nav> | ||
|
||
<div class="container"> | ||
<h1 class="display-4"><?php echo $type; ?> examples</h1> | ||
<?php foreach($examples as $key => $example): ?> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="psx-object"> | ||
<h1><?php echo $example->title; ?></h1> | ||
<div class="psx-object-description"><?php echo $example->description; ?></div> | ||
<div class="example-box"><pre><code class="json"><?php echo $example->schema; ?></code></pre></div> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<?php foreach ($example->types as $type => $code): ?> | ||
<?php if ($code instanceof stdClass): ?> | ||
<?php foreach ($code as $fileName => $chunk): ?> | ||
<div class="psx-object"> | ||
<h1><?php echo $fileName; ?></h1> | ||
<div class="example-box"><pre><code class="<?php echo $type; ?>"><?php echo htmlspecialchars($chunk); ?></code></pre></div> | ||
</div> | ||
<?php endforeach; ?> | ||
<?php else: ?> | ||
<div class="psx-object"> | ||
<h1>Output</h1> | ||
<div class="example-box"><pre><code class="<?php echo $type; ?>"><?php echo htmlspecialchars($code); ?></code></pre></div> | ||
</div> | ||
<?php endif; ?> | ||
<?php endforeach; ?> | ||
</div> | ||
</div> | ||
<hr> | ||
<?php endforeach; ?> | ||
|
||
<div class="typeschema-edit"> | ||
<a href="https://github.com/apioo/typeschema/blob/master/www/resources/template/<?php echo pathinfo(__FILE__, PATHINFO_BASENAME); ?>"><i class="bi bi-pencil"></i> Edit this page</a> | ||
</div> | ||
</div> | ||
|
||
<script>window.addEventListener('load', function() { hljs.highlightAll() });</script> | ||
|
||
<?php include __DIR__ . '/inc/footer.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,33 @@ | ||
|
||
<?php include __DIR__ . '/inc/header.php'; ?> | ||
|
||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item active" aria-current="page"><a href="<?php echo $url; ?>">TypeSchema</a> / <a href="<?php echo $router->getAbsolutePath([\App\Controller\Generator::class, 'show']); ?>">Generator</a> / <?php echo $typeName; ?></li> | ||
</ol> | ||
</nav> | ||
|
||
<div class="container-fluid"> | ||
<h1 class="display-4"><?php echo $typeName; ?> DTO Generator</h1> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<form method="post" action="<?php echo $router->getAbsolutePath([\App\Controller\Generator::class, 'generate'], ['type' => $type]); ?>"> | ||
<div class="form-group"> | ||
<input id="namespace" name="namespace" placeholder="Optional a namespace" value="<?php echo htmlspecialchars($namespace ?? ''); ?>" class="form-control"> | ||
</div> | ||
<div class="form-group"> | ||
<textarea id="schema" name="schema" rows="24" class="form-control"><?php echo htmlspecialchars($schema); ?></textarea> | ||
</div> | ||
<input type="submit" value="Generate" class="btn btn-primary"> | ||
<input type="submit" value="Download" class="btn btn-secondary"> | ||
</form> | ||
</div> | ||
<div class="col-6"> | ||
<div><pre><code class="<?php echo $type ?? ''; ?>"><?php echo isset($output) ? htmlspecialchars($output) : ''; ?></code></pre></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script>window.addEventListener('load', function() { hljs.highlightAll() });</script> | ||
|
||
<?php include __DIR__ . '/inc/footer.php'; ?> |
Oops, something went wrong.