@@ -5,6 +5,7 @@ import { HTMLRouter } from 'cell-router/source';
55import { NavBar } from 'boot-cell/source/Navigator/NavBar' ;
66
77import { history } from '../model' ;
8+ import { SideNav } from '../component/SideNav' ;
89import { HomePage } from './Home' ;
910import routes from '../../document/dist' ;
1011
@@ -28,11 +29,15 @@ export class PageRouter extends HTMLRouter {
2829 const Content = await component ( ) ;
2930
3031 return ( ) => (
31- < Fragment >
32- < h1 > { title } </ h1 >
33- < p className = "lead" > { description } </ p >
34- < Content />
35- </ Fragment >
32+ < div className = "d-flex" >
33+ < SideNav className = "p-3" menu = { side_menu } />
34+
35+ < div className = "flex-fill p-3" >
36+ < h1 > { title } </ h1 >
37+ < p className = "lead" > { description } </ p >
38+ < Content />
39+ </ div >
40+ </ div >
3641 ) ;
3742 }
3843 } ) )
@@ -47,62 +52,30 @@ export class PageRouter extends HTMLRouter {
4752 document . execCommand ( 'copy' ) ;
4853 }
4954
50- renderSideMenu ( ) {
51- return (
52- < ul className = "list-unstyled" >
53- { Object . entries ( side_menu ) . map ( ( [ group , list ] ) => (
54- < li >
55- < h5 > { group } </ h5 >
56-
57- < ul className = "list-unstyled" >
58- { list . map ( ( { href, title } ) => (
59- < li >
60- < a href = { href } > { title } </ a >
61- </ li >
62- ) ) }
63- </ ul >
64- </ li >
65- ) ) }
66- </ ul >
67- ) ;
68- }
69-
70- renderFooter ( ) {
71- return (
72- < footer className = "text-center bg-light py-5" >
73- Proudly developed with{ ' ' }
74- < a target = "_blank" href = "https://web-cell.dev/" >
75- WebCell v2
76- </ a >
77- ,{ ' ' }
78- < a target = "_blank" href = "https://web-cell.dev/BootCell/" >
79- BootCell v1
80- </ a > { ' ' }
81- &{ ' ' }
82- < a
83- target = "_blank"
84- href = "https://github.com/EasyWebApp/MarkCell"
85- >
86- MarkCell
87- </ a >
88- </ footer >
89- ) ;
90- }
91-
9255 render ( ) {
93- const documents = history . path . startsWith ( 'component' ) ;
94-
9556 return (
9657 < Fragment >
97- < NavBar title = "BootCell" />
58+ < NavBar brand = "BootCell" />
59+
60+ < main className = "mt-5" > { super . render ( ) } </ main >
9861
99- < div className = "mt-5 d-flex" >
100- { ! documents ? null : (
101- < nav className = "p-3" > { this . renderSideMenu ( ) } </ nav >
102- ) }
103- < main className = "flex-fill p-3" > { super . render ( ) } </ main >
104- </ div >
105- { documents ? null : this . renderFooter ( ) }
62+ < footer className = "text-center bg-light py-5" >
63+ Proudly developed with{ ' ' }
64+ < a target = "_blank" href = "https://web-cell.dev/" >
65+ WebCell v2
66+ </ a >
67+ ,{ ' ' }
68+ < a target = "_blank" href = "https://web-cell.dev/BootCell/" >
69+ BootCell v1
70+ </ a > { ' ' }
71+ &{ ' ' }
72+ < a
73+ target = "_blank"
74+ href = "https://github.com/EasyWebApp/MarkCell"
75+ >
76+ MarkCell
77+ </ a >
78+ </ footer >
10679 </ Fragment >
10780 ) ;
10881 }
0 commit comments