File tree Expand file tree Collapse file tree 4 files changed +64
-38
lines changed
theme/DocItem/TOC/Desktop Expand file tree Collapse file tree 4 files changed +64
-38
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ export default function Feedback({side}) {
191
191
192
192
193
193
return (
194
+ < div className = { styles . displayFeedback } >
194
195
< Panel hasBorder alignItems = 'start' >
195
196
< Popover open = { open } >
196
197
< Popover . Trigger >
@@ -212,6 +213,7 @@ export default function Feedback({side}) {
212
213
selected === 'neg' && negative_feedback
213
214
}
214
215
</ Popover >
215
- </ Panel >
216
+ </ Panel >
217
+ </ div >
216
218
) ;
217
219
}
Original file line number Diff line number Diff line change 1
- .Button {
2
- width : 40px ;
3
- height : 40px ;
4
- display : flex ;
5
- align-items : center ;
6
- justify-content : center ;
7
- border-radius : 4px ;
8
- cursor : pointer ;
9
- margin-right : 8px ;
10
- border : 1px solid ;
11
- background-color : transparent ;
12
-
13
- & .dark {
14
- border-color : #323232 ;
15
- background-color : transparent ;
16
-
17
- & .selected {
18
- background-color : #282828 ;
1
+ @use ' ../../css/breakpoints.scss' as breakpoints ;
2
+
3
+ .displayFeedback {
4
+ display : none ;
5
+ }
6
+
7
+ @media screen and (min-width : breakpoints .$laptop-breakpoint ) {
8
+
9
+ .displayFeedback {
10
+ display : flex ;
19
11
}
20
- }
21
12
22
- & .light {
23
- border-color : #E6E7E9 ;
24
- background-color : #fff ;
13
+ .Button {
14
+ width : 40px ;
15
+ height : 40px ;
16
+ display : flex ;
17
+ align-items : center ;
18
+ justify-content : center ;
19
+ border-radius : 4px ;
20
+ cursor : pointer ;
21
+ margin-right : 8px ;
22
+ border : 1px solid ;
23
+ background-color : transparent ;
24
+
25
+ & .dark {
26
+ border-color : #323232 ;
27
+ background-color : transparent ;
25
28
26
- & .selected {
27
- background-color : #F6F7FA ;
29
+ & .selected {
30
+ background-color : #282828 ;
31
+ }
32
+ }
33
+
34
+ & .light {
35
+ border-color : #E6E7E9 ;
36
+ background-color : #fff ;
37
+
38
+ & .selected {
39
+ background-color : #F6F7FA ;
40
+ }
41
+ }
28
42
}
29
- }
30
43
}
44
+
45
+
46
+
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import {useDoc} from '@docusaurus/plugin-content-docs/client';
4
4
import TOC from '@theme/TOC' ;
5
5
import clsx from "clsx" ;
6
6
import IconClose from '@theme/Icon/Close' ;
7
- import styles from './styles.module.css '
7
+ import styles from './styles.module.scss '
8
8
import Feedback from '../../../../components/Feedback' ;
9
9
10
10
const AD_DATA_ENDPOINT = 'https://cms.clickhouse-dev.com:1337/api/docs-ad'
@@ -89,7 +89,7 @@ export default function DocItemTOCDesktop() {
89
89
90
90
{
91
91
! isClosed && title && description && href && label && (
92
- < div className = { styles . docCloudCard } >
92
+ < div className = { styles . docCloudCardAd } >
93
93
< div className = { styles . docCloudCardHeader } >
94
94
< h6 > { title } </ h6 >
95
95
< button
Original file line number Diff line number Diff line change
1
+ @use ' ../../../../css/breakpoints.scss' as breakpoints ;
2
+
1
3
.docTOC {
2
4
top : 0 ;
3
5
position : relative ;
4
6
max-height : initial ;
5
7
}
6
8
9
+ .docCloudCardAd {
10
+ display : none ; // don't show by default on mobile
11
+ }
12
+
7
13
.docTOCContainer {
8
14
height : calc (100vh - (var (--ifm-navbar-height ) + 2rem ));
9
15
display : flex ;
15
21
top : calc (var (--ifm-navbar-height ) + 1rem );
16
22
}
17
23
18
- .docCloudCard {
19
- background : var (--click-cloud-card-background );
20
- display : flex;
21
- flex-direction : column;
22
- padding : 1rem ;
23
- border-radius : 8px ;
24
- margin-bottom : 24px ;
25
- }
26
-
27
24
.docCloudCardHeader {
28
25
display : flex ;
29
26
flex-wrap : nowrap ;
61
58
}
62
59
63
60
@media (max-height : 700px ) {
64
- .docCloudCard {
61
+ .docCloudCardAd {
65
62
display : none ;
66
63
}
67
64
}
65
+
66
+ @media screen and (min-width : breakpoints .$laptop-breakpoint ) {
67
+ .docCloudCardAd {
68
+ background : var (--click-cloud-card-background );
69
+ display : flex ;
70
+ flex-direction : column ;
71
+ padding : 1rem ;
72
+ border-radius : 8px ;
73
+ margin-bottom : 24px ;
74
+ }
75
+ }
You can’t perform that action at this time.
0 commit comments