{"id":19267423,"url":"https://github.com/luzefiru/advice-generator-app","last_synced_at":"2025-08-18T21:15:33.910Z","repository":{"id":182980956,"uuid":"669417862","full_name":"Luzefiru/advice-generator-app","owner":"Luzefiru","description":"An app that uses the Advice Slip API for a Frontend Mentor challenge.","archived":false,"fork":false,"pushed_at":"2023-07-26T07:50:20.000Z","size":2069,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T12:13:00.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Luzefiru.png","metadata":{"files":{"readme":".github/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":"2023-07-22T07:58:01.000Z","updated_at":"2023-07-25T13:06:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"86d52a63-beb8-45c1-85d4-4c1a04928ee4","html_url":"https://github.com/Luzefiru/advice-generator-app","commit_stats":null,"previous_names":["luzefiru/advice-generator-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzefiru%2Fadvice-generator-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzefiru%2Fadvice-generator-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzefiru%2Fadvice-generator-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzefiru%2Fadvice-generator-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luzefiru","download_url":"https://codeload.github.com/Luzefiru/advice-generator-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240371808,"owners_count":19790888,"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-09T20:11:58.629Z","updated_at":"2025-02-23T19:42:04.643Z","avatar_url":"https://github.com/Luzefiru.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Advice generator app solution\n\nThis is a solution to the [Advice generator app challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/advice-generator-app-QdUG-13db). 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- [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- Generate a new piece of advice by clicking the dice icon\n\n### Screenshot\n\n![](./screenshot.png)\n\n### Links\n\n- Solution URL: [Frontend Mentor](https://www.frontendmentor.io/solutions/advice-generator-app-with-react-typescript-tailwindcss-AAocz9QUmF)\n- Live Site URL: [GitHub Pages](https://luzefiru.github.io/advice-generator-app/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- React\n- TypeScript\n- TailwindCSS\n- a11y\n- Mobile-first workflow\n- React Testing Library + `jest-dom`\n\n### What I learned\n\nI learned that components would naturally be slightly off-center when we make them `position: absolute` while their parents are `position: relative`.\n\nIn order to combat this, I realized that all I needed to do was add a `transform: translate(50%, 50%)` according to how I aligned it in order to position itself relative to its own size.\n\n```jsx\n\u003cdiv className=\"relative\"\u003e\n  \u003cbutton className=\"RandomizeButton absolute bottom-0 -translate-x-1/2 translate-y-1/2 left-1/2\" /\u003e\n\u003c/div\u003e\n```\n\nI also learned that I no longer need to do:\n\n```css\nhtml {\n  height: 100%;\n}\n\nbody {\n  min-height: 100%;\n}\n```\n\nI can instead simply do:\n\n```css\nbody {\n  min-height: 100vh;\n}\n```\n\nThanks to this resource [HTML vs Body: How to Set Width and Height for Full Page Size](https://www.freecodecamp.org/news/html-page-width-height/).\n\n## Author\n\n- Website - [Luzefiru](https://luzefiru.github.io/Portfolio/)\n- Frontend Mentor - [@Luzefiru](https://www.frontendmentor.io/profile/Luzefiru)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzefiru%2Fadvice-generator-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluzefiru%2Fadvice-generator-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzefiru%2Fadvice-generator-app/lists"}