Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foton front end challenge - Completed #23

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
95f3301
chore: initial commit
adilsonmandlate Sep 30, 2021
cdc966d
initial commit
adilsonmandlate Sep 30, 2021
a12e746
initial commit
adilsonmandlate Sep 30, 2021
49add97
chore: lint commit messages
adilsonmandlate Sep 30, 2021
3f51449
chore: add editor and prettier config files
adilsonmandlate Sep 30, 2021
c91e7d3
chore: add editor and prettier config files
adilsonmandlate Sep 30, 2021
8c319bf
chore: lint commit messages husky and commitlint
adilsonmandlate Sep 30, 2021
d8737c8
chore: add initial project packages
adilsonmandlate Sep 30, 2021
c364fc4
chore: move source code to src folder
adilsonmandlate Sep 30, 2021
e3b709d
style: add SF Pro display font
adilsonmandlate Sep 30, 2021
74352d4
chore: install tailwind
adilsonmandlate Sep 30, 2021
947e50e
chore: configure and add app colors
adilsonmandlate Sep 30, 2021
7199b7c
chore: add custom document file
adilsonmandlate Sep 30, 2021
8f1a3b8
chore: remove unnecessary files
adilsonmandlate Sep 30, 2021
95c5b89
chore: add baseurl compiler optin
adilsonmandlate Oct 1, 2021
6036eb7
style: change background color
adilsonmandlate Oct 1, 2021
82ccd34
feat: add navbar icons
adilsonmandlate Oct 1, 2021
f8ae046
feat: create and use navbar in main page
adilsonmandlate Oct 1, 2021
c3fc9b0
style: add black as color list
adilsonmandlate Oct 1, 2021
765341d
feat: create initial style for input
adilsonmandlate Oct 1, 2021
557f991
style: add cloud color
adilsonmandlate Oct 4, 2021
928d60c
chore: add svg images
adilsonmandlate Oct 4, 2021
5cb2b3a
style(Input): add background; border radius
adilsonmandlate Oct 4, 2021
d13adf0
feat: create sections components
adilsonmandlate Oct 4, 2021
1069359
feat: create greetings component
adilsonmandlate Oct 4, 2021
9e3a120
style: fix colors definition
adilsonmandlate Oct 5, 2021
b6c2ebc
chore: add helper images
adilsonmandlate Oct 5, 2021
804ab8b
chore: rename cards components
adilsonmandlate Oct 5, 2021
5185cd4
chore: add export card components file
adilsonmandlate Oct 5, 2021
aef1230
style: change from margin to padding
adilsonmandlate Oct 5, 2021
47188bd
feat: add cards sections component
adilsonmandlate Oct 5, 2021
e3a788e
feat: create book list and details components
adilsonmandlate Oct 5, 2021
1956bc6
feat: add images used in app
adilsonmandlate Oct 7, 2021
46d276f
chore: add google domain to allowed images domain
adilsonmandlate Oct 7, 2021
ab2e7b7
chore: add swiper and swr libraries
adilsonmandlate Oct 7, 2021
2a2f342
style: add missing colors
adilsonmandlate Oct 7, 2021
876df25
feat: add card components
adilsonmandlate Oct 7, 2021
4059237
feat: add hooks for fecthed books
adilsonmandlate Oct 7, 2021
c6179db
chore: remove gobal padding
adilsonmandlate Oct 7, 2021
5d17c29
feat: add loading status
adilsonmandlate Oct 7, 2021
95afd09
feat: create book page
adilsonmandlate Oct 7, 2021
5d71fc4
style: add utility swipper styles
adilsonmandlate Oct 7, 2021
3dbc54e
feat: create utility functions
adilsonmandlate Oct 7, 2021
1676161
chore: change url file
adilsonmandlate Oct 7, 2021
17d95c1
chore: remove unused files
adilsonmandlate Oct 7, 2021
c326e83
feat: add load more button
adilsonmandlate Oct 7, 2021
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"env": {
"browser": true,
"es2020": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"next",
"next/core-web-vitals",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:@next/next/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": ["react", "react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off"
}
}
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# 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
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run pre-commit
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"src/**/*.+(js|json|ts|tsx)": ["eslint"],
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": ["prettier --write"]
}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Remove svg files
*.svg
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": true,
"singleQuote": false
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ Use React or React Native depending on the rule you are running for.
Use the [Google Books](https://developers.google.com/books/docs/v1/using)' API to recover the data that will be shown on the app.

```js
const query = 'harry potter';
const query = "harry potter";
fetch(`https://www.googleapis.com/books/v1/volumes?q=${query}`);
```

**NOTE:** You can use the form of calling apis of your choice (Fetch, Axios, etc).
**NOTE:** You can use the form of calling apis of your choice (Fetch, Axios, etc).

## Design/Screens

https://www.figma.com/file/KFElqzD983WNyvMY1SaF0c/book-app?node-id=0%3A1

<img width="581" alt="Screen Shot 2021-04-13 at 10 19 47" src="https://user-images.githubusercontent.com/13947203/114559257-eb55ad00-9c41-11eb-9617-4e7627cc373e.png">


The website design has 3 screens, which are:

### Home
Expand All @@ -32,7 +32,7 @@ The website design has 3 screens, which are:

### Search

In this screen the functionalities below are **mandatory**:
In this screen, the functionalities below are **mandatory**:

1. See a list of books based on search query;
2. Make it possible to search for more books with a "Load more" button;
Expand All @@ -41,6 +41,6 @@ In this screen the functionalities below are **mandatory**:

### Books details

In this screen the functionalities below are **mandatory**:
In this screen, the functionalities below are **mandatory**:

1. See all information for the selected book.
21 changes: 21 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
[
"ci",
"chore",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
],
],
},
};
5 changes: 5 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"baseUrl": "./src"
}
}
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
reactStrictMode: true,
images: {
domains: ["books.google.com"],
},
};
Loading