refactor: Cleanup git state - commit all staged changes

Major refactoring cleanup:
- Add new controller architecture (class-controller-*.php)
- Add new settings-v2 UI (views/settings-v2/)
- Add new CSS architecture (agentic-sidebar.css, tokens)
- Add esbuild build pipeline (scripts/build.js, package.json)
- Add composer dependencies (vendor/)
- Add frontend src directory (assets/js/src/index.jsx)
- Add documentation files
- Remove old/obsolete files (class-settings.php, old CSS)

This commits all pending changes from previous refactoring efforts.
This commit is contained in:
Dwindi Ramadhana
2026-06-17 05:27:58 +07:00
parent d3f142222c
commit 690991c526
7963 changed files with 941566 additions and 67372 deletions

View File

@@ -0,0 +1,65 @@
<?php
declare(strict_types=1);
use League\Tactician\CommandBus;
use League\Tactician\Handler\CommandHandlerMiddleware;
use League\Tactician\Handler\CommandNameExtractor\ClassNameExtractor;
use League\Tactician\Handler\MethodNameInflector\HandleInflector;
use League\Tactician\Plugins\LockingMiddleware;
use phpDocumentor\Guides\DependencyInjection\CommandLocator;
use phpDocumentor\Guides\FileCollector;
use phpDocumentor\Guides\Handlers\CompileDocumentsCommand;
use phpDocumentor\Guides\Handlers\CompileDocumentsHandler;
use phpDocumentor\Guides\Handlers\ParseDirectoryCommand;
use phpDocumentor\Guides\Handlers\ParseDirectoryHandler;
use phpDocumentor\Guides\Handlers\ParseFileCommand;
use phpDocumentor\Guides\Handlers\ParseFileHandler;
use phpDocumentor\Guides\Handlers\RenderCommand;
use phpDocumentor\Guides\Handlers\RenderDocumentCommand;
use phpDocumentor\Guides\Handlers\RenderDocumentHandler;
use phpDocumentor\Guides\Handlers\RenderHandler;
use Psr\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use function Symfony\Component\DependencyInjection\Loader\Configurator\inline_service;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_locator;
return static function (ContainerConfigurator $container): void {
$container->services()
->defaults()->autowire()
->set(ParseFileHandler::class)
->tag('phpdoc.guides.command', ['command' => ParseFileCommand::class])
->set(ParseDirectoryHandler::class)
->args([inline_service(FileCollector::class)->autowire()])
->tag('phpdoc.guides.command', ['command' => ParseDirectoryCommand::class])
->set(RenderHandler::class)
->tag('phpdoc.guides.command', ['command' => RenderCommand::class])
->set(CompileDocumentsHandler::class)
->tag('phpdoc.guides.command', ['command' => CompileDocumentsCommand::class])
->set(RenderDocumentHandler::class)
->tag('phpdoc.guides.command', ['command' => RenderDocumentCommand::class])
->arg('$renderer', service('phpdoc.guides.output_node_renderer'))
->arg('$eventDispatcher', service(EventDispatcherInterface::class))
->set(CommandBus::class)
->args([
[
inline_service(CommandHandlerMiddleware::class)
->args([
inline_service(ClassNameExtractor::class),
inline_service(CommandLocator::class)->args(
[tagged_locator('phpdoc.guides.command', 'command')],
),
inline_service(HandleInflector::class),
]),
inline_service(LockingMiddleware::class),
],
]);
};

View File

@@ -0,0 +1,263 @@
<?php
declare(strict_types=1);
use League\Tactician\CommandBus;
use phpDocumentor\Guides\Compiler\Compiler;
use phpDocumentor\Guides\Compiler\CompilerPass;
use phpDocumentor\Guides\Compiler\DocumentNodeTraverser;
use phpDocumentor\Guides\Compiler\NodeTransformer;
use phpDocumentor\Guides\Compiler\NodeTransformers\CustomNodeTransformerFactory;
use phpDocumentor\Guides\Compiler\NodeTransformers\MenuNodeTransformers\InternalMenuEntryNodeTransformer;
use phpDocumentor\Guides\Compiler\NodeTransformers\NodeTransformerFactory;
use phpDocumentor\Guides\Compiler\NodeTransformers\RawNodeEscapeTransformer;
use phpDocumentor\Guides\Event\PostProjectNodeCreated;
use phpDocumentor\Guides\EventListener\LoadSettingsFromComposer;
use phpDocumentor\Guides\NodeRenderers\Html\BreadCrumbNodeRenderer;
use phpDocumentor\Guides\NodeRenderers\Html\DocumentNodeRenderer;
use phpDocumentor\Guides\NodeRenderers\Html\MenuEntryRenderer;
use phpDocumentor\Guides\NodeRenderers\Html\MenuNodeRenderer;
use phpDocumentor\Guides\NodeRenderers\Html\TableNodeRenderer;
use phpDocumentor\Guides\NodeRenderers\OutputAwareDelegatingNodeRenderer;
use phpDocumentor\Guides\Parser;
use phpDocumentor\Guides\ReferenceResolvers\AnchorHyperlinkResolver;
use phpDocumentor\Guides\ReferenceResolvers\AnchorNormalizer;
use phpDocumentor\Guides\ReferenceResolvers\AnchorReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\DelegatingReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\DocReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\DocumentNameResolver;
use phpDocumentor\Guides\ReferenceResolvers\DocumentNameResolverInterface;
use phpDocumentor\Guides\ReferenceResolvers\EmailReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\ExternalReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\ImageReferenceResolverPreRender;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\ChainedInventoryLinkResolver;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\DefaultInventoryLoader;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\DefaultInventoryRepository;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\InventoryLoader;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\InventoryRepository;
use phpDocumentor\Guides\ReferenceResolvers\Interlink\JsonLoader;
use phpDocumentor\Guides\ReferenceResolvers\InterlinkReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\InternalReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\PageHyperlinkResolver;
use phpDocumentor\Guides\ReferenceResolvers\ReferenceResolver;
use phpDocumentor\Guides\ReferenceResolvers\ReferenceResolverPreRender;
use phpDocumentor\Guides\ReferenceResolvers\SluggerAnchorNormalizer;
use phpDocumentor\Guides\ReferenceResolvers\TitleReferenceResolver;
use phpDocumentor\Guides\Renderer\HtmlRenderer;
use phpDocumentor\Guides\Renderer\InMemoryRendererFactory;
use phpDocumentor\Guides\Renderer\InterlinkObjectsRenderer;
use phpDocumentor\Guides\Renderer\LatexRenderer;
use phpDocumentor\Guides\Renderer\TypeRendererFactory;
use phpDocumentor\Guides\Renderer\UrlGenerator\AbsoluteUrlGenerator;
use phpDocumentor\Guides\Renderer\UrlGenerator\AbstractUrlGenerator;
use phpDocumentor\Guides\Renderer\UrlGenerator\ConfigurableUrlGenerator;
use phpDocumentor\Guides\Renderer\UrlGenerator\RelativeUrlGenerator;
use phpDocumentor\Guides\Renderer\UrlGenerator\UrlGeneratorInterface;
use phpDocumentor\Guides\Settings\ComposerSettingsLoader;
use phpDocumentor\Guides\Settings\SettingsManager;
use phpDocumentor\Guides\TemplateRenderer;
use phpDocumentor\Guides\Twig\AssetsExtension;
use phpDocumentor\Guides\Twig\EnvironmentBuilder;
use phpDocumentor\Guides\Twig\GlobalMenuExtension;
use phpDocumentor\Guides\Twig\Theme\ThemeManager;
use phpDocumentor\Guides\Twig\TrimFilesystemLoader;
use phpDocumentor\Guides\Twig\TwigTemplateRenderer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Twig\Loader\FilesystemLoader;
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator;
return static function (ContainerConfigurator $container): void {
$container->parameters()
->set('phpdoc.guides.base_template_paths', [__DIR__ . '/../../../guides/resources/template/html'])
->set('phpdoc.guides.interlink.default_repository.enabled', true);
$container->services()
->defaults()
->autowire()
->autoconfigure()
->instanceof(CompilerPass::class)
->tag('phpdoc.guides.compiler.passes')
->instanceof(NodeTransformer::class)
->tag('phpdoc.guides.compiler.nodeTransformers')
->instanceof(ReferenceResolver::class)
->tag('phpdoc.guides.reference_resolver')
->load(
'phpDocumentor\\Guides\\Compiler\\NodeTransformers\\',
'../../src/Compiler/NodeTransformers/*Transformer.php',
)
->load(
'phpDocumentor\\Guides\\Compiler\\NodeTransformers\\MenuNodeTransformers\\',
'../../src/Compiler/NodeTransformers/MenuNodeTransformers/*Transformer.php',
)
->load(
'phpDocumentor\\Guides\\Compiler\\Passes\\',
'../../src/Compiler/Passes/*Pass.php',
)
->set(InternalMenuEntryNodeTransformer::class)
->tag('phpdoc.guides.compiler.nodeTransformers')
->set(RawNodeEscapeTransformer::class)
->arg('$escapeRawNodes', param('phpdoc.guides.raw_node.escape'))
->arg('$htmlSanitizerConfig', service('phpdoc.guides.raw_node.sanitizer.default'))
->set(AbsoluteUrlGenerator::class)
->set(RelativeUrlGenerator::class)
->set(UrlGeneratorInterface::class, ConfigurableUrlGenerator::class)
->set(DocumentNameResolverInterface::class, DocumentNameResolver::class)
->set(Parser::class)
->arg('$parserStrategies', tagged_iterator('phpdoc.guides.parser.markupLanguageParser'))
->set(Compiler::class)
->arg('$passes', tagged_iterator('phpdoc.guides.compiler.passes'))
->set(NodeTransformerFactory::class, CustomNodeTransformerFactory::class)
->arg('$transformers', tagged_iterator('phpdoc.guides.compiler.nodeTransformers'))
->set(SettingsManager::class)
->set(DocumentNodeTraverser::class)
->set(DefaultInventoryRepository::class)
->arg('$inventoryConfigs', param('phpdoc.guides.inventories'))
->arg('$enabled', param('phpdoc.guides.interlink.default_repository.enabled'))
->tag('phpdoc.guides.interlink_resolver')
->set(InventoryRepository::class, ChainedInventoryLinkResolver::class)
->arg('$repositories', tagged_iterator('phpdoc.guides.interlink_resolver'))
->set(InventoryLoader::class, DefaultInventoryLoader::class)
->set(JsonLoader::class)
->set(HttpClientInterface::class)
->factory([HttpClient::class, 'create'])
->set(AbstractUrlGenerator::class)
->set(ExternalReferenceResolver::class)
->set(EmailReferenceResolver::class)
->set(AnchorHyperlinkResolver::class)
->set(PageHyperlinkResolver::class)
->set(AnchorReferenceResolver::class)
->set(TitleReferenceResolver::class)
->set(InternalReferenceResolver::class)
->set(DocReferenceResolver::class)
->set(InterlinkReferenceResolver::class)
->set(DelegatingReferenceResolver::class)
->arg('$resolvers', tagged_iterator('phpdoc.guides.reference_resolver', defaultPriorityMethod: 'getPriority'))
->set(HtmlRenderer::class)
->tag(
'phpdoc.renderer.typerenderer',
[
'noderender_tag' => 'phpdoc.guides.noderenderer.html',
'format' => 'html',
],
)
->args(
['$commandBus' => service(CommandBus::class)],
)
->set(LatexRenderer::class)
->tag(
'phpdoc.renderer.typerenderer',
[
'noderender_tag' => 'phpdoc.guides.noderenderer.tex',
'format' => 'tex',
],
)
->set(InterlinkObjectsRenderer::class)
->tag(
'phpdoc.renderer.typerenderer',
['format' => 'interlink'],
)
->set(DocumentNodeRenderer::class)
->tag('phpdoc.guides.noderenderer.html')
->set(TableNodeRenderer::class)
->tag('phpdoc.guides.noderenderer.html')
->set(MenuNodeRenderer::class)
->tag('phpdoc.guides.noderenderer.html')
->set(MenuEntryRenderer::class)
->tag('phpdoc.guides.noderenderer.html')
->set(BreadCrumbNodeRenderer::class)
->tag('phpdoc.guides.noderenderer.html')
->set(ReferenceResolverPreRender::class)
->tag('phpdoc.guides.prerenderer')
->set(ImageReferenceResolverPreRender::class)
->tag('phpdoc.guides.prerenderer')
->set(InMemoryRendererFactory::class)
->arg('$renderSets', tagged_iterator('phpdoc.renderer.typerenderer', 'format'))
->alias(TypeRendererFactory::class, InMemoryRendererFactory::class)
->set(SluggerAnchorNormalizer::class)
->alias(AnchorNormalizer::class, SluggerAnchorNormalizer::class)
->set('phpdoc.guides.output_node_renderer', OutputAwareDelegatingNodeRenderer::class)
->arg('$nodeRenderers', tagged_iterator('phpdoc.guides.output_node_renderer', 'format'))
->set(AssetsExtension::class)
->arg('$nodeRenderer', service('phpdoc.guides.output_node_renderer'))
->tag('twig.extension')
->autowire()
->set(GlobalMenuExtension::class)
->arg('$nodeRenderer', service('phpdoc.guides.output_node_renderer'))
->tag('twig.extension')
->autowire()
->set(ThemeManager::class)
->arg('$filesystemLoader', service(FilesystemLoader::class))
->arg(
'$defaultPaths',
param('phpdoc.guides.base_template_paths'),
)
->set(TrimFilesystemLoader::class)
->arg(
'$paths',
param('phpdoc.guides.base_template_paths'),
)
->alias(FilesystemLoader::class, TrimFilesystemLoader::class)
->set(LoadSettingsFromComposer::class)
->tag('event_listener', ['event' => PostProjectNodeCreated::class])
->set(ComposerSettingsLoader::class)
->set(EnvironmentBuilder::class)
->arg('$extensions', tagged_iterator('twig.extension'))
->arg('$themeManager', service(ThemeManager::class))
->set(TemplateRenderer::class, TwigTemplateRenderer::class)
->arg('$environmentBuilder', new Reference(EnvironmentBuilder::class))
->set('phpdoc.guides.raw_node.sanitizer.default', HtmlSanitizerConfig::class)
->call('allowSafeElements', [], true);
};

View File

@@ -0,0 +1,6 @@
<div class="admonition {{ name }}{{ class ? (' '~class) }}{% if node.classes %} {{ node.classesString }}{% endif %}">
{% if title and isTitled %}<p class="admonition-title">{{ renderNode(title) }}</p>{% endif %}
{% if title and not isTitled %}<p>{{ renderNode(title) }}</p>{% endif %}
{{ renderNode(node) }}
</div>

View File

@@ -0,0 +1,3 @@
{% for child in node.value %}
{{ renderNode(child) }}
{% endfor %}

View File

@@ -0,0 +1,4 @@
<address itemprop="author" itemscope itemtype="http://schema.org/Person">
<p>Author: <span itemprop="name">{node.value}</span></p>
<p>Email: <a href="mailto:{node.email}"><span itemprop="email">{node.email}</span></a></p>
</address>

View File

@@ -0,0 +1,8 @@
<div class="citation {% if node.classes %} {{ node.classesString }}{% endif %}" id="{{ node.anchor }}">
<div class="citation-label">[{{ node.name }}]</div>
<div class="citation-content">
{%- for child in node.children -%}
{{ renderNode(child) }}
{%- endfor -%}
</div>
</div>

View File

@@ -0,0 +1,15 @@
{% if node.raw %}
{# see the RawDirective for where this is coming from; a refactor is desired to move this onto its own template / renderer #}
{{ node.value|raw }}
{%- else -%}
{% if node.caption %}
<div class="code-block-caption">
<span class="caption-text">{{ renderNode(node.caption) }}</span>
</div>
{%- endif -%}
<pre{% if node.classes %} class="{{ node.classesString }}"{% endif %}><code class="language-{{ node.language }}{{ node.startingLineNumber ? ' line-numbers' }}"
{%- if node.startingLineNumber %} data-start="{{ node.startingLineNumber }}"{% endif -%}
{%- if node.emphasizeLines %} data-emphasize-lines="{{ node.emphasizeLines }}"{% endif -%}>
{%- include "body/code/highlighted-code.html.twig" -%}
</code></pre>
{%~ endif -%}

View File

@@ -0,0 +1 @@
{{ node.value }}

View File

@@ -0,0 +1 @@
{{ renderNode(node) }}

View File

@@ -0,0 +1,17 @@
<div class="configuration-block">
<div role="tablist" aria-label="Configuration formats" class="configuration-tabs configuration-tabs-length-{{ node.tabs|length }}">
{% for tab in node.tabs %}
<button role="tab" type="button" data-language="{{ tab.slug }}"
aria-controls="{{ 'configuration-block-tabpanel-' ~ tab.hash }}" aria-selected="{{ loop.first ? 'true' : 'false' }}"
{{ loop.first ? 'data-active="true"' }} {{ not loop.first ? 'tabindex="-1"' }}>
<span>{{ tab.label }}</span>
</button>
{% endfor %}
</div>
{% for tab in node.tabs %}
<div role="tabpanel" id="{{ 'configuration-block-tabpanel-' ~ tab.hash }}" aria-label="{{ tab.label }}" class="configuration-codeblock" data-language="{{ tab.slug }}" style="{{ not loop.first ? 'display: none' }}">
{{ renderNode(tab.content) }}
</div>
{% endfor %}
</div>

View File

@@ -0,0 +1,4 @@
<div class="{{ class }}"{% if id is defined and id %} id="{{ id }}"{% endif %}>
{{ renderNode(node) }}
</div>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1,22 @@
<dl{% if node.classes %} class="{{ node.classesString }}"{% endif %}>
{% for definitionListTerm in node.children %}
{% if definitionListTerm.classifiers is empty %}
<dt>{{ renderNode(definitionListTerm.term) }}</dt>
{% else %}
<dt>
{{- renderNode(definitionListTerm.term) -}}
{%- for classifier in definitionListTerm.classifiers %}
<span class="classifier-delimiter">:</span>
<span class="classifier">{{ renderNode(classifier) }}</span>
{%- endfor -%}
</dt>
{% endif %}
{% if definitionListTerm.children %}
{%- for definition in definitionListTerm.children -%}
<dd>{{ renderNode(definition) }}</dd>
{%- endfor ~%}
{% endif %}
{% endfor %}
</dl>

View File

@@ -0,0 +1,3 @@
{%- for child in node.children -%}
{{ renderNode(child) }}
{%- endfor -%}

View File

@@ -0,0 +1,8 @@
<iframe src="{{ node.url }}"
{%- if node.hasOption('width') %} width="{{ node.option('width') }}"{% endif -%}
{%- if node.hasOption('height') %} height="{{ node.option('height') }}"{% endif -%}
{%- if node.hasOption('title') %} title="{{ node.option('title') }}"{% endif -%}
{%- if node.hasOption('allow') %} allow="{{ node.option('allow') }}"{% endif -%}
{%- if node.hasOption('allowfullscreen') and node.option('allowfullscreen') %} allowfullscreen{% endif -%}
>
</iframe>

View File

@@ -0,0 +1,17 @@
<table{% if node.classes %} class="{{ node.classesString }}"{% endif %}>
{% for item in node.children %}
<tr>
<th>{{ item.term }}</th>
<td>
{% if item.children %}
{%- for definition in item.children -%}
{{ renderNode(definition) }}
{%- endfor -%}
{% else %}
&nbsp;
{% endif %}
</td>
</tr>
{% endfor %}
</table>

View File

@@ -0,0 +1,14 @@
<figure
{%- if node.hasOption('figclass') %} class="{{ node.option('figclass') }}"{% endif -%}
{%- if node.hasOption('figwidth') %} style="{% if node.hasOption('figwidth') %}width: {{ node.option('figwidth') }};{% endif %}"{% endif -%}
>
{{ renderNode(node.image) }}
{% if node.document %}
{% set caption = renderNode(node.document) %}
{% if caption|trim %}
<figcaption>{{ caption|raw }}</figcaption>
{% endif %}
{% endif %}
</figure>

View File

@@ -0,0 +1,8 @@
<div class="footnote {% if node.classes %} {{ node.classesString }}{% endif %}" id="{{ node.anchor }}">
<div class="footnote-label">[{{ node.number }}]</div>
<div class="footnote-content">
{%- for child in node.children -%}
{{ renderNode(child) }}
{%- endfor -%}
</div>
</div>

View File

@@ -0,0 +1,11 @@
{% if node.target %}<a href="{{ node.target.url }}">{% endif %}
<img
src="{%- if node.value is external_target -%} {{ node.value }} {%- else -%} {{ asset(node.value) }} {%- endif -%}"
{% if node.hasOption('width') %}width="{{ node.option('width') }}"{% endif%}
{% if node.hasOption('height') %}height="{{ node.option('height') }}"{% endif%}
{% if node.hasOption('align') %}align="{{ node.option('align') }}"{% endif%}
{% if node.hasOption('alt') %}alt="{{ node.option('alt') }}"{% endif%}
{% if node.hasOption('title') %}title="{{ node.option('title') }}"{% endif%}
{% if node.classesString %}class="{{ node.classesString }}"{% endif%}
/>
{% if node.target %}</a>{% endif %}

View File

@@ -0,0 +1,6 @@
<li{{- node.prefix == '-' ? ' class="dash"' : '' -}}
{%- if node.orderNumber %} value="{{ node.orderNumber }}"{% endif -%}>
{%- for child in node.children -%}
{{ renderNode(child) }}
{%- endfor -%}
</li>

View File

@@ -0,0 +1,14 @@
{% set keyword = 'ul' %}
{% if node.isOrdered %}
{% set keyword = 'ol' %}
{% endif %}
<{{ keyword }}{% if node.classes %} class="{{ node.classesString }}"{% endif %}
{%- if node.start %} start="{{ node.start }}"{% endif -%}
{%- if node.orderingType %} type="{{ renderOrderedListType(node.orderingType) }}"{% endif -%}>
{% for child in node.children %}
{{ renderNode(child) }}
{% endfor %}
</{{ keyword }}>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1 @@
<pre>{{ node.value |raw }}</pre>

View File

@@ -0,0 +1 @@
<math{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value|raw }}</math>

View File

@@ -0,0 +1,10 @@
<nav aria-label="breadcrumb">
{% for entry in rootline -%}
{%- if entry.current %}
<span class="breadcrumb active level-{{ entry.level }}">{{ entry.value.toString }}</span>
{% else -%}
<a href="{{ renderLink(entry.url) }}"
class="breadcrumb level-{{ entry.level }}">{{ entry.value.toString }}</a> &gt;
{% endif -%}
{% endfor %}
</nav>

View File

@@ -0,0 +1,6 @@
<div class="contents">
{% if node.caption %}
<p class="topic-title">{{ renderNode(node.caption) }}</p>
{% endif %}
{% include "body/menu/menu-level.html.twig" %}
</div>

View File

@@ -0,0 +1 @@
<a href="{{ url }}">{{ renderNode(title) }}</a>

View File

@@ -0,0 +1,17 @@
<li class="toc-item {%- if node.isCurrent %} current{% endif -%} {%- if node.isInRootline %} active{% endif -%}">
<a href="{{ url }}">{{ node.value.toString }}</a>
{%~ if node.children|length %}
<ul class="menu-level-{{ node.level }}">
{% for child in node.children -%}
{{ renderNode(child) }}
{% endfor %}
</ul>
{%- endif ~%}
{%~ if node.sections|length %}
<ul class="section-level-{{ node.level }}">
{% for subsection in node.sections -%}
{{ renderNode(subsection) }}
{% endfor %}
</ul>
{%- endif ~%}
</li>

View File

@@ -0,0 +1,6 @@
<ul class="menu-level">
{% for entry in node.menuEntries -%}
{{ renderNode(entry) }}
{% endfor %}
</ul>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1,3 @@
<div class="menu">
{% include "body/menu/menu-level.html.twig" %}
</div>

View File

@@ -0,0 +1,6 @@
<div class="toc">
{% if node.caption %}
<p class="caption">{{ renderNode(node.caption) }}</p>
{% endif -%}
{% include "body/menu/menu-level.html.twig" %}
</div>

View File

@@ -0,0 +1,5 @@
{% set text = renderNode(node.value) %}
{% if text %}
<p{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ text|raw }}</p>
{% endif %}

View File

@@ -0,0 +1 @@
<blockquote{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{- renderNode(node.value) -}}</blockquote>

View File

@@ -0,0 +1 @@
<hr />

View File

@@ -0,0 +1,7 @@
<table {%- include "body/table/table-classes.html.twig" -%}
{%- include "body/table/table-inline-style.html.twig" -%}>
{% include "body/table/table-caption.html.twig" %}
{% include "body/table/table-colgroups.html.twig" %}
{% include "body/table/table-header.html.twig" %}
{% include "body/table/table-body.html.twig" %}
</table>

View File

@@ -0,0 +1,6 @@
<tbody>
{% for tableRow in tableRows %}
{% include "body/table/table-row.html.twig" %}
{% endfor %}
</tbody>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1,3 @@
{% if tableNode.hasOption('caption') %}
<caption>{{ tableNode.option('caption') }}</caption>
{% endif %}

View File

@@ -0,0 +1,5 @@
<td{% if column.colSpan > 1 %} colspan="{{ column.colSpan }}"{% endif %}{% if column.rowSpan > 1 %} rowspan="{{ column.rowSpan }}"{% endif %}>
{%- for child in column.children -%}
{{- renderNode(child) -}}
{%- else %}&nbsp;{% endfor %}</td>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1,17 @@
{%- set tableClasses = '' -%}
{# Check and add classes conditionally #}
{%- if tableNode.classes -%}
{%- set tableClasses = tableClasses ~ tableNode.classesString ~ ' ' -%}
{%- endif -%}
{%- if tableNode.hasOption('align') -%}
{%- set tableClasses = tableClasses ~ 'align-' ~ tableNode.option('align') ~ ' ' -%}
{%- endif -%}
{%- if tableNode.hasOption('widths') -%}
{%- set tableClasses = tableClasses ~ 'colwidths-' ~ tableNode.option('widths') ~ ' ' -%}
{%- endif -%}
{%- if tableNode.hasOption('grid') == 'grid' -%}
{%- set tableClasses = tableClasses ~ 'grid-' ~ tableNode.option('grid') ~ ' ' -%}
{%- endif -%}
{%- if tableClasses|trim %} class="{{ tableClasses|trim }}"{% endif -%}

View File

@@ -0,0 +1,11 @@
{% if tableNode.columnWidth %}
<colgroup>
{% for width in tableNode.columnWidth %}
{% if width<=0 %}
<col style="width: auto">
{% else %}
<col style="width: {{ width }}%">
{% endif %}
{% endfor %}
</colgroup>
{% endif %}

View File

@@ -0,0 +1,14 @@
{% if tableHeaderRows is not empty %}
<thead>
{% for tableHeaderRow in tableHeaderRows %}
<tr>
{% for column in tableHeaderRow.columns %}
<th{% if column.colspan > 1 %} colspan="{{ column.colspan }}"{% endif %}>
{%- for child in column.children -%}
{{- renderNode(child) -}}
{% endfor %}</th>
{% endfor %}
</tr>
{% endfor %}
</thead>
{% endif %}

View File

@@ -0,0 +1,5 @@
{%- set tableStyle = '' -%}
{%- if tableNode.hasOption('width') -%}
{%- set tableStyle = tableStyle ~ 'width: ' ~ tableNode.option('width') ~ '; ' -%}
{%- endif -%}
{%- if tableStyle|trim %} style="{{ tableStyle|trim }}"{% endif -%}

View File

@@ -0,0 +1,6 @@
<tr>
{% for column in tableRow.columns %}
{% include "body/table/table-cell.html.twig" %}
{% endfor %}
</tr>
{# force a new line at the end of the file #}

View File

@@ -0,0 +1,4 @@
<div class="topic">
<p class="topic-title">{{ name }}</p>
{{ renderNode(node) }}
</div>

View File

@@ -0,0 +1 @@
<a id="{{- node.value -}}"></a>

View File

@@ -0,0 +1,5 @@
{%- if node.internalTarget -%}
<sup>[<a href="{{- renderTarget(node.internalTarget) -}}">{{- node.value -}}</a>]</sup>
{%- else -%}
<sup>[{{- node.value -}}]</sup>
{%- endif -%}

View File

@@ -0,0 +1 @@
{{- include('inline/link.html.twig') -}}

View File

@@ -0,0 +1,5 @@
<em>
{%- for child in node.children -%}
{{- renderNode(child) -}}
{%- endfor -%}
</em>

View File

@@ -0,0 +1,5 @@
{%- if node.internalTarget -%}
<sup>[<a href="{{- renderTarget(node.internalTarget) -}}">{{- node.value -}}</a>]</sup>
{%- else -%}
<sup>[{{- node.value -}}]</sup>
{%- endif -%}

View File

@@ -0,0 +1,2 @@
<img src="{%- if node.value is external_target -%} {{ node.value }} {%- else -%} {{ asset(node.value) }} {%- endif -%}" alt="{{- node.altText -}}"
{%- if node.title %} title="{{- node.title -}}" {%- endif -%}/>

View File

@@ -0,0 +1,3 @@
{%- for child in node.children -%}
{{- renderNode(child) -}}
{%- endfor -%}

View File

@@ -0,0 +1,14 @@
{%- if node.url -%}
<a href="{{- node.url -}}"
{%- for key, value in attributes %} {{- key -}}="{{- value -}}"{% endfor -%}
{%- if node.classes %} class="{{ node.classesString }}"{% endif -%}
>
{%- for child in node.children -%}
{{- renderNode(child) -}}
{%- endfor -%}
</a>
{%- else -%}
{%- for child in node.children -%}
{{- renderNode(child) -}}
{%- endfor -%}
{%- endif -%}

View File

@@ -0,0 +1 @@
<code>{{- node.value -}}</code>

View File

@@ -0,0 +1 @@
&nbsp;

View File

@@ -0,0 +1 @@
<br>

View File

@@ -0,0 +1 @@
{{- node.value -}}

View File

@@ -0,0 +1 @@
{{- include('inline/link.html.twig') -}}

View File

@@ -0,0 +1,5 @@
<strong>
{%- for child in node.children -%}
{{- renderNode(child) -}}
{%- endfor -%}
</strong>

View File

@@ -0,0 +1 @@
<abbr title="{{ node.definition }}"{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.term }}</abbr>

View File

@@ -0,0 +1 @@
<em class="aspect{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>

View File

@@ -0,0 +1 @@
<br/>

View File

@@ -0,0 +1 @@
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>

View File

@@ -0,0 +1 @@
<strong class="command{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</strong>

View File

@@ -0,0 +1 @@
<em class="dfn{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>

View File

@@ -0,0 +1 @@
<em{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</em>

View File

@@ -0,0 +1 @@
<span class="pre file{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>

View File

@@ -0,0 +1,4 @@
{%- include [
('inline/textroles/' ~ node.type ~ '.html.twig'),
'inline/textroles/unknown.html.twig'
] -%}

View File

@@ -0,0 +1 @@
<span class="guilabel{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>

View File

@@ -0,0 +1 @@
<kbd{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</kbd>

View File

@@ -0,0 +1 @@
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>

View File

@@ -0,0 +1 @@
<em class="mailheader{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>

View File

@@ -0,0 +1 @@
<math{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</math>

View File

@@ -0,0 +1 @@
<span{%- if node.class %} class="{{ node.class }}"{% endif %}>{{- node.value -}}</span>

View File

@@ -0,0 +1 @@
<strong{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</strong>

View File

@@ -0,0 +1 @@
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>

View File

@@ -0,0 +1 @@
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>

View File

@@ -0,0 +1 @@
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>

View File

@@ -0,0 +1 @@
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>

View File

@@ -0,0 +1 @@
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>

View File

@@ -0,0 +1 @@
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>

View File

@@ -0,0 +1 @@
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>

View File

@@ -0,0 +1 @@
<code class="{{ node.type }}{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</code>

View File

@@ -0,0 +1 @@
{{- renderNode(node.child) -}}

View File

@@ -0,0 +1,14 @@
{% extends "structure/layout.html.twig" %}
{% block head %}
{%- for headerNode in node.headerNodes -%}
{{ renderNode(headerNode) }}
{%- endfor -%}
{{ parent() }}
{% endblock %}
{% block body %}
{% for child in node.children -%}
{{ renderNode(child) }}
{%~ endfor -%}
{% endblock %}

View File

@@ -0,0 +1,45 @@
<footer>
{#{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}#}
{#<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">#}
{#{% if next %}#}
{#<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>#}
{#{% endif %}#}
{#{% if prev %}#}
{#<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>#}
{#{% endif %}#}
{#</div>#}
{#{% endif %}#}
<hr/>
<div role="contentinfo">
<p>
{#{%- if show_copyright %}#}
{#{%- if hasdoc('copyright') %}#}
{#{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}#}
{#{%- else %}#}
{#{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}#}
{#{%- endif %}#}
{#{%- endif %}#}
{#{%- if build_id and build_url %}#}
{#{% trans build_url=build_url, build_id=build_id %}#}
{#<span class="build">#}
{#Build#}
{#<a href="{{ build_url }}">{{ build_id }}</a>.#}
{#</span>#}
{#{% endtrans %}#}
{#{%- elif commit %}#}
{#{% trans commit=commit %}#}
{#<span class="commit">#}
{#Revision <code>{{ commit }}</code>.#}
{#</span>#}
{#{% endtrans %}#}
{#{%- elif last_updated %}#}
{#{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}#}
{#{%- endif %}#}
</p>
</div>
</footer>

View File

@@ -0,0 +1 @@
<h{{ node.level }}{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ renderNode(node.value) }}</h{{ node.level }}>

View File

@@ -0,0 +1 @@
<meta name="author" content="{{ node.value }}" />

View File

@@ -0,0 +1 @@
<meta name="copyright" content="{{ node.value }}" />

View File

@@ -0,0 +1 @@
<meta name="date" content="{{ node.value }}" />

View File

@@ -0,0 +1 @@
<link rel="icon" type="image/x-icon" href="{{ url }}" />

View File

@@ -0,0 +1 @@
<script type="text/javascript" src="{{ js }}"></script>

View File

@@ -0,0 +1 @@
<meta name="{{ node.key }}" content="{{ node.value }}" />

View File

@@ -0,0 +1 @@
<meta name="robots" content="noindex">

View File

@@ -0,0 +1 @@
<link rel="stylesheet" type="text/css" href="{{ css }}" />

View File

@@ -0,0 +1,3 @@
{% if node.title == 'abstract' %}
<meta name="description" content="{{ node.value }}" />
{% endif %}

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ title }}
{%- if title!=null and env.projectNode.title!=null %} - {% endif -%}
{%- if env.projectNode.title -%}{{ env.projectNode.title }}{%- endif -%}</title>
{%~ block head %}
{%~ endblock %}
</head>
<body>
<!-- content start -->
{%~ block body %}
{%~ endblock %}
<!-- content end -->
</body>
</html>

View File

@@ -0,0 +1,5 @@
<div class="section{% if node.classes %} {{ node.classesString }}{% endif %}" id="{{ node.title.id }}">
{% for childNode in node.children %}
{{ renderNode(childNode) }}
{% endfor %}
</div>

View File

@@ -0,0 +1,5 @@
<div class="admonition-wrapper">
<div class="admonition admonition-sidebar"><p class="sidebar-title">{{ renderNode(title) }}</p>
{{ renderNode(node) }}
</div>
</div>

View File

@@ -0,0 +1,118 @@
<?php
declare(strict_types=1);
use phpDocumentor\Guides\Nodes\AnchorNode;
use phpDocumentor\Guides\Nodes\AnnotationListNode;
use phpDocumentor\Guides\Nodes\CitationNode;
use phpDocumentor\Guides\Nodes\CodeNode;
use phpDocumentor\Guides\Nodes\Configuration\ConfigurationBlockNode;
use phpDocumentor\Guides\Nodes\DefinitionListNode;
use phpDocumentor\Guides\Nodes\DefinitionLists\DefinitionNode;
use phpDocumentor\Guides\Nodes\DocumentNode;
use phpDocumentor\Guides\Nodes\EmbeddedFrame;
use phpDocumentor\Guides\Nodes\FieldListNode;
use phpDocumentor\Guides\Nodes\FigureNode;
use phpDocumentor\Guides\Nodes\FootnoteNode;
use phpDocumentor\Guides\Nodes\ImageNode;
use phpDocumentor\Guides\Nodes\Inline\AbbreviationInlineNode;
use phpDocumentor\Guides\Nodes\Inline\CitationInlineNode;
use phpDocumentor\Guides\Nodes\Inline\DocReferenceNode;
use phpDocumentor\Guides\Nodes\Inline\EmphasisInlineNode;
use phpDocumentor\Guides\Nodes\Inline\FootnoteInlineNode;
use phpDocumentor\Guides\Nodes\Inline\GenericTextRoleInlineNode;
use phpDocumentor\Guides\Nodes\Inline\HyperLinkNode;
use phpDocumentor\Guides\Nodes\Inline\ImageInlineNode;
use phpDocumentor\Guides\Nodes\Inline\LiteralInlineNode;
use phpDocumentor\Guides\Nodes\Inline\NewlineInlineNode;
use phpDocumentor\Guides\Nodes\Inline\PlainTextInlineNode;
use phpDocumentor\Guides\Nodes\Inline\ReferenceNode;
use phpDocumentor\Guides\Nodes\Inline\StrongInlineNode;
use phpDocumentor\Guides\Nodes\Inline\VariableInlineNode;
use phpDocumentor\Guides\Nodes\Inline\WhitespaceInlineNode;
use phpDocumentor\Guides\Nodes\InlineCompoundNode;
use phpDocumentor\Guides\Nodes\ListItemNode;
use phpDocumentor\Guides\Nodes\ListNode;
use phpDocumentor\Guides\Nodes\LiteralBlockNode;
use phpDocumentor\Guides\Nodes\MathNode;
use phpDocumentor\Guides\Nodes\Metadata\AddressNode;
use phpDocumentor\Guides\Nodes\Metadata\AuthorNode;
use phpDocumentor\Guides\Nodes\Metadata\AuthorsNode;
use phpDocumentor\Guides\Nodes\Metadata\ContactNode;
use phpDocumentor\Guides\Nodes\Metadata\CopyrightNode;
use phpDocumentor\Guides\Nodes\Metadata\DateNode;
use phpDocumentor\Guides\Nodes\Metadata\MetaNode;
use phpDocumentor\Guides\Nodes\Metadata\NoCommentsNode;
use phpDocumentor\Guides\Nodes\Metadata\NoSearchNode;
use phpDocumentor\Guides\Nodes\Metadata\OrganizationNode;
use phpDocumentor\Guides\Nodes\Metadata\OrphanNode;
use phpDocumentor\Guides\Nodes\Metadata\RevisionNode;
use phpDocumentor\Guides\Nodes\Metadata\TocDepthNode;
use phpDocumentor\Guides\Nodes\Metadata\TopicNode;
use phpDocumentor\Guides\Nodes\Metadata\VersionNode;
use phpDocumentor\Guides\Nodes\ParagraphNode;
use phpDocumentor\Guides\Nodes\QuoteNode;
use phpDocumentor\Guides\Nodes\SectionNode;
use phpDocumentor\Guides\Nodes\SeparatorNode;
use phpDocumentor\Guides\Nodes\TitleNode;
return [
AnchorNode::class => 'inline/anchor.html.twig',
\phpDocumentor\Guides\Nodes\AuthorNode::class => 'body/author.html.twig',
FigureNode::class => 'body/figure.html.twig',
MetaNode::class => 'structure/header/meta.html.twig',
ParagraphNode::class => 'body/paragraph.html.twig',
QuoteNode::class => 'body/quote.html.twig',
SeparatorNode::class => 'body/separator.html.twig',
TitleNode::class => 'structure/header-title.html.twig',
SectionNode::class => 'structure/section.html.twig',
DocumentNode::class => 'structure/document.html.twig',
ImageNode::class => 'body/image.html.twig',
CodeNode::class => 'body/code.html.twig',
ConfigurationBlockNode::class => 'body/configuration-block.html.twig',
DefinitionListNode::class => 'body/definition-list.html.twig',
DefinitionNode::class => 'body/definition.html.twig',
FieldListNode::class => 'body/field-list.html.twig',
ListNode::class => 'body/list/list.html.twig',
ListItemNode::class => 'body/list/list-item.html.twig',
LiteralBlockNode::class => 'body/literal-block.html.twig',
MathNode::class => 'body/math.html.twig',
CitationNode::class => 'body/citation.html.twig',
FootnoteNode::class => 'body/footnote.html.twig',
AnnotationListNode::class => 'body/annotation-list.html.twig',
EmbeddedFrame::class => 'body/embedded-frame.html.twig',
// Inline
ImageInlineNode::class => 'inline/image.html.twig',
AbbreviationInlineNode::class => 'inline/textroles/abbreviation.html.twig',
CitationInlineNode::class => 'inline/citation.html.twig',
DocReferenceNode::class => 'inline/doc.html.twig',
EmphasisInlineNode::class => 'inline/emphasis.html.twig',
FootnoteInlineNode::class => 'inline/footnote.html.twig',
HyperLinkNode::class => 'inline/link.html.twig',
LiteralInlineNode::class => 'inline/literal.html.twig',
NewlineInlineNode::class => 'inline/newline.html.twig',
WhitespaceInlineNode::class => 'inline/nbsp.html.twig',
PlainTextInlineNode::class => 'inline/plain-text.html.twig',
ReferenceNode::class => 'inline/ref.html.twig',
StrongInlineNode::class => 'inline/strong.html.twig',
VariableInlineNode::class => 'inline/variable.html.twig',
GenericTextRoleInlineNode::class => 'inline/textroles/generic.html.twig',
InlineCompoundNode::class => 'inline/inline-node.html.twig',
// Output as Metatags
AuthorNode::class => 'structure/header/author.html.twig',
CopyrightNode::class => 'structure/header/copyright.html.twig',
DateNode::class => 'structure/header/date.html.twig',
NoSearchNode::class => 'structure/header/no-search.html.twig',
TopicNode::class => 'structure/header/topic.html.twig',
// No output in page header in HTML - might be output in i.e. LaTex
AddressNode::class => 'structure/header/blank.html.twig',
AuthorsNode::class => 'structure/header/blank.html.twig',
ContactNode::class => 'structure/header/blank.html.twig',
NoCommentsNode::class => 'structure/header/blank.html.twig',
OrganizationNode::class => 'structure/header/blank.html.twig',
OrphanNode::class => 'structure/header/blank.html.twig',
RevisionNode::class => 'structure/header/blank.html.twig',
TocDepthNode::class => 'structure/header/blank.html.twig',
VersionNode::class => 'structure/header/blank.html.twig',
];

View File

@@ -0,0 +1 @@
\label{{ '{' }}{{ node.value }}{{ '}' }}

View File

@@ -0,0 +1,4 @@
\lstset{language={{ node.language }}{{ '}'}}
\begin{lstlisting}
{{ node.value|raw }}
\end{lstlisting}

Some files were not shown because too many files have changed in this diff Show More