Skip to content

Commit b645017

Browse files
author
Sergey Vlasov
committed
add simple css layout to kanban board and basic vue components
1 parent 9ebcd49 commit b645017

File tree

7 files changed

+107
-119
lines changed

7 files changed

+107
-119
lines changed

frontend/src/App.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<template>
22
<div id="app">
3-
<img src="./assets/logo.png">
3+
<kanban-header></kanban-header>
44
<router-view/>
5+
<kanban-footer></kanban-footer>
56
</div>
67
</template>
78

89
<script>
10+
import KanbanHeader from '@/components/KanbanHeader'
11+
import KanbanFooter from '@/components/KanbanFooter'
12+
913
export default {
10-
name: 'App'
14+
name: 'App',
15+
components: {
16+
'kanban-header': KanbanHeader,
17+
'kanban-footer': KanbanFooter
18+
}
1119
}
1220
</script>
1321

@@ -18,6 +26,6 @@ export default {
1826
-moz-osx-font-smoothing: grayscale;
1927
text-align: center;
2028
color: #2c3e50;
21-
margin-top: 60px;
29+
border: 1px solid black;
2230
}
2331
</style>

frontend/src/components/HelloWorld.vue

Lines changed: 0 additions & 113 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<template>
2+
<div id="kanban-board">
3+
<h1>Hello, {{ name }}</h1>
4+
<div id="board">
5+
<kanban-list></kanban-list>
6+
<kanban-list></kanban-list>
7+
<kanban-list></kanban-list>
8+
</div>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import KanbanList from '@/components/board/KanbanList.vue'
14+
15+
export default {
16+
components: { KanbanList },
17+
name: 'KanbanBoard',
18+
data () {
19+
return {
20+
msg: 'Welcome to Your Vue.js App!',
21+
name: 'Sergey'
22+
}
23+
}
24+
}
25+
</script>
26+
27+
<!-- Add "scoped" attribute to limit CSS to this component only -->
28+
<style scoped>
29+
#kanban-board {
30+
border: 1px solid red;
31+
}
32+
#board {
33+
border: 1px solid blue;
34+
overflow-x: auto;
35+
white-space: nowrap;
36+
text-align: left;
37+
}
38+
</style>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div id="kanban-footer">
3+
<h2>This is the footer</h2>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'KanbanFooter'
10+
}
11+
</script>
12+
13+
<style scoped>
14+
#kanban-footer {
15+
border: 1px solid red;
16+
}
17+
</style>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div id="kanban-header">
3+
<h2>This is the footer</h2>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'KanbanHeader'
10+
}
11+
</script>
12+
13+
<!-- Add "scoped" attribute to limit CSS to this component only -->
14+
<style scoped>
15+
#kanban-header {
16+
border: 1px solid red;
17+
}
18+
</style>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div id="kanban-list">
3+
<h2>This is the List</h2>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'KanbanList'
10+
}
11+
</script>
12+
13+
<style scoped>
14+
#kanban-list {
15+
border: 1px solid green;
16+
width: 300px;
17+
display: inline-block;
18+
text-align: center;
19+
}
20+
</style>

frontend/src/router/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import Vue from 'vue'
22
import Router from 'vue-router'
3-
import HelloWorld from '@/components/HelloWorld'
3+
import KanbanBoard from '@/components/KanbanBoard'
44

55
Vue.use(Router)
66

77
export default new Router({
88
routes: [
99
{
1010
path: '/',
11-
name: 'HelloWorld',
12-
component: HelloWorld
11+
name: 'KanbanBoard',
12+
component: KanbanBoard
1313
}
1414
]
1515
})

0 commit comments

Comments
 (0)