Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/about#401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 3 commits intomasterfromfeature/about
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletionsweb-app/src/Routes.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,6 @@ import ErrorView from './components/Error'
importLoadingPagefrom'./containers/Loading'
importStartPagefrom'./containers/Start'
importSelectTutorialPagefrom'./containers/SelectTutorial'
importCompletedPagefrom'./containers/Tutorial/CompletedPage'
importTutorialPagefrom'./containers/Tutorial'

/*
Expand DownExpand Up@@ -39,12 +38,8 @@ const Routes = () => {
<Routepaths={{Tutorial:{Level:{Load:true}}}}>
<LoadingPagetext="Loading Level..."processes={context.processes}/>
</Route>
<Routepaths={{Tutorial:{Level:true}}}>
<TutorialPagesend={send}context={context}state={route.replace('Tutorial.Level.','')}/>
</Route>
{/* Completed */}
<Routepaths={{Tutorial:{Completed:true}}}>
<CompletedPagecontext={context}/>
<Routepaths={{Tutorial:{Level:true,Completed:true}}}>
<TutorialPagesend={send}context={context}state={route.replace('Tutorial.','')}/>
</Route>
</Router>
)
Expand Down
55 changes: 0 additions & 55 deletionsweb-app/src/containers/Tutorial/CompletedPage.tsx
View file
Open in desktop

This file was deleted.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
import*asReactfrom'react'
import{css,jsx}from'@emotion/core'
import{Button,Icon}from'@alifd/next'

conststyles={
banner:{
height:'auto',
width:'100%',
backgroundColor:'rgb(85, 132, 255)',
color:'white',
padding:'0.5rem 1rem',
},
header:{
position:'relative'as'relative',
width:'100%',
},
headerMessage:{
marginLeft:'0.5rem',
},
// close: {
// position: 'absolute' as 'absolute',
// right: '0.5rem',
// top: '0.5rem',
// padding: '2px',
// },
section:{
padding:'0rem 0.5rem 1rem 0.5rem',
},
options:{
display:'flex'as'flex',
flexDirection:'row'as'row',
flexWrap:'wrap'as'wrap',
},
optionsLeft:{
flex:3,
},
optionsRight:{
flex:1,
display:'flex'as'flex',
justifyContent:'flex-end'as'flex-end',
alignItems:'flex-end'as'flex-end',
},
}

interfaceProps{
title:string
onRequestWorkspace():void
}

constCompletedBanner=(props:Props)=>{
return(
<divcss={styles.banner}>
<divcss={styles.header}>
<h3>
<Icontype="success-filling"size="large"/>
<spancss={styles.headerMessage}>Congratulations on completing "{props.title}"!</span>
</h3>
</div>
<divcss={styles.section}>
<h5>You've reached the end of the road...</h5>
<divcss={styles.options}>
<divcss={styles.optionsLeft}>
<p>To go down another path:</p>
<ul>
<li>- open a new VSCode workspace</li>
<li>- relaunch the CodeRoad app</li>
<li>- select a new tutorial</li>
</ul>
</div>
<divcss={styles.optionsRight}>
<Buttontype="primary"ghost="dark"onClick={props.onRequestWorkspace}>
Open New Workspace
</Button>
</div>
</div>
</div>
</div>
)
}

exportdefaultCompletedBanner
21 changes: 17 additions & 4 deletionsweb-app/src/containers/Tutorial/components/SideMenu.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,8 +23,8 @@ const styles = {
interfaceProps{
visible:boolean
toggleVisible(visible:boolean):void
page:'level'|'settings'|'review'
setPage(page:'level'|'settings'|'review'):void
page:'about'|'level'|'review'|'settings'
setPage(page:'about'|'level'|'review'|'settings'):void
}

constSideMenu=(props:Props)=>{
Expand DownExpand Up@@ -65,8 +65,20 @@ const SideMenu = (props: Props) => {
<Icontype="list"size="small"color="#EBEBEB"/>
<spanstyle={styles.itemText}>Review</span>
</Item>
{/*<Divider key="divider" />
<Dividerkey="divider"/>
<Item
key="about"
disabled={props.page==='about'}
style={props.page==='about' ?styles.active :{}}
onClick={()=>{
onMenuClose()
props.setPage('about')
}}
>
<Icontype="prompt"size="xs"color="#EBEBEB"/>
<spanstyle={styles.itemText}>About</span>
</Item>
{/* <Item
key="settings"
disabled={props.page === 'settings'}
style={props.page === 'settings' ? styles.active : {}}
Expand All@@ -77,7 +89,8 @@ const SideMenu = (props: Props) => {
>
<Icon type="set" size="small" color="#EBEBEB" />
<span style={styles.itemText}>Settings</span>
</Item> */}
</Item>{' '}
*/}
</Menu>
</Drawer>
)
Expand Down
68 changes: 68 additions & 0 deletionsweb-app/src/containers/Tutorial/containers/About.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
import*asReactfrom'react'
importMarkdownfrom'../../../components/Markdown'

conststyles={
container:{
display:'flex'as'flex',
flexDirection:'column'as'column',
},
header:{
display:'flex'as'flex',
alignItems:'center',
justifyContent:'space-between',
height:'2rem',
backgroundColor:'#EBEBEB',
fontSize:'1rem',
lineHeight:'1rem',
padding:'10px 0.4rem',
},
content:{
padding:'0.5rem',
},
}

interfaceProps{}

constAboutPage=(props:Props)=>{
return(
<divcss={styles.container}>
<divcss={styles.header}>
<div>About CodeRoad</div>
</div>
<divcss={styles.content}>
<Markdown>
{`
CodeRoad is an open source VSCode extension that allows you to **create** and **play** interactive coding tutorials inside VSCode.
Learn more or contribute at [https://github.com/coderoad/coderoad-vscode](https://github.com/coderoad/coderoad-vscode).
##### Why CodeRoad?
Interactive learning is the most effective way to gain new skills and knowledge. CodeRoad aims to help tutorial creators develop and share interactive content with the community.
For learners, there are a number of advantages to running tutorials inside VSCode:
a. Learn in a real world coding environment
b. Get rapid feedback on save and helpful error messages
c.Users own the code, and can build a Git timeline and deploy a portfolio
##### Subscribe
Join our [mailing list](https://tiny.cc/coderoad) to hear about new tutorials & features.
##### Contact
We'd love to hear your feedback.
For bugs/feature requests, reach out on GitHub.
Otherwise, email us at [coderoadapp@gmail.com](mailto:coderoadapp@gmail.com).
`}
</Markdown>
</div>
</div>
)
}

exportdefaultAboutPage
2 changes: 2 additions & 0 deletionsweb-app/src/containers/Tutorial/containers/Review.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,8 @@ interface Props {

conststyles={
container:{
height:'auto',
width:'100%',
display:'flex'as'flex',
flexDirection:'column'as'column',
},
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp