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

add markdown support to tutorial overview#355

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 1 commit intomasterfromfix/summary-markdown
May 24, 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
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import * as TT from 'typings/tutorial'
// import moment from 'moment'
import Button from '../Button'
import Markdown from '../Markdown'
import Button from '../../../components/Button'
import Markdown from '../../../components/Markdown'
import { Breadcrumb } from '@alifd/next'

const footerHeight = '3rem'
Expand DownExpand Up@@ -88,8 +88,8 @@ const Summary = (props: Props) => {
</Breadcrumb.Item>
</Breadcrumb>
</div>
<h1 css={styles.title}>{props.tutorial.summary.title}</h1>
<h3>{props.tutorial.summary.description}</h3>
<Markdown css={styles.title}>{`# ${props.tutorial.summary.title}`}</Markdown>
<Markdown>{`### ${props.tutorial.summary.description}`}</Markdown>
{/* <h5 css={styles.meta}>
<div css={{ marginRight: '2rem' }}>Created by {props.createdBy.name}</div>
<div>Last updated {moment(props.updatedAt).format('M/YYYY')}</div>
Expand All@@ -100,9 +100,7 @@ const Summary = (props: Props) => {
<h2>Content</h2>
{props.tutorial.levels.map((level: TT.Level, index: number) => (
<div key={index}>
<h3>
{index + 1}. {level.title}
</h3>
<Markdown>{`### ${index + 1}. ${level.title}`}</Markdown>
<div css={styles.levelSummary}>
<Markdown>{level.summary}</Markdown>
</div>
Expand Down
2 changes: 1 addition & 1 deletionweb-app/src/containers/SelectTutorial/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import * as TT from 'typings/tutorial'
import * as React from 'react'
import SelectTutorialForm from './SelectTutorialForm'
import TutorialOverview from '../../components/TutorialOverview'
import TutorialOverview from './TutorialOverview'
import LoadTutorialSummary from './LoadTutorialSummary'
import processTutorial from '../../services/tutorial'

Expand Down
11 changes: 7 additions & 4 deletionsweb-app/stories/Overview.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ import { linkTo } from '@storybook/addon-links'
import { action } from '@storybook/addon-actions'
import { storiesOf } from '@storybook/react'
import React from 'react'
import OverViewPage from '../src/components/TutorialOverview'
import OverViewPage from '../src/containers/SelectTutorial/TutorialOverview'
import SideBarDecorator from './utils/SideBarDecorator'

storiesOf('Overview', module)
Expand All@@ -13,18 +13,21 @@ storiesOf('Overview', module)
id: '1',
version: '0.1.0',
config: {
appVersions: {
vscode: '0.1.0',
},
testRunner: { command: '' },
repo: { uri: '', branch: 'master' },
},
summary: {
title: 'Manage NPM package.json',
description: 'Learn to use the package manager at the core of JavaScript projects.',
description: 'Learn to use the package manager at the core of JavaScript projects',
},
levels: [
{
id: 'L1',
title: 'The First Level',
summary: 'A Summary of the first level',
title: 'The First Level. `Markdown` supported here.',
summary: 'A Summary of the first level. `Markdown` supported here.',
content: '',
steps: [],
},
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp