Esempio n. 1
0
 def page_layouts(self, site):
     # Page template
     page_template = page(
         topbar_container(brand="<img src='/media/djpsite/logos/djpcms-light-125x40.png' alt='djpcms'>",
                          fixed=False),
         container('header', grid('grid 100'),
                   renderer=self.render_header),
         container('content'),
         container('footer', grid('grid 33-33-33'),
                   renderer=self.render_footer))
     tiny_template = page(container('header', grid('grid 100')),
                          container('content'),
                          container('footer', grid('grid 100')))
     site.register_page_layout('default', page_template)
     site.register_page_layout('tiny', tiny_template)
Esempio n. 2
0
 def page_layouts(self, site):
     # Page template
     page_template = page(
         topbar_container(
             brand=
             "<img src='/media/djpsite/logos/djpcms-light-125x40.png' alt='djpcms'>",
             fixed=False),
         container('header', grid('grid 100'), renderer=self.render_header),
         container('content'),
         container('footer',
                   grid('grid 33-33-33'),
                   renderer=self.render_footer))
     tiny_template = page(container('header', grid('grid 100')),
                          container('content'),
                          container('footer', grid('grid 100')))
     site.register_page_layout('default', page_template)
     site.register_page_layout('tiny', tiny_template)
Esempio n. 3
0
    def register_page_layout(self, name, page=None):
        '''Register a :class:`djpcms.html.layout.page` with the
:class:`Site`. Return self for concatenating calls.'''
        name = name.lower()
        if page is None:
            page = layout.page()
        self._page_layout_registry[name] = page
        return self
Esempio n. 4
0
    def register_page_layout(self, name, page=None):
        '''Register a :class:`djpcms.html.layout.page` with the
:class:`Site`. Return self for concatenating calls.'''
        name = name.lower()
        if page is None:
            page = layout.page()
        self._page_layout_registry[name] = page
        return self