himedlooff / doxray-template

A handlebars.js template for Doxray
http://himedlooff.github.io/doxray-template/docs/
MIT License
0 stars 0 forks source link

wrappers property #3

Open himedlooff opened 9 years ago

himedlooff commented 9 years ago

@Scotchester, instead of having variantWrappers and defaultWrapper properties I'm thinking of combining them into one called wrappers. If wrappers exists then I will render whatever is in markup once for each item in the wrappers array.

Here's an example:

/* doxray
label:
    .doxray-toc_masthead
markup: |
    <h1 class="doxray-toc_masthead">
        Masthead
    </h1>
wrappers: [default, mint, mocca]
*/

Would render:

image

Each wrapper would have a class attached to it and a label that both correspond to the value in the array.

image

Notice that the first item is called default. You could also use an empty string if you wanted no class/label for the first item, like this: ['', mint, mocca]

Scotchester commented 9 years ago

That makes perfect sense to me!