Reahl is a Python framework to build a web application with Python code only. There is not need to write HTML, CSS or JavaScript [1]. Reahl is using bootstrap.io for most of the UI components [3]. Here are some examples. All samples are in a public repository: https://bitbucket.org/schroedingerdb/reahl-samples/
Navbar
A simple navbar example[2]. It is very similar to the Reahl tutorial: https://www.reahl.org/docs/4.0/tutorial/styling.d.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from __future__ import print_function, unicode_literals, absolute_import, division from reahl.web.fw import UserInterface from reahl.web.bootstrap.ui import HTML5Page from reahl.web.bootstrap.navbar import Navbar, ResponsiveLayout class MyTestUI(UserInterface): def assemble(self): self.define_view('/', title='Home', page=MyTestPage.factory()) class MyTestPage(HTML5Page): def __init__(self, view): super(MyTestPage, self).__init__(view) layout = ResponsiveLayout('md', colour_theme='light', bg_scheme='light') navbar = Navbar(view, css_id='sp_nav').use_layout(layout) navbar.layout.set_brand_text('MyTestPage') self.body.add_child(navbar) |
The result looks like:

The navbar has a responsive layout. On smaller devices a menu pops up.

A navbar with links:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
from __future__ import print_function, unicode_literals, absolute_import, division from reahl.web.fw import UserInterface from reahl.web.ui import Url, A from reahl.web.bootstrap.ui import HTML5Page from reahl.web.bootstrap.navbar import Navbar, ResponsiveLayout from reahl.web.bootstrap.navs import Nav class MyTestUI(UserInterface): def assemble(self): self.define_view('/', title='Home', page=MyTestPage.factory()) class MyTestPage(HTML5Page): def __init__(self, view): super(MyTestPage, self).__init__(view) layout = ResponsiveLayout('md', colour_theme='light', bg_scheme='light') navbar = Navbar(view, css_id='sp_nav').use_layout(layout) navbar.layout.set_brand_text('MyTestPage') nav = Nav(view) nav.add_a(A(view, Url('http://schroedingerdb.com'), 'Link1')) nav.add_a(A(view, Url('http://schroedingerdb.de'), 'Link2')) nav.add_a(A(view, Url('/login'), 'Login')) navbar.layout.add(nav) self.body.add_child(navbar) |
The results looks like:

[1] https://www.reahl.org/
[2] https://www.reahl.org/docs/4.0/web/bootstrap/navbar.d.html
[3] https://www.reahl.org/docs/4.0/web/bootstrap/ui.d.html