diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0c0cd30 --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2022, Free Ebook Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 0c83cde..382f6b9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Getting Started with Create React App +# Free Programming Books Search This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). diff --git a/package.json b/package.json index 9e76091..82f7e33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "homepage": "https://4dylanregan.github.io/myapp", - "name": "my-app", + "homepage": "https://ebookfoundation.github.io/free-programming-books-search/", + "name": "fpb_search_page", "version": "0.1.0", "private": true, "dependencies": { diff --git a/public/index.html b/public/index.html index aa069f2..2f74be0 100644 --- a/public/index.html +++ b/public/index.html @@ -2,14 +2,12 @@ - - - React App + FPB Search diff --git a/public/manifest.json b/public/manifest.json index 080d6c7..653f095 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "FPB Search", + "name": "Free Programming Books Search", "icons": [ { "src": "favicon.ico", diff --git a/src/App.js b/src/App.js index d14fb19..2df2c03 100644 --- a/src/App.js +++ b/src/App.js @@ -5,7 +5,7 @@ import SearchResult from "./components/SearchResult"; import axios from "axios"; import Fuse from "fuse.js"; -const fpb = require("./fpb.json"); //local copy of json becuase online currently can't be accessed +const fpb = null; // eslint-disable-next-line function makeBook(author, hLang, cLang, title, url) { @@ -27,7 +27,8 @@ function forEachBook(func, json) { throw "ERROR in forEachBook: parameter not a fucntion"; } - for (const hLang in json) { //for each human language + for (const hLang in json) { + //for each human language if (Array.isArray(hLang.sections)) { //check if sections is an array hLang.sections.forEach(