api-generator-templates/Web-documentation/all_contents.html.twig

142 lines
5.1 KiB
Twig

{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %}
<body class="main-page">
<div class="aside aside-left">
<div class="header">
<div class="title">{{ pageTitle }}</div>
</div>
<div class="content">
{%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %}
</div>
</div>
<div class="aside aside-right">
{%- include 'blocks/header.html.twig' with {
imagesFolderPath: imagesFolderPath,
methodsPath: methodsPath,
relativeToRootPath: relativeToRootPath
} %}
<div class="content">
<div class="page-data">
<h1>{{ pageTitle }}</h1>
{% if author is not empty %}
<h2>{{ author }}</h2>
{% endif %}
<p>Версия {{ version }}</p>
<p>{{ "now"|date("dd.MM.YYYY") }}</p>
</div>
<h1>
Содержание
</h1>
<div class="page-data">
<div class="numbered-contents">
<ol>
<li>
<h2 class="numbered-contents__title">
<a href="index.html">Общие принципы построения API</a>
</h2>
<ol>
<li><a href="index.html">Протокол общения между сервером и клиентом</a></li>
<li><a href="index.html">Стиль построения API</a></li>
<li><a href="index.html">Используемая кодировка</a></li>
<li><a href="index.html">Допустимые задержки</a></li>
<li><a href="index.html">Передача параметров</a></li>
<li><a href="index.html">Перечисления</a></li>
<li><a href="index.html">Общий вид ответа сервера</a></li>
</ol>
</li>
{% if versioningEnabled %}
<li>
<h2 class="numbered-contents__title">
<a href="index.html">Версионирование API</a>
</h2>
<ol>
<li><a href="versioning.html">Описание</a></li>
<li><a href="versioning.html">Пример</a></li>
</ol>
</li>
{% endif %}
{%- include 'blocks/table-of-contents-body.html.twig' with {
methods: tableOfContents.methods,
classes: tableOfContents.classes,
enums: tableOfContents.enums
} %}
</ol>
</div>
</div>
<h1>
Общие принципы построения API
</h1>
{%- include 'blocks/main-concepts.html.twig' with { responseClass: responseClass } %}
{% if versioningEnabled %}
<h1>
Версионирование API
</h1>
{%- include 'blocks/versioning-info.html.twig' with { errorType: errorType, errorsPagePath: errorsPagePath } %}
{% endif %}
{% if methodGroups is not null %}
<h1>
Методы
</h1>
{% for methodGroup in methodGroups %}
<div class="page-data">
<h2>{{ methodGroup.title }}</h2>
{% if methodGroup.description is not null %}
<p>{{ methodGroup.description }}</p>
{% endif %}
{% if methodGroup.baseUrl is not empty %}
<p>BaseUrl: {{ methodGroup.baseUrl }}</p>
{% endif %}
</div>
{% for method in methodGroup.methods %}
<div class="page-data">
{%- include 'blocks/method-body.html.twig' with {
method: method,
objectsLinks: objectsLinks,
showSandbox: false
} %}
</div>
{% endfor %}
{% endfor %}
{% endif %}
{% if classes is not null %}
<h1>
Классы
</h1>
{% for class in classes %}
<div class="page-data">
{%- include 'blocks/class-body.html.twig' with {
structure: class,
objectsLinks: objectsLinks
} %}
</div>
{% endfor %}
{% endif %}
{% if enums is not null %}
<h1>
Перечисления
</h1>
{% for enum in enums %}
<div class="page-data">
{%- include 'blocks/enum-body.html.twig' with {
structure: enum,
objectsLinks: objectsLinks
} %}
</div>
{% endfor %}
{% endif %}
</div>
</div>
{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %}
</body>
</html>