正在显示
5 个修改的文件
包含
60 行增加
和
2 行删除
@@ -4,8 +4,8 @@ import { Row, Col } from 'antd'; | @@ -4,8 +4,8 @@ import { Row, Col } from 'antd'; | ||
4 | export default () => { | 4 | export default () => { |
5 | return ( | 5 | return ( |
6 | <Row> | 6 | <Row> |
7 | - <Col span={12}>INSERT_BLOCK_PLACEHOLDER:Col 12</Col> | ||
8 | - <Col span={12}>INSERT_BLOCK_PLACEHOLDER:Col 12</Col> | 7 | + <Col span={12} style={{ minHeight: '20px', background: '#fecccc' }}>INSERT_BLOCK_PLACEHOLDER:Col 12</Col> |
8 | + <Col span={12} style={{ minHeight: '20px', background: '#82caff' }}>INSERT_BLOCK_PLACEHOLDER:Col 12</Col> | ||
9 | </Row> | 9 | </Row> |
10 | ); | 10 | ); |
11 | } | 11 | } |
blocks/layout-holy-grail/package.json
0 → 100644
blocks/layout-holy-grail/snapshot.png
0 → 100644
69.5 KB
blocks/layout-holy-grail/src/index.js
0 → 100755
1 | +import React from 'react'; | ||
2 | +import styles from './index.less'; | ||
3 | + | ||
4 | +export default function() { | ||
5 | + return ( | ||
6 | + <div className={styles.wrapper}> | ||
7 | + <header>INSERT_BLOCK_PLACEHOLDER:HEADER</header> | ||
8 | + <div className={styles.body}> | ||
9 | + <main>INSERT_BLOCK_PLACEHOLDER:CONTENT</main> | ||
10 | + <nav>INSERT_BLOCK_PLACEHOLDER:NAV</nav> | ||
11 | + <aside>INSERT_BLOCK_PLACEHOLDER:ASIDE</aside> | ||
12 | + </div> | ||
13 | + <footer>INSERT_BLOCK_PLACEHOLDER:FOOTER</footer> | ||
14 | + </div> | ||
15 | + ); | ||
16 | +} |
blocks/layout-holy-grail/src/index.less
0 → 100644
1 | + | ||
2 | +.wrapper { | ||
3 | + display: flex; | ||
4 | + min-height: 100vh; | ||
5 | + flex-direction: column; | ||
6 | + | ||
7 | + header, footer { | ||
8 | + background: #82caff; | ||
9 | + flex: 0 0 6em; | ||
10 | + } | ||
11 | +} | ||
12 | + | ||
13 | +.body { | ||
14 | + display: flex; | ||
15 | + flex: 1; | ||
16 | + flex-direction: column; | ||
17 | + | ||
18 | + main { | ||
19 | + flex: 1; | ||
20 | + background: #fecccc; | ||
21 | + } | ||
22 | + aside, nav { | ||
23 | + flex: 0 0 12em; | ||
24 | + background: #c9c; | ||
25 | + } | ||
26 | + nav { | ||
27 | + order: -1; | ||
28 | + } | ||
29 | +} | ||
30 | + | ||
31 | +@media (min-width: 768px) { | ||
32 | + .body { | ||
33 | + flex-direction: row; | ||
34 | + } | ||
35 | +} |
请
注册
或
登录
后发表评论