SassDoc / sassdoc

Release the docs!
http://sassdoc.com
MIT License
1.41k stars 56 forks source link

Move some templating logic to API #129

Closed KittyGiraudel closed 10 years ago

KittyGiraudel commented 10 years ago

https://github.com/SassDoc/sassdoc/blob/master/view/templates/layouts/base.html.swig#L12-L21

This should be done in the JavaScript side, at least the item.display thing.

KittyGiraudel commented 10 years ago

Please note we're moving view.json to the theme when doing this. ;)

See #122.

KittyGiraudel commented 10 years ago
var group;

// Adding a `display` key to each item
for (group in data) {
  data[group].forEach(function (item) {
    item.display = (options.display.access.indexOf(item.access[0]) !== -1) && !(!options.display.alias && item.alias);
  });
}
KittyGiraudel commented 10 years ago

Done. :)