eorg/examples/html-enaml/card.enaml

34 lines
949 B
Plaintext
Executable File

from web.components.api import *
from web.components.api import Div
enamldef Card(Div):
attr values
cls = 'card'
Div:
cls = 'card-image waves-effect waves-block waves-light'
Img:
cls = 'activator'
src = 'images/office.jpg'
Div:
cls = 'card-content'
Span:
cls = 'card-title activator grey-text text-darken-4">Card Title<i class="material-icons right'
text << card.title
I:
cls = 'material-icons right'
text = 'more_vert'
P:
A:
href="#"
text = 'This is a link'
Div:
cls = 'card-reveal'
Span:
cls = 'card-title grey-text text-darken-4'
text = 'Card title'
I:
cls = 'material-icons right'
text = 'more_vert'
P:
text << getattr(card, 'description', '')