WikiNG: Macroshttp://projects.andriylesyuk.com/http://projects.andriylesyuk.com/plugin_assets/andriy_lesyuk/images/s-andy.ico2015-09-03T21:56:41ZProjects
Redmine Macros: Hierarcial Numbered headershttp://projects.andriylesyuk.com/boards/22/topics/1532015-09-03T21:56:41ZAdnan Topçu
<p>This is related to <a class="issue tracker-2 status-8 priority-5 priority-default" title="Hierarcial Numbered headers (Incomplete)" href="http://projects.andriylesyuk.com/issues/2392">#2392</a></p>
<p>name</p>
<pre>
headernumbers
</pre>
<p>Description<br /><pre>
Hierarcial Header Numbering
</pre></p>
<p>Content</p>
<pre>
<style type="text/css">
h1 { counter-reset: h1s;
}
h2 { counter-reset: h2s; }
h2::before {
content: counter(h1s) ". ";
counter-increment: h1s;
}
h3 { counter-reset: h3s; }
h3::before {
content: counter(h1s) "." counter(h2s) ". ";
counter-increment: h2s;
}
h4 { counter-reset: h4s; }
h4::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) ". ";
counter-increment: h3s;
}
h5 { counter-reset: h5s; }
h5::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) "." counter(h4s) ". ";
counter-increment: h4s;
}
h6 { counter-reset: h6s; }
h6::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) "." counter(h4s) "." counter(h5s) ". ";
counter-increment: h5s;
}
</style>
</pre>
<p>Limitations</p>
<pre>
1. This macro must be call each page you want to use this feature.
2. h1. must be exist.
3. Supported up to h6.
</pre>
<p>Example</p>
<pre>
{{headernumbers}}
h1. Unnumbered Top Header (must be exist)
h2. First child topic
h3. Cild's child topic
h2. Second child topic
</pre> Macros: RE: {{blink(css_color1, css_color2}} - blinking texthttp://projects.andriylesyuk.com/boards/22/topics/133?r=134#message-1342014-04-17T12:42:37ZMiodrag Milic
<p>BTW, <a class="user active" href="http://projects.andriylesyuk.com/users/s-andy">Andriy Lesyuk</a> is there any way to force Textile evaluation within macro body ?</p> Macros: {{blink(css_color1, css_color2}} - blinking texthttp://projects.andriylesyuk.com/boards/22/topics/1332014-04-17T12:18:49ZMiodrag Milic
<ul>
<li>Name <br /><pre>
blink
</pre></li>
<li>Description <br /><pre>
Blinking tekst
arg1, arg2 - CSS colors.
</pre></li>
<li>Content<br /><pre>
<style>
.text_blink {
color:%[1];
font-weight:bold;
animation: blink 2s step-end infinite;
-webkit-animation: blink 2s step-end infinite;
}
@keyframes blink
{
0% {color: %[1]}
50% {color: %[2]}
}
@-webkit-keyframes blink
{
0% {color: %[1]}
50% {color: %[2]}
}
</style>
<div class="text_blink">
%(*)
</div>
</pre></li>
</ul>
<ul>
<li>Example<br /><pre>
{{blink(red, #FAFAFA)
Must read for everybody!
}}
</pre></li>
</ul> Macros: {{youtube}}: embedding YouTube videoshttp://projects.andriylesyuk.com/boards/22/topics/1082013-10-20T23:14:33ZAndriy Lesyuks-andy@andriylesyuk.com
<table>
<tr>
<th style="text-align:right;"> Name:</th>
<td><code>{{youtube}}</code></td>
</tr>
<tr>
<th style="text-align:right;">Description:</th>
<td>Embeds “YouTube":http://www.youtube.com video player, requires video ID, e.g.: @{{youtube(ethtaYKdl9g)}}@</td>
</tr>
<tr>
<th style="text-align:right;"> Content:</th>
<td><pre><code><iframe width="420" height="315" src="//www.youtube.com/embed/%[1]" frameborder="0" allowfullscreen></iframe>
</code></pre></td>
</tr>
</table> Macros: Guidelineshttp://projects.andriylesyuk.com/boards/22/topics/1072013-10-20T23:10:26ZAndriy Lesyuks-andy@andriylesyuk.com
<p>The <a href="/projects/wiking/boards/22">Macros</a> forum is intended for sharing <a class="wiki-page" href="http://projects.andriylesyuk.com/projects/wiking/wiki/Custom-macros">custom Wiki macros</a>. But to be useful a topic about a macro <ins>should</ins> include:</p>
<ol>
<li><strong>The name</strong><br />It’s not always obvious, which name is the best for the macro. Sharing the name, you also standardize the macro.</li>
<li><strong>The description</strong><br />Your description will help to understand the idea of the macro better.<br />In the description you may use Textile, which will be rendered as HTML, or the raw Textile code enclosed into <code>notextile</code> tag.</li>
<li><strong>The content</strong><br />Without the content a macro is useless.</li>
</ol>
<p>So, use the following template (followed by the optional details) to describe your macro:</p>
<pre>
|_.Name |@{{}}@|
|_.Description|<notextile></notextile>|
|_.Content |<notextile><pre><code class="html"></code></pre>|<br /></pre>
<p>Generally, one should be able to copy-paste data from the table to add the macro to his/her installation.</p>
<p>I also suggest using the following format for the subject of your topic, that describes the macro:</p>
<pre>
{{macro_name}}: short description
</pre>
<hr />
<p>Check the following topic for a sample:</p>
<ul>
<li><a class="message" href="http://projects.andriylesyuk.com/boards/22/topics/108">{{youtube}}: embedding YouTube videos</a></li>
</ul>