🚚 chore: Move relevant starter files to main directory

This commit is contained in:
marleyrae 2023-05-28 18:45:05 -07:00
parent e644f54839
commit 13723755d4
10 changed files with 82 additions and 105 deletions

View file

@ -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
<h1>Some HTML code I'm proud of</h1>
```
```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.**

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -1,13 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<title>Frontend Mentor | Product preview card component</title>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
</style>
</head>
<body>
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
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend
Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
</div>
</body>
</html>

View file

@ -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)
}

View file

@ -1,24 +0,0 @@
import './style.css'
import typescriptLogo from './typescript.svg'
import viteLogo from '/vite.svg'
import { setupCounter } from './counter.ts'
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
</a>
<a href="https://www.typescriptlang.org/" target="_blank">
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
</a>
<h1>Vite + TypeScript</h1>
<div class="card">
<button id="counter" type="button"></button>
</div>
<p class="read-the-docs">
Click on the Vite and TypeScript logos to learn more
</p>
</div>
`
setupCounter(document.querySelector<HTMLButtonElement>('#counter')!)

View file

@ -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.

View file

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<title>Frontend Mentor | Product preview card component</title>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
</style>
</head>
<body>
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
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend
Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
</div>
</body>
</html>