Skip to content

Commit 1d80b92

Browse files
committed
增加bootstrap样式
1 parent ca36a4e commit 1d80b92

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

index.html

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<title>notesapp</title>
5-
<meta charset="utf-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
</head>
8-
<body>
9-
<div id="app"></div>
10-
</body>
3+
4+
<head>
5+
<title>notesapp</title>
6+
<meta charset="utf-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
9+
crossorigin="anonymous">
10+
</head>
11+
12+
<body>
13+
<div id="app"></div>
14+
</body>
15+
1116
</html>

src/components/NotesList.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div id="notesList">
33
<h2>NOTES | COLIGO</h2>
44
<div id="notesButton">
5-
<button v-bind:class="{active:show === 'all'}" v-on:click="showAll">All Notes</button>
6-
<button v-bind:class="{active:show === 'favorites'}" v-on:click="showFavorites">Favorites</button>
5+
<button class="btn btn-default" v-bind:class="{active:show === 'all'}" v-on:click="showAll">All Notes</button>
6+
<button class="btn btn-default" v-bind:class="{active:show === 'favorites'}" v-on:click="showFavorites">Favorites</button>
77
</div>
88
<div id="listContainer">
99
<div v-on:click="updateActiveNote(note)" class="g" v-bind:class="{active:activeNote === note}" v-for="note in filterNotes">

src/components/Toolbar.vue

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div id='toolbar'>
3-
<div v-on:click="addNote">add</div>
4-
<div v-bind:class="{favorite:favorite}" v-on:click="toggleFavorite">favorite</div>
5-
<div v-on:click="deleteNote">delete</div>
3+
<div class="glyphicon glyphicon-plus" v-on:click="addNote"></div>
4+
<div class="glyphicon" v-bind:class="{'glyphicon-star-empty':!favorite,'glyphicon-star':favorite}" v-on:click="toggleFavorite "></div>
5+
<div class="glyphicon glyphicon-remove" v-on:click="deleteNote "></div>
66
</div>
77
</template>
88

@@ -36,10 +36,14 @@ export default {
3636
height: 100%;
3737
flex-direction: column;
3838
background-color: #30414D;
39-
color: #767676;
39+
color: darkcyan;
4040
}
4141
42-
.favorite {
43-
color: red;
42+
#toolbar div {
43+
font-size: 30px;
44+
margin: 35px 0px 0px 25px;
45+
cursor: pointer;
46+
opacity: 0.8;
47+
transition: opacity 0.5s ease;
4448
}
4549
</style>

0 commit comments

Comments
 (0)