Exemplo n.º 1
0
 def render_html(self):
     html = ''
     html += markup.img(self.src1)
     html += markup.img(self.src2)
     if self.desc:
         html += markup.p(self.desc, 'beschriftung')
     return html
Exemplo n.º 2
0
    def test_img(self):
        self.assertEqual(
            markup.img('/home/pics/me.jpg'),
            '<img class="bordered flexible" src="/home/pics/me.jpg" />\n'
            )

        self.assertEqual(
            markup.img(''),
            '<img class="bordered flexible" src="images/site/error.png" />\n'
            )
Exemplo n.º 3
0
    def render_html(self):
        html_left_col = markup.img(self.image.src)
        html_left_col += markup.p(self.image.desc, 'beschriftung')
        html_left_col = markup.grid(
                    markup.gbox(
                        markup.section(html_left_col, 'box lila')
                        )
                    , 50, 'l'
                    )
        html_infos = ''
        for info in self.infos:
            html_infos += info.render_html()

        html_right_col = markup.section(html_infos, 'box info')
        html_right_col = markup.grid( markup.gbox( html_right_col ), 50, 'r')
        return markup.grid_main(html_left_col + html_right_col)