1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Adds wiki syntax help for commonmark alerts (#42603).

Patch by Mizuki ISHIKAWA (user:ishikawa999).

git-svn-id: https://svn.redmine.org/redmine/trunk@23764 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu 2025-05-14 18:31:36 +00:00
parent 3ca91c63a4
commit 76590c2b5e
4 changed files with 87 additions and 0 deletions

View File

@ -72,3 +72,14 @@ a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
.syntaxhl .s1 { background-color: #fff0f0 }
span.more_info { font-weight: normal; }
.markdown-alert {
border-left: 4px solid;
padding-left: 10px;
margin-left: 10px;
}
.markdown-alert-title {
font-weight: bold;
}
.markdown-alert-note { border-color: #169; }
.markdown-alert-note .markdown-alert-title { color: #1e40af; }

View File

@ -63,3 +63,23 @@ table.list td { background-color: #f5f5f5; vertical-align: middle; padding: 0.3e
.syntaxhl .o { color: #333333 }
.syntaxhl .s2 { background-color: #fff0f0 }
.syntaxhl .si { background-color: #eeeeee }
.markdown-alert {
border-left: 4px solid;
padding-left: 10px;
margin-left: 20px;
}
.markdown-alert-title {
font-weight: bold;
}
.markdown-alert-tip { border-color: #5db651; }
.markdown-alert-tip .markdown-alert-title { color: #005f00; }
.markdown-alert-important { border-color: #800080; }
.markdown-alert-important .markdown-alert-title { color: #4b006e; }
.markdown-alert-caution { border-color: #c22; }
.markdown-alert-caution .markdown-alert-title { color: #880000; }
.markdown-alert-warning { border-color: #e4bc4b; }
.markdown-alert-warning .markdown-alert-title { color: #a7760c; }
.markdown-alert-note { border-color: #169; }
.markdown-alert-note .markdown-alert-title { color: #1e40af; }

View File

@ -81,6 +81,14 @@
<th></th><td>HTML is &lt;del&gt;not&lt;/del&gt; &lt;u&gt;allowed&lt;/u&gt;.</td><td>HTML is <del>not</del> <u>allowed</u>.</td>
</tr>
<tr><th colspan="3">Alerts <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "16") %>" target="_blank">more</a>)</span></th></tr>
<tr><th></th><td>> [!NOTE]<br>> You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].</td><td>
<div class="markdown-alert markdown-alert-note">
<p class="markdown-alert-title">Note</p>
<p>You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].</p>
</div>
</td></tr>
</table>
<p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p>

View File

@ -27,6 +27,7 @@
<li><a href='#12'>Macros</a></li>
<li><a href='#13'>Code highlighting</a></li>
<li><a href='#15'>Raw HTML</a></li>
<li><a href='#16'>Alerts</a></li>
</ul>
<h2><a name="2" class="wiki-page"></a>Links</h2>
@ -369,5 +370,52 @@ It can be expanded by clicking a link.
float
</code></pre>
<h2><a name="16" class="wiki-page"></a>Alerts</h2>
<p>
<dl>
<dt><code>NOTE</code></dt>
<dd>
<pre><code>> [!NOTE]<br>> Wiki page edits are preserved as history, allowing you to restore previous versions if needed.</code></pre>
<div class="markdown-alert markdown-alert-note">
<p class="markdown-alert-title">Note</p>
<p>Wiki page edits are preserved as history, allowing you to restore previous versions if needed.</p>
</div>
</dd>
<dt><code>TIP</code></dt>
<dd>
<pre><code>> [!TIP]<br>> To quickly review the update history of an issue, use the "History" tab for convenient access.</code></pre>
<div class="markdown-alert markdown-alert-tip">
<p class="markdown-alert-title">Tip</p>
<p>To quickly review the update history of an issue, use the "History" tab for convenient access.</p>
</div>
</dd>
<dt><code>WARNING</code></dt>
<dd>
<pre><code>> [!WARNING]<br>> Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.</code></pre>
<div class="markdown-alert markdown-alert-warning">
<p class="markdown-alert-title">Warning</p>
<p>Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.</p>
</div>
</dd>
<dt><code>IMPORTANT</code></dt>
<dd>
<pre><code>> [!IMPORTANT]<br>> Changing role permissions can affect user access across all projects, so be mindful of potential impacts.</code></pre>
<div class="markdown-alert markdown-alert-important">
<p class="markdown-alert-title">Important</p>
<p>Changing role permissions can affect user access across all projects, so be mindful of potential impacts.</p>
</div>
</dd>
<dt><code>CAUTION</code></dt>
<dd>
<pre><code>> [!CAUTION]<br>> When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.</code></pre>
<div class="markdown-alert markdown-alert-caution">
<p class="markdown-alert-title">Caution</p>
<p>When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.</p>
</div>
</dd>
</dl>
</p>
</body>
</html>