Skip to content

Commit

Permalink
Merge pull request #951 from phpDocumentor/backport/1.x/pr-944
Browse files Browse the repository at this point in the history
[1.x] Fix Tex template name
  • Loading branch information
phpdoc-bot authored Mar 20, 2024
2 parents bb92a54 + 11844c4 commit 61fc85c
Show file tree
Hide file tree
Showing 149 changed files with 4,922 additions and 4,456 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div class="tab-pane fade {%- if tab.active %} show active{% endif -%}" id="{{ tab.key }}-{{ tabsId }}" role="tabpanel" aria-labelledby="{{ tab.key }}-tab-{{ tabsId }}">
{{ renderNode(tab.value) }}
</div>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
{{ renderNode(tab.content) }}
</button>
</li>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@

<ul class="level-{{ menuEntry.level }}">
{% for entry in menuEntry.children -%}
<li><a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
{%- if menu.currentPath == entry.url %} aria-current="page" {%- endif -%} >
{{ renderNode(entry.value.value) }}
</a>
{% for entry in menuEntry.children -%}
<li>
<a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
{%- if menu.currentPath == entry.url %} aria-current="page" {%- endif -%}>
{{- renderNode(entry.value.value) -}}
</a>

{%- if entry.children|length %}
{% include "body/menu/mainmenu/menu-level.html.twig" with {
menuEntry:entry
} %}
{%- endif -%}
</li>
{% endfor %}
{%- if entry.children|length %}
{% include "body/menu/mainmenu/menu-level.html.twig" with {
menuEntry:entry
} %}
{%- endif ~%}
</li>
{% endfor %}
</ul>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<nav class="nav flex-column">
{% if node.caption %}
<h2>{{ renderNode(node.caption) }}</h2>
{% endif %}
<ul class="menu-level-main">
{% for entry in node.menuEntries -%}
<li><a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
{%- if node.currentPath == entry.url %} aria-current="page" {% endif -%} >
{{ renderNode(entry.value.value) }}
</a>
{% if node.caption %}
<h2>{{ renderNode(node.caption) }}</h2>
{% endif %}
<ul class="menu-level-main">
{% for entry in node.menuEntries -%}
<li>
<a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
{%- if node.currentPath == entry.url %} aria-current="page"{% endif -%}>
{{- renderNode(entry.value.value) -}}
</a>

{%- if entry.children|length %}
{% include "body/menu/mainmenu/menu-level.html.twig" with {
menu:node,
menuEntry:entry
} %}
{%- endif -%}
{%- if entry.children|length %}
{% include "body/menu/mainmenu/menu-level.html.twig" with {
menu:node,
menuEntry:entry
} %}
{%- endif ~%}
</li>
{% endfor %}
</ul>

{% endfor %}
</ul>
</nav>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

<ul class="level-{{ node.level }}">
{% for entry in node.menuEntries -%}
{% apply spaceless %}
<li class="nav-item">
<a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
{%- if menu.currentPath == entry.url %} aria-current="page" {% endif %} >
{{ renderNode(entry.value.value) }}
</a>
</li>
{% endapply %}
{%- endfor %}
<li class="nav-item">
<a href="{{ renderLink(entry.url) }}"
class="nav-link {%- if menu.currentPath == entry.url %} current {%- endif -%}{% if entry.url in menu.rootlinePaths %} active {%- endif -%}"
{%- if menu.currentPath == entry.url %} aria-current="page"{% endif %}>
{{- renderNode(entry.value.value) -}}
</a>
</li>
{%~ endfor %}
</ul>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{% for entry in node.menuEntries -%}
<li class="nav-item">
<a href="{{ renderLink(entry.url) }}" class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
{%- if node.currentPath == entry.url %} aria-current="page" {% endif %} >
{{ renderNode(entry.value.value) }}
</a>
<a href="{{ renderLink(entry.url) }}" class="nav-link {%- if node.currentPath == entry.url %} current {%- endif -%}{% if entry.url in node.rootlinePaths %} active {%- endif -%}"
{%- if node.currentPath == entry.url %} aria-current="page"{% endif %}>
{{ renderNode(entry.value.value) }}
</a>
</li>

{%- if entry.children|length %}
Expand All @@ -16,3 +16,4 @@
{%- endif -%}
{% endfor %}
</ul>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">

{% if parts.navbar %}
{% for child in parts.navbar -%}
{{ renderNode(child) }}
Expand All @@ -18,3 +17,4 @@
</div>
</div>
</nav>
{# force a new line at the end of the file #}
4 changes: 3 additions & 1 deletion packages/guides/resources/config/guides.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
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;
Expand Down Expand Up @@ -223,11 +224,12 @@
param('phpdoc.guides.base_template_paths'),
)

->set(FilesystemLoader::class)
->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])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<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 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
{%- if node.emphasizeLines %} data-emphasize-lines="{{ node.emphasizeLines }}"{% endif -%}>
{%- include "body/code/highlighted-code.html.twig" -%}
</code></pre>
{%- endif -%}
{%~ endif -%}
Original file line number Diff line number Diff line change
@@ -1,3 +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 #}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% if definitionListTerm.children %}
{%- for definition in definitionListTerm.children -%}
<dd>{{ renderNode(definition) }}</dd>
{%- endfor -%}
{%- endfor ~%}
{% endif %}
{% endfor %}
</dl>
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
{{ renderNode(child) }}
{% endfor %}
</{{ keyword }}>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
@@ -1,16 +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 %}
<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 %}
{%- endif ~%}
{%~ if node.sections|length %}
<ul class="section-level-{{ node.level }}">
{% for subsection in node.sections -%}
{{ renderNode(subsection) }}
{% endfor %}
</ul>
{%- endif -%}
{%- endif ~%}
</li>
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
{{ renderNode(entry) }}
{% endfor %}
</ul>
{# force a new line at the end of the file #}
10 changes: 4 additions & 6 deletions packages/guides/resources/template/html/body/paragraph.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{% apply spaceless %}
{% set text = renderNode(node.value) %}
{% set text = renderNode(node.value) %}

{% if text %}
<p{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ text|raw }}</p>
{% endif %}
{% endapply %}
{% if text %}
<p{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ text|raw }}</p>
{% endif %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<blockquote{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{ renderNode(node.value) }}</blockquote>
<blockquote{% if node.classes %} class="{{ node.classesString }}"{% endif %}>{{- renderNode(node.value) -}}</blockquote>
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
{% include "body/table/table-row.html.twig" %}
{% endfor %}
</tbody>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
{%- for child in column.children -%}
{{- renderNode(child) -}}
{%- else %}&nbsp;{% endfor %}</td>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
{% include "body/table/table-cell.html.twig" %}
{% endfor %}
</tr>
{# force a new line at the end of the file #}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<a id="{{- node.value -}}"></a>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% apply spaceless %}{{ include('inline/link.html.twig') }}{% endapply %}
{{- include('inline/link.html.twig') -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<em>{{- node.value -}}</em>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{% apply spaceless %}<img src="{{- node.url -}}" alt="{{- node.altText -}}"/>
{% endapply %}
<img src="{{- node.url -}}" alt="{{- node.altText -}}"/>
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<code>{{- node.value -}}</code>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% apply spaceless %}&nbsp;{% endapply %}
&nbsp;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% apply spaceless %}<br>{% endapply %}
<br>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% apply spaceless %}{{ include('inline/link.html.twig') }}{% endapply %}
{{- include('inline/link.html.twig') -}}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{% apply spaceless %}<strong>{{- node.value -}}</strong>
{% endapply %}
<strong>{{- node.value -}}</strong>
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<abbr title="{{ node.definition }}"{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.term }}</abbr>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<em class="aspect{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{%- apply spaceless %}<br/>{% endapply -%}
<br/>
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{% apply spaceless %}
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>

{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{% apply spaceless %}
<strong class="command{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</strong>

{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{% apply spaceless %}
<em class="dfn{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>

{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<em{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</em>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{% apply spaceless %}
<span class="pre file{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>

{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<span class="guilabel{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</span>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<kbd{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</kbd>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<code{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</code>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<em class="mailheader{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</em>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<math{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</math>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<span{%- if node.class %} class="{{ node.class }}"{% endif %}>{{- node.value -}}</span>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<strong{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</strong>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<sub{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sub>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<sup{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</sup>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<cite{%- if node.class %} class="{{ node.class }}"{% endif %}>{{ node.value }}</cite>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% apply spaceless %}
<code class="{{ node.type }}{%- if node.class %} {{ node.class }}{% endif %}">{{ node.value }}</code>
{% endapply %}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{% apply spaceless %}{{ renderNode(node.child) }}
{% endapply %}
{{- renderNode(node.child) -}}
11 changes: 4 additions & 7 deletions packages/guides/resources/template/tex/body/paragraph.tex.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{% apply spaceless %}
{% set text = renderNode(node.value) %}
{%- set text = renderNode(node.value) -%}

{% if text|trim %}
{{ text|raw }}

{% endif %}
{% endapply %}
{%- if text|trim %}
{{- text|raw -}}
{% endif -%}
Loading

0 comments on commit 61fc85c

Please sign in to comment.