Skip to content

Commit ef8ee50

Browse files
committed
Use bootstrap for more things.
1 parent 074520f commit ef8ee50

File tree

5 files changed

+12
-37
lines changed

5 files changed

+12
-37
lines changed

dist/styles.css

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
.padding {
2-
padding: 1.55rem;
3-
}
4-
5-
.margin {
6-
margin-left: .4rem;
7-
margin-right: 1.55rem;
8-
}
9-
10-
.width-80 {
11-
width: 80%;
12-
}
13-
14-
.font-lg {
15-
font-size: 1.3rem;
16-
}
17-
18-
.red-text {
19-
color: red;
20-
}
21-
22-
.green-text {
23-
color: green;
24-
}
25-
261
.fixed-height {
272
height: 2.5rem;
283
}

src/components/App.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def render_todo_panel(self):
3434
<div>
3535
<TodoListContainer />
3636
<Form
37-
className="padding"
37+
className="p-4"
3838
onSubmit={self.on_submit}
3939
>
4040
<FormPanelContainer />
@@ -57,11 +57,11 @@ def render(self):
5757
>
5858
<Jumbotron>
5959
<div className="d-flex flex-column">
60-
<div className="d-flex justify-content-center align-items-center padding">
60+
<div className="d-flex justify-content-center align-items-center p-4">
6161
<h2>My Todos</h2>
6262
</div>
6363
{visible_component}
64-
<span className="red-text">{error}</span>
64+
<span className="text-danger">{error}</span>
6565
</div>
6666
</Jumbotron>
6767
</Col>

src/components/ButtonPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def on_click_logout(self):
3434
def render(self):
3535
return __pragma__("xtrans", None, "{}", """ (
3636
<div className="d-flex justify-content-center align-items-center">
37-
<div className="d-flex justify-content-around width-80">
37+
<div className="d-flex justify-content-around w-75">
3838
<Button
3939
className="fixed-height"
4040
onClick={self.on_click_add}

src/components/LoginForm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def render(self):
4040
"username_text", "password_text")
4141

4242
return __pragma__("xtrans", None, "{}", """ (
43-
<Form className="padding" onSubmit={self.on_submit_login}>
43+
<Form className="p-4" onSubmit={self.on_submit_login}>
4444
<FormGroup>
4545
<Label for="username_text">Enter your username</Label>
4646
<Input
@@ -58,7 +58,7 @@ def render(self):
5858
id="password_text" />
5959
</FormGroup>
6060
<Button
61-
className="fixed-height margin"
61+
className="fixed-height ml-2 mr-4"
6262
type="submit"
6363
>Login</Button>
6464
<Button

src/components/TodoList.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def render_checkmark(self, todo):
5959
return None
6060

6161
return __pragma__("xtrans", None, "{}", """ (
62-
<div className="d-flex flex-column justify-content-center align-items-center margin">
62+
<div className="d-flex flex-column justify-content-center align-items-center ml-2 mr-4">
6363
<FontAwesomeIcon
6464
name="check-circle"
6565
size="2x"
66-
className="green-text" />
66+
className="text-success" />
6767
</div>
6868
); """)
6969

@@ -74,11 +74,11 @@ def render_list_item(self, todo):
7474
key={todo.id}
7575
>
7676
{self.render_checkmark(todo)}
77-
<div className="d-flex flex-grow-1 font-lg">
78-
{todo.text}
77+
<div className="d-flex flex-grow-1">
78+
<h5>{todo.text}</h5>
7979
</div>
8080
<Button
81-
className="fixed-height margin"
81+
className="fixed-height ml-2 mr-4"
8282
color="primary"
8383
onClick={self.on_click_complete(todo)}
8484
disabled={todo.complete}
@@ -100,7 +100,7 @@ def render(self):
100100
<ListGroup>
101101
{list_items}
102102
</ListGroup>
103-
<span className="red-text">{error}</span>
103+
<span className="text-danger">{error}</span>
104104
{self.render_spinner()}
105105
</div>
106106
); """)

0 commit comments

Comments
 (0)