8000 snippet note · csseditor/Boostnote@b6d3447 · GitHub
Skip to content

Commit b6d3447

Browse files
committed
snippet note
1 parent 69d11b5 commit b6d3447

13 files changed

Lines changed: 890 additions & 96 deletions

File tree

browser/components/MarkdownPreview.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export default class MarkdownPreview extends React.Component {
7171
el.removeEventListener('click', goExternal)
7272
})
7373

74-
7574
let { value, fontFamily, fontSize, codeBlockFontFamily, lineNumber, codeBlockTheme } = this.props
7675
fontFamily = _.isString(fontFamily) && fontFamily.trim().length > 0
7776
? [fontFamily].concat(defaultFontFamily)

browser/lib/modes.js

Lines changed: 78 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,9 @@
11
const modes = [
2-
// Major
32
{
43
name: 'text',
54
label: 'Plain text',
65
mode: 'text'
76
},
8-
{
9-
name: 'markdown',
10-
label: 'Markdown',
11-
alias: ['md'],
12-
mode: 'markdown'
13-
},
14-
{
15-
name: 'javascript',
16-
label: 'JavaScript',
17-
alias: ['js', 'jscript', 'babel', 'es'],
18-
mode: 'javascript'
19-
},
20-
{
21-
name: 'html',
22-
label: 'HTML',
23-
alias: [],
24-
mode: 'html'
25-
},
26-
{
27-
name: 'css',
28-
label: 'CSS',
29-
alias: ['cascade', 'stylesheet'],
30-
mode: 'css'
31-
},
32-
{
33-
name: 'php',
34-
label: 'PHP',
35-
alias: [],
36-
mode: 'php'
37-
},
38-
{
39-
name: 'python',
40-
label: 'Python',
41-
alias: ['py'],
42-
mode: 'python'
43-
},
44-
{
45-
name: 'ruby',
46-
label: 'Ruby',
47-
alias: ['rb'],
48-
mode: 'ruby'
49-
},
50-
{
51-
name: 'java',
52-
label: 'Java',
53-
alias: [],
54-
mode: 'java'
55-
},
56-
{
57-
name: 'c',
58-
label: 'C',
59-
alias: ['c', 'h', 'clang', 'clang'],
60-
mode: 'c_cpp'
61-
},
62-
{
63-
name: 'cpp',
64-
label: 'C++',
65-
alias: ['cc', 'cpp', 'cxx', 'hh', 'c++', 'cplusplus'],
66-
mode: 'c_cpp'
67-
},
68-
{
69-
name: 'csharp',
70-
label: 'C#',
71-
alias: ['cs', 'c#'],
72-
mode: 'csharp'
73-
},
74-
{
75-
name: 'swift',
76-
label: 'Swift',
77-
alias: [],
78-
mode: 'swift'
79-
},
80-
{
81-
name: 'golang',
82-
label: 'Go',
83-
alias: ['go'],
84-
mode: 'golang'
85-
},
86-
87-
// Minor
887
{
898
name: 'abap',
909
label: 'ABAP',
@@ -145,6 +64,12 @@ const modes = [
14564
alias: ['dos', 'windows', 'bat', 'cmd', 'btm'],
14665
mode: 'batchfile'
14766
},
67+
{
68+
name: 'c',
69+
label: 'C',
70+
alias: ['c', 'h', 'clang', 'clang'],
71+
mode: 'c_cpp'
72+
},
14873
{
14974
name: 'cirru',
15075
label: 'Cirru',
@@ -175,6 +100,24 @@ const modes = [
175100
alias: ['cfm', 'cfc'],
176101
mode: 'coldfusion'
177102
},
103+
{
104+
name: 'cpp',
105+
label: 'C++',
106+
alias: ['cc', 'cpp', 'cxx', 'hh', 'c++', 'cplusplus'],
107+
mode: 'c_cpp'
108+
},
109+
{
110+
name: 'csharp',
111+
label: 'C#',
112+
alias: ['cs', 'c#'],
113+
mode: 'csharp'
114+
},
115+
{
116+
name: 'css',
117+
label: 'CSS',
118+
alias: ['cascade', 'stylesheet'],
119+
mode: 'css'
120+
},
178121
{
179122
name: 'curly',
180123
label: 'Curly',
@@ -283,6 +226,12 @@ const modes = [
283226
alias: ['opengl', 'shading'],
284227
mode: 'glsl'
285228
},
229+
{
230+
name: 'golang',
231+
label: 'Go',
232+
alias: ['go'],
233+
mode: 'golang'
234+
},
286235
{
287236
name: 'groovy',
288237
label: 'Groovy',
@@ -313,6 +262,12 @@ const modes = [
313262
alias: ['hx', 'hxml'],
314263
mode: 'haxe'
315264
},
265+
{
266+
name: 'html',
267+
label: 'HTML',
268+
alias: [],
269+
mode: 'html'
270+
},
316271
{
317272
name: 'html_ruby',
318273
label: 'HTML (Ruby)',
@@ -355,6 +310,18 @@ const modes = [
355310
alias: [],
356311
mode: 'jade'
357312
},
313+
{
314+
name: 'java',
315+
label: 'Java',
316+
alias: [],
317+
mode: 'java'
318+
},
319+
{
320+
name: 'javascript',
321+
label: 'JavaScript',
322+
alias: ['js', 'jscript', 'babel', 'es'],
323+
mode: 'javascript'
324+
},
358325
{
359326
name: 'json',
360327
label: 'JSON',
@@ -451,6 +418,12 @@ const modes = [
451418
alias: [],
452419
mode: 'makefile'
453420
},
421+
{
422+
name: 'markdown',
423+
label: 'Markdown',
424+
alias: ['md'],
425+
mode: 'markdown'
426+
},
454427
{
455428
name: 'mask',
456429
label: 'Mask',
@@ -529,6 +502,12 @@ const modes = [
529502
alias: ['postgres'],
530503
mode: 'pgsql'
531504
},
505+
{
506+
name: 'php',
507+
label: 'PHP',
508+
alias: [],
509+
mode: 'php'
510+
},
532511
{
533512
name: 'powershell',
534513
label: 'PowerShell',
@@ -559,6 +538,12 @@ const modes = [
559538
alias: ['protocol', 'buffers'],
560539
mode: 'protobuf'
561540
},
541+
{
542+
name: 'python',
543+
label: 'Python',
544+
alias: ['py'],
545+
mode: 'python'
546+
},
562547
{
563548
name: 'r',
564549
label: 'R',
@@ -571,6 +556,12 @@ const modes = [
571556
alias: [],
572557
mode: 'rdoc'
573558
},
559+
{
560+
name: 'ruby',
561+
label: 'Ruby',
562+
alias: ['rb'],
563+
mode: 'ruby'
564+
},
574565
{
575566
name: 'rust',
576567
label: 'Rust',
@@ -667,6 +658,12 @@ const modes = [
667658
alias: [],
668659
mode: 'svg'
669660
},
661+
{
662+
name: 'swift',
663+
label: 'Swift',
664+
alias: [],
665+
mode: 'swift'
666+
},
670667
{
671668
name: 'swig',
672669
label: 'SWIG',
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { PropTypes } from 'react'
22
import CSSModules from 'browser/lib/CSSModules'
3-
import styles from './NoteDetail.styl'
3+
import styles from './MarkdownNoteDetail.styl'
44
import MarkdownEditor from 'browser/components/MarkdownEditor'
55
import StarButton from './StarButton'
66
import TagSelect from './TagSelect'
@@ -13,7 +13,7 @@ const { remote } = electron
1313
const Menu = remote.Menu
1414
const MenuItem = remote.MenuItem
1515

16-
class NoteDetail extends React.Component {
16+
class MarkdownNoteDetail extends React.Component {
1717
constructor (props) {
1818
super(props)
1919

@@ -217,7 +217,7 @@ class NoteDetail extends React.Component {
217217
}
218218
}
219219

220-
NoteDetail.propTypes = {
220+
MarkdownNoteDetail.propTypes = {
221221
dispatch: PropTypes.func,
222222
repositories: PropTypes.array,
223223
note: PropTypes.shape({
@@ -229,4 +229,4 @@ NoteDetail.propTypes = {
229229
ignorePreviewPointerEvents: PropTypes.bool
230230
}
231231

232-
export default CSSModules(NoteDetail, styles)
232+
export default CSSModules(MarkdownNoteDetail, styles)

browser/main/Detail/NoteDetail.styl renamed to browser/main/Detail/MarkdownNoteDetail.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ $info-height = 75px
22

33
.root
44
absolute top bottom right
5-
border-width 1px 0
5+
border-width 0 0 1px
66
border-style solid
77
border-color $ui-borderColor
88

0 commit comments

Comments
 (0)