@@ -13,6 +13,65 @@ import TagSelect from 'boost/components/TagSelect'
1313import ModeSelect from 'boost/components/ModeSelect'
1414import activityRecord from 'boost/activityRecord'
1515
16+ const BRAND_COLOR = '#18AF90'
17+
18+ const editDeleteTutorialElement = (
19+ < svg width = '300' height = '500' className = 'tutorial' >
20+ < text x = '50' y = '220' fill = { BRAND_COLOR } fontSize = '24' > Edit / Delete a post</ text >
21+ < text x = '90' y = '245' fill = { BRAND_COLOR } fontSize = '18' > press `e`/`d`</ text >
22+
23+ < svg x = '150' y = '35' >
24+ < path fill = 'white' d = 'M87.5,93.6c-16.3-5.7-30.6-16.7-39.9-31.4c-5.5-8.7-9-19.1-3.4-28.7c4.8-8.2,13.6-12.8,22.4-15.3
25+ c15.7-4.5,34.4-6.2,49.7,0.4c17.3,7.4,25.6,26.3,25.7,44.4c0.1,10.4-3.4,20.9-13.1,26c-8.6,4.5-19,4.1-28.4,3.7
26+ c-1.9-0.1-1.9,2.9,0,3c9.3,0.4,19.2,0.6,27.9-3.2c8.5-3.7,13.8-11.2,15.7-20.2c3.6-17.9-2.9-40.2-17.7-51.4
27+ C110.8,9.1,89,9.9,70.8,14c-17.9,4-37.4,16.8-31.3,37.9C45.6,73,66.7,89.5,86.7,96.5C88.6,97.1,89.4,94.2,87.5,93.6L87.5,93.6z' />
28+ < path fill = 'white' d = 'M11.9,89.7c14.8-3.4,29.7-6,44.8-7.9c-0.5-0.6-1-1.3-1.4-1.9c-2.6,6.3-2.8,12.7-0.7,19.2
29+ c0.6,1.8,3.5,1,2.9-0.8c-1.9-6-1.7-11.8,0.7-17.6c0.3-0.8-0.5-2-1.4-1.9c-15.3,1.9-30.6,4.5-45.6,8C9.3,87.3,10.1,90.2,11.9,89.7
30+ L11.9,89.7z' />
31+ < path fill = 'white' d = 'M48.6,81.5c-9.4,10.4-17,22.3-22.2,35.3c-5.5,13.6-9.3,28.9-6,43.4c0.4,1.9,3.3,1.1,2.9-0.8
32+ c-3.2-14,0.7-28.8,6-41.8c5.1-12.5,12.4-24,21.5-34C52,82.2,49.9,80,48.6,81.5L48.6,81.5z' />
33+ </ svg >
34+ </ svg >
35+ )
36+
37+ const tagSelectTutorialElement = (
38+ < svg width = '500' height = '500' className = 'tutorial' >
39+ < text x = '155' y = '50' fill = { BRAND_COLOR } fontSize = '24' > Attach some tags here!</ text >
40+
41+ < svg x = '0' y = '-15' >
42+ < path fill = 'white' d = 'M15.5,22.2c77.8-0.7,155.6-1.3,233.5-2c22.2-0.2,44.4-0.4,66.6-0.6c1.9,0,1.9-3,0-3
43+ c-77.8,0.7-155.6,1.3-233.5,2c-22.2,0.2-44.4,0.4-66.6,0.6C13.6,19.2,13.6,22.2,15.5,22.2L15.5,22.2z' />
44+ < path fill = 'white' d = 'M130.8,25c-5.4,6.8-10.3,14-14.6,21.5c-0.8,1.4,1.2,3.2,2.4,1.8c1-1.2,2-2.4,3.1-3.7c1.2-1.5-0.9-3.6-2.1-2.1
45+ c-1,1.2-2,2.4-3.1,3.7c0.8,0.6,1.6,1.2,2.4,1.8c4.2-7.3,8.9-14.3,14.2-20.9C134.1,25.6,132,23.4,130.8,25L130.8,25z' />
46+ < path fill = 'white' d = 'M132.6,22.1c8.4,5.9,16.8,11.9,25.2,17.8c1.6,1.1,3.1-1.5,1.5-2.6c-8.4-5.9-16.8-11.9-25.2-17.8
47+ C132.5,18.4,131,21,132.6,22.1L132.6,22.1z' />
48+ < path fill = 'white' d = 'M132.9,18.6c0.4,6.7-0.7,13.3-3.5,19.3c-1.5,3.1-3.9,6.4-3.1,10c0.7,3.1,3.4,4.4,6.2,5.5
49+ c5.1,2.1,10.5,3.1,16.1,3.2c1.9,0,1.9-3,0-3c-4.7-0.1-9.2-0.8-13.6-2.4c-3-1.1-6.2-1.9-5.4-6.6c0.4-2,2-4.1,2.8-5.9
50+ c2.9-6.3,4-13.1,3.6-20.1C135.8,16.7,132.8,16.7,132.9,18.6L132.9,18.6z' />
51+ </ svg >
52+ </ svg >
53+ )
54+
55+ const modeSelectTutorialElement = (
56+ < svg width = '500' height = '500' className = 'tutorial' >
57+ < text x = '195' y = '130' fill = { BRAND_COLOR } fontSize = '24' > Select code syntax!!</ text >
58+
59+ < svg x = '300' y = '0' >
60+ < path fill = 'white' d = 'M99.9,58.8c-14.5-0.5-29-2.2-43.1-5.6c-12.3-2.9-27.9-6.4-37.1-15.5C7.9,26,28.2,18.9,37,16.7
61+ c13.8-3.5,28.3-4.7,42.4-5.8c29.6-2.2,59.3-1.7,89-1c3,0.1,7.5-0.6,10.2,0.6c3.1,1.4,3.1,5.3,3.3,8.1c0.3,5.2-0.2,10.7-2.4,15.4
62+ c-4.4,9.6-18.4,14.7-27.5,18.1c-27.1,10.1-56.7,12.8-85.3,15.6c-1.9,0.2-1.9,3.2,0,3c29.3-2.9,59.8-5.6,87.5-16.2
63+ c9.6-3.7,22.8-8.7,27.7-18.4c2.3-4.6,3.2-9.9,3.2-15c0-3.6,0-9.4-2.9-12c-1.9-1.7-4.7-1.8-7.1-2c-4.8-0.2-9.6-0.2-14.4-0.3
64+ c-8.7-0.2-17.5-0.3-26.2-0.4C116.7,6.3,99,6.5,81.3,7.8c-15.8,1.1-32.1,2.3-47.4,6.6c-7.7,2.2-22.1,6.9-20.9,17.4
65+ c0.6,5.4,5.6,9.4,9.9,12.1c6.7,4.3,14.4,6.9,22,9.2c17.8,5.4,36.4,8,54.9,8.6C101.8,61.8,101.8,58.8,99.9,58.8L99.9,58.8z' />
66+ < path fill = 'white' d = 'M11.1,67.8c9.2-6.1,18.6-11.9,28.2-17.2c-0.7-0.3-1.5-0.6-2.2-0.9c0.9,5.3,0.7,10.3-0.5,15.5
67+ c-0.4,1.9,2.4,2.7,2.9,0.8c1.4-5.7,1.5-11.3,0.5-17.1c-0.2-1-1.4-1.3-2.2-0.9c-9.7,5.3-19.1,11.1-28.2,17.2
68+ C8,66.3,9.5,68.9,11.1,67.8L11.1,67.8z' />
69+ < path fill = 'white' d = 'M31.5,52.8C23.4,68.9,0.2,83.2,7.9,104c0.7,1.8,3.6,1,2.9-0.8C3.6,83.7,26.4,69.7,34.1,54.3
70+ C35,52.6,32.4,51.1,31.5,52.8L31.5,52.8z' />
71+ </ svg >
72+ </ svg >
73+ )
74+
1675function makeInstantArticle ( article ) {
1776 return Object . assign ( { } , article )
1877}
@@ -95,7 +154,7 @@ export default class ArticleDetail extends React.Component {
95154 }
96155
97156 renderIdle ( ) {
98- let { activeArticle, folders } = this . props
157+ let { status , activeArticle, folders } = this . props
99158
100159 let tags = activeArticle . tags != null ? activeArticle . tags . length > 0
101160 ? activeArticle . tags . map ( tag => {
@@ -140,6 +199,9 @@ export default class ArticleDetail extends React.Component {
140199 < i className = 'fa fa-fw fa-trash' /> < span className = 'tooltip' > Delete (d)</ span >
141200 </ button >
142201 </ div >
202+
203+ { status . isTutorialOpen ? editDeleteTutorialElement : null }
204+
143205 </ div >
144206 )
145207 }
@@ -234,15 +296,14 @@ export default class ArticleDetail extends React.Component {
234296 }
235297
236298 handleTitleKeyDown ( e ) {
237- console . log ( e . keyCode )
238- if ( e . keyCode === 9 ) {
299+ if ( e . keyCode === 9 && ! e . shiftKey ) {
239300 e . preventDefault ( )
240301 this . refs . mode . handleIdleSelectClick ( )
241302 }
242303 }
243304
244305 renderEdit ( ) {
245- let { folders } = this . props
306+ let { folders, status } = this . props
246307
247308 let folderOptions = folders . map ( folder => {
248309 return (
@@ -266,7 +327,11 @@ export default class ArticleDetail extends React.Component {
266327 tags = { this . state . article . tags }
267328 onChange = { ( tags , tag ) => this . handleTagsChange ( tags , tag ) }
268329 />
330+
331+ { status . isTutorialOpen ? tagSelectTutorialElement : null }
332+
269333 </ div >
334+
270335 < div className = 'right' >
271336 {
272337 this . state . article . mode === 'markdown'
@@ -290,6 +355,8 @@ export default class ArticleDetail extends React.Component {
290355 className = 'mode'
291356 onBlur = { ( ) => this . handleModeSelectBlur ( ) }
292357 />
358+
359+ { status . isTutorialOpen ? modeSelectTutorialElement : null }
293360 </ div >
294361
295362 { this . state . previewMode
0 commit comments