Skip to content

Commit 66d5d04

Browse files
committed
Fixed mobile styling issue
1 parent bae6d6d commit 66d5d04

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Diff for: components/sidebar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export default function Sidebar(props) {
9191

9292
<div className={styles.topBarMobile}>
9393
<div className={styles.topBarMobileInner} style={{ borderColor: `${sidebarShown ? 'var(--divider-color)' : 'transparent'}`, width: `${sidebarShown ? '250px' : '38px'}` }}>
94-
<X className={styles.menuBarIcon} style={{ marginLeft: `${sidebarShown ? '212px' : '0'}`, position: `${sidebarShown ? 'unset' : 'absolute'}`, transform: `scale(${sidebarShown ? '1' : '0'})` }} onClick={() => setSidebarShown(!sidebarShown)} size={24} />
95-
<Menu className={styles.menuBarIcon} style={{ marginLeft: `${sidebarShown ? '212px' : '0'}`, position: `${sidebarShown ? 'absolute' : 'unset'}`, transform: `scale(${sidebarShown ? '0' : '1'})` }} onClick={() => setSidebarShown(!sidebarShown)} size={24} />
94+
<X className={styles.menuBarIcon} style={{ marginLeft: `${sidebarShown ? '212px' : '0'}`, position: `${sidebarShown ? 'unset' : 'absolute'}`, transform: `scale(${sidebarShown ? '1' : '0'})` }} onClick={() => setSidebarShown(!sidebarShown)} size={28} />
95+
<Menu className={styles.menuBarIcon} style={{ marginLeft: `${sidebarShown ? '212px' : '0'}`, position: `${sidebarShown ? 'absolute' : 'unset'}`, transform: `scale(${sidebarShown ? '0' : '1'})` }} onClick={() => setSidebarShown(!sidebarShown)} size={28} />
9696
</div>
9797
</div>
9898
</React.Fragment>

Diff for: styles/index.module.css

+10-6
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@
2929
padding: 0 0 0 302px;
3030
}
3131

32+
.contentInner {
33+
flex: 1;
34+
height: 100%;
35+
36+
padding: 5% 7%;
37+
}
38+
3239
@media only screen and (max-width: 768px) {
3340
/* For mobile phones: */
3441
.content {
3542
padding: 0;
3643
}
37-
}
3844

39-
.contentInner {
40-
flex: 1;
41-
height: 100%;
42-
43-
padding: 5% 7%;
45+
.contentInner {
46+
padding-top: calc(5% + 40px);
47+
}
4448
}
4549

4650

Diff for: styles/sidebar.module.css

+2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
top: 0;
128128

129129
width: 100%;
130+
max-height: 40px;
130131

131132
background: var(--main-background-color);
132133

@@ -139,6 +140,7 @@
139140
padding: 7px;
140141

141142
width: 250px;
143+
max-height: 40px;
142144

143145
border-right: solid 2px var(--divider-color);
144146

0 commit comments

Comments
 (0)