diff --git a/Durham.html b/Durham.html new file mode 100644 index 0000000..a50806b --- /dev/null +++ b/Durham.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + Durham + + + + + + +
+

Durham

+
+ + + +
+
+
+

The Results are in!

+

The Top 5 Restaurants in Durham are:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RankRestaurantCuisineBest Seller
1Chicken HutSouthernFried Chicken Plate
2BocciPizzaNonnas Pizza
3NantucketAmerican FarePrime Rib Plate
4NzingasLike Mamma's HouseShrimp and Grits
5FostersModernGrit Bowl
+
+ +
+
+

Tell us about your favorite Durham restaurant

+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 7ed589e..0000000 --- a/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# AD - SBA - HTML/CSS/JavaScript - - - -### Description -* In this Skill-based Assessment, you will be creating a small website and you get to pick what is the website about. The main purpose of this SBA is to test your skills in implementing a clean HTML structure that follows the methodologies of visual design, and styling your site so that it is user-friendly. - -* You have the entire day for this SBA. Make sure to check in with your instructor for approval of your idea. Your work will be graded based on the below technical requirements. Also, creativity always works in your favor. - -* Since this is your first time creating a 3 page website, keep it simple. Keeping it simple is very important. It ensures that you can complete this project within the given time and also gives you a better idea of what can you get done in the given time if you were to do it again with more requirements. - -* Once you got your idea, think in the user’s perspective when creating the website.  You like your users to have a good experience when interacting with your site. This gives you a better chance of users trusting your site and coming back for more. For this SBA, don’t worry too much about the content. There are many places you can get free content to display on your site. Concentrate more on the web site's structure and grid system. - - -* Some resources for free content: - * Photos: `https://www.pexels.com/search/template/` - * Text: `https://www.lipsum.com/` - * GIFs: `https://www.motionelements.com/stock-image-10116013-business-and-startup-4k` - -* Useful API sites: - * https://rapidapi.com/ (Links to an external site.) - * https://any-api.com/ (Links to an external site.) - * https://github.com/toddmotto/public-apis#public-apis- (Links to an external site.) - * https://apilist.fun/ - -### Deliverable: -* A theme for your site that you feel comfortable with - * Complete all technical requirements for HTML, CSS, and Javascript - * Have markups of your pages - * Research for a public API that can provide you with content (Optional) - * Include a README file. The file should include technical specifications and description of your website. - * Host on GitHub, include the link to your GitHub account in the README file(optional) - * Submit the project in a ZIP file - - - - -## Technical requirements - -* HTML - * Have at least 3 pages, keep the grid system consistent as much as possible - * Use at least 10 different HTML tags - * Use HTML tables - * Implement at least two uses for forms - * Dropped Down Menu - * Use web fonts - * Use different types of content in the form of text, images, videos, and GIFs - * Use regex validation - -* CSS - * Inline, internal, and external styling - * Use five different CSS selectors - * Don’t use too many fonts - * Use colors that complement each other - * Use Flexbox (Optional) - * Use SASS/SCSS (Optional) - * Use animations (Optional) - -* Javascript - * External scripts - * Use variables, if statements, loops, at least one form of collections, functions/call back, and events - * Use AJAX (Optional) - * Use JSON or XML (Optional) - * Use JQuery (Optional) - - - -## How to Download - -#### Part 1 - Forking the Project -* To _fork_ the project, click the `Fork` button located at the top right of the project. - - -#### Part 2 - Navigating to _forked_ Repository -* Navigate to your github profile to find the _newly forked repository_. -* Copy the URL of the project to the clipboard. - -#### Part 3 - Cloning _forked_ repository -* Clone the repository from **your account** into the `~/dev` directory. - * if you do not have a `~/dev` directory, make one by executing the following command: - * * `mkdir ~/dev` - * navigate to the `~/dev` directory by executing the following command: - * * `cd ~/dev` - * clone the project by executing the following command: - * * `git clone https://github.com/${MYUSERNAME}/${NAMEOFPROJECT}` - - - - - - -## How to Submit - -#### Part 1 - _Pushing_ local changes to remote repository -* from a _terminal_ navigate to the root directory of the _cloned_ project. -* from the root directory of the project, execute the following commands: - * * add all changes - * * `git add .` - * * commit changes to be pushed - * * `git commit -m 'I have added changes'` - * * push changes to your repository - * * `git push -u origin master` - -#### Part 2 - Submitting assignment -* from the browser, navigate to the _forked_ project from **your** github account. -* click the `Pull Requests` tab. -* select `New Pull Request` diff --git a/README/README.md b/README/README.md new file mode 100644 index 0000000..42c4f05 --- /dev/null +++ b/README/README.md @@ -0,0 +1,44 @@ +# AD - SBA - HTML/CSS/JavaScript + +* Access my site by navigating to the following link: https://phillipkinney.github.io/sba.javascript_3-page-website/ + + +### Description +* I decided to design a 3 page website the allows a user to see the top 5 restartants, submit thier favorite restaurants, and search for the weekly deals at one of the top 5 restaurants in Raleigh or Durham, NC. + +## Technologies Used +*HTML +*CSS +*Bootstrap +*Java Script + +## Design Process +* I started by building a skeleton of the website using html and bootstrap elements. I then added in photos, tables, and made adjustments in CSS to bring the appearance more closely in line with what I wanted. + +* Once that was completed I added in the JavaScript element. I used JavaScript to add a search feature (see citation below) to my Raleigh and Durham pages that allows users to search for the weekly specials at the top 5 restaurants in each respective city. + +## Challenges +* I ran into an issue with one of the links on my homepage not working. I did some research on StackOverflow and learned that the issue could be due a
covering the link up. I checked my
's, and realized that this was the issue so I made the necessary adjustment. +* Implementing and troubleshooting the JavaScript ended up being pretty time consuming. I had trouble deciding what to feature to add. The search feature I decided to add worked initially, but stopped working after I made some adjustments to the code. I reverted elements that could have caused the error, but still could not get it back working properly. On the upside, I feel like I gained a much better understanding of the eventhandler and how it interacts with HTML through this process. + +# Citation +* Idea for the search feature came from the Mozilla Developer site. I adjusted the HTML and JavaSpript code where needed to fit my project. +https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Looping_code + + +### Deliverable: +* A theme for your site that you feel comfortable with + * Complete all technical requirements for HTML, CSS, and Javascript + * Have markups of your pages + * Research for a public API that can provide you with content (Optional) + * Include a README file. The file should include technical specifications and description of your website. + * Host on GitHub, include the link to your GitHub account in the README file(optional) + * Submit the project in a ZIP file + + + + + + + + diff --git a/Raleigh.html b/Raleigh.html new file mode 100644 index 0000000..cb232d8 --- /dev/null +++ b/Raleigh.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + +Raleigh + + + + + + +
+

Raleigh

+
+ + + +
+
+
+

The Results are in!

+

The Top 5 Restaurants in Raleigh are:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RankRestaurantCuisineBest Seller
1Che EmpanadasEmpenadasSweet Beef Empanadas
2Beasley's Chicken and WafflesSoutherChicken and Waffle Plate
3Nancy's PizzeriaPizzaChicago Style Pizza
4Taza GrillMediterraneanLamb Gyro
5Winston's GrillAmerican FareAngus Beef Burger
+
+ +
+
+

Tell us about your favorite Raleigh restaurant

+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+ + + +
+ + + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/Screenshot_2020-07-10 Durham.png b/Screenshot_2020-07-10 Durham.png new file mode 100644 index 0000000..cc6ea07 Binary files /dev/null and b/Screenshot_2020-07-10 Durham.png differ diff --git a/Screenshot_2020-07-10 Food and Drink.png b/Screenshot_2020-07-10 Food and Drink.png new file mode 100644 index 0000000..ce5a6fd Binary files /dev/null and b/Screenshot_2020-07-10 Food and Drink.png differ diff --git a/Screenshot_2020-07-10 Raleigh.png b/Screenshot_2020-07-10 Raleigh.png new file mode 100644 index 0000000..e6d2ed4 Binary files /dev/null and b/Screenshot_2020-07-10 Raleigh.png differ diff --git a/css/style.css b/css/style.css index d17d83a..171a4fa 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,5 @@ body { - background-color: navy; + background-color: white; } @@ -7,3 +7,37 @@ object { height: 100vh; width: 100vh; } + +#img{ + width: 400px; + height: 400px; + +} + +#rowMargin1{ + left:150px; + position: relative; +} + +#rowMargin2{ + left:50px; + position: relative; +} + +#form{ + width:500px; + left: 50px; + position: relative; +} + +#form2{ + width:500px; + left: 170px; + position: relative; + top: 50px; +} + +#search{ + left: 80px; + +} diff --git a/img/Canva - Clear Wine Glass With Red Wine.jpg b/img/Canva - Clear Wine Glass With Red Wine.jpg new file mode 100644 index 0000000..b20cecb Binary files /dev/null and b/img/Canva - Clear Wine Glass With Red Wine.jpg differ diff --git a/img/Canva - Fresh Pizza.jpg b/img/Canva - Fresh Pizza.jpg new file mode 100644 index 0000000..1a9b062 Binary files /dev/null and b/img/Canva - Fresh Pizza.jpg differ diff --git a/img/dtRal.jpg b/img/dtRal.jpg new file mode 100644 index 0000000..e766a5c Binary files /dev/null and b/img/dtRal.jpg differ diff --git a/index.html b/index.html index 4dc0c72..bc26249 100644 --- a/index.html +++ b/index.html @@ -12,12 +12,75 @@ - + +Food and Drink +
+

The Best Food and Drink Deals!

+
+ +
+
+ +
+
+ Fresh Pizza +
+

Raleigh

+

+

Click here to see Raleigh specials

+
Photo from Canva by Lee
+

+
+
+
+
+
+ Fresh Pizza +
+

Durham

+

+

Click here to see Durham specials

+
Photo from Canva by Engin Akyurt
+

+
+
+
+ + + +
+
+

Stay up to date on new specials

+
+
+
+
+
+ +
+

+
+
+ +
+
+
+ + + +
+
+ @@ -35,7 +98,7 @@ - The quickest of brown foxes. + @@ -45,6 +108,10 @@
+ + + +
diff --git a/js/Durham.js b/js/Durham.js new file mode 100644 index 0000000..d4dff54 --- /dev/null +++ b/js/Durham.js @@ -0,0 +1,28 @@ +const restaurants = ['Chicken Hut: BOGO chicken dinners after 5pm everyday', + 'Bocci: Free breadsticks with pizza purchase everyday before 6pm', + 'Nantucket: $10 off prime rib after 9pm every day', + 'Nzingas: BOGO shrimp and grits everyday from 11am-3pm', + 'Fosters: 50% entrees everyday 3pm-7pm' +]; +const deal = document.querySelector('#answerDiv2'); +const input = document.querySelector('input'); +const btn = document.querySelector('button'); + +btn.addEventListener('click', function(){ + let searchRest = input.value.toLowerCase(); + input.value=''; + input.focus(); + for (let rests = 0; rests < restaurants.length; rests++){ + let restDeal = restaurants[rests].split(':'); + if(restDeal[0].toLowerCase() === searchRest){ + deal.textContent = restDeal[0] + '\'s deal for the week is' + restDeal[1] + '.'; + break; + } else { + deal.textContent = 'Restaurant not in top 5'; + } + + + } + + +}); \ No newline at end of file diff --git a/js/Raleigh.js b/js/Raleigh.js new file mode 100644 index 0000000..054d48b --- /dev/null +++ b/js/Raleigh.js @@ -0,0 +1,28 @@ +const restaurants = ['Che Empanadas: BOGO empanadas after 5pm everyday', + 'Beasley\'s Chicken and Waffles: Free Mac n Cheese everyday before 6pm', + 'Nancy\'s Pizzeria: $10 off stuffed pizza after 9pm every day', + 'Taza Grill: BOGO Lamb Gyro everyday from 11am-3pm', + 'Winston\'s Grill: 50% entrees everyday 3pm-7pm' +]; +const deal = document.querySelector('#answerDiv'); +const input = document.querySelector('input'); +const btn = document.querySelector('button'); + +btn.addEventListener('click', function(){ + let searchRest = input.value.toLowerCase(); + input.value=' '; + input.focus(); + for (let rests = 0; rests < restaurants.length; rests++){ + let restDeal = restaurants[rests].split(':'); + if(restDeal[0].toLocaleLowerCase() === searchRest){ + deal.textContent = restDeal[0] + '\'s deal for the week is' + restDeal[1] + '.'; + break; + } else { + deal.textContent = 'Restaurant not in top 5'; + } + + + } + + +}); \ No newline at end of file