@@ -49,33 +49,55 @@ const getItemLevel = (item) => {
4949<template >
5050 <div class =" outline" >
5151 <div class =" outline-title" >
52- <a class =" outline-title-link" > {{ t("static.outline") }} </a >
52+ <a class =" outline-title-link" >{{ t("static.outline") }}</a >
5353 </div >
54- <div v-for =" (item, index) in outlineData" :key =" index" >
55- <static-content-right-outline-item
56- :item =" item"
57- :max-depth =" maxDepth"
58- :root-level =" getRootLevel()"
59- :is-root =" true"
60- :active-text =" activeText"
61- />
54+ <div class =" outline-content" >
55+ <div
56+ v-for =" (item, index) in outlineData"
57+ :key =" index"
58+ class =" outline-item"
59+ >
60+ <static-content-right-outline-item
61+ :item =" item"
62+ :max-depth =" maxDepth"
63+ :root-level =" getRootLevel()"
64+ :is-root =" true"
65+ :active-text =" activeText"
66+ />
67+ </div >
6268 </div >
6369 </div >
6470</template >
6571
6672<style lang="stylus" scoped>
6773.outline
6874 width : 240px
75+ height : 100vh
6976 background-color : #f f f
70- padding : 10px
7177 box-shadow : 2px 0 6px rgba (0 , 0 , 0 , 0.1 )
72- z-index : 9
73- overflow-y auto
74- height : 100vh
75- position : relative
78+ border : 1px solid #ea ea ea
79+ display : flex
80+ flex-direction : column
81+ position fixed
82+
83+ // Dark mode styles
84+ html [data-theme-mode = "dark" ] &
85+ background-color : #1e 1e 1e
86+ border-color : #3a 3a 3a
7687
7788.outline-title
78- margin-bottom : 1rem
89+ flex-shrink : 0
90+ padding : 10px 20px
91+ background-color : inherit
92+ position : sticky
93+ top : 0
94+ z-index : 10
95+ // border-bottom: 1px solid #eaeaea
96+
97+ // Dark mode styles
98+ html [data-theme-mode = "dark" ] &
99+ border-bottom-color : #3a 3a 3a
100+
79101 .outline-title-link
80102 color : #3 3 3
81103 font-weight : 600
@@ -84,4 +106,24 @@ const getItemLevel = (item) => {
84106 transition : color 0.3s ease
85107 & :hover
86108 color : #00 7b ff
109+
110+ // Dark mode styles
111+ html [data-theme-mode = "dark" ] &
112+ color : #d d d
113+ & :hover
114+ color : #33 99 ff
115+
116+ .outline-content
117+ flex-grow : 1
118+ overflow-y : auto
119+ background-color : inherit
120+ padding : 10px
121+
122+ // Dark mode styles
123+ html [data-theme-mode = "dark" ] &
124+ background-color : #1e 1e 1e
125+
126+ .outline-item
127+ margin-bottom : 8px
128+ padding-left : 5px
87129 </style >
0 commit comments