Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 92e40bb

Browse files
committed
refactor(cheatsheet): improve cs tyle
1 parent 7336550 commit 92e40bb

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/containers/CheatsheetThread/Cheatsheet.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from 'react'
22
import Masonry from 'react-masonry-component'
33
import { Remarkable } from 'remarkable'
4-
import remarkableemoj from 'remarkable-emoji'
54
// import Prism from 'mastani-codehighlight'
5+
6+
// eslint-disable-next-line import/named
67
import { COMMUNITY_CHEATSHEET } from '@config'
78

89
import { uid } from '@utils'
@@ -17,7 +18,6 @@ import parser from './parser'
1718
import CheatSheetStyle from './styles/CheatsheetMarkStyles'
1819

1920
const md = new Remarkable()
20-
md.use(remarkableemoj)
2121

2222
const Cards = ({ cards }) =>
2323
cards.map(item => (

src/containers/CheatsheetThread/styles/CheatsheetMarkStyles.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,15 @@ const CheatSheetStyles = styled.div`
316316
.cheatsheet-body code {
317317
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,
318318
monospace;
319-
font-size: 12px;
319+
font-size: 16px;
320320
}
321321
322322
.cheatsheet-body pre {
323323
margin-top: 0;
324324
margin-bottom: 0;
325325
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,
326326
monospace;
327-
font-size: 12px;
327+
font-size: 16px;
328328
}
329329
330330
.cheatsheet-body .octicon {

src/containers/CheatsheetThread/styles/cheatsheet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const Wrapper = styled.div`
77
`
88
// width: 550px;
99
export const CardWrapper = styled.div`
10-
width: 550px;
10+
width: 450px;
1111
height: auto;
1212
background: ${theme('code.bg')};
1313
margin: 10px;

src/containers/Sidebar/logic.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ let sub$ = null
2828
export const setPin = () => store.mark({ pin: !store.pin })
2929

3030
export const scrollOnTop = () => {
31-
store.mark({ showHomeBarShadow: false })
32-
log('scrollTop ... On')
31+
if (store) store.mark({ showHomeBarShadow: false })
3332
}
3433

3534
export const scrollOffTop = () => {
36-
store.mark({ showHomeBarShadow: true })
37-
log('scrollTop ... Off')
35+
if (store) store.mark({ showHomeBarShadow: true })
3836
}
3937

4038
export const onCommunitySelect = community => {

0 commit comments

Comments
 (0)