Skip to content

Commit

Permalink
Adding example with-mdbreact
Browse files Browse the repository at this point in the history
  • Loading branch information
enochbeloved committed Dec 5, 2020
1 parent b403e9e commit 0bbf27a
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 0 deletions.
35 changes: 35 additions & 0 deletions examples/with-mdbreact/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

/.idea
# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
21 changes: 21 additions & 0 deletions examples/with-mdbreact/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# mdbreact Example

This example shows how to use Next.js with [material design bootstrap for react ](https://mdbootstrap.com/docs/react).

## Deploy your own

Deploy the example using [Vercel](https://vercel.com):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https://github.com/vercel/next.js/tree/canary/examples/with-mdbreact)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:

```bash
npx create-next-app --example with-mdbreact
# or
yarn create next-app --example with-mdbreact
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
16 changes: 16 additions & 0 deletions examples/with-mdbreact/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "with-mdbreact",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"mdbreact": "^5.0.0",
"next": "10.0.3",
"react": "17.0.1",
"react-dom": "17.0.1"
}
}
10 changes: 10 additions & 0 deletions examples/with-mdbreact/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import '@fortawesome/fontawesome-free/css/all.min.css'
import 'bootstrap-css-only/css/bootstrap.min.css'
import 'mdbreact/dist/css/mdb.css'
import '../styles/globals.css'

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}

export default MyApp
118 changes: 118 additions & 0 deletions examples/with-mdbreact/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import Head from 'next/head'
import {
MDBBtn,
MDBCard,
MDBCardBody,
MDBCardText,
MDBCardTitle,
MDBCol,
MDBContainer,
MDBFooter,
MDBRow,
} from 'mdbreact'

export default function Home() {
return (
<>
<Head>
<title>NextJS with Material Design Bootstrap for React</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<MDBContainer className="text-center mt-5">
<h1 className="h1-responsive font-weight-bolder">
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<p className="mb-3">
Get started by editing <code>pages/index.js</code>
</p>
<MDBRow>
<MDBCol sm="6">
<MDBCard className="my-3">
<MDBCardBody>
<MDBCardTitle tag="h5">Documentation</MDBCardTitle>
<MDBCardText>
Find in-depth information about Next.js features and API.
</MDBCardText>
<MDBBtn
color="primary"
size="sm"
className="text-capitalize"
href="https://nextjs.org/docs"
>
More &rarr;
</MDBBtn>
</MDBCardBody>
</MDBCard>
</MDBCol>
<MDBCol sm="6">
<MDBCard className="my-3">
<MDBCardBody>
<MDBCardTitle tag="h5">Learn</MDBCardTitle>
<MDBCardText>
Learn about Next.js in an interactive course with quizzes!
</MDBCardText>
<MDBBtn
color="primary"
size="sm"
className="text-capitalize"
href="https://nextjs.org/learn"
>
More &rarr;
</MDBBtn>
</MDBCardBody>
</MDBCard>
</MDBCol>
</MDBRow>
<MDBRow>
<MDBCol sm="6">
<MDBCard className="my-3">
<MDBCardBody>
<MDBCardTitle tag="h5">Examples</MDBCardTitle>
<MDBCardText>
Discover and deploy boilerplate example Next.js projects.
</MDBCardText>
<MDBBtn
color="primary"
size="sm"
className="text-capitalize"
href="https://github.com/vercel/next.js/tree/master/examples"
>
More &rarr;
</MDBBtn>
</MDBCardBody>
</MDBCard>
</MDBCol>
<MDBCol sm="6">
<MDBCard className="my-3">
<MDBCardBody>
<MDBCardTitle tag="h5">Deploy</MDBCardTitle>
<MDBCardText>
Instantly deploy your Next.js site to a public URL with
Vercel.
</MDBCardText>
<MDBBtn
color="primary"
size="sm"
className="text-capitalize"
href="https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=example&utm_campaign=next-example"
>
More &rarr;
</MDBBtn>
</MDBCardBody>
</MDBCard>
</MDBCol>
</MDBRow>
<MDBFooter className="text-center mt-4" color="white">
<span className="black-text"> Powered by</span>
<a
href="https://vercel.com?filter=next.js&utm_source=github&utm_medium=example&utm_campaign=next-example"
target="_blank"
rel="noopener noreferrer"
>
<img src="/vercel.svg" alt="Vercel Logo" />
</a>
</MDBFooter>
</MDBContainer>
</>
)
}
Binary file added examples/with-mdbreact/public/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions examples/with-mdbreact/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions examples/with-mdbreact/styles/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

a {
color: inherit;
text-decoration: none;
}

* {
box-sizing: border-box;
}

0 comments on commit 0bbf27a

Please sign in to comment.