├── public ├── robots.txt ├── favicon.ico ├── manifest.json └── index.html ├── src ├── stylesheets │ ├── App.css │ ├── Categories.css │ ├── AddBook.css │ ├── index.css │ ├── Navbar.css │ └── Books.css ├── redux │ ├── books │ │ ├── actionTypes.js │ │ └── books.js │ ├── categories │ │ └── categories.js │ └── configureStore.js ├── components │ ├── Navbar.js │ ├── Categories.js │ ├── Books.js │ ├── AddBook.js │ └── Book.js ├── BooksContainer.js └── index.js ├── images ├── bkstorecat.png └── bkstorehome.png ├── .babelrc ├── .stylelintrc.json ├── .gitignore ├── .eslintrc.json ├── MIT.md ├── .github └── workflows │ └── linters.yml ├── package.json └── README.md /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nemwel-Boniface/nemwelbookstore/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/stylesheets/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | margin: 0 5%; 3 | background-color: var(--pale-grey); 4 | } 5 | -------------------------------------------------------------------------------- /images/bkstorecat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nemwel-Boniface/nemwelbookstore/HEAD/images/bkstorecat.png -------------------------------------------------------------------------------- /images/bkstorehome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nemwel-Boniface/nemwelbookstore/HEAD/images/bkstorehome.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-react" 4 | ], 5 | "plugins": ["@babel/plugin-syntax-jsx"] 6 | } -------------------------------------------------------------------------------- /src/redux/books/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const ADDBOOK = 'addBook'; 2 | export const REMOVEBOOK = 'removeBook'; 3 | export const GETBOOK = 'getBook'; 4 | -------------------------------------------------------------------------------- /src/stylesheets/Categories.css: -------------------------------------------------------------------------------- 1 | .categories { 2 | text-align: center; 3 | margin: 40px; 4 | } 5 | 6 | .categories button { 7 | width: 300px; 8 | } 9 | -------------------------------------------------------------------------------- /src/stylesheets/AddBook.css: -------------------------------------------------------------------------------- 1 | 2 | /* Styling for the form */ 3 | .addnewbook { 4 | margin: 40px 4%; 5 | } 6 | 7 | .form input { 8 | width: 24%; 9 | padding: 10px; 10 | margin-right: 30px; 11 | } 12 | 13 | .form select { 14 | width: 25%; 15 | padding: 10px; 16 | margin-right: 30px; 17 | } 18 | 19 | .form button { 20 | width: 12%; 21 | } 22 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["stylelint-config-standard"], 3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"], 4 | "rules": { 5 | "at-rule-no-unknown": null, 6 | "scss/at-rule-no-unknown": true, 7 | "csstree/validator": true 8 | }, 9 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"] 10 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/redux/categories/categories.js: -------------------------------------------------------------------------------- 1 | const CHECKSTATUS = 'checkStatus'; 2 | 3 | const categoriesReducer = (state = [], action) => { 4 | switch (action.type) { 5 | case CHECKSTATUS: 6 | return [...state, 'Under construction']; 7 | default: 8 | return state; 9 | } 10 | }; 11 | 12 | export const checkStatus = (book) => ({ 13 | type: CHECKSTATUS, 14 | book, 15 | }); 16 | 17 | export default categoriesReducer; 18 | -------------------------------------------------------------------------------- /src/redux/configureStore.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware, combineReducers, createStore } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import booksReducer from './books/books'; 4 | import categoriesReducer from './categories/categories'; 5 | 6 | const mainReducer = combineReducers({ 7 | booksReducer, 8 | categoriesReducer, 9 | }); 10 | 11 | const store = createStore( 12 | mainReducer, 13 | applyMiddleware(thunk), 14 | ); 15 | 16 | export default store; 17 | -------------------------------------------------------------------------------- /src/components/Navbar.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | 4 | const Navbar = () => ( 5 |
6 |