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

184 lines
7.4 KiB
Twig

{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %}
<body class="main-page">
<div class="aside aside-left">
<div class="aside__container">
<div class="header">
{%- include 'blocks/menu-header.html.twig' %}
</div>
<div class="content">
{%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %}
</div>
</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 print-title">
<h1>{{ pageTitle }}</h1>
{% if author is not empty %}
<h2>{{ author }}</h2>
{% endif %}
<p>Версия: {{ version }}</p>
{% if buildVersion|length %}
<p>Сборка: {{ buildVersion }}</p>
{% endif %}
<p>{{ "now"|date("dd.MM.YYYY") }}</p>
</div>
<h2 class="main-title">
Содержание
</h2>
<div class="page-data">
<div class="numbered-contents">
<ol>
<li>
<h2 class="numbered-contents__title">
<a href="#main-concepts">Общие принципы построения API</a>
</h2>
<ol>
<li><a href="#main-concepts-protocol">Протокол общения между сервером и клиентом</a></li>
<li><a href="#main-concepts-style">Стиль построения API</a></li>
<li><a href="#main-concepts-encoding">Используемая кодировка</a></li>
<li><a href="#main-concepts-delay">Допустимые задержки</a></li>
<li><a href="#main-concepts-params">Передача параметров</a></li>
<li><a href="#main-concepts-enums">Перечисления</a></li>
<li><a href="#main-concepts-general-response">Общий вид ответа сервера</a></li>
</ol>
</li>
{% if versioningEnabled %}
<li>
<h2 class="numbered-contents__title">
<a href="#versioining">Версионирование API</a>
</h2>
<ol>
<li><a href="#versioning-description">Описание</a></li>
<li><a href="#versioning-example">Пример</a></li>
</ol>
</li>
{% endif %}
{%- include 'blocks/table-of-contents-body.html.twig' with {
methods: tableOfContents.methods,
classes: tableOfContents.classes,
enums: tableOfContents.enums,
useAnchors: true
} %}
</ol>
</div>
</div>
<div class="numbered-page-data">
<ol>
<li>
<h2 class="main-title" id="main-concepts">Общие принципы построения API</h2>
<ol>
<li>
{%- include 'blocks/main-concepts.html.twig' with {
responseClass: responseClass,
useAnchors: true
} %}
</li>
</ol>
</li>
{% if versioningEnabled %}
<li>
<h2 class="main-title" id="versioning">Версионирование API</h2>
<ol>
<li>
{%- include 'blocks/versioning-info.html.twig' with { errorType: errorType, errorsPagePath: errorsPagePath } %}
</li>
</ol>
</li>
{% endif %}
{% if methodGroups is not null %}
<li>
<h2 class="main-title" id="methods">Методы</h2>
<ol>
{% for methodGroup in methodGroups %}
<li>
<div class="page-data section-helper">
<h2 class="subtitle" id="{{ methodGroup.sectionTitle }}">{{ methodGroup.title }}</h2>
{% if methodGroup.description is not null %}
<p>{{ methodGroup.description | escape }}</p>
{% endif %}
{% if methodGroup.baseUrl is not empty %}
<p>BaseUrl: {{ methodGroup.baseUrl }}</p>
{% endif %}
</div>
<ol>
{% for method in methodGroup.methods %}
<li>
<div class="page-data">
{%- include 'blocks/method-body.html.twig' with {
method: method,
objectsLinks: objectsLinks,
showSandbox: false,
useAnchors: true
} %}
</div>
</li>
{% endfor %}
</ol>
</li>
{% endfor %}
</ol>
</li>
{% endif %}
{% if classes is not null %}
<li>
<h2 class="main-title" id="classes">Классы</h2>
<ol>
{% for class in classes %}
<li>
<div class="page-data">
{%- include 'blocks/class-body.html.twig' with {
structure: class,
objectsLinks: objectsLinks,
useAnchors: true
} %}
</div>
</li>
{% endfor %}
</ol>
</li>
{% endif %}
{% if enums is not null %}
<li>
<h2 class="main-title" id="enums">Перечисления</h2>
<ol>
{% for enum in enums %}
<li>
<div class="page-data">
{%- include 'blocks/enum-body.html.twig' with {
structure: enum,
objectsLinks: objectsLinks,
useAnchors: true
} %}
</div>
</li>
{% endfor %}
</ol>
</li>
{% endif %}
</ol>
</div>
</div>
</div>
{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %}
</body>
</html>