Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab896b7

Browse files
committed
wip
1 parent da63191 commit ab896b7

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

src/client/app/modules/components/search-form.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export class SearchForm extends React.Component {
7373
}
7474

7575
updateSearch(params, hashes = [], append = false) {
76-
this.resultView.scrollTop = 0;
76+
if (!append) {
77+
this.resultView.scrollTop = 0;
78+
}
7779
if(!params.searchStringRegEx) {
7880
// Escape regex characters
7981
params.searchString = params.searchString.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
@@ -140,7 +142,7 @@ export class SearchForm extends React.Component {
140142
</span>
141143
</div> : null
142144
}
143-
<div className="Results" ref={(ref) => this.resultView = this.resultView || ref} >
145+
<div className="Results no-scroll-bar" ref={(ref) => this.resultView = this.resultView || ref} >
144146
{ (results.length > 0) ?
145147
<ConnectedInfiniteScroll loadMore={() => this.loadMore(hashes)} hasMore={searchString || location}>
146148
{

src/client/sass/index.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ html {
1515
background-color: #21252b;
1616
}
1717

18+
body {
19+
overflow: hidden;
20+
}
21+
1822
input[type="submit"],
1923
input[type="reset"],
2024
input[type="button"],
@@ -85,8 +89,11 @@ button {
8589
}
8690
}
8791

88-
.prism-show-language-label {
89-
display: none !important;
92+
.no-scroll-bar {
93+
padding-right: 30px;
94+
margin-right: -30px;
95+
padding-bottom: 30px;
96+
margin-bottom: -30px;
9097
}
9198

9299
.pulse:before {

src/client/sass/partials/_code.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.SnippetContainer {
22
margin-bottom: 24px;
3-
overflow-x: hidden;
3+
overflow: hidden;
44

55
pre {
66
@include display-flex;
@@ -20,16 +20,18 @@
2020
.Snippet-code {
2121
background: #2b303b;
2222
border: 1px solid #181a1f;
23+
overflow: hidden;
2324

2425
.hljs {
25-
margin: 16px;
2626
font-family: 'Inconsolata', monospace;
2727
font-size: 15px;
2828
line-height: 20px;
29-
margin-left: 48px;
3029
padding: 0;
3130
background: none;
3231
z-index: 1;
32+
margin: 16px 0;
33+
padding-left: 64px;
34+
padding-bottom: 25px;
3335
}
3436
}
3537

src/client/sass/partials/_full-view.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
background-color: #1b1d23;
33
@include flex(3);
44
height: 100%;
5-
overflow: scroll;
5+
overflow-y: scroll;
66

77
pre {
88
background: #1b1d23 !important;
@@ -16,7 +16,12 @@
1616

1717
.SnippetContainer {
1818
margin-top: 56px;
19+
20+
.hljs {
21+
margin-bottom: 0;
22+
}
1923
}
24+
2025
}
2126

2227
.Header {

src/client/sass/partials/_search.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
padding: 11px 16px;
66
color: #ddd;
77
height: 100%;
8-
overflow: scroll;
8+
overflow-y: hidden;
99
box-sizing: border-box;
1010
border-right: 1px solid #15191c;
1111

0 commit comments

Comments
 (0)