Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Quilljou/master
feat: ✨ button docs demo
- Loading branch information
Showing
29 changed files
with
459 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@require '~@/common/stylus/reset.styl' | ||
@require "../../../src/common/stylus/variable.styl" | ||
@require "./base.styl" | ||
@require "./md.styl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
|
||
export default class Back extends React.Component { | ||
public render(): React.ReactNode { | ||
return ( | ||
<span>back</span> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
|
||
import './index.styl' | ||
|
||
interface DisplayProps { | ||
path: string | ||
} | ||
|
||
export default class Display extends React.Component<DisplayProps> { | ||
public render(): React.ReactNode { | ||
const { path } = this.props; | ||
if(!path) return null; | ||
const ifrSrc = `/examples/${path}` | ||
return ( | ||
<div className="page-display"> | ||
<div className="display-wrapper"> | ||
<section className="mofang-demo"> | ||
<iframe src={ifrSrc} frameBorder="0" width="100%" height="100%" scrolling="no" title="diplay"></iframe> | ||
</section> | ||
</div> | ||
</div > | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@require "../../../src/common/stylus/variable.styl" | ||
|
||
.page-display | ||
position: relative | ||
.display-wrapper | ||
position: relative | ||
width: 330px | ||
height: 645px | ||
top: 50% | ||
transform: translate(0, -50%) | ||
margin: 0 56px 0 26px | ||
background: url("./iphoneX.png") no-repeat center 0 | ||
background-size: 100% | ||
.mofang-demo | ||
position: absolute | ||
top: 64px | ||
left: 21px | ||
right: 23px | ||
bottom: 22px | ||
overflow: hidden | ||
border-radius: 0 0 35px 35px | ||
border: 1px solid #edf0f4 | ||
border-top: none | ||
background-color: #edf0f4 | ||
iframe | ||
// safari shit | ||
width: 0 | ||
max-width: 100% | ||
min-width: 100% |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { Route, RouteComponentProps } from 'react-router-dom'; | ||
|
||
import SideList from '../SideList/SideList' | ||
import Display from '../Display/Display' | ||
import Back from '../Back/Back' | ||
import Markdown from '../Markdown/Markdown' | ||
import './index.styl' | ||
|
||
|
||
export default class Docs extends React.Component<RouteComponentProps> { | ||
public render(): React.ReactNode { | ||
const { match } = this.props; | ||
const path = window.location.pathname.split('/').pop() | ||
return ( | ||
<div className="docs-view"> | ||
{/* <img className="menu" src="./close.svg" alt="close" /> */} | ||
{/* <img className="menu" v-show="!showCatalog" src="./menu.svg" alt="menu"/> */} | ||
{/* <Back /> */} | ||
{/* <div className="mask"></div> */} | ||
<div className="nav-list-wrapper"> | ||
<SideList /> | ||
</div> | ||
<Route path={`${match.path}/:md`} component={Markdown}></Route> | ||
<Display path={path}/> | ||
</div > | ||
); | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
@require "../../../src/common/stylus/variable.styl" | ||
|
||
.docs-view | ||
display: flex | ||
width: 100% | ||
height: 100% | ||
box-sizing: border-box | ||
flex-wrap: wrap | ||
@media screen and (max-width: 960px) | ||
position: relative | ||
height: auto | ||
&::before | ||
position: fixed | ||
top: 48px | ||
.menu | ||
display: none | ||
@media screen and (max-width: 960px) | ||
display: block | ||
z-index: 5 | ||
position: fixed | ||
right: 6px | ||
top: 4px | ||
width: 20px | ||
height: 20px | ||
padding: 10px | ||
&:active | ||
opacity: .6 | ||
.nav-list-wrapper | ||
width: 279px | ||
height: 100% | ||
border-right: 1px solid #e3e3e3 | ||
@media screen and (max-width: 960px) | ||
position: fixed | ||
right: 0 | ||
top: 48px | ||
bottom: 0 | ||
height: auto | ||
background-color: $color-white | ||
z-index: 1 | ||
overflow: hidden | ||
transform: translate(100%, 0) | ||
transition: all 0.4s ease | ||
border-right: none | ||
&.active | ||
transform: translate(0, 0) | ||
@media screen and (max-width: 960px) | ||
.mask | ||
z-index: 1 | ||
position: absolute | ||
top: 0 | ||
left: 0 | ||
width: 100% | ||
height: 100% | ||
background-color: transparent | ||
&.active | ||
background-color: rgba(0, 0, 0 ,0.05) | ||
transition: all 0.4s ease | ||
.page-sidelist | ||
height: 100% | ||
padding: 50px 0 | ||
margin-right: -1px | ||
box-sizing: border-box | ||
overflow-y: auto | ||
@media screen and (max-width: 960px) | ||
height: 100% | ||
padding: 30px 0 | ||
font-size: 12px | ||
.nav-li | ||
.nav-name | ||
font-size: 15px | ||
.angle | ||
font-size: 12px | ||
.arrow | ||
top: 27px | ||
.page-doc | ||
position: relative | ||
flex: 1 | ||
height: 100% | ||
padding: 54px 30px 30px | ||
box-sizing: border-box | ||
overflow-y: auto | ||
@media screen and (max-width: 960px) | ||
flex: 1 1 100% | ||
height: auto | ||
padding: 20px | ||
font-size: 13px | ||
h2:first-child | ||
margin-top: 0 | ||
.page-display | ||
flex: none | ||
height: 100% | ||
overflow-y: auto | ||
@media screen and (max-width: 960px) | ||
flex: 1 1 100% | ||
height: 680px |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.