Skip to content

Commit

Permalink
website: update header.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 17, 2022
1 parent 57cb244 commit 0ccf990
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 40 deletions.
8 changes: 1 addition & 7 deletions website/.kktrc.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import path from 'path';
import webpack, { Configuration } from 'webpack';
import { Configuration } from 'webpack';
import lessModules from '@kkt/less-modules';
import rawModules from '@kkt/raw-modules';
import scopePluginOptions from '@kkt/scope-plugin-options';
import { LoaderConfOptions } from 'kkt';
import pkg from './package.json';

export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {
conf = lessModules(conf, env, options);
Expand All @@ -13,11 +12,6 @@ export default (conf: Configuration, env: 'development' | 'production', options:
...options,
allowedFiles: [path.resolve(process.cwd(), 'README.md'), path.resolve(process.cwd(), 'src')],
});
conf.plugins!.push(
new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
}),
);

if (env === 'production') {
/** https:/uiwjs/react-code-preview/issues/94 */
Expand Down
7 changes: 7 additions & 0 deletions website/src/App.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
padding-bottom: 30px;
text-align: center;
color: white;
sup {
background-color: #e6e6e6;
border-radius: 3px;
color: #555;
font-size: 12px;
padding: 1px 5px;
}
}

.logo {
Expand Down
9 changes: 5 additions & 4 deletions website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ import Layout from '@uiw/react-layout';
import Markdown from './Markdown';
import styles from './App.module.less';
import logo from './logo.svg';
import pkg from '@uiw/react-layout/package.json';

export default function App() {
// @ts-ignore
const version = VERSION;
return (
<div className={styles.app}>
<GitHubCorners fixed target="__blank" zIndex={10} href="https:/uiwjs/react-layout" />
<header className={styles.header}>
<img src={logo} className={styles.logo} alt="react logo" />
<h1>React Monorepo Template {version}</h1>
<p className={styles.info}>Simple React package development project example template.</p>
<h1>
React Layout <sup>{pkg.version}</sup>
</h1>
<p className={styles.info}>{pkg.description}</p>
</header>
<Markdown
className={styles.markdown}
Expand Down
25 changes: 0 additions & 25 deletions website/src/Markdown/index.module.less
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
.docinfo {
padding: 30px 0 10px 0;
line-height: 24px;
color: #909090;
}

.markdown {
font-size: inherit;
line-height: initial;
h1,
h2,
h3,
h4,
h5,
h6 {
a {
display: none;
}
}
pre[data-type='rehyp'] {
overflow: initial;
font-size: inherit;
line-height: initial;

white-space: initial;
word-spacing: initial;
word-break: initial;
word-wrap: initial;
}
}
4 changes: 0 additions & 4 deletions website/src/Markdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useEffect, useState } from 'react';
import MarkdownPreview from '@uiw/react-markdown-preview';
import Code from './Code';
import Footer from './Footer';
import styles from './index.module.less';

export interface CreatePageProps<T> extends React.HTMLAttributes<HTMLDivElement> {
Expand Down Expand Up @@ -76,9 +75,6 @@ export default function CreatePage<T>(props: CreatePageProps<T>) {
},
}}
/>
<div className={styles.docinfo}>
<Footer path={path} />
</div>
</div>
);
}

0 comments on commit 0ccf990

Please sign in to comment.