forked from liferay/clay
-
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.
Add base page for API layout | Fixes liferay#657
- Loading branch information
1 parent
1132da8
commit 51f1500
Showing
1 changed file
with
106 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{namespace ElectricApi} | ||
|
||
{template .render} | ||
{@param apiData: ?} | ||
{@param project: ?} | ||
{@param site: ?} | ||
{@param? entityData: ?} | ||
|
||
<div class="api"> | ||
<script src="/js/bundles/electricApi.js"></script> | ||
<div class="navbar navbar-mobile navbar-expand-lg navbar-header"> | ||
<a class="navbar-brand d-flex" href="/"> | ||
<img class="logo mr-2" src="/images/clay_logo_w.png" alt="" /> | ||
<span class="title h1 font-weight-bold mb-0 p-1">{$site.title} </span> | ||
</a> | ||
|
||
<button class="navbar-toggler sidebar-toggler p-3" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-bars"> | ||
<use xlink:href="/vendor/lexicon/icons.svg#bars" /> | ||
</svg> | ||
</button> | ||
</div> | ||
|
||
<nav class="sidebar-toggler-content sidenav-fixed sidenav-menu-slider" id="clay-sidebar"> | ||
<div class="sidebar sidebar-clay-site sidenav-menu d-flex flex-column"> | ||
<div class="sidebar-header"> | ||
<div class="navbar navbar-expand-lg navbar-header"> | ||
<a class="navbar-brand" href="/"> | ||
<img class="logo mr-2" src="/images/clay_logo_w.png" alt="{$site.title}" /> | ||
<span class="title">{$site.title} </span> | ||
<small>by Liferay</small> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<div class="sidebar-body mb-auto"> | ||
<div class="sidebar-search"> | ||
<div class="page-autocomplete"> | ||
<div class="form-group"> | ||
<div class="input-group"> | ||
<input autocomplete="off" class="form-control" name="query" placeholder="Search API" ref="input" type="text" aria-activedescendant="" aria-autocomplete="list" aria-haspopup="true" aria-owns="autocomplete-6" role="combobox"> | ||
<span class="input-group-addon"> | ||
<svg class="lexicon-icon"> | ||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/vendor/lexicon/icons.svg#search"></use> | ||
</svg> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<ul class="nav nav-nested nav-pills nav-stacked"> | ||
{foreach $entity in $apiData} | ||
<li class="{if $entityData.name == $entity.name} active{/if}"> | ||
<a class="align-middle" href="/api/{$project.ref}/{$entity.name}.html"> | ||
<span>{$entity.name}</span> | ||
</a> | ||
</li> | ||
{/foreach} | ||
</ul> | ||
</div> | ||
<ul class="nav-icons"> | ||
<li class="d-block mb-3"> | ||
<a class="rounded-circle sticker sticker-secondary" href="https://github.com/liferay/clay/issues" target="_blank"> | ||
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-bars"> | ||
<use xlink:href="/vendor/lexicon/icons.svg#comments" /> | ||
</svg> | ||
</a> | ||
</li> | ||
<li class="d-block"> | ||
<a class="rounded-circle sticker sticker-secondary" href="https://github.com/liferay/clay" target="_blank"> | ||
<img class="lexicon-icon" src="/images/home/GitHub-Mark-64px.svg" alt=""> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
|
||
<div class="sidebar-offset"> | ||
<div class="clay-site-container container-fluid"> | ||
{if $entityData and $entityData.name} | ||
{call ElectricAPIEntities.render} | ||
{param entityData: $entityData /} | ||
{param project: $project /} | ||
{/call} | ||
{else} | ||
<div class="row"> | ||
<div class="col-xs-16"> | ||
<h1 class="docs-home-top-title">{$project.ref}</h1> | ||
</div> | ||
</div> | ||
{/if} | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
window.electricPageComponent = new pageComponent.default({lb} | ||
project: {lb} | ||
ref: '{$project.ref}', | ||
repo: '{$project.repo}', | ||
user: '{$project.user}' | ||
{rb} | ||
{rb}); | ||
</script> | ||
</div> | ||
{/template} |