예제 #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)
예제 #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)
예제 #3
0
파일: site.py 프로젝트: pombredanne/djpcms
    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
예제 #4
0
파일: site.py 프로젝트: pombredanne/djpcms
    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