From efedfcd7da7aaf093744fb7a6e6a86d370209128 Mon Sep 17 00:00:00 2001 From: anish Date: Mon, 18 May 2020 11:30:49 +0545 Subject: [PATCH 01/38] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0b4284b --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# coding-standards-convention +Commonly followed coding standards and convention at leapfrog From 7dd0fba0133de527e17473b09f62868ea28ffa8c Mon Sep 17 00:00:00 2001 From: anish manandhar Date: Mon, 18 May 2020 12:42:22 +0545 Subject: [PATCH 02/38] setup docusaurus for documentation --- .dockerignore | 2 + .gitignore | 12 ++ Dockerfile | 10 ++ README.md | 200 ++++++++++++++++++++++++++++++- docker-compose.yml | 18 +++ docs/01-introduction.md | 6 + docs/02-1-files.md | 7 ++ docs/02-2-classes.md | 8 ++ docs/02-3-functions.md | 7 ++ docs/02-4-variables.md | 7 ++ docs/02-5-constants.md | 7 ++ docs/02-6-folders.md | 7 ++ website/README.md | 198 ++++++++++++++++++++++++++++++ website/core/Footer.js | 118 ++++++++++++++++++ website/package.json | 14 +++ website/pages/en/help.js | 54 +++++++++ website/pages/en/index.js | 212 +++++++++++++++++++++++++++++++++ website/pages/en/users.js | 48 ++++++++ website/sidebars.json | 6 + website/siteConfig.js | 108 +++++++++++++++++ website/static/css/custom.css | 43 +++++++ website/static/img/favicon.png | Bin 0 -> 1678 bytes website/static/img/lf_logo.svg | 106 +++++++++++++++++ website/static/img/logo.png | Bin 0 -> 10751 bytes website/static/index.html | 15 +++ yarn.lock | 4 + 26 files changed, 1215 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100755 docs/01-introduction.md create mode 100755 docs/02-1-files.md create mode 100755 docs/02-2-classes.md create mode 100755 docs/02-3-functions.md create mode 100755 docs/02-4-variables.md create mode 100755 docs/02-5-constants.md create mode 100755 docs/02-6-folders.md create mode 100644 website/README.md create mode 100644 website/core/Footer.js create mode 100644 website/package.json create mode 100644 website/pages/en/help.js create mode 100644 website/pages/en/index.js create mode 100644 website/pages/en/users.js create mode 100644 website/sidebars.json create mode 100644 website/siteConfig.js create mode 100644 website/static/css/custom.css create mode 100755 website/static/img/favicon.png create mode 100755 website/static/img/lf_logo.svg create mode 100755 website/static/img/logo.png create mode 100755 website/static/index.html create mode 100644 yarn.lock diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..27d2dae --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +*/node_modules +*.log diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5395ea7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +.DS_Store + +node_modules + +lib/core/metadata.js +lib/core/MetadataBlog.js + +website/translated_docs +website/build/ +website/yarn.lock +website/node_modules +website/i18n/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c7f1856 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:lts + +WORKDIR /app/website + +EXPOSE 3000 35729 +COPY ./docs /app/docs +COPY ./website /app/website +RUN yarn install + +CMD ["yarn", "start"] diff --git a/README.md b/README.md index 0b4284b..6477a55 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,198 @@ -# coding-standards-convention -Commonly followed coding standards and convention at leapfrog +This website was created with [Docusaurus](https://docusaurus.io/). + +# What's In This Document + +- [Get Started in 5 Minutes](#get-started-in-5-minutes) +- [Directory Structure](#directory-structure) +- [Editing Content](#editing-content) +- [Adding Content](#adding-content) +- [Full Documentation](#full-documentation) + +# Get Started in 5 Minutes + +1. Make sure all the dependencies for the website are installed: + +```sh +# Install dependencies +$ yarn +``` + +2. Run your dev server: + +```sh +# Start the site +$ yarn start +``` + +## Directory Structure + +Your project file structure should look something like this + +``` +my-docusaurus/ + docs/ + doc-1.md + doc-2.md + doc-3.md + website/ + blog/ + 2016-3-11-oldest-post.md + 2017-10-24-newest-post.md + core/ + node_modules/ + pages/ + static/ + css/ + img/ + package.json + sidebars.json + siteConfig.js +``` + +# Editing Content + +## Editing an existing docs page + +Edit docs by navigating to `docs/` and editing the corresponding document: + +`docs/doc-to-be-edited.md` + +```markdown +--- +id: page-needs-edit +title: This Doc Needs To Be Edited +--- + +Edit me... +``` + +For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) + +## Editing an existing blog post + +Edit blog posts by navigating to `website/blog` and editing the corresponding post: + +`website/blog/post-to-be-edited.md` + +```markdown +--- +id: post-needs-edit +title: This Blog Post Needs To Be Edited +--- + +Edit me... +``` + +For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) + +# Adding Content + +## Adding a new docs page to an existing sidebar + +1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: + +```md +--- +id: newly-created-doc +title: This Doc Needs To Be Edited +--- + +My new content here.. +``` + +1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`: + +```javascript +// Add newly-created-doc to the Getting Started category of docs +{ + "docs": { + "Getting Started": [ + "quick-start", + "newly-created-doc" // new doc here + ], + ... + }, + ... +} +``` + +For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) + +## Adding a new blog post + +1. Make sure there is a header link to your blog in `website/siteConfig.js`: + +`website/siteConfig.js` + +```javascript +headerLinks: [ + ... + { blog: true, label: 'Blog' }, + ... +] +``` + +2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: + +`website/blog/2018-05-21-New-Blog-Post.md` + +```markdown +--- +author: Frank Li +authorURL: https://twitter.com/foobarbaz +authorFBID: 503283835 +title: New Blog Post +--- + +Lorem Ipsum... +``` + +For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) + +## Adding items to your site's top navigation bar + +1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: + +`website/siteConfig.js` + +```javascript +{ + headerLinks: [ + ... + /* you can add docs */ + { doc: 'my-examples', label: 'Examples' }, + /* you can add custom pages */ + { page: 'help', label: 'Help' }, + /* you can add external links */ + { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, + ... + ], + ... +} +``` + +For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) + +## Adding custom pages + +1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: +1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: + +`website/siteConfig.js` + +```javascript +{ + headerLinks: [ + ... + { page: 'my-new-custom-page', label: 'My New Custom Page' }, + ... + ], + ... +} +``` + +For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). + +# Full Documentation + +Full documentation can be found on the [website](https://docusaurus.io/). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6711192 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +services: + docusaurus: + build: . + ports: + - 3000:3000 + - 35729:35729 + volumes: + - ./docs:/app/docs + - ./website/blog:/app/website/blog + - ./website/core:/app/website/core + - ./website/i18n:/app/website/i18n + - ./website/pages:/app/website/pages + - ./website/static:/app/website/static + - ./website/sidebars.json:/app/website/sidebars.json + - ./website/siteConfig.js:/app/website/siteConfig.js + working_dir: /app/website diff --git a/docs/01-introduction.md b/docs/01-introduction.md new file mode 100755 index 0000000..37ef239 --- /dev/null +++ b/docs/01-introduction.md @@ -0,0 +1,6 @@ +--- +id: introduction +title: Introduction +--- + +Coding standards and conventions...... \ No newline at end of file diff --git a/docs/02-1-files.md b/docs/02-1-files.md new file mode 100755 index 0000000..6b13742 --- /dev/null +++ b/docs/02-1-files.md @@ -0,0 +1,7 @@ +--- +id: files +title: Files +sidebar_label: Files +--- + +## Contents... \ No newline at end of file diff --git a/docs/02-2-classes.md b/docs/02-2-classes.md new file mode 100755 index 0000000..250f9ac --- /dev/null +++ b/docs/02-2-classes.md @@ -0,0 +1,8 @@ +--- +id: classes +title: Classes +sidebar_label: Classes +--- + + +#### Contents... \ No newline at end of file diff --git a/docs/02-3-functions.md b/docs/02-3-functions.md new file mode 100755 index 0000000..3406db2 --- /dev/null +++ b/docs/02-3-functions.md @@ -0,0 +1,7 @@ +--- +id: functions +title: Function +sidebar_label: Functions +--- + +#### 1. Contents... \ No newline at end of file diff --git a/docs/02-4-variables.md b/docs/02-4-variables.md new file mode 100755 index 0000000..1bb94ae --- /dev/null +++ b/docs/02-4-variables.md @@ -0,0 +1,7 @@ +--- +id: variables +title: Variables +sidebar_label: Variables +--- + +#### 1. Contents... \ No newline at end of file diff --git a/docs/02-5-constants.md b/docs/02-5-constants.md new file mode 100755 index 0000000..4f0191b --- /dev/null +++ b/docs/02-5-constants.md @@ -0,0 +1,7 @@ +--- +id: constants +title: Constants +sidebar_label: Constants +--- + +#### 1. Contents... \ No newline at end of file diff --git a/docs/02-6-folders.md b/docs/02-6-folders.md new file mode 100755 index 0000000..5b8da58 --- /dev/null +++ b/docs/02-6-folders.md @@ -0,0 +1,7 @@ +--- +id: folders +title: Folder +sidebar_label: Folder +--- + +#### 1. Contents... \ No newline at end of file diff --git a/website/README.md b/website/README.md new file mode 100644 index 0000000..6477a55 --- /dev/null +++ b/website/README.md @@ -0,0 +1,198 @@ +This website was created with [Docusaurus](https://docusaurus.io/). + +# What's In This Document + +- [Get Started in 5 Minutes](#get-started-in-5-minutes) +- [Directory Structure](#directory-structure) +- [Editing Content](#editing-content) +- [Adding Content](#adding-content) +- [Full Documentation](#full-documentation) + +# Get Started in 5 Minutes + +1. Make sure all the dependencies for the website are installed: + +```sh +# Install dependencies +$ yarn +``` + +2. Run your dev server: + +```sh +# Start the site +$ yarn start +``` + +## Directory Structure + +Your project file structure should look something like this + +``` +my-docusaurus/ + docs/ + doc-1.md + doc-2.md + doc-3.md + website/ + blog/ + 2016-3-11-oldest-post.md + 2017-10-24-newest-post.md + core/ + node_modules/ + pages/ + static/ + css/ + img/ + package.json + sidebars.json + siteConfig.js +``` + +# Editing Content + +## Editing an existing docs page + +Edit docs by navigating to `docs/` and editing the corresponding document: + +`docs/doc-to-be-edited.md` + +```markdown +--- +id: page-needs-edit +title: This Doc Needs To Be Edited +--- + +Edit me... +``` + +For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) + +## Editing an existing blog post + +Edit blog posts by navigating to `website/blog` and editing the corresponding post: + +`website/blog/post-to-be-edited.md` + +```markdown +--- +id: post-needs-edit +title: This Blog Post Needs To Be Edited +--- + +Edit me... +``` + +For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) + +# Adding Content + +## Adding a new docs page to an existing sidebar + +1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: + +```md +--- +id: newly-created-doc +title: This Doc Needs To Be Edited +--- + +My new content here.. +``` + +1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`: + +```javascript +// Add newly-created-doc to the Getting Started category of docs +{ + "docs": { + "Getting Started": [ + "quick-start", + "newly-created-doc" // new doc here + ], + ... + }, + ... +} +``` + +For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) + +## Adding a new blog post + +1. Make sure there is a header link to your blog in `website/siteConfig.js`: + +`website/siteConfig.js` + +```javascript +headerLinks: [ + ... + { blog: true, label: 'Blog' }, + ... +] +``` + +2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: + +`website/blog/2018-05-21-New-Blog-Post.md` + +```markdown +--- +author: Frank Li +authorURL: https://twitter.com/foobarbaz +authorFBID: 503283835 +title: New Blog Post +--- + +Lorem Ipsum... +``` + +For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) + +## Adding items to your site's top navigation bar + +1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: + +`website/siteConfig.js` + +```javascript +{ + headerLinks: [ + ... + /* you can add docs */ + { doc: 'my-examples', label: 'Examples' }, + /* you can add custom pages */ + { page: 'help', label: 'Help' }, + /* you can add external links */ + { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, + ... + ], + ... +} +``` + +For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) + +## Adding custom pages + +1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: +1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: + +`website/siteConfig.js` + +```javascript +{ + headerLinks: [ + ... + { page: 'my-new-custom-page', label: 'My New Custom Page' }, + ... + ], + ... +} +``` + +For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). + +# Full Documentation + +Full documentation can be found on the [website](https://docusaurus.io/). diff --git a/website/core/Footer.js b/website/core/Footer.js new file mode 100644 index 0000000..439f21f --- /dev/null +++ b/website/core/Footer.js @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const React = require('react'); + +class Footer extends React.Component { + docUrl(doc, language) { + const baseUrl = this.props.config.baseUrl; + const docsUrl = this.props.config.docsUrl; + const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; + const langPart = `${language ? `${language}/` : ''}`; + return `${baseUrl}${docsPart}${langPart}${doc}`; + } + + pageUrl(doc, language) { + const baseUrl = this.props.config.baseUrl; + return baseUrl + (language ? `${language}/` : '') + doc; + } + + render() { + return ( + + ); + } +} + +module.exports = Footer; diff --git a/website/package.json b/website/package.json new file mode 100644 index 0000000..1f87392 --- /dev/null +++ b/website/package.json @@ -0,0 +1,14 @@ +{ + "scripts": { + "examples": "docusaurus-examples", + "start": "docusaurus-start", + "build": "docusaurus-build", + "publish-gh-pages": "docusaurus-publish", + "write-translations": "docusaurus-write-translations", + "version": "docusaurus-version", + "rename-version": "docusaurus-rename-version" + }, + "devDependencies": { + "docusaurus": "^1.14.4" + } +} diff --git a/website/pages/en/help.js b/website/pages/en/help.js new file mode 100644 index 0000000..2b790e4 --- /dev/null +++ b/website/pages/en/help.js @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const React = require('react'); + +const CompLibrary = require('../../core/CompLibrary.js'); + +const Container = CompLibrary.Container; +const GridBlock = CompLibrary.GridBlock; + +function Help(props) { + const {config: siteConfig, language = ''} = props; + const {baseUrl, docsUrl} = siteConfig; + const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; + const langPart = `${language ? `${language}/` : ''}`; + const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; + + const supportLinks = [ + { + content: `Learn more using the [documentation on this site.](${docUrl( + 'doc1.html', + )})`, + title: 'Browse Docs', + }, + { + content: 'Ask questions about the documentation and project', + title: 'Join the community', + }, + { + content: "Find out what's new with this project", + title: 'Stay up to date', + }, + ]; + + return ( +
+ +
+
+

Need help?

+
+

This project is maintained by a dedicated group of people.

+ +
+
+
+ ); +} + +module.exports = Help; diff --git a/website/pages/en/index.js b/website/pages/en/index.js new file mode 100644 index 0000000..1e03b77 --- /dev/null +++ b/website/pages/en/index.js @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const React = require('react'); + +const CompLibrary = require('../../core/CompLibrary.js'); + +const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ +const Container = CompLibrary.Container; +const GridBlock = CompLibrary.GridBlock; + +class HomeSplash extends React.Component { + render() { + const {siteConfig, language = ''} = this.props; + const {baseUrl, docsUrl} = siteConfig; + const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; + const langPart = `${language ? `${language}/` : ''}`; + const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; + + const SplashContainer = props => ( +
+
+
{props.children}
+
+
+ ); + + const Logo = props => ( +
+ Project Logo +
+ ); + + const ProjectTitle = props => ( +

+ {props.title} + {props.tagline} +

+ ); + + const PromoSection = props => ( +
+
+
{props.children}
+
+
+ ); + + const Button = props => ( +
+ + {props.children} + +
+ ); + + return ( + + +
+ + + + + + +
+
+ ); + } +} + +class Index extends React.Component { + render() { + const {config: siteConfig, language = ''} = this.props; + const {baseUrl} = siteConfig; + + const Block = props => ( + + + + ); + + const FeatureCallout = () => ( +
+

Feature Callout

+ These are features of this project +
+ ); + + const TryOut = () => ( + + {[ + { + content: + 'To make your landing page more attractive, use illustrations! Check out ' + + '[**unDraw**](https://undraw.co/) which provides you with customizable illustrations which are free to use. ' + + 'The illustrations you see on this page are from unDraw.', + image: `${baseUrl}img/undraw_code_review.svg`, + imageAlign: 'left', + title: 'Wonderful SVG Illustrations', + }, + ]} + + ); + + const Description = () => ( + + {[ + { + content: + 'This is another description of how this project is useful', + image: `${baseUrl}img/undraw_note_list.svg`, + imageAlign: 'right', + title: 'Description', + }, + ]} + + ); + + const LearnHow = () => ( + + {[ + { + content: + 'Each new Docusaurus project has **randomly-generated** theme colors.', + image: `${baseUrl}img/undraw_youtube_tutorial.svg`, + imageAlign: 'right', + title: 'Randomly Generated Theme Colors', + }, + ]} + + ); + + const Features = () => ( + + {[ + { + content: 'This is the content of my feature', + image: `${baseUrl}img/undraw_react.svg`, + imageAlign: 'top', + title: 'Feature One', + }, + { + content: 'The content of my second feature', + image: `${baseUrl}img/undraw_operating_system.svg`, + imageAlign: 'top', + title: 'Feature Two', + }, + ]} + + ); + + const Showcase = () => { + if ((siteConfig.users || []).length === 0) { + return null; + } + + const showcase = siteConfig.users + .filter(user => user.pinned) + .map(user => ( + + {user.caption} + + )); + + const pageUrl = page => baseUrl + (language ? `${language}/` : '') + page; + + return ( +
+

Who is Using This?

+

This project is used by all these people

+
{showcase}
+
+ + More {siteConfig.title} Users + +
+
+ ); + }; + + return ( +
+ +
+ + + + + + +
+
+ ); + } +} + +module.exports = Index; diff --git a/website/pages/en/users.js b/website/pages/en/users.js new file mode 100644 index 0000000..039dc39 --- /dev/null +++ b/website/pages/en/users.js @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const React = require('react'); + +const CompLibrary = require('../../core/CompLibrary.js'); + +const Container = CompLibrary.Container; + +class Users extends React.Component { + render() { + const {config: siteConfig} = this.props; + if ((siteConfig.users || []).length === 0) { + return null; + } + + const editUrl = `${siteConfig.repoUrl}/edit/master/website/siteConfig.js`; + const showcase = siteConfig.users.map(user => ( + + {user.caption} + + )); + + return ( +
+ +
+
+

Who is Using This?

+

This project is used by many folks

+
+
{showcase}
+

Are you using this project?

+ + Add your company + +
+
+
+ ); + } +} + +module.exports = Users; diff --git a/website/sidebars.json b/website/sidebars.json new file mode 100644 index 0000000..c63d640 --- /dev/null +++ b/website/sidebars.json @@ -0,0 +1,6 @@ +{ + "docs": { + "Overview": ["introduction"], + "Naming Convention": ["files", "classes", "functions", "variables", "constants", "folders"] + } +} diff --git a/website/siteConfig.js b/website/siteConfig.js new file mode 100644 index 0000000..71ab044 --- /dev/null +++ b/website/siteConfig.js @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2017-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// See https://docusaurus.io/docs/site-config for all the possible +// site configuration options. + +// List of projects/orgs using your project for the users page. +const users = [ + { + caption: 'User1', + // You will need to prepend the image path with your baseUrl + // if it is not '/', like: '/test-site/img/image.jpg'. + image: '/img/undraw_open_source.svg', + infoLink: 'https://www.facebook.com', + pinned: true + } +]; + +const siteConfig = { + title: 'Coding Standards And Convention', // Title for your website. + tagline: 'Coding Standards And Convention Documentation', + url: 'https://lftechnology.com', // Your website URL + baseUrl: '/', // Base URL for your project */ + // For github.io type URLs, you would set the url and baseUrl like: + // url: 'https://facebook.github.io', + // baseUrl: '/test-site/', + + // Used for publishing and more + projectName: 'coding standards and convention', + organizationName: 'lftechnology', + // For top-level user or org sites, the organization is still the same. + // e.g., for the https://JoelMarcey.github.io site, it would be set like... + // organizationName: 'JoelMarcey' + + // For no header links in the top nav bar -> headerLinks: [], + headerLinks: [{ doc: 'introduction', label: 'Docs' }], + + // If you have users set above, you add it here: + users, + + /* path to images for header/footer */ + headerIcon: 'img/logo.png', + footerIcon: 'img/favicon.png', + favicon: 'img/favicon.png', + + /* Colors for website */ + colors: { + primaryColor: '#02a9f4', + secondaryColor: '#00cb5b' + }, + + /* Custom fonts for website */ + /* + fonts: { + myFont: [ + "Times New Roman", + "Serif" + ], + myOtherFont: [ + "-apple-system", + "system-ui" + ] + }, + */ + + // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. + copyright: `Copyright © ${new Date().getFullYear()} Leapfrog Technology`, + + highlight: { + // Highlight.js theme to use for syntax highlighting in code blocks. + theme: 'default' + }, + + // Add custom scripts here that would be placed in + + Coding Standards And Conventions + + + If you are not redirected automatically, follow this link. + + diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From ff6e84565fb1259512f6b63eddd506fde92bd5a3 Mon Sep 17 00:00:00 2001 From: anish manandhar Date: Wed, 20 May 2020 14:28:24 +0545 Subject: [PATCH 03/38] upgrqade docusaurus from v1 to v2 --- .gitignore | 28 +- Dockerfile | 10 - README.md | 191 +- docker-compose.yml | 18 - docs/git/.gitkeep | 0 docs/java/.gitkeep | 0 docs/javascript/.gitkeep | 0 docs/python/.gitkeep | 0 docs/rest-api/.gitkeep | 0 docusaurus.config.js | 105 + package.json | 30 + website/sidebars.json => sidebars.js | 4 +- src/css/custom.css | 25 + src/pages/index.js | 97 + src/pages/styles.module.css | 37 + {website/static => static}/img/favicon.png | Bin {website/static => static}/img/lf_logo.svg | 0 static/img/logo.svg | 1 + {website/static => static}/index.html | 0 website/README.md | 198 - website/core/Footer.js | 118 - website/package.json | 14 - website/pages/en/help.js | 54 - website/pages/en/index.js | 212 - website/pages/en/users.js | 48 - website/siteConfig.js | 108 - website/static/css/custom.css | 43 - website/static/img/logo.png | Bin 10751 -> 0 bytes yarn.lock | 9592 ++++++++++++++++++++ 29 files changed, 9921 insertions(+), 1012 deletions(-) delete mode 100644 Dockerfile delete mode 100644 docker-compose.yml create mode 100644 docs/git/.gitkeep create mode 100644 docs/java/.gitkeep create mode 100644 docs/javascript/.gitkeep create mode 100644 docs/python/.gitkeep create mode 100644 docs/rest-api/.gitkeep create mode 100644 docusaurus.config.js create mode 100644 package.json rename website/sidebars.json => sidebars.js (86%) create mode 100644 src/css/custom.css create mode 100644 src/pages/index.js create mode 100644 src/pages/styles.module.css rename {website/static => static}/img/favicon.png (100%) rename {website/static => static}/img/lf_logo.svg (100%) create mode 100644 static/img/logo.svg rename {website/static => static}/index.html (100%) mode change 100755 => 100644 delete mode 100644 website/README.md delete mode 100644 website/core/Footer.js delete mode 100644 website/package.json delete mode 100644 website/pages/en/help.js delete mode 100644 website/pages/en/index.js delete mode 100644 website/pages/en/users.js delete mode 100644 website/siteConfig.js delete mode 100644 website/static/css/custom.css delete mode 100755 website/static/img/logo.png diff --git a/.gitignore b/.gitignore index 5395ea7..c7418de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,22 @@ -.DS_Store +# dependencies +/node_modules + +# production +/build -node_modules +# generated files +.docusaurus +.cache-loader + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local -lib/core/metadata.js -lib/core/MetadataBlog.js +npm-debug.log* +yarn-debug.log* +yarn-error.log* -website/translated_docs -website/build/ -website/yarn.lock -website/node_modules -website/i18n/* +.vscode/* diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c7f1856..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:lts - -WORKDIR /app/website - -EXPOSE 3000 35729 -COPY ./docs /app/docs -COPY ./website /app/website -RUN yarn install - -CMD ["yarn", "start"] diff --git a/README.md b/README.md index 6477a55..ee0ccc9 100644 --- a/README.md +++ b/README.md @@ -1,198 +1,33 @@ -This website was created with [Docusaurus](https://docusaurus.io/). +# Website -# What's In This Document +This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. -- [Get Started in 5 Minutes](#get-started-in-5-minutes) -- [Directory Structure](#directory-structure) -- [Editing Content](#editing-content) -- [Adding Content](#adding-content) -- [Full Documentation](#full-documentation) +### Installation -# Get Started in 5 Minutes - -1. Make sure all the dependencies for the website are installed: - -```sh -# Install dependencies -$ yarn -``` - -2. Run your dev server: - -```sh -# Start the site -$ yarn start -``` - -## Directory Structure - -Your project file structure should look something like this - -``` -my-docusaurus/ - docs/ - doc-1.md - doc-2.md - doc-3.md - website/ - blog/ - 2016-3-11-oldest-post.md - 2017-10-24-newest-post.md - core/ - node_modules/ - pages/ - static/ - css/ - img/ - package.json - sidebars.json - siteConfig.js ``` - -# Editing Content - -## Editing an existing docs page - -Edit docs by navigating to `docs/` and editing the corresponding document: - -`docs/doc-to-be-edited.md` - -```markdown ---- -id: page-needs-edit -title: This Doc Needs To Be Edited ---- - -Edit me... -``` - -For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Editing an existing blog post - -Edit blog posts by navigating to `website/blog` and editing the corresponding post: - -`website/blog/post-to-be-edited.md` - -```markdown ---- -id: post-needs-edit -title: This Blog Post Needs To Be Edited ---- - -Edit me... +$ yarn ``` -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -# Adding Content - -## Adding a new docs page to an existing sidebar - -1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: - -```md ---- -id: newly-created-doc -title: This Doc Needs To Be Edited ---- +### Local Development -My new content here.. ``` - -1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`: - -```javascript -// Add newly-created-doc to the Getting Started category of docs -{ - "docs": { - "Getting Started": [ - "quick-start", - "newly-created-doc" // new doc here - ], - ... - }, - ... -} +$ yarn start ``` -For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) +This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. -## Adding a new blog post +### Build -1. Make sure there is a header link to your blog in `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -headerLinks: [ - ... - { blog: true, label: 'Blog' }, - ... -] ``` - -2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: - -`website/blog/2018-05-21-New-Blog-Post.md` - -```markdown ---- -author: Frank Li -authorURL: https://twitter.com/foobarbaz -authorFBID: 503283835 -title: New Blog Post ---- - -Lorem Ipsum... +$ yarn build ``` -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) +This command generates static content into the `build` directory and can be served using any static contents hosting service. -## Adding items to your site's top navigation bar +### Deployment -1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - /* you can add docs */ - { doc: 'my-examples', label: 'Examples' }, - /* you can add custom pages */ - { page: 'help', label: 'Help' }, - /* you can add external links */ - { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, - ... - ], - ... -} ``` - -For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding custom pages - -1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: -1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - { page: 'my-new-custom-page', label: 'My New Custom Page' }, - ... - ], - ... -} +$ GIT_USER= USE_SSH=true yarn deploy ``` -For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). - -# Full Documentation - -Full documentation can be found on the [website](https://docusaurus.io/). +If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 6711192..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: "3" - -services: - docusaurus: - build: . - ports: - - 3000:3000 - - 35729:35729 - volumes: - - ./docs:/app/docs - - ./website/blog:/app/website/blog - - ./website/core:/app/website/core - - ./website/i18n:/app/website/i18n - - ./website/pages:/app/website/pages - - ./website/static:/app/website/static - - ./website/sidebars.json:/app/website/sidebars.json - - ./website/siteConfig.js:/app/website/siteConfig.js - working_dir: /app/website diff --git a/docs/git/.gitkeep b/docs/git/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/java/.gitkeep b/docs/java/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/javascript/.gitkeep b/docs/javascript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/python/.gitkeep b/docs/python/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/rest-api/.gitkeep b/docs/rest-api/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docusaurus.config.js b/docusaurus.config.js new file mode 100644 index 0000000..97af5a6 --- /dev/null +++ b/docusaurus.config.js @@ -0,0 +1,105 @@ +module.exports = { + title: 'Coding Standards And Convention', + tagline: 'Coding Standards And Convention Documentation', + url: 'https://lftechnology.com', + baseUrl: '/', + favicon: 'img/favicon.ico', + organizationName: 'lftechnology', // Usually your GitHub org/user name. + projectName: 'coding standards and convention', // Usually your repo name. + themeConfig: { + navbar: { + title: 'Coding Standard and Convention', + logo: { + alt: '', + src: 'img/favicon.png', + }, + links: [ + { + to: 'docs/', + activeBasePath: 'docs', + label: 'Docs', + position: 'left', + }, + {to: 'blog', label: 'Blog', position: 'left'}, + { + href: 'https://github.com/facebook/docusaurus', + label: 'GitHub', + position: 'right', + }, + ], + }, + footer: { + style: 'dark', + links: [ + { + title: 'Docs', + items: [ + { + label: 'Style Guide', + to: 'docs/', + }, + { + label: 'Second Doc', + to: 'docs/doc2/', + }, + ], + }, + { + title: 'Community', + items: [ + { + label: 'Stack Overflow', + href: 'https://stackoverflow.com/questions/tagged/docusaurus', + }, + { + label: 'Discord', + href: 'https://discordapp.com/invite/docusaurus', + }, + { + label: 'Twitter', + href: 'https://twitter.com/docusaurus', + }, + ], + }, + { + title: 'More', + items: [ + { + label: 'Blog', + to: 'blog', + }, + { + label: 'GitHub', + href: 'https://github.com/facebook/docusaurus', + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, + }, + }, + presets: [ + [ + '@docusaurus/preset-classic', + { + docs: { + // It is recommended to set document id as docs home page (`docs/` path). + homePageId: 'doc1', + sidebarPath: require.resolve('./sidebars.js'), + // Please change this to your repo. + editUrl: + 'https://github.com/facebook/docusaurus/edit/master/website/', + }, + blog: { + showReadingTime: true, + // Please change this to your repo. + editUrl: + 'https://github.com/facebook/docusaurus/edit/master/website/blog/', + }, + theme: { + customCss: require.resolve('./src/css/custom.css'), + }, + }, + ], + ], +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..2bdcefb --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "coding-standards-convention", + "version": "0.0.0", + "private": true, + "scripts": { + "start": "docusaurus start", + "build": "docusaurus build", + "swizzle": "docusaurus swizzle", + "deploy": "docusaurus deploy" + }, + "dependencies": { + "@docusaurus/core": "^2.0.0-alpha.55", + "@docusaurus/preset-classic": "^2.0.0-alpha.55", + "classnames": "^2.2.6", + "react": "^16.8.4", + "react-dom": "^16.8.4" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} \ No newline at end of file diff --git a/website/sidebars.json b/sidebars.js similarity index 86% rename from website/sidebars.json rename to sidebars.js index c63d640..8d6e2fa 100644 --- a/website/sidebars.json +++ b/sidebars.js @@ -1,6 +1,6 @@ -{ +module.exports = { "docs": { "Overview": ["introduction"], "Naming Convention": ["files", "classes", "functions", "variables", "constants", "folders"] } -} +}; diff --git a/src/css/custom.css b/src/css/custom.css new file mode 100644 index 0000000..74ba0f2 --- /dev/null +++ b/src/css/custom.css @@ -0,0 +1,25 @@ +/* stylelint-disable docusaurus/copyright-header */ +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +/* You can override the default Infima variables here. */ +:root { + --ifm-color-primary: #25c2a0; + --ifm-color-primary-dark: rgb(33, 175, 144); + --ifm-color-primary-darker: rgb(31, 165, 136); + --ifm-color-primary-darkest: rgb(26, 136, 112); + --ifm-color-primary-light: rgb(70, 203, 174); + --ifm-color-primary-lighter: rgb(102, 212, 189); + --ifm-color-primary-lightest: rgb(146, 224, 208); + --ifm-code-font-size: 95%; +} + +.docusaurus-highlight-code-line { + background-color: rgb(72, 77, 91); + display: block; + margin: 0 calc(-1 * var(--ifm-pre-padding)); + padding: 0 var(--ifm-pre-padding); +} diff --git a/src/pages/index.js b/src/pages/index.js new file mode 100644 index 0000000..dd76689 --- /dev/null +++ b/src/pages/index.js @@ -0,0 +1,97 @@ +import React from 'react'; +import classnames from 'classnames'; +import Layout from '@theme/Layout'; +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import styles from './styles.module.css'; + +const features = [ + { + title: <>Easy to Use, + imageUrl: 'img/undraw_docusaurus_mountain.svg', + description: ( + <> + Docusaurus was designed from the ground up to be easily installed and + used to get your website up and running quickly. + + ), + }, + { + title: <>Focus on What Matters, + imageUrl: 'img/undraw_docusaurus_tree.svg', + description: ( + <> + Docusaurus lets you focus on your docs, and we'll do the chores. Go + ahead and move your docs into the docs directory. + + ), + }, + { + title: <>Powered by React, + imageUrl: 'img/undraw_docusaurus_react.svg', + description: ( + <> + Extend or customize your website layout by reusing React. Docusaurus can + be extended while reusing the same header and footer. + + ), + }, +]; + +function Feature({imageUrl, title, description}) { + const imgUrl = useBaseUrl(imageUrl); + return ( +
+ {imgUrl && ( +
+ {title} +
+ )} +

{title}

+

{description}

+
+ ); +} + +function Home() { + const context = useDocusaurusContext(); + const {siteConfig = {}} = context; + return ( + +
+
+

{siteConfig.title}

+

{siteConfig.tagline}

+
+ + Get Started + +
+
+
+
+ {features && features.length > 0 && ( +
+
+
+ {features.map((props, idx) => ( + + ))} +
+
+
+ )} +
+
+ ); +} + +export default Home; diff --git a/src/pages/styles.module.css b/src/pages/styles.module.css new file mode 100644 index 0000000..c1aa851 --- /dev/null +++ b/src/pages/styles.module.css @@ -0,0 +1,37 @@ +/* stylelint-disable docusaurus/copyright-header */ + +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + padding: 4rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +@media screen and (max-width: 966px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; +} + +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureImage { + height: 200px; + width: 200px; +} diff --git a/website/static/img/favicon.png b/static/img/favicon.png similarity index 100% rename from website/static/img/favicon.png rename to static/img/favicon.png diff --git a/website/static/img/lf_logo.svg b/static/img/lf_logo.svg similarity index 100% rename from website/static/img/lf_logo.svg rename to static/img/lf_logo.svg diff --git a/static/img/logo.svg b/static/img/logo.svg new file mode 100644 index 0000000..9db6d0d --- /dev/null +++ b/static/img/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/static/index.html b/static/index.html old mode 100755 new mode 100644 similarity index 100% rename from website/static/index.html rename to static/index.html diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 6477a55..0000000 --- a/website/README.md +++ /dev/null @@ -1,198 +0,0 @@ -This website was created with [Docusaurus](https://docusaurus.io/). - -# What's In This Document - -- [Get Started in 5 Minutes](#get-started-in-5-minutes) -- [Directory Structure](#directory-structure) -- [Editing Content](#editing-content) -- [Adding Content](#adding-content) -- [Full Documentation](#full-documentation) - -# Get Started in 5 Minutes - -1. Make sure all the dependencies for the website are installed: - -```sh -# Install dependencies -$ yarn -``` - -2. Run your dev server: - -```sh -# Start the site -$ yarn start -``` - -## Directory Structure - -Your project file structure should look something like this - -``` -my-docusaurus/ - docs/ - doc-1.md - doc-2.md - doc-3.md - website/ - blog/ - 2016-3-11-oldest-post.md - 2017-10-24-newest-post.md - core/ - node_modules/ - pages/ - static/ - css/ - img/ - package.json - sidebars.json - siteConfig.js -``` - -# Editing Content - -## Editing an existing docs page - -Edit docs by navigating to `docs/` and editing the corresponding document: - -`docs/doc-to-be-edited.md` - -```markdown ---- -id: page-needs-edit -title: This Doc Needs To Be Edited ---- - -Edit me... -``` - -For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Editing an existing blog post - -Edit blog posts by navigating to `website/blog` and editing the corresponding post: - -`website/blog/post-to-be-edited.md` - -```markdown ---- -id: post-needs-edit -title: This Blog Post Needs To Be Edited ---- - -Edit me... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -# Adding Content - -## Adding a new docs page to an existing sidebar - -1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: - -```md ---- -id: newly-created-doc -title: This Doc Needs To Be Edited ---- - -My new content here.. -``` - -1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`: - -```javascript -// Add newly-created-doc to the Getting Started category of docs -{ - "docs": { - "Getting Started": [ - "quick-start", - "newly-created-doc" // new doc here - ], - ... - }, - ... -} -``` - -For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding a new blog post - -1. Make sure there is a header link to your blog in `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -headerLinks: [ - ... - { blog: true, label: 'Blog' }, - ... -] -``` - -2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: - -`website/blog/2018-05-21-New-Blog-Post.md` - -```markdown ---- -author: Frank Li -authorURL: https://twitter.com/foobarbaz -authorFBID: 503283835 -title: New Blog Post ---- - -Lorem Ipsum... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -## Adding items to your site's top navigation bar - -1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - /* you can add docs */ - { doc: 'my-examples', label: 'Examples' }, - /* you can add custom pages */ - { page: 'help', label: 'Help' }, - /* you can add external links */ - { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, - ... - ], - ... -} -``` - -For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding custom pages - -1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: -1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - { page: 'my-new-custom-page', label: 'My New Custom Page' }, - ... - ], - ... -} -``` - -For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). - -# Full Documentation - -Full documentation can be found on the [website](https://docusaurus.io/). diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100644 index 439f21f..0000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - const docsUrl = this.props.config.docsUrl; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - return `${baseUrl}${docsPart}${langPart}${doc}`; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? `${language}/` : '') + doc; - } - - render() { - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 1f87392..0000000 --- a/website/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.14.4" - } -} diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100644 index 2b790e4..0000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -function Help(props) { - const {config: siteConfig, language = ''} = props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const supportLinks = [ - { - content: `Learn more using the [documentation on this site.](${docUrl( - 'doc1.html', - )})`, - title: 'Browse Docs', - }, - { - content: 'Ask questions about the documentation and project', - title: 'Join the community', - }, - { - content: "Find out what's new with this project", - title: 'Stay up to date', - }, - ]; - - return ( -
- -
-
-

Need help?

-
-

This project is maintained by a dedicated group of people.

- -
-
-
- ); -} - -module.exports = Help; diff --git a/website/pages/en/index.js b/website/pages/en/index.js deleted file mode 100644 index 1e03b77..0000000 --- a/website/pages/en/index.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -class HomeSplash extends React.Component { - render() { - const {siteConfig, language = ''} = this.props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const SplashContainer = props => ( -
-
-
{props.children}
-
-
- ); - - const Logo = props => ( -
- Project Logo -
- ); - - const ProjectTitle = props => ( -

- {props.title} - {props.tagline} -

- ); - - const PromoSection = props => ( -
-
-
{props.children}
-
-
- ); - - const Button = props => ( -
- - {props.children} - -
- ); - - return ( - - -
- - - - - - -
-
- ); - } -} - -class Index extends React.Component { - render() { - const {config: siteConfig, language = ''} = this.props; - const {baseUrl} = siteConfig; - - const Block = props => ( - - - - ); - - const FeatureCallout = () => ( -
-

Feature Callout

- These are features of this project -
- ); - - const TryOut = () => ( - - {[ - { - content: - 'To make your landing page more attractive, use illustrations! Check out ' + - '[**unDraw**](https://undraw.co/) which provides you with customizable illustrations which are free to use. ' + - 'The illustrations you see on this page are from unDraw.', - image: `${baseUrl}img/undraw_code_review.svg`, - imageAlign: 'left', - title: 'Wonderful SVG Illustrations', - }, - ]} - - ); - - const Description = () => ( - - {[ - { - content: - 'This is another description of how this project is useful', - image: `${baseUrl}img/undraw_note_list.svg`, - imageAlign: 'right', - title: 'Description', - }, - ]} - - ); - - const LearnHow = () => ( - - {[ - { - content: - 'Each new Docusaurus project has **randomly-generated** theme colors.', - image: `${baseUrl}img/undraw_youtube_tutorial.svg`, - imageAlign: 'right', - title: 'Randomly Generated Theme Colors', - }, - ]} - - ); - - const Features = () => ( - - {[ - { - content: 'This is the content of my feature', - image: `${baseUrl}img/undraw_react.svg`, - imageAlign: 'top', - title: 'Feature One', - }, - { - content: 'The content of my second feature', - image: `${baseUrl}img/undraw_operating_system.svg`, - imageAlign: 'top', - title: 'Feature Two', - }, - ]} - - ); - - const Showcase = () => { - if ((siteConfig.users || []).length === 0) { - return null; - } - - const showcase = siteConfig.users - .filter(user => user.pinned) - .map(user => ( - - {user.caption} - - )); - - const pageUrl = page => baseUrl + (language ? `${language}/` : '') + page; - - return ( -
-

Who is Using This?

-

This project is used by all these people

-
{showcase}
- -
- ); - }; - - return ( -
- -
- - - - - - -
-
- ); - } -} - -module.exports = Index; diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100644 index 039dc39..0000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; - -class Users extends React.Component { - render() { - const {config: siteConfig} = this.props; - if ((siteConfig.users || []).length === 0) { - return null; - } - - const editUrl = `${siteConfig.repoUrl}/edit/master/website/siteConfig.js`; - const showcase = siteConfig.users.map(user => ( - - {user.caption} - - )); - - return ( -
- -
-
-

Who is Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index 71ab044..0000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// See https://docusaurus.io/docs/site-config for all the possible -// site configuration options. - -// List of projects/orgs using your project for the users page. -const users = [ - { - caption: 'User1', - // You will need to prepend the image path with your baseUrl - // if it is not '/', like: '/test-site/img/image.jpg'. - image: '/img/undraw_open_source.svg', - infoLink: 'https://www.facebook.com', - pinned: true - } -]; - -const siteConfig = { - title: 'Coding Standards And Convention', // Title for your website. - tagline: 'Coding Standards And Convention Documentation', - url: 'https://lftechnology.com', // Your website URL - baseUrl: '/', // Base URL for your project */ - // For github.io type URLs, you would set the url and baseUrl like: - // url: 'https://facebook.github.io', - // baseUrl: '/test-site/', - - // Used for publishing and more - projectName: 'coding standards and convention', - organizationName: 'lftechnology', - // For top-level user or org sites, the organization is still the same. - // e.g., for the https://JoelMarcey.github.io site, it would be set like... - // organizationName: 'JoelMarcey' - - // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [{ doc: 'introduction', label: 'Docs' }], - - // If you have users set above, you add it here: - users, - - /* path to images for header/footer */ - headerIcon: 'img/logo.png', - footerIcon: 'img/favicon.png', - favicon: 'img/favicon.png', - - /* Colors for website */ - colors: { - primaryColor: '#02a9f4', - secondaryColor: '#00cb5b' - }, - - /* Custom fonts for website */ - /* - fonts: { - myFont: [ - "Times New Roman", - "Serif" - ], - myOtherFont: [ - "-apple-system", - "system-ui" - ] - }, - */ - - // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. - copyright: `Copyright © ${new Date().getFullYear()} Leapfrog Technology`, - - highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks. - theme: 'default' - }, - - // Add custom scripts here that would be placed in