Skip to content

Commit

Permalink
Merge pull request #26 from olvlvl/v2
Browse files Browse the repository at this point in the history
A redesign of my theme
  • Loading branch information
olvlvl authored Apr 2, 2017
2 parents 5bf6888 + 0d22100 commit 4257ef3
Show file tree
Hide file tree
Showing 19 changed files with 1,221 additions and 829 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License
---------------

- Copyright (c) 2012 [Olivier Laviale](https://github.com/olvlvl)
- Copyright (c) 2012-2017 [Olivier Laviale](https://github.com/olvlvl)
- Copyright (c) 2014 [Tomáš Votruba](http://tomasvotruba.cz)

Permission is hereby granted, free of charge, to any person
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Twitter Bootstrap Theme

[![Downloads this Month](https://img.shields.io/packagist/dm/apigen/theme-bootstrap.svg?style=flat-square)](https://packagist.org/packages/apigen/theme-bootstrap)
[![Latest stable](https://img.shields.io/packagist/v/apigen/theme-bootstrap.svg?style=flat-square)](https://packagist.org/packages/apigen/theme-bootstrap)
[![Downloads this Month](https://img.shields.io/packagist/dm/apigen/theme-bootstrap.svg)](https://packagist.org/packages/apigen/theme-bootstrap)
[![Latest stable](https://img.shields.io/packagist/v/apigen/theme-bootstrap.svg)](https://packagist.org/packages/apigen/theme-bootstrap)

Uses [Twitter Bootstrap 3.3.2](https://github.com/twbs/bootstrap/releases/tag/v3.3.2), *released on 2015-01-19*
A theme for [ApiGen](http://www.apigen.org/) that matches [Twitter Bootstrap v4.0.0-alpha.6](https://github.com/twbs/bootstrap/releases/tag/v4.0.0-alpha.6).

![Twitter Bootstrap Theme](screenshot.png)

## Installation

Clone the theme as `ApiGen/vendor/apigen/theme-bootstrap`.

## Usage
Add `--template-theme bootstrap` to Apigen command like :

Add `--template-theme bootstrap` to ApiGen command like :

apigen generate --source app --destination docs/api/v1 --template-theme bootstrap

Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 24 additions & 36 deletions src/@elementlist.latte
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,43 @@
{/define}

{if $classes}
<div class="panel panel-default">
<div class="panel-heading"><h2>Classes summary</h2></div>
<table class="summary table table-bordered table-striped" id="classes">
{include elements, elements => $classes}
</table>
</div>
<h2>Classes summary</h2>
<table class="summary" id="classes">
{include elements, elements => $classes}
</table>
{/if}

{if $interfaces}
<div class="panel panel-default">
<div class="panel-heading"><h2>Interfaces summary</h2></div>
<table class="summary table table-bordered table-striped" id="interfaces">
{include elements, elements => $interfaces}
</table>
</div>
<h2>Interfaces summary</h2>
<table class="summary" id="interfaces">
{include elements, elements => $interfaces}
</table>
{/if}

{if $traits}
<div class="panel panel-default">
<div class="panel-heading"><h2>Traits summary</h2></div>
<table class="summary table table-bordered table-striped" id="traits">
{include elements, elements => $traits}
</table>
</div>
<h2>Traits summary</h2>
<table class="summary" id="traits">
{include elements, elements => $traits}
</table>
{/if}

{if $exceptions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Exceptions summary</h2></div>
<table class="summary table table-bordered table-striped" id="exceptions">
{include elements, elements => $exceptions}
</table>
</div>
<h2>Exceptions summary</h2>
<table class="summary" id="exceptions">
{include elements, elements => $exceptions}
</table>
{/if}

{if $constants}
<div class="panel panel-default">
<div class="panel-heading"><h2>Constants summary</h2></div>
<table class="summary table table-bordered table-striped" id="constants">
{include elements, elements => $constants}
</table>
</div>
<h2>Constants summary</h2>
<table class="summary" id="constants">
{include elements, elements => $constants}
</table>
{/if}

{if $functions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Functions summary</h2></div>
<table class="summary table table-bordered table-striped" id="functions">
{include elements, elements => $functions}
</table>
</div>
<h2>Functions summary</h2>
<table class="summary" id="functions">
{include elements, elements => $functions}
</table>
{/if}
177 changes: 97 additions & 80 deletions src/@layout.latte
Original file line number Diff line number Diff line change
Expand Up @@ -5,84 +5,94 @@
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex" n:if="!$robots">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<title>{include title}{if 'overview' !== $active && $config->title} | {$config->title}{/if}</title>

<link rel="stylesheet" href="{='resources/bootstrap.min.css'|staticFile}">
<link rel="stylesheet" href="{='resources/style.css'|staticFile}">
<link n:if="$config->googleCseId" rel="search" type="application/opensearchdescription+xml" title="{$config->title}" href="{$config->baseUrl}/opensearch.xml">

<script n:if="$config->googleAnalytics">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{*<script n:if="$config->googleAnalytics" type="text/javascript">*}
{*(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){*}
{*(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),*}
{*m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)*}
{*})(window,document,'script','//www.google-analytics.com/analytics.js','ga');*}

ga('create', {$config->googleAnalytics}, 'auto');
ga('send', 'pageview');
</script>
{*ga('create', {$config->googleAnalytics}, 'auto');*}
{*ga('send', 'pageview');*}
{*</script>*}
</head>

<body>
<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">{if $config->title}{$config->title}{else}Overview{/if}</a>
</div>
<div class="collapse navbar-collapse">

<form{if $config->googleCseId} action="http://www.google.com/cse"{/if} id="search" class="navbar-form navbar-left" role="search">
<input type="hidden" name="cx" value="{$config->googleCseId}">
<input type="hidden" name="ie" value="UTF-8">
<div class="form-group">
<input type="text" name="q" class="search-query form-control" placeholder="Search"{if 'overview' === $active} autofocus{/if}>
</div>
</form>

<ul class="nav navbar-nav">
<li n:class="'package' === $active ? active" n:if="$packages">
<a n:tag-if="'package' !== $active && $package" href="{$package|packageUrl}" title="Summary of {$package}"><span>Package</span></a>
</li>
<li n:class="'namespace' === $active ? active" n:if="$namespaces">
<a n:tag-if="'namespace' !== $active && $namespace" href="{$namespace|namespaceUrl}" title="Summary of {$namespace}"><span>Namespace</span></a>
</li>
<li n:class="'class' === $active ? active" n:if="!$function && !$constant">
<a n:tag-if="'class' !== $active && $class" href="{$class|classUrl}" title="Summary of {$class->name}"><span>Class</span></a>
</li>
<li n:class="'function' === $active ? active" n:if="$function">
<a n:tag-if="'function' !== $active" href="{$function|functionUrl}" title="Summary of {$function->name}"><span>Function</span></a>
</li>
<li n:class="'constant' === $active ? active" n:if="$constant">
<a n:tag-if="'constant' !== $active" href="{$constant|constantUrl}" title="Summary of {$constant->name}"><span>Constant</span></a>
</li>

<li class="divider-vertical" n:if="$config->tree || $config->deprecated || $config->todo"></li>

<li n:class="'tree' === $active ? active" n:if="$config->tree">
<a n:tag-if="'tree' !== $active" href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>

{foreach $annotationGroups as $annotation}
<li n:class="$active === 'annotation-group-' . $annotation ? active">
<a n:tag-if="$active !== 'annotation-group-' . $annotation" href="annotation-group-{$annotation}.html" title="List of elements with {$annotation} annotation">
<span>{$annotation|firstUpper}</span>
</a>
</li>
{/foreach}

<li class="divider-vertical" n:if="$config->download"></li>

<li n:if="$config->download">
<a href="{$archive}" title="Download documentation as ZIP archive"><span>Download</span></a>
</li>
</ul>
</div>
</div>
<nav class="navbar">
<svg width="50" height="50" viewBox="23.177 138.194 50 50" xmlns="http://www.w3.org/2000/svg" class="sidebar-toggle" role="button" aria-pressed="false"><path d="M73.18 146.94c0 .7-.43 1.25-.96 1.25H24.14c-.53 0-.96-.58-.96-1.26v-7.5c0-.7.43-1.26.96-1.26h48.08c.53 0 .96.55.96 1.24v7.5zm0 12.5c0-.7-.43-1.25-.96-1.25H24.14c-.53 0-.96.54-.96 1.23v7.5c0 .7.43 1.25.96 1.25h48.08c.53 0 .96-.56.96-1.26v-7.5zm0 20c0-.7-.43-1.25-.96-1.25H24.14c-.53 0-.96.54-.96 1.23v7.5c0 .7.43 1.25.96 1.25h48.08c.53 0 .96-.57.96-1.26v-7.5z"/></svg>
<div class="navbar-brand"><a href="index.html">{if $config->title}{$config->title}{else}Overview{/if}</a></div>
<div class="collapse navbar-collapse">
<ul class="navbar-nav">
{capture $navbarNav}
<li n:class="'package' === $active ? active" n:if="$packages">
<a n:tag-if="'package' !== $active && $package" href="{$package|packageUrl}" title="Summary of {$package}"><span class="nav-link">Package</span></a>
</li>
<li n:class="'namespace' === $active ? active" n:if="$namespaces">
<a n:tag-if="'namespace' !== $active && $namespace" href="{$namespace|namespaceUrl}" title="Summary of {$namespace}"><span class="nav-link">Namespace</span></a>
</li>
<li n:class="'class' === $active ? active" n:if="!$function && !$constant">
<a n:tag-if="'class' !== $active && $class" href="{$class|classUrl}" title="Summary of {$class->name}"><span class="nav-link">Class</span></a>
</li>
<li n:class="'function' === $active ? active" n:if="$function">
<a n:tag-if="'function' !== $active" href="{$function|functionUrl}" title="Summary of {$function->name}"><span class="nav-link">Function</span></a>
</li>
<li n:class="'constant' === $active ? active" n:if="$constant">
<a n:tag-if="'constant' !== $active" href="{$constant|constantUrl}" title="Summary of {$constant->name}"><span class="nav-link">Constant</span></a>
</li>

<li class="divider-vertical" n:if="$config->tree || $config->deprecated || $config->todo"></li>

<li n:class="'tree' === $active ? active" n:if="$config->tree">
<a n:tag-if="'tree' !== $active" href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span class="nav-link">Tree</span></a>
</li>

{foreach $annotationGroups as $annotation}
<li n:class="$active === 'annotation-group-' . $annotation ? active">
<a n:tag-if="$active !== 'annotation-group-' . $annotation" href="annotation-group-{$annotation}.html" title="List of elements with {$annotation} annotation">
<span class="nav-link">{$annotation|firstUpper}</span>
</a>
</li>
{/foreach}

<li class="divider-vertical" n:if="$config->download"></li>

<li n:if="$config->download">
<a href="{$archive}" class="nav-link" title="Download documentation as ZIP archive"><span>Download</span></a>
</li>
{/capture}
{$navbarNav|noescape}
</ul>

<form{if $config->googleCseId} action="http://www.google.com/cse"{/if} id="search" role="search" accept-charset="UTF-8" class="search-wrapper">
<svg viewBox="0 0 512 640" xmlns="http://www.w3.org/2000/svg"><path d="M215.64 62.7a154.5 154.5 0 1 1-154.5 154.5 154.5 154.5 0 0 1 154.5-154.5m0-61.14a215.68 215.68 0 0 0-84 414.31A215.68 215.68 0 0 0 299.59 18.52a214.35 214.35 0 0 0-84-17z"/><path d="M315.188 356.876l43.232-43.233L511.997 467.22l-43.233 43.232z"/></svg>
<input class="search-query"
size="8"
data-hotkey="s" name="q" placeholder="Search"
aria-label="Search this document"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
autocapitalize="off"
type="text">
</form>
</div>
</nav>

<div id="left">
<div id="menu">
{define group}
<div class="veil"></div>

<aside class="sidebar">
<nav>
<div id="navigation-mirror">
<strong>Navigation</strong>
<ul>{$navbarNav|noescape}</ul>
</div>

{define group}
<ul>
{foreach $groups as $group}
{var $nextLevel = substr_count($iterator->nextValue, '\\') > substr_count($group, '\\')}
Expand All @@ -104,10 +114,10 @@

<div id="groups">
{if $namespaces}
<h3>Namespaces</h3>
<strong>Namespaces</strong>
{include group, groups => $namespaces, actualGroup => $namespace, groupBy => 'namespace'}
{elseif $packages}
<h3>Packages</h3>
<strong>Packages</strong>
{include group, groups => $packages, actualGroup => $package, groupBy => 'package'}
{/if}
</div>
Expand All @@ -120,49 +130,56 @@

<div id="elements">
{if $classes}
<h3>Classes</h3>
<strong>Classes</strong>
{include elements, elements => $classes, activeElement => $class}
{/if}

{if $interfaces}
<h3>Interfaces</h3>
<strong>Interfaces</strong>
{include elements, elements => $interfaces, activeElement => $class}
{/if}

{if $traits}
<h3>Traits</h3>
<strong>Traits</strong>
{include elements, elements => $traits, activeElement => $class}
{/if}

{if $exceptions}
<h3>Exceptions</h3>
<strong>Exceptions</strong>
{include elements, elements => $exceptions, activeElement => $class}
{/if}

{if $constants}
<h3>Constants</h3>
<strong>Constants</strong>
{include elements, elements => $constants, activeElement => $constant}
{/if}

{if $functions}
<h3>Functions</h3>
<strong>Functions</strong>
{include elements, elements => $functions, activeElement => $function}
{/if}
</div>
</div>
</div>

<div id="splitter"></div>
</nav>
</aside>

<div id="right">
<div id="rightInner">
{include content}
</div>

<div id="footer">
<footer>
{$config->title} API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</footer>
</div>

<div id="assets" aria-hidden="true">

<svg data-asset="icon-anchor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M 4 9 L 5 9 L 5 10 L 4 10 C 2.5 10 1 8.31 1 6.5 C 1 4.69 2.55 3 4 3 L 6.442 3 L 8 3 C 9.45 3 11 4.69 11 6.5 C 11 7.91 10.09 9.22 9 9.75 L 9 8.59 C 9.58 8.14 10 7.32 10 6.5 C 10 5.22 8.98 4 8 4 L 4 4 C 3.02 4 2 5.22 2 6.5 C 2 7.78 3 9 4 9 Z M 13 6 L 12 6 L 12 7 L 12.679 7 L 13 7 C 14 7 15 8.22 15 9.5 C 15 10.78 13.98 12 13 12 L 9 12 C 8.02 12 7 10.78 7 9.5 C 7 8.67 7.42 7.86 8 7.41 L 8 6.25 C 6.91 6.78 6 8.09 6 9.5 C 6 11.31 7.55 13 9 13 L 13 13 C 14.45 13 16 11.31 16 9.5 C 16 7.69 14.5 6 13 6 Z"></path>
</svg>

</div>

<script src="{='resources/combined.js'|staticFile}"></script>
<script src="{='elementlist.js'|staticFile}"></script>
</body>
Expand Down
Loading

0 comments on commit 4257ef3

Please sign in to comment.