{"id":21906200,"url":"https://github.com/jkellerman/tip-calculator-app-main","last_synced_at":"2025-10-04T10:53:34.729Z","repository":{"id":109616675,"uuid":"459299909","full_name":"jkellerman/tip-calculator-app-main","owner":"jkellerman","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-25T20:02:54.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T07:41:39.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkellerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-14T19:36:01.000Z","updated_at":"2022-02-14T19:36:46.000Z","dependencies_parsed_at":"2023-04-27T04:45:38.819Z","dependency_job_id":null,"html_url":"https://github.com/jkellerman/tip-calculator-app-main","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkellerman%2Ftip-calculator-app-main","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkellerman%2Ftip-calculator-app-main/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkellerman%2Ftip-calculator-app-main/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkellerman%2Ftip-calculator-app-main/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkellerman","download_url":"https://codeload.github.com/jkellerman/tip-calculator-app-main/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244920261,"owners_count":20531985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T16:42:46.969Z","updated_at":"2025-10-04T10:53:29.698Z","avatar_url":"https://github.com/jkellerman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Tip calculator app solution\n\nThis is a solution to the [Tip calculator app challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/tip-calculator-app-ugJNGbJUX). Frontend Mentor challenges help you improve your coding skills by building realistic projects.\n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- View the optimal layout for the app depending on their device's screen size\n- See hover states for all interactive elements on the page\n- Calculate the correct tip and total cost of the bill per person\n\n### Screenshot\n\n![screenshot](images/screenshot1.png)\n![screenshot](images/screenshot2.png)\n![screenshot](images/screenshot3.png)\n![screenshot](images/screenshot4.png)\n\n### Links\n\n- Solution URL: [Solution](https://github.com/jkellerman/tip-calculator-app-main)\n- Live Site URL: [Live Site](https://jkellerman.github.io/tip-calculator-app-main/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n- Mobile-first workflow\n- ES6 JavaScript\n\n### What I learned\n\nOne of the key things I learned from this task was how to get a string from an element and convert it to a float or integer.\n\nI also learned how to set a maximum amount of characters into an input field using JS. See snippet below.\n\n```js\nfunction limit(element) {\n  let max_chars = 8;\n  if (element.value.length \u003e max_chars) {\n    element.value = element.value.substring(0, max_chars);\n  }\n}\n```\n\n### Continued development\n\nCreate a normal calculator\n\n### Useful resources\n\n- [Stack Overflow](https://stackoverflow.com/questions/9841363/how-to-restrict-number-of-characters-that-can-be-entered-in-html5-number-input-f) - This helped me use JS to limit the amount of characters that can be entered into an input field.\n- [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat) - This helped me understand how to convert a string into a float.\n\n## Author\n\n- Frontend Mentor - [@jkellerman](https://www.frontendmentor.io/profile/jkellerman)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkellerman%2Ftip-calculator-app-main","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkellerman%2Ftip-calculator-app-main","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkellerman%2Ftip-calculator-app-main/lists"}