Giter Site home page Giter Site logo

canteenmenu's Introduction

NISER Canteen Menu

  This is a static site built to show the menu of NISER Canteen.

Previously it was not fixed and the canteen owners used to fill a google form. There was a google sheet linked to that. The frontend used to request google for that sheet in csv format, parsed the content and showed the canteen accordingly. That was a very interesting and clever implementation to make a static site somewhat behave like a dynamic site. (the previous js file has not been deleted and can be found at js/script_old.js).

Now the canteen menu has been fixed by NISER authorities. So, the canteen owners no longer need to fill any google form, the content of everyday is predetermined. So the frontend just needs to show the content of the day. The menu is stored in a javascript object. The frontend just needs to parse the object and show the content accordingly.

How to Update Menu

In future if the menu changes due to some reason, any layman can update the menu just by editing the js/menu.js file. No technical knowledge is essential.

  0 to 6 in menu.js maps to 1 to 7 in the PDF. For example, the menu you put in menu.js at 0 should be marked as 1 in the PDF. The everyday menu in the PDF should be put into 7 in menu.js.

  After doing all this, u have to email Prof. Subhankar Mishra for further instructions for hosting the site.

How it works:   The JavaScript code displays the 7 as Default Item. Then it takes the array according to the day, joins the elements with a comma-space (', '), and displays it in the special items section.

canteenmenu's People

Contributors

peithonking avatar smlab-niser avatar

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.