Skip to content

Minor tweak in admonition titles #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Templates/default/html/directives/admonition.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
{% elseif name in ['seealso'] %}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" /></svg>
{% endif %}
{{ text }}
<span>{{ text }}</span>
</p>
2 changes: 1 addition & 1 deletion src/Templates/default/html/directives/sidebar.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title">{{ title|raw }}</p>
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title"><span>{{ title|raw }}</span></p>
2 changes: 1 addition & 1 deletion tests/fixtures/expected/blocks/directives/admonition.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="admonition admonition-default screencast_class">
<p class="admonition-title">
Screencast
<span>Screencast</span>
</p><p>Do you prefer video tutorials? Check out the the screencasts.</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="admonition admonition-best-practice ">
<p class="admonition-title">
Best Practice
<span>Best Practice</span>
</p><p>Use the bcrypt encoder for hashing your users' passwords.</p>
</div>
4 changes: 2 additions & 2 deletions tests/fixtures/expected/blocks/directives/caution.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
Caution
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>Caution</span>
</p><p>Using too many sidebars or caution directives can be distracting!</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
Note
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>test</p>
<div translate="no" class="notranslate codeblock codeblock-loc-1 codeblock-php">
<div class="codeblock-scroll">
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/expected/blocks/directives/note.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
Note
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>Sometimes we add notes. But not too often because they interrupt the flow.</p>
</div>
2 changes: 1 addition & 1 deletion tests/fixtures/expected/blocks/directives/seealso.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"/>
</svg>
See also
<span>See also</span>
</p>
<p>Also check out the homepage</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title">The sidebar's title</p><p>some text before code block</p>
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title"><span>The sidebar's title</span></p><p>some text before code block</p>
<div translate="no" class="notranslate codeblock codeblock-loc-1 codeblock-php">
<div class="codeblock-scroll">
<pre class="codeblock-lines">1</pre>
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/expected/blocks/directives/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title">The sidebar's title</p><p>some text inside sidebar</p>
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title"><span>The sidebar's title</span></p><p>some text inside sidebar</p>
</div></div>
2 changes: 1 addition & 1 deletion tests/fixtures/expected/blocks/directives/tip.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="admonition admonition-tip ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg>
Tip
<span>Tip</span>
</p><p>This is a little tip about something! We an also talk about specific</p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewbox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"></path>
</svg>
New in version 4.1
<span>New in version 4.1</span>

</p>
<p>This option was introduced in Symfony 2.6 and replaces another option, which is available prior to 2.6.</p>
16 changes: 8 additions & 8 deletions tests/fixtures/expected/main/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h3 id="the-date-format-option"><a class="headerlink" href="#the-date-format-opt
<div class="admonition admonition-tip ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg>
Tip
<span>Tip</span>
</p><p>This is a little tip about something! We an also talk about specific
methods: <a href="https://api.symfony.com/4.0/Symfony/Component/BrowserKit/Client.html#method_doRequest" class="reference external" title="Symfony\Component\BrowserKit\Client::doRequest()">doRequest()</a>.
Or a namespace: <a href="https://api.symfony.com/4.0/Symfony/Component/Validator/Constraints.html" class="reference external" title="Symfony\Component\Validator\Constraints">Constraints</a>.
Expand All @@ -76,8 +76,8 @@ <h3 id="date-widget"><a class="headerlink" href="#date-widget" title="Permalink
<p>Date widget!</p>
<div class="admonition admonition-note ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
Note
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
<span>Note</span>
</p><p>Sometimes we add notes. But not too often because they interrupt the flow.
<a href="form/form_type.html#internal-reference" class="reference internal">FormType Documentation</a></p>
</div>
Expand All @@ -90,7 +90,7 @@ <h3 id="placeholder"><a class="headerlink" href="#placeholder" title="Permalink
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"></path>
</svg>
New in version 2.6</p>
<span>New in version 2.6</span></p>
<p>The <code translate="no" class="notranslate">placeholder</code> option was introduced in Symfony 2.6 and replaces
<code translate="no" class="notranslate">empty_value</code>, which is available prior to 2.6.
<a href="form/form_type.html#internal-reference" class="reference internal">FormType Documentation</a></p></div>
Expand All @@ -117,7 +117,7 @@ <h3 id="placeholder"><a class="headerlink" href="#placeholder" title="Permalink
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" />
</svg>
See also
<span>See also</span>
</p><p>Also check out the homepage - <a href="index.html" class="reference internal">Some Test Docs!</a>.
<a href="form/form_type.html#internal-reference" class="reference internal">FormType Documentation</a></p>
</div>
Expand All @@ -137,17 +137,17 @@ <h3 id="format"><a class="headerlink" href="#format" title="Permalink to this he
<p>If the <code translate="no" class="notranslate">widget</code> option is set to <code translate="no" class="notranslate">single_text</code>, this option specifies
the format of the input, i.e. how Symfony will interpret the given input
as a datetime string. See <a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" class="reference external" rel="external noopener noreferrer" target="_blank">Date/Time Format Syntax</a>.</p>
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title">Everyone loves sidebars</p><p>But do they really? They also get in the way!</p>
<div class="admonition-wrapper"><div class="admonition admonition-sidebar"><p class="sidebar-title"><span>Everyone loves sidebars</span></p><p>But do they really? They also get in the way!</p>
</div></div>
<div class="admonition admonition-caution ">
<p class="admonition-title">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
Caution
<span>Caution</span>
</p><p>Using too many sidebars or caution directives can be distracting!</p>
</div>
<div class="admonition admonition-best-practice ">
<p class="admonition-title">
Best Practice
<span>Best Practice</span>
</p><p>Use the bcrypt encoder for hashing your users' passwords.</p>
</div>
</div>
Expand Down