Skip to content

Commit 407ee85

Browse files
authored
Merge pull request #129 from nemozak1/develop
fix glossary scrollbars
2 parents 3c60c05 + 58dfa6b commit 407ee85

File tree

2 files changed

+67
-26
lines changed

2 files changed

+67
-26
lines changed

src/components/GlossarySearchNav.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ const searchEvent = (event) => {
106106
<style scoped>
107107
.tabs {
108108
display: flex;
109-
max-height: 90vh;
110109
}
111110
112111
.alphabet {
@@ -155,8 +154,6 @@ const searchEvent = (event) => {
155154
}
156155
157156
.tab-items {
158-
overflow: auto;
159-
max-height: 100vh;
160157
margin-top: 10px;
161158
margin-right: -8px;
162159
}

src/views/GlossaryView.vue

Lines changed: 67 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,46 +34,90 @@ const glossary = ref(inject(obpGlossaryKey)!.glossary_items)
3434
</script>
3535

3636
<template>
37-
<el-container>
37+
<el-container class="glossary-container">
3838
<el-aside class="search-nav" width="20%">
39-
<SearchNav />
39+
<el-scrollbar>
40+
<SearchNav />
41+
</el-scrollbar>
4042
</el-aside>
41-
<el-main>
42-
<el-container class="main">
43-
<el-container>
44-
<main>
45-
<el-backtop :right="100" :bottom="100" target="main" />
46-
<div v-for="(value, key) of glossary" :key="value">
47-
<span>
48-
<a v-bind:href="`#${value.title}`" :id="value.title">
49-
{{ value.title }}
50-
</a>
51-
</span>
52-
<div v-html="value.description.html" class="content"></div>
53-
</div>
54-
</main>
55-
</el-container>
56-
</el-container>
43+
<el-main class="glossary-content">
44+
<el-scrollbar>
45+
<el-backtop :right="100" :bottom="100" />
46+
<div v-for="(value, key) of glossary" :key="value">
47+
<span>
48+
<a v-bind:href="`#${value.title}`" :id="value.title">
49+
{{ value.title }}
50+
</a>
51+
</span>
52+
<div v-html="value.description.html" class="content"></div>
53+
</div>
54+
</el-scrollbar>
5755
</el-main>
5856
</el-container>
5957
</template>
6058

6159
<style scoped>
62-
.main {
63-
max-height: 90vh;
64-
overflow-y: auto;
60+
.glossary-container {
61+
height: calc(100vh - 60px);
6562
}
66-
main {
67-
margin: 25px;
63+
.search-nav :deep(.el-scrollbar__wrap) {
64+
overflow-x: hidden;
65+
}
66+
.search-nav :deep(.el-scrollbar__view) {
67+
padding: 10px;
68+
}
69+
.glossary-content {
6870
color: #39455f;
6971
font-family: 'Roboto';
72+
padding: 0;
73+
}
74+
.glossary-content :deep(.el-scrollbar__wrap) {
75+
overflow-x: hidden;
76+
}
77+
.glossary-content :deep(.el-scrollbar__view) {
78+
padding: 25px;
79+
word-wrap: break-word;
80+
overflow-wrap: break-word;
81+
max-width: 100%;
82+
box-sizing: border-box;
7083
}
7184
span {
7285
font-size: 28px;
86+
word-wrap: break-word;
87+
overflow-wrap: break-word;
7388
}
7489
div {
7590
font-size: 14px;
7691
}
92+
.content {
93+
word-wrap: break-word;
94+
overflow-wrap: break-word;
95+
max-width: 100%;
96+
}
97+
.content :deep(*) {
98+
max-width: 100%;
99+
word-wrap: break-word;
100+
overflow-wrap: break-word;
101+
}
102+
.content :deep(img) {
103+
max-width: 100%;
104+
height: auto;
105+
}
106+
.content :deep(table) {
107+
max-width: 100%;
108+
table-layout: fixed;
109+
word-wrap: break-word;
110+
}
111+
.content :deep(pre) {
112+
max-width: 100%;
113+
overflow-x: auto;
114+
white-space: pre-wrap;
115+
word-wrap: break-word;
116+
}
117+
.content :deep(code) {
118+
word-wrap: break-word;
119+
overflow-wrap: break-word;
120+
}
77121
.content :deep(strong) {
78122
font-family: 'Roboto';
79123
}

0 commit comments

Comments
 (0)