Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

nextjs_setup #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ typings/

# next.js build output
.next
out/
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"useTabs": true,
"tabWidth": 2,
"trailingComma": "all"
}
Empty file added common/binary_socket.js
Empty file.
12 changes: 12 additions & 0 deletions components/button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Button = ({ text }) => (
<button className="btn">
{text}
<style jsx>{`
.btn {
background-color: var(--main-color);
}
`}</style>
</button>
)

export default Button
Empty file added components/card.js
Empty file.
Empty file added components/footer.js
Empty file.
Empty file added components/header.js
Empty file.
Empty file added components/hero.js
Empty file.
Empty file added components/layout.js
Empty file.
12 changes: 12 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const withCSS = require('@zeit/next-css');

module.exports = withCSS({
exportPathMap: function() {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/contact': { page: '/contact' },
'/terms-and-conditions': { page: '/terms-and-conditions' }
};
}
});
5,791 changes: 5,791 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "deriv-com",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"export": "next export",
"deploy": "npm run build && npm run export"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@zeit/next-css": "^1.0.1",
"next": "^8.1.0",
"react": "^16.8.6",
"react-dom": "^16.8.6"
}
}
9 changes: 9 additions & 0 deletions pages/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function About() {
return (
<div>
<p>About</p>
</div>
)
}


9 changes: 9 additions & 0 deletions pages/contact.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function Contact() {
return (
<div>
<p>Contact</p>
</div>
)
}


14 changes: 14 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import '../styles/common.css';

export default function Index() {
return (
<div>
<p>Hello Next.js a</p>
<style jsx>{`
p {
color: var(--main-color);
}
`}</style>
</div>
);
}
9 changes: 9 additions & 0 deletions pages/terms-and-conditions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function TermsAndConditions() {
return (
<div>
<p>TermsAndConditions</p>
</div>
)
}


21 changes: 21 additions & 0 deletions styles/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@import './reset.css';

body {
font-family: sans-serif;
margin: 0;
}

* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-size: 62.5%; /* 1 rem = 10px */
}

:root {
/* TODO: naming, colors */
--main-color: #c69963;
--main-text-color: #54483a;
--secondary-color: #f9f7f6;
--ternary-color: #aaa;
}
137 changes: 137 additions & 0 deletions styles/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/*------------------------------------*
* # Reset SCSS
* - to make browsers render all elements more consistently
* - Reference: https://github.com/AdamMarsden/simple-typography/blob/master/_reset.scss
*------------------------------------*/

/* stylelint-disable */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
input,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
html {
height: 100%;
}
body {
line-height: 1;
height: 100%;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* stylelint-enable */
Empty file added translations/README.md
Empty file.