This file contains hidden or 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
| import Head from 'next/head'; | |
| import React from 'react'; | |
| import { css } from '@emotion/core'; | |
| import { | |
| node, string, oneOfType, object | |
| } from 'prop-types'; | |
| import { Layout } from 'antd'; | |
| const layoutCls = css` | |
| background: #152530; | |
| color: #fff; |
This file contains hidden or 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
| import React from 'react'; | |
| import Document, { Head, Main, NextScript } from 'next/document'; | |
| import { extractCritical } from 'emotion-server'; | |
| export default class MyDocument extends Document { | |
| static getInitialProps({ renderPage }) { | |
| // for emotion-js | |
| const page = renderPage(); | |
| const styles = extractCritical(page.html); | |
| return { ...page, ...styles }; | |
| } |
This file contains hidden or 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
| import Head from 'next/head'; | |
| import React from 'react'; | |
| import { css } from '@emotion/core'; | |
| import { | |
| node, string, oneOfType, object | |
| } from 'prop-types'; | |
| import { Layout } from 'antd'; | |
| const layoutCls = css` | |
| background: #152530; | |
| color: #fff; |
This file contains hidden or 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
| import React, { Component } from 'react'; | |
| import { Button, Drawer } from 'antd'; | |
| import Link from 'next/link'; | |
| import { headerCls, drawerCls } from './styles'; | |
| import LeftMenu from './LeftMenu'; | |
| import RightMenu from './RightMenu'; | |
| class Header extends Component { | |
| state = { | |
| visible: false, |
This file contains hidden or 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
| import React from 'react'; | |
| import { node, string, oneOfType } from 'prop-types'; | |
| import { Layout } from 'antd'; | |
| const AppContent = Layout.Content; | |
| const Content = ({ children, ...props }) => | |
| <AppContent {...props}>{children}</AppContent>; | |
| Content.propTypes = { | |
| children: oneOfType([node, string]), | |
| }; | |
| export default Content; |
This file contains hidden or 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
Show hidden characters
| { | |
| "presets": ["@emotion/babel-preset-css-prop"], | |
| "plugins": [ | |
| ["import", { "libraryName": "antd", "style": "css" }], | |
| "@babel/plugin-proposal-class-properties" | |
| ] | |
| } |
This file contains hidden or 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
| import { css } from '@emotion/core'; | |
| export const headerCls = css` | |
| background-color: #04070b; | |
| box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1); | |
| ul { | |
| background-color: #04070b; | |
| li { | |
| cursor: pointer; | |
| color: #fff; |
OlderNewer