{"id":18060232,"url":"https://github.com/buzzcosm/splash-page-vanilla-js-app","last_synced_at":"2026-05-18T19:46:28.472Z","repository":{"id":259117987,"uuid":"875879364","full_name":"buzzcosm/splash-page-vanilla-js-app","owner":"buzzcosm","description":"ZTM Cours (javaScript Web Projects) - No. 18: Splash Page (Figma Design)","archived":false,"fork":false,"pushed_at":"2024-10-21T21:08:37.000Z","size":1729,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T23:35:02.827Z","etag":null,"topics":["figma","html-css-javascript","memory-leak","vanilla-js","ztm","ztm-course-exercises"],"latest_commit_sha":null,"homepage":"https://buzzcosm.github.io/splash-page-vanilla-js-app/","language":"CSS","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/buzzcosm.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":"2024-10-21T02:55:42.000Z","updated_at":"2024-10-21T21:11:45.000Z","dependencies_parsed_at":"2024-10-22T22:42:59.014Z","dependency_job_id":null,"html_url":"https://github.com/buzzcosm/splash-page-vanilla-js-app","commit_stats":null,"previous_names":["buzzcosm/splash-page-vanilla-js-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buzzcosm%2Fsplash-page-vanilla-js-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buzzcosm%2Fsplash-page-vanilla-js-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buzzcosm%2Fsplash-page-vanilla-js-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buzzcosm%2Fsplash-page-vanilla-js-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buzzcosm","download_url":"https://codeload.github.com/buzzcosm/splash-page-vanilla-js-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332596,"owners_count":20921854,"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":["figma","html-css-javascript","memory-leak","vanilla-js","ztm","ztm-course-exercises"],"created_at":"2024-10-31T04:06:36.212Z","updated_at":"2026-05-18T19:46:23.434Z","avatar_url":"https://github.com/buzzcosm.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Splash Page\n\nExercise Project of `ZTM` Cours on Udemy ([JavaScript Web Projects: 20 Projects to Build Your Portfolio](https://www.udemy.com/course/javascript-web-projects-to-build-your-portfolio-resume)).\n\n## Description\n\nProgrammed in vanilla-js. Working with Figma design.\n\n\u003e Great algorithm for switching the background!\n\n```js\nfunction changeBackground(number) {\n  // Check if background is already showing\n  let previousBackground;\n  if (body.className) {\n    previousBackground = body.className;\n  }\n  // Reset CSS class for body\n  body.className = '';\n  switch (number) {\n    case '1':\n      return (previousBackground === 'background-1') ? false : body.classList.add('background-1');\n    case '2':\n      return (previousBackground === 'background-2') ? false : body.classList.add('background-2');\n    case '3':\n      return (previousBackground === 'background-3') ? false : body.classList.add('background-3');\n    default:\n      break;\n  }\n}\n```\n\n## Interesting things\n\n- [Medium (Article) - Memory leaks in JavaScript](https://medium.com/@lelianto.eko/memory-leaks-in-javascript-and-how-to-prevent-them-96a69de65c31)\n- [snyk | learn - Memory leaks](https://learn.snyk.io/lesson/memory-leaks/)\n\n## Useful references\n\n- [Figma - Overview for Developer](https://www.figma.com/best-practices/tips-on-developer-handoff/)\n- [Heropatterns - Background Generator](https://heropatterns.com/)\n- [uiGradients - Background Generator](https://uigradients.com/#Mystic)\n- [W3Schools - JavaScript Switch Statement](https://www.w3schools.com/js/js_switch.asp)\n- [Mozilla - Conditional (ternary) operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuzzcosm%2Fsplash-page-vanilla-js-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuzzcosm%2Fsplash-page-vanilla-js-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuzzcosm%2Fsplash-page-vanilla-js-app/lists"}