What is the source code for the info, warning, note and tip macros to create own User Macros

Sanet Minnie August 13, 2012

I want to create my own info, warning, note and tip macros as User macros. We need titles as a default for accessibilty compliancy (WCAG 2.0 AA).

CSS option - I do not want to change it in the CSS, as it will change the titles of existing note boxes in our spaces.

I want to create a new set of info, warning, note and tip macros for my team. I am not a developer, so I actually need the source code of the Confluence info, warning, note and tip macros, but I cannot find it :-(.

Is it possible to provide it so I can tweak it to always have a specific title?

Thank you

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
dy raffy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2012

her you go:

<h2>Inserted with JS</h2>
<div id="aui-message-bar"></div>
<div id="custom-context"></div>

<h2>Inserted with HTML</h2>
<div class="aui-message shadowed">
    <p class="title">
        <span class="aui-icon icon-generic"></span>
        <strong>This is a generic message.</strong>
    </p>
    <p>It is pitch black. You are likely to be eaten by a grue.</p>
</div><!-- .aui-message -->

<div class="aui-message warning shadowed">
    <p class="title">
        <span class="aui-icon icon-warning"></span>
        <strong>It's dangerous to go alone</strong>
    </p>
    <p>Here, take this.</p>
</div><!-- .aui-message -->            
    
<div class="aui-message error shadowed">
    <p class="title">
        <span class="aui-icon icon-error"></span>
        <strong>Woah! Something went wrong!</strong>
    </p>
    <p>The savepoints are really far apart in this level.</p>
</div><!-- .aui-message -->            

<div class="aui-message success shadowed">
    <p class="title">

        <span class="aui-icon icon-success"></span>
        <strong>Thank you Mario!</strong>
    </p>
    <p>But the Princess is in another castle.</p>
</div><!-- .aui-message -->            

<div class="aui-message hint shadowed closeable">
    <p class="title">
        <span class="aui-icon icon-hint "></span>

        <strong>We'll give you a hint to avoid that problem next time.</strong>
    </p>
    <p>But first you have to catch the Help Cat with that stupid Wiimote.</p>
</div><!-- .aui-message -->

Just add the code to your site and confluence will do the rest :-)

Check the messages in http://docs.atlassian.com/aui/latest/sandbox/

I hope I could help

Raffy

Sanet Minnie August 14, 2012

Awesome! Thank you very much!

0 votes
Akeles
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2012

Hi Sanet,

Check out the Confluence Information Macros at http://marketplace.atlassian.com/plugins/confluence.extra.information/version/2021

You can click on the browse source on the right sidebar under the resource section.

Sanet Minnie August 14, 2012

Thank you very much!

TAGS
AUG Leaders

Atlassian Community Events