From 81ac8006cd58bf8b5f71d8b3d8425a4b6afc8478 Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Fri, 9 May 2025 07:14:20 +0000 Subject: [PATCH] Add alerts help --- app/assets/stylesheets/wiki_syntax.css | 11 +++++ .../stylesheets/wiki_syntax_detailed.css | 20 ++++++++ .../en/wiki_syntax_common_mark.html.erb | 8 ++++ .../wiki_syntax_detailed_common_mark.html.erb | 48 +++++++++++++++++++ 4 files changed, 87 insertions(+) diff --git a/app/assets/stylesheets/wiki_syntax.css b/app/assets/stylesheets/wiki_syntax.css index 41e780c75..89b117419 100644 --- a/app/assets/stylesheets/wiki_syntax.css +++ b/app/assets/stylesheets/wiki_syntax.css @@ -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; } \ No newline at end of file diff --git a/app/assets/stylesheets/wiki_syntax_detailed.css b/app/assets/stylesheets/wiki_syntax_detailed.css index e90279641..ad3c8c65f 100644 --- a/app/assets/stylesheets/wiki_syntax_detailed.css +++ b/app/assets/stylesheets/wiki_syntax_detailed.css @@ -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; } \ No newline at end of file diff --git a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb index 486b96424..a650b2751 100644 --- a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb +++ b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb @@ -81,6 +81,14 @@ HTML is <del>not</del> <u>allowed</u>.HTML is not allowed. +Alerts (" target="_blank">more) +> [!NOTE]
> You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION]. +
+

Note

+

You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].

+
+ +

More Information

diff --git a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb index 193606ab2..a74094460 100644 --- a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb +++ b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb @@ -27,6 +27,7 @@
  • Macros
  • Code highlighting
  • Raw HTML
  • +
  • Alerts
  • Links

    @@ -369,5 +370,52 @@ It can be expanded by clicking a link. float +

    Alerts

    + +

    +

    +
    NOTE
    +
    +
    > [!NOTE]
    > Wiki page edits are preserved as history, allowing you to restore previous versions if needed.
    +
    +

    Note

    +

    Wiki page edits are preserved as history, allowing you to restore previous versions if needed.

    +
    +
    +
    TIP
    +
    +
    > [!TIP]
    > To quickly review the update history of an issue, use the "History" tab for convenient access.
    +
    +

    Tip

    +

    To quickly review the update history of an issue, use the "History" tab for convenient access.

    +
    +
    +
    WARNING
    +
    +
    > [!WARNING]
    > Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.
    +
    +

    Warning

    +

    Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.

    +
    +
    +
    IMPORTANT
    +
    +
    > [!IMPORTANT]
    > Changing role permissions can affect user access across all projects, so be mindful of potential impacts.
    +
    +

    Important

    +

    Changing role permissions can affect user access across all projects, so be mindful of potential impacts.

    +
    +
    +
    CAUTION
    +
    +
    > [!CAUTION]
    > When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.
    +
    +

    Caution

    +

    When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.

    +
    +
    +
    +

    + -- 2.49.0