Giter Site home page Giter Site logo

surhud004 / foodish_js Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 222.21 MB

A JavaScript version of Foodish API to GET a random picture of food dishes.

Home Page: https://foodish-js.netlify.app/

License: MIT License

JavaScript 87.18% HTML 12.02% CSS 0.80%
food pictures random foodish foodish-api javascript

foodish_js's Introduction

๐Ÿฒ Foodish.js ๐Ÿ› Website Netlify Status Contributions Welcome

Logo

A JavaScript version of the Foodish API to GET a random picture of food dishes.

Demo

Visit https://foodish-js.netlify.app/

Installation

Step 1

Include the JS scripts in the <head> tag of the HTML -

<script src="https://foodish-js.netlify.app/js/images.js"></script>
<script src="https://foodish-js.netlify.app/js/foodish.js"></script>

Step 2

Add an <img> with id='foodish' to the HTML -

<img id="foodish" alt="foodish" />

Step 3

Add a <script> in the <body> and get a random Foodish with getFoodish() -

<script type="text/javascript">
  getFoodish("random");
</script>

or get a random Foodish from food category -

<script type="text/javascript">
  getFoodish(foodCategory);
</script>

Please visit the demo website to view the list of available food categories.

Example

To get a random burger -

<html>
  <head>
    <script src="https://foodish-js.netlify.app/js/images.js"></script>
    <script src="https://foodish-js.netlify.app/js/foodish.js"></script>
  </head>
  <body>
    <img id="foodish" alt="foodish" />
    <script type="text/javascript">
      getFoodish("burger");
    </script>
  </body>
</html>

Usage

  • You are designing a restaurant website and you want to add random food pictures as placeholders.
  • You are creating a guess the food dish game.
  • You are ordering a pizza but you just want a random choice, visit https://foodish-js.netlify.app/?foodish=pizza because that's fun! Didn't like the pizza? Just hit refresh!
  • You just like to see food pictures (visual hunger) because you eat with your eyes first.
Please note that I do not own any of the Foodish dataset images. All Foodish images and their ownership belong to their original creators.

Support

Please create a new issue for support and issues.

Contributing

Please read the CONTRIBUTING for details on adding images to the Foodish Database.

License

The project is licensed under MIT. Please read the LICENSE for details.


Foodish.js is maintained by surhud004.

foodish_js's People

Contributors

surhud004 avatar

Watchers

 avatar

Forkers

sha-shak

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.