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,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>