diff --git a/LICENSE b/LICENSE index a674d40..879eced 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 98a3aad..c19b117 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/screenshot.png b/screenshot.png index 4e9d69a..93f4752 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/src/@elementlist.latte b/src/@elementlist.latte index 064dfdd..43b7220 100644 --- a/src/@elementlist.latte +++ b/src/@elementlist.latte @@ -6,55 +6,43 @@ {/define} {if $classes} -
{$method->declaringClassName} | -{$method->name}() |
-
- {if $method->hasAnnotation($annotation)}
- {foreach $method->annotations[$annotation] as $description}
- {if $description}
- {$description|annotation:$annotation:$method|noescape} - {/if} - {/foreach} - {/if} - |
-
{$method->declaringClassName} | +{$method->name}() |
+
+ {if $method->hasAnnotation($annotation)}
+ {foreach $method->annotations[$annotation] as $description}
+ {if $description}
+ {$description|annotation:$annotation:$method|noescape} + {/if} + {/foreach} + {/if} + |
+
{$constant->declaringClassName} | -{$constant->name} |
+
{$constant->declaringClassName} | +{$constant->name} |
- {else}
- {$constant->namespaceName} | -{$constant->shortName} |
- {/if}
-
- {foreach $constant->annotations[$annotation] as $description}
- {if $description}
- {$description|annotation:$annotation:$constant|noescape} - {/if} - {/foreach} - |
-
{$constant->shortName}
{$property->declaringClassName} | -${$property->name} | -
- {foreach $property->annotations[$annotation] as $description}
- {if $description}
- {$description|annotation:$annotation:$property|noescape} - {/if} - {/foreach} - |
-
{$property->declaringClassName} | +${$property->name} | +
+ {foreach $property->annotations[$annotation] as $description}
+ {if $description}
+ {$description|annotation:$annotation:$property|noescape} + {/if} + {/foreach} + |
+
{$function->namespaceName} | -{$function->shortName} |
-
- {foreach $function->annotations[$annotation] as $description}
- {if $description}
- {$description|annotation:$annotation:$function|noescape} - {/if} - {/foreach} - |
-
{$function->namespaceName} | +{$function->shortName} |
+
+ {foreach $function->annotations[$annotation] as $description}
+ {if $description}
+ {$description|annotation:$annotation:$function|noescape} + {/if} + {/foreach} + |
+
+
+
+
{if !$class->interface && $method->abstract}abstract{elseif $method->final}final{/if} {if $method->protected}protected{elseif $method->private}private{else}public{/if} {if $method->static}static{/if}
- {ifset $annotations['return']}{$annotations['return'][0]|typeLinks:$method|noescape}{/ifset}
{if $method->returnsReference()}&{/if}
-
-
{block|strip}
- {if $class->internal}
- {$method->name}(
- {else}
- {$method->name}(
- {/if}
- {foreach $method->parameters as $parameter}
- {$parameter->typeHint|typeLinks:$method|noescape}
- {if $parameter->passedByReference}& {/if}${$parameter->name}{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$class|noescape}{elseif $parameter->unlimited},…{/if}{sep}, {/sep}
- {/foreach}
- ){/block}
+ {block|strip}
+ {if $class->internal}
+ {$method->name}(
+ {else}
+ {$method->name}(
+ {/if}
+ {if $method->parameters}
+ {foreach $method->parameters as $parameter}
+ {$parameter->typeHint|typeLinks:$method|noescape}
+ {if $parameter->passedByReference}& {/if}${$parameter->name}
{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|noescape}{elseif $parameter->unlimited},…{/if}{sep}, {/sep}
+ {/foreach}
+ {else}
+ void
+ {/if}
+ ){/block}
+
+
+ {ifset $annotations['return']}: {$annotations['return'][0]|typeLinks:$method|noescape}{/ifset}
+
{if $config->template['options']['elementDetailsCollapsed']}
${$parameter->name}
{if $parameter->unlimited},…{/if}
- {foreach $methods as $method}
- {$method->name}()
{sep}, {/sep}
- {/foreach}
-
+ {foreach $methods as $method}
+ {$method->name}()
{sep}, {/sep}
+ {/foreach}
+
- {foreach $methods as $data}
- {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $methods as $data}
+ {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}
{sep}, {/sep}
+ {/foreach}
+
- {foreach $methods as $method}
- {$method->name}()
{sep}, {/sep}
- {/foreach}
-
+ {foreach $methods as $method}
+ {$method->name}()
{sep}, {/sep}
+ {/foreach}
+
- {foreach $methods as $data}
- {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $methods as $data}
+ {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}
{sep}, {/sep}
+ {/foreach}
+
{$constant->typeHint|typeLinks:$constant|noescape} |
-
-
- {if $class->internal}
- {$constant->name}
- {else}
- {$constant->name}
- {/if}
-
+ Constants summary+
+
+
+ {var $annotations = $constant->annotations}
+
+
+
+ {if $class->internal}
+ {$constant->name}
+ {else}
+ {$constant->name}
+ {/if}
+
-
-
- {$constant|longDescription|noescape}
-
- {foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions}
-
- {$annotation|annotationBeautify}-
- {foreach $descriptions as $description}
- {if $description}
- {$description|annotation:$annotation:$constant|noescape}
- {/foreach}
- - {/if} - {/foreach} - |
-
-
- #
- {$constant->valueDefinition|highlightValue:$class|noescape}
+
+ {$constant|shortDescription:true|noescape}
+
+
+
+ {$constant|longDescription|noescape}
+
+ {foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions}
+ {$annotation|annotationBeautify}+
+ {foreach $descriptions as $description}
+ {if $description}
+ {$description|annotation:$annotation:$constant|noescape}
- + {/if} + {/foreach} |
-
{$constant->valueDefinition|highlightValue:$class|noescape}+
- {foreach $constants as $constant}
- {$constant->name}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $constants as $constant}
+ {$constant->name}
{sep}, {/sep}
+ {/foreach}
+
+
{$property->defaultValueDefinition|highlightValue:$class|noescape}
- {$property->defaultValueDefinition|highlightValue:$class|noescape}+ {/define} -
- {foreach $properties as $property}
- ${$property->name}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $properties as $property}
+ ${$property->name}
{sep}, {/sep}
+ {/foreach}
+
- {foreach $properties as $property}
- ${$property->name}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $properties as $property}
+ ${$property->name}
{sep}, {/sep}
+ {/foreach}
+
- {foreach $properties as $property}
- ${$property->name}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $properties as $property}
+ ${$property->name}
{sep}, {/sep}
+ {/foreach}
+
- {foreach $properties as $property}
- ${$property->name}
{sep}, {/sep}
- {/foreach}
-
+ {foreach $properties as $property}
+ ${$property->name}
{sep}, {/sep}
+ {/foreach}
+
{$constant->typeHint|typeLinks:$constant|noescape} |
- {block|strip}
- {var $element = $template->resolveElement($constant->valueDefinition, $constant)}
- {if $element}{$constant->valueDefinition}{else}{$constant->valueDefinition|highlightValue:$constant|noescape} {/if}
- {/block} |
-
{$constant->typeHint|typeLinks:$constant|noescape} |
+ {block|strip}
+ {var $element = $template->resolveElement($constant->valueDefinition, $constant)}
+ {if $element}{$constant->valueDefinition}{else}{$constant->valueDefinition|highlightValue:$constant|noescape} {/if}
+ {/block} |
+
{$parameter->typeHint|typeLinks:$function|noescape} |
- {block|strip}
- {if $parameter->passedByReference}& {/if}${$parameter->name}{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$function|noescape}{elseif $parameter->unlimited},…{/if}
- {/block} |
- {$parameter->description|description:$function} | -
{$parameter->typeHint|typeLinks:$function|noescape} |
+ {block|strip}
+ {if $parameter->passedByReference}& {/if}${$parameter->name}{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$function|noescape}{elseif $parameter->unlimited},…{/if}
+ {/block} |
+ {$parameter->description|description:$function} | +
- {$annotations['return'][0]|typeLinks:$function|noescape}
- |
- - {$annotations['return'][0]|description:$function|noescape} - | -
+ {$annotations['return'][0]|typeLinks:$function|noescape}
+ |
+ + {$annotations['return'][0]|description:$function|noescape} + | +
- {$throws|typeLinks:$function|noescape}
- |
- - {$throws|description:$function|noescape} - | -
+ {$throws|typeLinks:$function|noescape}
+ |
+ + {$throws|description:$function|noescape} + | +
{$namespace} | -
{$namespace} | +
{$namespace} | -
{$namespace} | +
- {$package} - | -
+ {$package} + | +
{$package} | -
{$package} | +