Exemplo n.º 1
0
 def get_options(self):
     nav_root = self.context.restrictedTraverse(
         getNavigationRoot(self.context))
     options = ICustomStyles(nav_root).get_styles()
     styles = []
     for key, value in options.items():
         if value and key.startswith('css.'):
             styles.append('$%s: %s;' % (key.replace('css.', ''), value))
         if value and key == 'custom_scss':
             styles.append(value)
     return '\n'.join(styles)
Exemplo n.º 2
0
 def get_options(self):
     nav_root = self.context.restrictedTraverse(
         getNavigationRoot(self.context))
     options = ICustomStyles(nav_root).get_styles()
     styles = []
     for key, value in options.items():
         if value and key.startswith('css.'):
             styles.append('$%s: %s;' % (key.replace('css.', ''),
                                         value))
         if value and key == 'custom_scss':
             styles.append(value)
     return '\n'.join(styles)