forked from Gitlink/forgeplus-react
许可证
This commit is contained in:
parent
ec1ff5d479
commit
3f01ac4ccb
82
src/App.js
82
src/App.js
|
@ -35,14 +35,14 @@ const theme = createMuiTheme({
|
|||
secondary: { main: '#4CACFF' }, // #11cb5f This is just green.A700 as hex.
|
||||
},
|
||||
});
|
||||
//forge项目
|
||||
const Projects = Loadable({
|
||||
loader: () => import('./forge/Index'),
|
||||
//首页
|
||||
const Index = Loadable({
|
||||
loader: () => import('./mulan/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
//forge项目-devOps详情
|
||||
const OpsDetail = Loadable({
|
||||
loader: () => import('./forge/DevOps/opsDetail'),
|
||||
//首页
|
||||
const License = Loadable({
|
||||
loader: () => import('./mulan/license/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
//403页面
|
||||
|
@ -61,20 +61,6 @@ const http500 = Loadable({
|
|||
loader: () => import('./modules/500/http500'),
|
||||
loading: Loading,
|
||||
})
|
||||
const InfosIndex = Loadable({
|
||||
loader: () => import('./forge/users/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
// 组织
|
||||
const OrganizeIndex = Loadable({
|
||||
loader: () => import('./forge/Team/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
const EducoderLogin = Loadable({
|
||||
loader: () => import('./modules/login/EducoderLogin'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -214,60 +200,24 @@ class App extends Component {
|
|||
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
|
||||
<Router>
|
||||
<Switch>
|
||||
{/*项目*/}
|
||||
<Route
|
||||
path={"/projects/:owner/:projectId/devops/:opsId/detail"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OpsDetail {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/*项目*/}
|
||||
<Route
|
||||
path={"/projects"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Projects {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
<Route
|
||||
path="/register"
|
||||
render={
|
||||
(props) => {
|
||||
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
/>
|
||||
{/*403*/}
|
||||
<Route path="/403" component={Shixunauthority} />
|
||||
|
||||
<Route path="/500" component={http500} />
|
||||
<Route path={"/organize"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/*404*/}
|
||||
<Route path="/nopage" component={Shixunnopage} />
|
||||
{/* 个人主页 */}
|
||||
<Route path="/users/:username"
|
||||
render={
|
||||
(props) => {
|
||||
return (<InfosIndex {...this.props} {...this.state} />)
|
||||
}
|
||||
}></Route>
|
||||
<Route exact path="/"
|
||||
|
||||
<Route path="/license"
|
||||
render={
|
||||
(props) => (
|
||||
<Projects {...this.props} {...props} {...this.state}></Projects>
|
||||
<License {...this.props} {...props} {...this.state}></License>
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (
|
||||
<Index {...this.props} {...props} {...this.state}></Index>
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Route component={Shixunnopage} />
|
||||
</Switch>
|
||||
</Router>
|
||||
</MuiThemeProvider>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import React from 'react';
|
||||
|
||||
function Footer(props){
|
||||
return(
|
||||
<div className="footsnav">ddd</div>
|
||||
)
|
||||
}
|
||||
export default Footer;
|
|
@ -0,0 +1,15 @@
|
|||
import React from 'react';
|
||||
|
||||
function Header(props){
|
||||
return(
|
||||
<div className="headsnav">
|
||||
<div>
|
||||
<ul>
|
||||
<li>首页</li>
|
||||
<li>开源许可证</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Header;
|
|
@ -0,0 +1,18 @@
|
|||
import React, { Component } from 'react';
|
||||
import Header from './Header';
|
||||
import Footer from './Footer';
|
||||
import './Index.scss';
|
||||
|
||||
export function HOC(Sub){
|
||||
return class II extends Component {
|
||||
render(){
|
||||
return(
|
||||
<div style={{height:"100%"}}>
|
||||
<Header {...this.props} {...this.state}/>
|
||||
<div className="homebody"><Sub {...this.props} {...this.state}/></div>
|
||||
<Footer {...this.props} {...this.state}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
.headsnav{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
top:0px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
|
||||
& > div{
|
||||
width:1200px;
|
||||
margin: 0px auto;
|
||||
ul{
|
||||
display: flex;
|
||||
height: 100%;
|
||||
li{
|
||||
padding:0px 18px;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.homebody{
|
||||
padding-top: 60px;
|
||||
}
|
||||
.footsnav{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import React from 'react';
|
||||
import { HOC } from './HOC/Index';
|
||||
import {Route,Switch} from 'react-router-dom';
|
||||
import Loadable from 'react-loadable';
|
||||
import Loading from '../Loading';
|
||||
|
||||
const LicenseIndex = Loadable({
|
||||
loader: () => import('./license/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
function Index(props){
|
||||
return(
|
||||
<Switch {...props}>
|
||||
<Route
|
||||
path="/license"
|
||||
render={(p) => (
|
||||
<LicenseIndex {...props} {...p} />
|
||||
)}
|
||||
></Route>
|
||||
</Switch>
|
||||
)
|
||||
}
|
||||
export default HOC(Index);
|
|
@ -0,0 +1,41 @@
|
|||
import React from 'react';
|
||||
import { HOC } from '../HOC/Index';
|
||||
import {Route, Switch , Link } from 'react-router-dom';
|
||||
import Loadable from 'react-loadable';
|
||||
import Loading from '../../Loading';
|
||||
import { Box , Long , Short , Gap } from '../../forge/Component/layout';
|
||||
import './Index.scss';
|
||||
|
||||
const Preface = Loadable({
|
||||
loader: () => import('./Preface'),
|
||||
loading: Loading,
|
||||
})
|
||||
function Index(props){
|
||||
return(
|
||||
<div className="panelsBox">
|
||||
<Box>
|
||||
<Short>
|
||||
<ul className="leftmenus">
|
||||
<li><Link to={``}>序言</Link></li>
|
||||
<li><Link to={``}>木兰宽松许可证</Link></li>
|
||||
<li><Link to={``}>木兰公共许可证</Link></li>
|
||||
<li><Link to={``}>常见问题</Link></li>
|
||||
</ul>
|
||||
</Short>
|
||||
<Long>
|
||||
<Gap>
|
||||
<Switch {...props}>
|
||||
<Route
|
||||
path="/license/preface"
|
||||
render={(p) => (
|
||||
<Preface {...props} {...p} />
|
||||
)}
|
||||
></Route>
|
||||
</Switch>
|
||||
</Gap>
|
||||
</Long>
|
||||
</Box>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default HOC(Index);
|
|
@ -0,0 +1,21 @@
|
|||
.panelsBox{
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
.leftmenus{
|
||||
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
|
||||
li{
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
border-bottom: 1px solid #eee;
|
||||
&:last-child{
|
||||
border: none;
|
||||
}
|
||||
a{
|
||||
display: block;
|
||||
padding:0px 20px;
|
||||
font-size:16px;
|
||||
color:#333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import React from 'react';
|
||||
|
||||
|
||||
function Preface(props){
|
||||
return(
|
||||
<div>序言</div>
|
||||
)
|
||||
}
|
||||
export default Preface;
|
Loading…
Reference in New Issue