diff --git a/website/core/button.js b/website/core/button.js
new file mode 100644
index 0000000..597088d
--- /dev/null
+++ b/website/core/button.js
@@ -0,0 +1,19 @@
+const React = require('react');
+
+class Button extends React.Component {
+ render() {
+ return (
+
+ );
+ }
+}
+
+Button.defaultProps = {
+ target: '_self',
+};
+
+module.exports = Button;
diff --git a/website/core/homeSplash.js b/website/core/homeSplash.js
new file mode 100644
index 0000000..6230bc8
--- /dev/null
+++ b/website/core/homeSplash.js
@@ -0,0 +1,56 @@
+const React = require('react');
+const Button = require('./button');
+const utils = require('./utils');
+
+const siteConfig = require(process.cwd() + '/siteConfig.js');
+
+const SplashContainer = props => (
+
+);
+
+const Logo = props => (
+
+
+
+);
+
+const ProjectTitle = () => (
+
+ {siteConfig.title}
+ {siteConfig.tagline}
+
+);
+
+const PromoSection = props => (
+
+);
+
+class HomeSplash extends React.Component {
+ render() {
+ let language = this.props.language || '';
+
+ return (
+
+
+
+
+
+ Try It Out
+ Live Demo
+ Docs
+
+
+
+ );
+ }
+}
+
+module.exports = HomeSplash;
diff --git a/website/core/utils/index.js b/website/core/utils/index.js
new file mode 100644
index 0000000..a1b35f6
--- /dev/null
+++ b/website/core/utils/index.js
@@ -0,0 +1,19 @@
+const siteConfig = require(process.cwd() + '/siteConfig.js');
+
+const imgUrl = (img) => {
+ return siteConfig.baseUrl + 'img/' + img;
+}
+
+const docUrl = (doc, language) => {
+ return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
+}
+
+const pageUrl = (page, language) => {
+ return siteConfig.baseUrl + (language ? language + '/' : '') + page;
+}
+
+module.exports = {
+ imgUrl,
+ docUrl,
+ pageUrl
+}
diff --git a/website/i18n/en.json b/website/i18n/en.json
index 5009b49..a81f821 100644
--- a/website/i18n/en.json
+++ b/website/i18n/en.json
@@ -52,6 +52,7 @@
"API": "API",
"Help": "Help",
"Blog": "Blog",
+ "GitHub": "GitHub",
"Basic Usage": "Basic Usage",
"Remote Table": "Remote Table",
"Table Toolkits": "Table Toolkits",
diff --git a/website/pages/en/index.js b/website/pages/en/index.js
index d17369b..0827159 100755
--- a/website/pages/en/index.js
+++ b/website/pages/en/index.js
@@ -7,116 +7,48 @@
const React = require('react');
+// Built-in library
const CompLibrary = require('../../core/CompLibrary.js');
-const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
-const siteConfig = require(process.cwd() + '/siteConfig.js');
-
-function imgUrl(img) {
- return siteConfig.baseUrl + 'img/' + img;
-}
-
-function docUrl(doc, language) {
- return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
-}
-
-function pageUrl(page, language) {
- return siteConfig.baseUrl + (language ? language + '/' : '') + page;
-}
-
-class Button extends React.Component {
- render() {
- return (
-
- );
- }
-}
-
-Button.defaultProps = {
- target: '_self',
-};
-
-const SplashContainer = props => (
-
-);
-
-const Logo = props => (
-
-
-
-);
-
-const ProjectTitle = props => (
-
- {siteConfig.title}
- {siteConfig.tagline}
-
-);
-
-const PromoSection = props => (
-
-);
-
-class HomeSplash extends React.Component {
- render() {
- let language = this.props.language || '';
- return (
-
- {/* */}
-
-
-
- Try It Out
- Live Demo
- Docs
-
-
-
- );
- }
-}
+// Customized component and utils
+const HomeSplash = require(process.cwd() + '/core/homeSplash.js');
+const utils = require(process.cwd() + '/core/utils');
+const imgUrl = utils.imgUrl;
const Block = props => (
-
+ >
+
);
-const Features = props => (
-
+const Features = () => (
+
{[
{
content: 'Sortable, Row Selection, Cell Editor, Row Expand, Column Filter Pagination etc.',
- // image: imgUrl('docusaurus.svg'),
+ image: imgUrl('icon/bulb.svg'),
imageAlign: 'top',
title: 'Rich Functionality',
},
{
content: 'Configurable and customizable table',
- // image: imgUrl('docusaurus.svg'),
+ image: imgUrl('icon/tool.svg'),
imageAlign: 'top',
title: 'Customization',
},
{
content: 'Satisfy for Redux/Mobx or any other state management tool.',
- // image: imgUrl('docusaurus.svg'),
+ image: imgUrl('icon/store.svg'),
imageAlign: 'top',
title: 'Remote',
},
@@ -124,20 +56,11 @@ const Features = props => (
);
-// const FeatureCallout = props => (
-//
-//
Feature Callout
-// These are features of this project
-//
-// );
-
-const LearnHow = props => (
-
+const LearnHow = () => (
+
{[
{
- content: 'Intuitive to use. Compatitable for Bootstrap 3 and 4. Better than legacy react-bootstrap-table2!! ',
+ content: 'Intuitive to use. Compatible for Bootstrap 3 and 4. Better than legacy react-bootstrap-table!! ',
image: imgUrl('react-bootstrap-table2-sample.png'),
imageAlign: 'right',
title: 'react-bootstrap-table2',
@@ -146,62 +69,6 @@ const LearnHow = props => (
);
-const TryOut = props => (
-
- {[
- {
- content: 'Talk about trying this out',
- image: imgUrl('docusaurus.svg'),
- imageAlign: 'left',
- title: 'Try it Out',
- },
- ]}
-
-);
-
-const Description = props => (
-
- {[
- {
- content: 'This is another description of how this project is useful',
- image: imgUrl('docusaurus.svg'),
- imageAlign: 'right',
- title: 'Description',
- },
- ]}
-
-);
-
-const Showcase = props => {
- if ((siteConfig.users || []).length === 0) {
- return null;
- }
- const showcase = siteConfig.users
- .filter(user => {
- return user.pinned;
- })
- .map((user, i) => {
- return (
-
-
-
- );
- });
-
- return (
-
-
{"Who's Using This?"}
-
This project is used by all these people
-
{showcase}
-
-
- );
-};
-
class Index extends React.Component {
render() {
let language = this.props.language || '';
@@ -211,11 +78,7 @@ class Index extends React.Component {
- {/* */}
- {/*
-
- */}
);
diff --git a/website/siteConfig.js b/website/siteConfig.js
index cdaf997..8c99917 100644
--- a/website/siteConfig.js
+++ b/website/siteConfig.js
@@ -4,46 +4,49 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
+const ORGANIZATION_NAME = 'react-bootstrap-table';
+const PROJECT_NAME = 'react-bootstrap-table2';
+const PRIMARY_COLOR = '#1976d2';
+const SECONDARY_COLOR = '#1769aa';
/* List of projects/orgs using your project for the users page */
const users = [
{
caption: '',
- // image: '/react-bootstrap-table2/img/docusaurus.svg',
+ image: '/react-bootstrap-table2/img/logo/pure-color-square.svg',
infoLink: 'https://github.com/react-bootstrap-table/react-bootstrap-table2',
pinned: true,
},
];
const siteConfig = {
- title: 'react-bootstrap-table2' /* title for your website */,
+ title: PROJECT_NAME /* title for your website */,
tagline: 'Next Generation of react-bootstrap-table',
url: 'https://react-bootstrap-table.github.io' /* your website url */,
baseUrl: '/react-bootstrap-table2/' /* base url for your project */,
- projectName: 'react-bootstrap-table2',
+ projectName: PROJECT_NAME,
headerLinks: [
{doc: 'about', label: 'Docs'},
{doc: 'table-props', label: 'API'},
{page: 'help', label: 'Help'},
{blog: true, label: 'Blog'},
+ {href: 'https://github.com/react-bootstrap-table/react-bootstrap-table2', label: 'GitHub' },
],
users,
/* path to images for header/footer */
- // headerIcon: 'img/docusaurus.svg',
- // footerIcon: 'img/docusaurus.svg',
- // favicon: 'img/favicon.png',
+ headerIcon: 'img/logo/hybrid-white-large.svg',
+ favicon: 'img/favicon.ico',
+ disableHeaderTitle: true,
+
/* colors for website */
colors: {
- primaryColor: '#294E80',
- secondaryColor: '#3CA7F2',
+ primaryColor: PRIMARY_COLOR,
+ secondaryColor: SECONDARY_COLOR,
},
// This copyright info is used in /core/Footer.js and blog rss/atom feeds.
- copyright:
- 'Copyright © ' +
- new Date().getFullYear() +
- ' react-bootstrap-table2',
- organizationName: 'react-bootstrap-table', // or set an env variable ORGANIZATION_NAME
- projectName: 'react-bootstrap-table2', // or set an env variable PROJECT_NAME
+ copyright: `Copyright © ${new Date().getFullYear()} ${PROJECT_NAME}`,
+ organizationName: ORGANIZATION_NAME,
+ projectName: PROJECT_NAME,
highlight: {
// Highlight.js theme to use for syntax highlighting in code blocks
theme: 'default',
diff --git a/website/static/css/custom.css b/website/static/css/custom.css
index 220c1dd..f964b2b 100644
--- a/website/static/css/custom.css
+++ b/website/static/css/custom.css
@@ -13,4 +13,39 @@
}
@media only screen and (min-width: 1500px) {
-}
\ No newline at end of file
+}
+
+/* Footer */
+footer.nav-footer {
+ background-color: #202020;
+}
+
+/* Home */
+.logo {
+ display: flex;
+ justify-content: center;
+}
+
+.logo img {
+ height: 100%;
+ max-height: 250px;
+ margin-bottom: 0px;
+}
+
+.homeContainer .homeWrapper .projectLogo {
+ justify-content: flex-start;
+}
+
+.feature-block .blockImage img {
+ width: 48px;
+}
+
+.buttonWrapper a.button {
+ border-radius: 24px;
+ min-width: 64px;
+}
+
+/* Navigation */
+.navGroup ul {
+ background-color: #f9f9f9;
+}
diff --git a/website/static/img/favicon.ico b/website/static/img/favicon.ico
new file mode 100644
index 0000000..8fc5cec
Binary files /dev/null and b/website/static/img/favicon.ico differ
diff --git a/website/static/img/icon/bulb.svg b/website/static/img/icon/bulb.svg
new file mode 100644
index 0000000..3861a54
--- /dev/null
+++ b/website/static/img/icon/bulb.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/website/static/img/icon/store.svg b/website/static/img/icon/store.svg
new file mode 100644
index 0000000..cecd62e
--- /dev/null
+++ b/website/static/img/icon/store.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/website/static/img/icon/tool.svg b/website/static/img/icon/tool.svg
new file mode 100644
index 0000000..1ee2297
--- /dev/null
+++ b/website/static/img/icon/tool.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/website/static/img/logo/hybrid-white-large.svg b/website/static/img/logo/hybrid-white-large.svg
new file mode 100644
index 0000000..e63f010
--- /dev/null
+++ b/website/static/img/logo/hybrid-white-large.svg
@@ -0,0 +1 @@
+logo color
\ No newline at end of file
diff --git a/website/static/img/logo/pure-color-square.svg b/website/static/img/logo/pure-color-square.svg
new file mode 100644
index 0000000..bc897b9
--- /dev/null
+++ b/website/static/img/logo/pure-color-square.svg
@@ -0,0 +1 @@
+logo square
\ No newline at end of file