Loading repository data…
Loading repository data…
badripaudel77 / repository
(For Mentorship Program for new comers in the company) This repository contains codes implemented during mentorship program at Infinite Nepal (https://www.infinite.com). This was to guide new comers before they're assigned to the projects helping them understand in web programming, especially, in JavaScript along with HTML and CSS.
For DEMO, refer to the following link which contains different screenshots of implemented scenarios of application.
cd backendnpm installnpm run dev
This should run backend server on specified PORT 3000.Complete user re-direction on login/logout Class Work:
- Validate User Login Form on our existing "post manager application", try to meet the following criteria whenever possible:
- You must create a re-usable function with minimal duplication
- Feel free to use the HTML structure (element for displaying error message / login loader) of your choice but make sure you validate correctly.
- Disallow multiple submission if no-response has been received from the server while doing login to the app
- To display the error messages/warnings/ login progresses, you MUST use the same function and your function should be able to handle all scenarios less duplication.
- Make function as less coupled as possible.
- Use proper selector (you may vary type of selectors as much as possible) while referencing on DOM
This will be your "Main Assignment" for Web Programming (Front End Only -> JS/CSS/HTML):
On our existing "Posts Manager" Project, implement following scenarios:
For Each Post Received From the backend server, attach an Icon (use some library like fontawesome or your own custom Icon, eg: ➕ icon) and attach an event listener.
When clicked on the that icon(Note: Only add ICON to the regular posts and not on the saved post item), make an API call to out server to fetch the details of the item (HINT: body of the JSON field).
Show some loading or indicator until the response is back from the server (This should expand the section where content will eventually be placed). When response arrives from the server, display the body (remember, as of now, we're only using title to display) content on a some view (HTML element).
When you render the content, the ICON should change to some collapse Indicator Icon (eg: ➖ ) and clicking on it should hide the area where content was rendered.
When expanding multiple times, make sure you shouldn't make multiple API calls if data has been already fetched until and unless it is a page refresh. Manage the state of data as mentioned in this point.
Try to implement relevant scenario if you choose to implement in your own way, it should be justifiable. Handle other cases during implementation based on needs.
https://developer.mozilla.org (Official documentation) - https://developer.mozilla.org/en-US/docs/Web/HTML (HTML) - https://developer.mozilla.org/en-US/docs/Web/CSS - https://developer.mozilla.org/en-US/docs/Web/JavaScript (Javascript)
https://www.w3schools.com/Js/ (Good for individual HTML, CSS, JS concepts)
NodeJS and Redis: https://redis.io/docs/latest/develop/connect/clients/nodejs/