Skip to content

Commit bb34845

Browse files
committed
modify css
1 parent ee1c88a commit bb34845

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

public/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
<!-- built files will be auto injected -->
1616
</body>
1717
</html>
18+
1819
<style>
1920
body {
2021
height: 100%;
2122
margin:0;
23+
background:#f0f2f5;
2224
}
23-
2425
</style>

src/views/article/detail.vue

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838

3939

4040
<el-col class="article-right-sidebar" :span="4">
41-
<div>
42-
<!-- <el-card class="bg-purple-dark">-->
43-
<div v-html="articleDetail.toc"/>
44-
<!-- </el-card>-->
45-
</div>
41+
<el-scrollbar always="true">
42+
<div class="article-toc-card">
43+
<el-card :body-style="tocBodyStyle" shadow="hover">
44+
<div v-html="articleDetail.toc"/>
45+
</el-card>
46+
</div>
47+
</el-scrollbar>
4648
</el-col>
4749
</el-row>
4850
</template>
@@ -62,6 +64,7 @@
6264
return {
6365
articleDetail: {},
6466
tempRoute: {},
67+
tocBodyStyle: {padding: '5px 20px 10px 0px'}
6568
}
6669
},
6770
@@ -124,11 +127,11 @@
124127
border-right-style: solid;
125128
border-width: 1px;
126129
border-color: rgba(0, 0, 0, 0.125);
130+
background-color: white;
127131
}
128132
129133
130134
.article-left-sidebar {
131-
background: #99a9bf;
132135
text-align: left;
133136
height: 100%;
134137
border-radius: 4px;
@@ -143,34 +146,43 @@
143146
}
144147
145148
.article-right-sidebar {
146-
background: #99a9bf;
147149
text-align: left;
148-
height: 100%;
149150
border-radius: 4px;
150151
}
152+
153+
.article-toc-card {
154+
155+
}
156+
157+
151158
</style>
152159
<style>
153-
.article-toc {
160+
.article-toc {
154161
list-style-type: none;
155162
padding-inline-start: 20px;
156163
157164
}
165+
158166
a {
159167
color: blue;
160168
}
161169
162-
.article-toc a:link {
170+
.article-toc a:link {
163171
color: black;
164172
}
173+
165174
.article-toc a:visited {
166175
color: gray;
167176
}
168-
.article-toc a:hover {
177+
178+
.article-toc a:hover {
169179
color: blue;
170180
}
171-
.article-toc a:active {
181+
182+
.article-toc a:active {
172183
color: red;
173184
}
185+
174186
.article-content a {
175187
color: blue;
176188
}

0 commit comments

Comments
 (0)