Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 41a35dd

Browse files
author
Barrie Hadfield
committed
a stylish table
1 parent 8d786a6 commit 41a35dd

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

index.html

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@
2626
TypeAlong()
2727
Buttons()
2828
Clock()
29+
StylishTable()
2930
end
3031
end
3132
end
3233

3334
class Buttons < Hyperloop::Component
3435
render(DIV) do
35-
H2 { "Here is a button" }
36-
BUTTON { 'See the value' }.on(:click) do
37-
alert "MyStore value is '#{ MyStore.value }' "
38-
end
39-
BUTTON { 'Clear' }.on(:click) { ClearOp.run }
36+
H2 { "Some buttons" }
37+
BUTTON(class: 'btn btn-primary') { 'See the value' }.on(:click) { alert "MyStore value is '#{ MyStore.value }'" }
38+
BUTTON(class: 'btn btn-link') { 'Clear' }.on(:click) { ClearOp.run }
4039
end
4140
end
4241

@@ -76,6 +75,28 @@
7675
step { MyStore.clear }
7776
end
7877

78+
class StylishTable < Hyperloop::Component
79+
render(DIV) do
80+
H2 { "A stylish table" }
81+
table.table.table_bordered do
82+
thead do
83+
tr do
84+
th { "First Name" }
85+
th { "Last Name" }
86+
th { "Username" }
87+
end
88+
end
89+
tbody do
90+
tr do
91+
td { "Mark" }
92+
td { "Otto" }
93+
td.text_success { MyStore.value }
94+
end
95+
end
96+
end
97+
end
98+
end
99+
79100
</script>
80101

81102
</head>

0 commit comments

Comments
 (0)