-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
4,129 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# mdbreact Example | ||
|
||
This example shows how to use [MDBReact](https://mdbootstrap.com/docs/react) with Next.js. | ||
|
||
## 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 with-mdbreact-app | ||
# or | ||
yarn create next-app --example with-mdbreact with-mdbreact-app | ||
``` | ||
|
||
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)). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "with-mdbreact", | ||
"version": "0.1.0", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"mdbreact": "^5.0.0", | ||
"next": "latest", | ||
"react": "17.0.1", | ||
"react-dom": "17.0.1" | ||
}, | ||
"license": "MIT" | ||
} |
This file contains 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
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 |
This file contains 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
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 → | ||
</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 → | ||
</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 → | ||
</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 → | ||
</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 not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
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; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.