Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xxczaki committed Jul 20, 2019
0 parents commit f33578f
Show file tree
Hide file tree
Showing 27 changed files with 553 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
3 changes: 3 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
README.md
.next
node_modules
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
14 changes: 14 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"processors": [
"stylelint-processor-styled-components"
],
"extends": [
"stylelint-config-xo",
"stylelint-config-styled-components"
],
"rules": {
"font-family-name-quotes": null,
"font-weight-notation": null,
"declaration-colon-newline-after": null
}
}
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- "node"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Antoni Kepinski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const presets = [
['next/babel', {
'preset-env': {
targets: {
esmodules: true
},
corejs: 3,
useBuiltIns: 'usage'
}
}]
];

const plugins = [
['babel-plugin-styled-components', {
ssr: true,
pure: true
}]
];

module.exports = {presets, plugins};
11 changes: 11 additions & 0 deletions components/button-group.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import styled from 'styled-components';

const ButtonGroup = styled.div`
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
`;

export default ButtonGroup;
13 changes: 13 additions & 0 deletions components/container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import styled from 'styled-components';

const Container = styled.div`
display: flex;
flex-direction: column;
flex-wrap: wrap;
width: 100%;
margin: auto;
justify-content: center;
align-items: center;
`;

export default Container;
18 changes: 18 additions & 0 deletions components/description.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import styled from 'styled-components';

const Wrapper = styled.div`
text-align: center;
`;

const Text = styled.h2`
font-size: 1.3em;
`;

const Description = () => (
<Wrapper>
<Text>Modern Order Placement & Management System for Pizza Restaurants!</Text>
</Wrapper>
);

export default Description;
41 changes: 41 additions & 0 deletions components/docs-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import styled from 'styled-components';

import Vector from './vector';

const Button = styled.button`
border: none;
border-radius: 3px;
padding: 10px 12px;
margin: 10px;
width: 17em;
height: 3.5em;
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #fff;
background-color: #4263f7;
text-decoration: none;
user-select: none;
outline: none;
background-position: center;
transition: background 0.8s;
&:hover {
background: #637ef8 radial-gradient(circle, transparent 1%, #637ef8 1%) center/15000%;
}
&:active {
background-color: #113bf5;
background-size: 100%;
transition: background 0s;
}
`;

const DocsButton = () => (
<a href="https://docs.pizzaql.tech" target="_blank" rel="noopener noreferrer">
<Button><Vector src="/static/images/document.svg"/>Read the documentation</Button>
</a>
);

export default DocsButton;
41 changes: 41 additions & 0 deletions components/github-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import styled from 'styled-components';

import Vector from './vector';

const Button = styled.button`
border: none;
border-radius: 3px;
padding: 10px 12px;
margin: 10px;
width: 17em;
height: 3.5em;
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #fff;
background-color: #333;
text-decoration: none;
user-select: none;
outline: none;
background-position: center;
transition: background 0.8s;
&:hover {
background: #444 radial-gradient(circle, transparent 1%, #444 1%) center/15000%;
}
&:active {
background-color: #111;
background-size: 100%;
transition: background 0s;
}
`;

const GithubButton = () => (
<a href="https://github.com/pizzaql/pizzaql" target="_blank" rel="noopener noreferrer">
<Button><Vector src="/static/images/github.svg"/>Star the project on Github</Button>
</a>
);

export default GithubButton;
21 changes: 21 additions & 0 deletions components/logo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import styled from 'styled-components';
import breakpoint from 'styled-components-breakpoint';

const Img = styled.img`
${breakpoint('desktop')`
width: 30%;
height: 30%;
`}
${breakpoint('mobile')`
width: 75%;
height: 75%;
`}
`;

const Logo = () => (
<Img alt="Logo" importance="high" decoding="async" loading="eager" src="/static/images/logo.png" draggable={false}/>
);

export default Logo;
20 changes: 20 additions & 0 deletions components/vector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';

const Img = styled.img`
width: 18px;
height: 18px;
margin-right: 10px;
vertical-align: text-top;
`;

const Vector = ({src}) => (
<Img alt="icon" importance="low" decoding="async" loading="lazy" src={src} draggable={false}/>
);

Vector.propTypes = {
src: PropTypes.string.isRequired
};

export default Vector;
29 changes: 29 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const withOffline = require('next-offline');
const withCSS = require('@zeit/next-css');
const withFonts = require('next-fonts');

const nextConfig = {
workboxOpts: {
swDest: 'static/service-worker.js',
runtimeCaching: [
{
urlPattern: /^https?.*/,
handler: 'networkFirst',
options: {
cacheName: 'https-calls',
networkTimeoutSeconds: 15,
expiration: {
maxEntries: 150,
maxAgeSeconds: 30 * 24 * 60 * 60 // 1 month
},
cacheableResponse: {
statuses: [0, 200]
}
}
}
]
},
target: 'serverless'
};

module.exports = withCSS(withFonts(withOffline(nextConfig)));
28 changes: 28 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": 2,
"alias": ["pizzaql.tech"],
"routes": [
{
"src": "/",
"headers": {
"cache-control": "s-maxage=2628000, maxage=0",
"accept-encoding": "br"
}
},
{
"src": "^/service-worker.js$",
"dest": "/_next/static/service-worker.js",
"headers": {
"cache-control": "public, max-age=43200, immutable",
"Service-Worker-Allowed": "/"
}
}
],
"builds": [
{
"src": "next.config.js",
"use": "@now/next"
}
],
"regions": ["all"]
}
Loading

0 comments on commit f33578f

Please sign in to comment.