In [21]:
from IPython.html import widgets
from ipbs.widgets import (
    Container,
    Row,
    Column,
    Label
)
from ipbs import bootstrap as bs
contexts = list(bs.Context)

cols = [
    Column(
        Label(context),
        background=context
    )
    for i in range(12)
    for context in [contexts[i % len(contexts)]]
]
row = Row(*cols)
grid = Container(row)


Display the widget:


In [22]:
grid

In [31]:
Container(*[
    Row(
        Column(
            Label("Offset %s" % i),
            background=contexts[2 + ((1 + i) % 3)]
        ) + i,
        background=contexts[i % 2]
    )
    for i in range(12)
])



In [24]:
Container(*[
    Row(Column(Label("Push %s" % i)) > i)
    for i in range(12)
])



In [25]:
Container(*[
    Row(Column(Label("Pull %s" % i)) < i)
    for i in range(12)
])