From 13723755d4b2d049478ca40453e1e29f6e53f4a2 Mon Sep 17 00:00:00 2001 From: marleyrae Date: Sun, 28 May 2023 18:45:05 -0700 Subject: [PATCH] :truck: chore: Move relevant starter files to main directory --- .../{starter/README-template.md => README.md} | 67 ++++++++++++------ .../{starter => }/images/favicon-32x32.png | Bin .../{starter => }/images/icon-cart.svg | 0 .../images/image-product-desktop.jpg | Bin .../images/image-product-mobile.jpg | Bin product-preview-card-component/index.html | 46 +++++++++--- product-preview-card-component/src/counter.ts | 9 --- product-preview-card-component/src/main.ts | 24 ------- .../starter/README.md | 2 +- .../starter/index.html | 39 ---------- 10 files changed, 82 insertions(+), 105 deletions(-) rename product-preview-card-component/{starter/README-template.md => README.md} (55%) rename product-preview-card-component/{starter => }/images/favicon-32x32.png (100%) rename product-preview-card-component/{starter => }/images/icon-cart.svg (100%) rename product-preview-card-component/{starter => }/images/image-product-desktop.jpg (100%) rename product-preview-card-component/{starter => }/images/image-product-mobile.jpg (100%) delete mode 100644 product-preview-card-component/src/counter.ts delete mode 100644 product-preview-card-component/starter/index.html diff --git a/product-preview-card-component/starter/README-template.md b/product-preview-card-component/README.md similarity index 55% rename from product-preview-card-component/starter/README-template.md rename to product-preview-card-component/README.md index 754dfe2..b33d097 100644 --- a/product-preview-card-component/starter/README-template.md +++ b/product-preview-card-component/README.md @@ -1,18 +1,20 @@ # Frontend Mentor - Product preview card component solution -This is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa). Frontend Mentor challenges help you improve your coding skills by building realistic projects. +This is a solution to +the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa). +Frontend Mentor challenges help you improve your coding skills by building realistic projects. ## Table of contents - [Overview](#overview) - - [The challenge](#the-challenge) - - [Screenshot](#screenshot) - - [Links](#links) + - [The challenge](#the-challenge) + - [Screenshot](#screenshot) + - [Links](#links) - [My process](#my-process) - - [Built with](#built-with) - - [What I learned](#what-i-learned) - - [Continued development](#continued-development) - - [Useful resources](#useful-resources) + - [Built with](#built-with) + - [What I learned](#what-i-learned) + - [Continued development](#continued-development) + - [Useful resources](#useful-resources) - [Author](#author) - [Acknowledgments](#acknowledgments) @@ -31,13 +33,19 @@ Users should be able to: ![](./screenshot.jpg) -Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your project, right-click the page and select "Take a Screenshot". You can choose either a full-height screenshot or a cropped one based on how long the page is. If it's very long, it might be best to crop it. +Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your +project, right-click the page and select "Take a Screenshot". You can choose either a full-height +screenshot or a cropped one based on how long the page is. If it's very long, it might be best to +crop it. -Alternatively, you can use a tool like [FireShot](https://getfireshot.com/) to take the screenshot. FireShot has a free option, so you don't need to purchase it. +Alternatively, you can use a tool like [FireShot](https://getfireshot.com/) to take the screenshot. +FireShot has a free option, so you don't need to purchase it. -Then crop/optimize/edit your image however you like, add it to your project, and update the file path in the image above. +Then crop/optimize/edit your image however you like, add it to your project, and update the file +path in the image above. -**Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to add a screenshot, feel free to remove this entire section.** +**Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to +add a screenshot, feel free to remove this entire section.** ### Links @@ -61,40 +69,52 @@ Then crop/optimize/edit your image however you like, add it to your project, and ### What I learned -Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge. +Use this section to recap over some of your major learnings while working through this project. +Writing these out and providing code samples of areas you want to highlight is a great way to +reinforce your own knowledge. To see how you can add code snippets, see below: ```html

Some HTML code I'm proud of

``` + ```css .proud-of-this-css { - color: papayawhip; + color: papayawhip; } ``` + ```js const proudOfThisFunc = () => { console.log('🎉') } ``` -If you want more help with writing markdown, we'd recommend checking out [The Markdown Guide](https://www.markdownguide.org/) to learn more. +If you want more help with writing markdown, we'd recommend checking +out [The Markdown Guide](https://www.markdownguide.org/) to learn more. **Note: Delete this note and the content within this section and replace with your own learnings.** ### Continued development -Use this section to outline areas that you want to continue focusing on in future projects. These could be concepts you're still not completely comfortable with or techniques you found useful that you want to refine and perfect. +Use this section to outline areas that you want to continue focusing on in future projects. These +could be concepts you're still not completely comfortable with or techniques you found useful that +you want to refine and perfect. -**Note: Delete this note and the content within this section and replace with your own plans for continued development.** +**Note: Delete this note and the content within this section and replace with your own plans for +continued development.** ### Useful resources -- [Example resource 1](https://www.example.com) - This helped me for XYZ reason. I really liked this pattern and will use it going forward. -- [Example resource 2](https://www.example.com) - This is an amazing article which helped me finally understand XYZ. I'd recommend it to anyone still learning this concept. +- [Example resource 1](https://www.example.com) - This helped me for XYZ reason. I really liked this + pattern and will use it going forward. +- [Example resource 2](https://www.example.com) - This is an amazing article which helped me finally + understand XYZ. I'd recommend it to anyone still learning this concept. -**Note: Delete this note and replace the list above with resources that helped you during the challenge. These could come in handy for anyone viewing your solution or for yourself when you look back on this project in the future.** +**Note: Delete this note and replace the list above with resources that helped you during the +challenge. These could come in handy for anyone viewing your solution or for yourself when you look +back on this project in the future.** ## Author @@ -106,6 +126,9 @@ Use this section to outline areas that you want to continue focusing on in futur ## Acknowledgments -This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you worked in a team or got some inspiration from someone else's solution. This is the perfect place to give them some credit. +This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you +worked in a team or got some inspiration from someone else's solution. This is the perfect place to +give them some credit. -**Note: Delete this note and edit this section's content as necessary. If you completed this challenge by yourself, feel free to delete this section entirely.** +**Note: Delete this note and edit this section's content as necessary. If you completed this +challenge by yourself, feel free to delete this section entirely.** diff --git a/product-preview-card-component/starter/images/favicon-32x32.png b/product-preview-card-component/images/favicon-32x32.png similarity index 100% rename from product-preview-card-component/starter/images/favicon-32x32.png rename to product-preview-card-component/images/favicon-32x32.png diff --git a/product-preview-card-component/starter/images/icon-cart.svg b/product-preview-card-component/images/icon-cart.svg similarity index 100% rename from product-preview-card-component/starter/images/icon-cart.svg rename to product-preview-card-component/images/icon-cart.svg diff --git a/product-preview-card-component/starter/images/image-product-desktop.jpg b/product-preview-card-component/images/image-product-desktop.jpg similarity index 100% rename from product-preview-card-component/starter/images/image-product-desktop.jpg rename to product-preview-card-component/images/image-product-desktop.jpg diff --git a/product-preview-card-component/starter/images/image-product-mobile.jpg b/product-preview-card-component/images/image-product-mobile.jpg similarity index 100% rename from product-preview-card-component/starter/images/image-product-mobile.jpg rename to product-preview-card-component/images/image-product-mobile.jpg diff --git a/product-preview-card-component/index.html b/product-preview-card-component/index.html index f86e483..029b44e 100644 --- a/product-preview-card-component/index.html +++ b/product-preview-card-component/index.html @@ -1,13 +1,39 @@ - - - - - Vite + TS - - -
- - + + + + + + + + Frontend Mentor | Product preview card component + + + + + + +Preview + +Gabrielle Essence Eau De Parfum + +A floral, solar and voluptuous interpretation composed by Olivier Polge, +Perfumer-Creator for the House of CHANEL. + +$149.99 +$169.99 + +Add to Cart + +
+ Challenge by Frontend + Mentor. + Coded by Your Name Here. +
+ diff --git a/product-preview-card-component/src/counter.ts b/product-preview-card-component/src/counter.ts deleted file mode 100644 index 09e5afd..0000000 --- a/product-preview-card-component/src/counter.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function setupCounter(element: HTMLButtonElement) { - let counter = 0 - const setCounter = (count: number) => { - counter = count - element.innerHTML = `count is ${counter}` - } - element.addEventListener('click', () => setCounter(counter + 1)) - setCounter(0) -} diff --git a/product-preview-card-component/src/main.ts b/product-preview-card-component/src/main.ts index 791547b..e69de29 100644 --- a/product-preview-card-component/src/main.ts +++ b/product-preview-card-component/src/main.ts @@ -1,24 +0,0 @@ -import './style.css' -import typescriptLogo from './typescript.svg' -import viteLogo from '/vite.svg' -import { setupCounter } from './counter.ts' - -document.querySelector('#app')!.innerHTML = ` -
- - - - - - -

Vite + TypeScript

-
- -
-

- Click on the Vite and TypeScript logos to learn more -

-
-` - -setupCounter(document.querySelector('#counter')!) diff --git a/product-preview-card-component/starter/README.md b/product-preview-card-component/starter/README.md index 163f8be..0d082a3 100644 --- a/product-preview-card-component/starter/README.md +++ b/product-preview-card-component/starter/README.md @@ -77,7 +77,7 @@ providers. [Read more about our recommended and trusted hosts](https://medium.co ## Create a custom `README.md` We strongly recommend overwriting this `README.md` with a custom one. We've provided a template -inside the [`README-template.md`](README-template.md) file in this starter code. +inside the [`README-template.md`](../README.md) file in this starter code. The template provides a guide for what to add. A custom `README` will help you explain your project and reflect on your learnings. Please feel free to edit our template as much as you like. diff --git a/product-preview-card-component/starter/index.html b/product-preview-card-component/starter/index.html deleted file mode 100644 index 029b44e..0000000 --- a/product-preview-card-component/starter/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - Frontend Mentor | Product preview card component - - - - - - -Preview - -Gabrielle Essence Eau De Parfum - -A floral, solar and voluptuous interpretation composed by Olivier Polge, -Perfumer-Creator for the House of CHANEL. - -$149.99 -$169.99 - -Add to Cart - -
- Challenge by Frontend - Mentor. - Coded by Your Name Here. -
- -