nicolas-t / Chocolat

Chocolat : the lightbox so cool horses use it :horse:
http://chocolat.insipi.de
GNU General Public License v3.0
1.69k stars 170 forks source link

How to reproduce styling in demo? #91

Closed CptMeatball closed 6 years ago

CptMeatball commented 6 years ago

I was triggered by the styling in the demo, which has most information in the top bar. Is this custom styling/settings or is there some part of the docs I've failed to find?

nicolas-t commented 6 years ago

Hello,

You can achieve this by modifying the markup with the hook afterMarkup, you'll find an example here : https://github.com/nicolas-t/Chocolat/issues/65#issuecomment-307143028 and in the readme :

$('#example').Chocolat({
  afterMarkup: function () {
    this.elems.description.appendTo(this.elems.top)
  }
})

It's a very flexible function and I can help you if you share more details about what you're trying to achieve.

You can also override the default css to make some positioning adjustments.

CptMeatball commented 6 years ago

Ah thanks!