diff --git a/base.code-workspace b/base.code-workspace index 876a149..e023534 100644 --- a/base.code-workspace +++ b/base.code-workspace @@ -2,6 +2,9 @@ "folders": [ { "path": "." + }, + { + "path": "projects/FrontendMentor/junior/advice-generator-app" } ], "settings": {} diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/README-orig.md b/projects/FrontendMentor/newbie/product-preview-card-component/README-orig.md new file mode 100644 index 0000000..7f11de5 --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/README-orig.md @@ -0,0 +1,92 @@ +# Frontend Mentor - Product preview card component + +![Design preview for the Product preview card component coding challenge](./design/desktop-preview.jpg) + +## Welcome! 👋 + +Thanks for checking out this front-end coding challenge. + +[Frontend Mentor](https://www.frontendmentor.io) challenges help you improve your coding skills by building realistic projects. + +**To do this challenge, you need a basic understanding of HTML and CSS.** + +## The challenge + +Your challenge is to build out this product preview card component and get it looking as close to the design as possible. + +You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go. + +Your users should be able to: + +- View the optimal layout depending on their device's screen size +- See hover and focus states for interactive elements + +Want some support on the challenge? [Join our Slack community](https://www.frontendmentor.io/slack) and ask questions in the **#help** channel. + +## Where to find everything + +Your task is to build out the project to the designs inside the `/design` folder. You will find both a mobile and a desktop version of the design. + +The designs are in JPG static format. Using JPGs will mean that you'll need to use your best judgment for styles such as `font-size`, `padding` and `margin`. + +If you would like the design files (we provide Sketch & Figma versions) to inspect the design in more detail, you can [subscribe as a PRO member](https://www.frontendmentor.io/pro). + +You will find all the required assets in the `/images` folder. The assets are already optimized. + +There is also a `style-guide.md` file containing the information you'll need, such as color palette and fonts. + +## Building your project + +Feel free to use any workflow that you feel comfortable with. Below is a suggested process, but do not feel like you need to follow these steps: + +1. Initialize your project as a public repository on [GitHub](https://github.com/). Creating a repo will make it easier to share your code with the community if you need help. If you're not sure how to do this, [have a read-through of this Try Git resource](https://try.github.io/). +2. Configure your repository to publish your code to a web address. This will also be useful if you need some help during a challenge as you can share the URL for your project with your repo URL. There are a number of ways to do this, and we provide some recommendations below. +3. Look through the designs to start planning out how you'll tackle the project. This step is crucial to help you think ahead for CSS classes to create reusable styles. +4. Before adding any styles, structure your content with HTML. Writing your HTML first can help focus your attention on creating well-structured content. +5. Write out the base styles for your project, including general content styles, such as `font-family` and `font-size`. +6. Start adding styles to the top of the page and work down. Only move on to the next section once you're happy you've completed the area you're working on. + +## Deploying your project + +As mentioned above, there are many ways to host your project for free. Our recommend hosts are: + +- [GitHub Pages](https://pages.github.com/) +- [Vercel](https://vercel.com/) +- [Netlify](https://www.netlify.com/) + +You can host your site using one of these solutions or any of our other trusted providers. [Read more about our recommended and trusted hosts](https://medium.com/frontend-mentor/frontend-mentor-trusted-hosting-providers-bf000dfebe). + +## 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. + +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. + +Once you've added your information to the template, delete this file and rename the `README-template.md` file to `README.md`. That will make it show up as your repository's README file. + +## Submitting your solution + +Submit your solution on the platform for the rest of the community to see. Follow our ["Complete guide to submitting solutions"](https://medium.com/frontend-mentor/a-complete-guide-to-submitting-solutions-on-frontend-mentor-ac6384162248) for tips on how to do this. + +Remember, if you're looking for feedback on your solution, be sure to ask questions when submitting it. The more specific and detailed you are with your questions, the higher the chance you'll get valuable feedback from the community. + +## Sharing your solution + +There are multiple places you can share your solution: + +1. Share your solution page in the **#finished-projects** channel of the [Slack community](https://www.frontendmentor.io/slack). +2. Tweet [@frontendmentor](https://twitter.com/frontendmentor) and mention **@frontendmentor**, including the repo and live URLs in the tweet. We'd love to take a look at what you've built and help share it around. +3. Share your solution on other social channels like LinkedIn. +4. Blog about your experience building your project. Writing about your workflow, technical choices, and talking through your code is a brilliant way to reinforce what you've learned. Great platforms to write on are [dev.to](https://dev.to/), [Hashnode](https://hashnode.com/), and [CodeNewbie](https://community.codenewbie.org/). + +We provide templates to help you share your solution once you've submitted it on the platform. Please do edit them and include specific questions when you're looking for feedback. + +The more specific you are with your questions the more likely it is that another member of the community will give you feedback. + +## Got feedback for us? + +We love receiving feedback! We're always looking to improve our challenges and our platform. So if you have anything you'd like to mention, please email hi[at]frontendmentor[dot]io. + +This challenge is completely free. Please share it with anyone who will find it useful for practice. + +**Have fun building!** 🚀 diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/README-template.md b/projects/FrontendMentor/newbie/product-preview-card-component/README-template.md deleted file mode 100644 index 754dfe2..0000000 --- a/projects/FrontendMentor/newbie/product-preview-card-component/README-template.md +++ /dev/null @@ -1,111 +0,0 @@ -# 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. - -## Table of contents - -- [Overview](#overview) - - [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) -- [Author](#author) -- [Acknowledgments](#acknowledgments) - -**Note: Delete this note and update the table of contents based on what sections you keep.** - -## Overview - -### The challenge - -Users should be able to: - -- View the optimal layout depending on their device's screen size -- See hover and focus states for interactive elements - -### Screenshot - -![](./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. - -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. - -**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 - -- Solution URL: [Add solution URL here](https://your-solution-url.com) -- Live Site URL: [Add live site URL here](https://your-live-site-url.com) - -## My process - -### Built with - -- Semantic HTML5 markup -- CSS custom properties -- Flexbox -- CSS Grid -- Mobile-first workflow -- [React](https://reactjs.org/) - JS library -- [Next.js](https://nextjs.org/) - React framework -- [Styled Components](https://styled-components.com/) - For styles - -**Note: These are just examples. Delete this note and replace the list above with your own choices** - -### 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. - -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; -} -``` -```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. - -**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. - -**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. - -**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 - -- Website - [Add your name here](https://www.your-site.com) -- Frontend Mentor - [@yourusername](https://www.frontendmentor.io/profile/yourusername) -- Twitter - [@yourusername](https://www.twitter.com/yourusername) - -**Note: Delete this note and add/remove/edit lines above based on what links you'd like to share.** - -## 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. - -**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/projects/FrontendMentor/newbie/product-preview-card-component/README.md b/projects/FrontendMentor/newbie/product-preview-card-component/README.md index 7f11de5..f56895f 100644 --- a/projects/FrontendMentor/newbie/product-preview-card-component/README.md +++ b/projects/FrontendMentor/newbie/product-preview-card-component/README.md @@ -1,92 +1,64 @@ -# Frontend Mentor - Product preview card component +# Frontend Mentor - Product preview card component solution -![Design preview for the Product preview card component coding challenge](./design/desktop-preview.jpg) +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. -## Welcome! 👋 +## Table of contents -Thanks for checking out this front-end coding challenge. +- [Frontend Mentor - Product preview card component solution](#frontend-mentor---product-preview-card-component-solution) + - [Table of contents](#table-of-contents) + - [Overview](#overview) + - [The challenge](#the-challenge) + - [Screenshot](#screenshot) + - [Links](#links) + - [My process](#my-process) + - [Built with](#built-with) + - [Author](#author) + - [Acknowledgments](#acknowledgments) -[Frontend Mentor](https://www.frontendmentor.io) challenges help you improve your coding skills by building realistic projects. +**Note: Delete this note and update the table of contents based on what sections you keep.** -**To do this challenge, you need a basic understanding of HTML and CSS.** +## Overview -## The challenge +### The challenge -Your challenge is to build out this product preview card component and get it looking as close to the design as possible. - -You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go. - -Your users should be able to: +Users should be able to: - View the optimal layout depending on their device's screen size - See hover and focus states for interactive elements -Want some support on the challenge? [Join our Slack community](https://www.frontendmentor.io/slack) and ask questions in the **#help** channel. +### Screenshot -## Where to find everything +![Mobile](screenshots/mobile.png) +![Mobile Dark](screenshots/mobile-dark.png) +![Desktop](screenshots/desktop.png) +![Desktop Dark](screenshots/desktop-dark.png) -Your task is to build out the project to the designs inside the `/design` folder. You will find both a mobile and a desktop version of the design. +### Links -The designs are in JPG static format. Using JPGs will mean that you'll need to use your best judgment for styles such as `font-size`, `padding` and `margin`. +- Solution URL: [Github](https://github.com/tarasis/tarasis.github.io/tree/main/projects/FrontendMentor/newbie/product-preview-card-component) +- Live Site URL: [tarasis.github.io](http://tarasis.github.io/FrontendMentor/newbie/product-preview-card-component) -If you would like the design files (we provide Sketch & Figma versions) to inspect the design in more detail, you can [subscribe as a PRO member](https://www.frontendmentor.io/pro). +## My process -You will find all the required assets in the `/images` folder. The assets are already optimized. +Standard for me so far. Set up CSS properties for most things. +Then I built the mobile version of the page. +Made minor changes for the desktop version. +Added a Light/Dark switcher, just to show updating the variables to change the colors. -There is also a `style-guide.md` file containing the information you'll need, such as color palette and fonts. +### Built with -## Building your project +- Semantic HTML5 markup +- CSS custom properties +- Flexbox (for some alignment) +- CSS Grid (just for putting in the middle of the page) +- Mobile-first workflow -Feel free to use any workflow that you feel comfortable with. Below is a suggested process, but do not feel like you need to follow these steps: +## Author -1. Initialize your project as a public repository on [GitHub](https://github.com/). Creating a repo will make it easier to share your code with the community if you need help. If you're not sure how to do this, [have a read-through of this Try Git resource](https://try.github.io/). -2. Configure your repository to publish your code to a web address. This will also be useful if you need some help during a challenge as you can share the URL for your project with your repo URL. There are a number of ways to do this, and we provide some recommendations below. -3. Look through the designs to start planning out how you'll tackle the project. This step is crucial to help you think ahead for CSS classes to create reusable styles. -4. Before adding any styles, structure your content with HTML. Writing your HTML first can help focus your attention on creating well-structured content. -5. Write out the base styles for your project, including general content styles, such as `font-family` and `font-size`. -6. Start adding styles to the top of the page and work down. Only move on to the next section once you're happy you've completed the area you're working on. +- Website - [Robert McGovern](https://tarasis.net) +- Frontend Mentor - [@tarasis](https://www.frontendmentor.io/profile/tarasis) +- Twitter - [@tarasis](https://www.twitter.com/tarasis) -## Deploying your project +## Acknowledgments -As mentioned above, there are many ways to host your project for free. Our recommend hosts are: - -- [GitHub Pages](https://pages.github.com/) -- [Vercel](https://vercel.com/) -- [Netlify](https://www.netlify.com/) - -You can host your site using one of these solutions or any of our other trusted providers. [Read more about our recommended and trusted hosts](https://medium.com/frontend-mentor/frontend-mentor-trusted-hosting-providers-bf000dfebe). - -## 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. - -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. - -Once you've added your information to the template, delete this file and rename the `README-template.md` file to `README.md`. That will make it show up as your repository's README file. - -## Submitting your solution - -Submit your solution on the platform for the rest of the community to see. Follow our ["Complete guide to submitting solutions"](https://medium.com/frontend-mentor/a-complete-guide-to-submitting-solutions-on-frontend-mentor-ac6384162248) for tips on how to do this. - -Remember, if you're looking for feedback on your solution, be sure to ask questions when submitting it. The more specific and detailed you are with your questions, the higher the chance you'll get valuable feedback from the community. - -## Sharing your solution - -There are multiple places you can share your solution: - -1. Share your solution page in the **#finished-projects** channel of the [Slack community](https://www.frontendmentor.io/slack). -2. Tweet [@frontendmentor](https://twitter.com/frontendmentor) and mention **@frontendmentor**, including the repo and live URLs in the tweet. We'd love to take a look at what you've built and help share it around. -3. Share your solution on other social channels like LinkedIn. -4. Blog about your experience building your project. Writing about your workflow, technical choices, and talking through your code is a brilliant way to reinforce what you've learned. Great platforms to write on are [dev.to](https://dev.to/), [Hashnode](https://hashnode.com/), and [CodeNewbie](https://community.codenewbie.org/). - -We provide templates to help you share your solution once you've submitted it on the platform. Please do edit them and include specific questions when you're looking for feedback. - -The more specific you are with your questions the more likely it is that another member of the community will give you feedback. - -## Got feedback for us? - -We love receiving feedback! We're always looking to improve our challenges and our platform. So if you have anything you'd like to mention, please email hi[at]frontendmentor[dot]io. - -This challenge is completely free. Please share it with anyone who will find it useful for practice. - -**Have fun building!** 🚀 +Two articles gave me the setup for the Light / Dark switcher I've set up. The first by [Musthaq Ahamad](https://medium.com/@haxzie/dark-and-light-theme-switcher-using-css-variables-and-pure-javascript-zocada-dd0059d72fa2) gave the JavaScript, but I didn't want to have it as a sliding button and with using a class for dark mode. For handling that I used ideas from [Luke Lowrey's](https://lukelowrey.com/css-variable-theme-switcher/) implementation, using data attributes. \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/css/style.css b/projects/FrontendMentor/newbie/product-preview-card-component/css/style.css new file mode 100644 index 0000000..f938f43 --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/css/style.css @@ -0,0 +1,314 @@ +/* + * design sizing + * Desktop: 1440x800 + * Mobile: 375x667 + */ + +*, +::before, +::after { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +:root { + /* Colors */ + /*I know style guide says dark cyan, but come on its dark green) */ + --col-primary-dark-green: hsl(158, 36%, 37%); + --col-primary-darker-green: #1a4032; + --col-primary-cream: hsl(30, 38%, 92%); + + --col-neutral-very-dark-blue: hsl(212, 21%, 14%); + --col-neutral-dark-grayish-blue: hsl(228, 12%, 48%); + --col-neutral-white: hsl(0, 0%, 100%); + + --col-page-background: var(--col-primary-cream); + --col-card-background: var(--col-neutral-white); + --col-button-text: var(--col-neutral-white); + --col-button-background: var(--col-primary-dark-green); + --col-button-background-hover: var(--col-primary-darker-green); + --col-product-name: var(--col-neutral-very-dark-blue); + --col-product-description: var(--col-neutral-dark-grayish-blue); + --col-category-name: var(--col-neutral-dark-grayish-blue); + --col-price-current: var(--col-primary-dark-green); + --col-price-old: var(--col-neutral-dark-grayish-blue); + + /* Typography */ + --ff-category: "Montserrat", sans-serif; + --ff-product-name: "Fraunces", serif; + --ff-product-description: "Montserrat", sans-serif; + --ff-price-current: "Fraunces", serif; + --ff-price-old: "Montserrat", sans-serif; + --ff-button: "Montserrat", sans-serif; + + --fs-category-name: 0.75rem; + --lh-category-name: 0.9375rem; + --ls-category-name: 5px; + --fw-category-name: 500; + + --fs-product-name: 2rem; + --lh-product-name: 2rem; + --fw-product-name: 700; + + --fs-product-description: 0.875rem; + --lh-product-description: 1.4375rem; + --fw-product-description: 500; + + --fs-price-current: 2rem; + --lh-price-current: 2rem; + --fw-price-current: 700; + + --fs-price-old: 0.8125rem; + --lh-price-old: 1.4375rem; + --fw-price-old: 500; + + --fs-button: 0.875rem; + --lh-button: 1.0625rem; + --fw-button: 700; + + /* Styling */ + --border-radius-card: 0.625rem; + --border-radius-button: 0.5rem; + /* Positioning */ + --padding-product-details: 1.5rem; + + --width-product-card: 21.4375rem; /* 343px mobile */ + + --margin-bottom-product-card__details: 1.5rem; + --margin-bottom-product-card__category: 0.75rem; + --margin-bottom-product-card__name: 1rem; + --margin-bottom-product-card__description: 1.5rem; + --margin-bottom-product-card__price-block: 1.25rem; + + /* Other */ + --img-desktop: url(images/image-product-desktop.jpg); + --img-mobile: url(images/image-product-mobile.jpg); + --image-filter: none; +} + +body { + min-height: 100vh; + + display: grid; + place-content: center; + + background-color: var(--col-page-background); +} + +.product-card { + border-radius: var(--border-radius-card); + background-color: var(--col-card-background); + + max-width: var(--width-product-card); +} +.product-card__image img { + border-radius: var(--border-radius-card) var(--border-radius-card) 0 0; + width: 100%; + filter: var(--image-filter); + /* filter: saturate(1.3); */ +} +.product-card__details { + padding: var(--padding-product-details); +} +.product-card__category { + font-family: var(--ff-category); + font-size: var(--fs-category-name); + line-height: var(--lh-category-name); + font-weight: var(--fw-category-name); + letter-spacing: var(--ls-category-name); + + text-transform: uppercase; + + color: var(--col-category-name); + + margin-bottom: var(--margin-bottom-product-card__category); +} +.product-card__name { + font-family: var(--ff-product-name); + font-size: var(--fs-product-name); + line-height: var(--lh-product-name); + font-weight: var(--fw-product-name); + + color: var(--col-product-name); + + margin-bottom: var(--margin-bottom-product-card__name); +} +.product-card__description { + font-family: var(--ff-product-description); + font-size: var(--fs-product-description); + line-height: var(--lh-product-description); + font-weight: var(--fw-product-description); + + color: var(--col-product-description); + + margin-bottom: var(--margin-bottom-product-card__description); +} +.product-card__price-block { + display: flex; + gap: 1.1875rem; + align-items: center; + + margin-bottom: var(--margin-bottom-product-card__price-block); +} +.product-card__price-current { + font-family: var(--ff-price-current); + font-size: var(--fs-price-current); + line-height: var(--lh-price-current); + font-weight: var(--fw-price-current); + + color: var(--col-price-current); +} +.product-card__price-old { + font-family: var(--ff-price-old); + font-size: var(--fs-price-old); + line-height: var(--lh-price-old); + font-weight: var(--fw-price-old); + + text-decoration: line-through; + + color: var(--col-price-old); +} +.product-card__button-buy { + font-family: var(--ff-button); + font-size: var(--fs-button); + line-height: var(--lh-button); + font-weight: var(--fw-button); + + color: var(--col-button-text); + background-color: var(--col-button-background); + + border-radius: var(--border-radius-button); + + display: inline-flex; + justify-content: center; + gap: 0.75rem; + + outline: none; + border: none; + padding: 0.9375rem 0; + width: 100%; +} + +.product-card__button-buy:has(:focus, :hover) { + background-color: var(--col-button-background-hover); +} + +@media screen and (min-width: 1000px) { + :root { + --padding-product-details: 2rem 2rem 1.875rem 2rem; + --width-product-card: 37.5rem; + + --margin-bottom-product-card__details: 0; + --margin-bottom-product-card__category: 1.25rem; + --margin-bottom-product-card__name: 1.5rem; + --margin-bottom-product-card__description: 1.8125rem; + --margin-bottom-product-card__description: 1.875rem; + } + + .product-card { + display: flex; + } + + .product-card__image img { + border-radius: var(--border-radius-card) 0 0 var(--border-radius-card); + width: 18.75rem; + margin-bottom: unset; + height: 100%; + } + + .product-card__button-buy { + padding: 0.9375rem 0; + } +} + +/* For Light / Dark button */ + +/* Update styling for checkbox */ +html[data-theme="theme-dark"] { + --col-light-yellow: rgb(201, 175, 103); + --col-other-yellow: rgb(210, 169, 4); + --col-page-background: var(--col-neutral-very-dark-blue); + --col-card-background: rgb(97, 83, 83); + --col-button-text: rgb(40, 4, 4); + /* --col-button-background: rgb(48, 166, 48); */ + --col-button-background: rgb(48, 166, 48); + + --col-button-background-hover: rgba(7, 225, 7, 0.828); + --col-product-name: var(--col-other-yellow); + --col-product-description: var(--col-light-yellow); + --col-category-name: var(--col-light-yellow); + --col-price-current: var(--col-other-yellow); + --col-price-old: var(--col-light-yellow); + --image-filter: saturate(1.6); +} + +.switch { + position: absolute; + display: inline-block; + width: 40px; + height: 40px; + + top: 10px; + right: 10px; + + z-index: 30; +} + +/* Hide default HTML checkbox */ +.switch input { + display: none; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: white; + -webkit-transition: 0.4s; + transition: 0.4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 40px; + width: 40px; + left: 0px; + bottom: 4px; + top: 0; + bottom: 0; + margin: auto 0; + -webkit-transition: 0.4s; + transition: 0.4s; + box-shadow: 0 0px 15px #2020203d; + background-image: url("../images/bs-moon-stars-fill.svg"); + background-repeat: no-repeat; + background-position: center; +} + +/* input:checked + .slider { + background-color: #2196f3; +} + +input:focus + .slider { + box-shadow: 0 0 1px #2196f3; +} */ + +input:checked + .slider:before { + color: green; + background-image: url("../images/bs-sun-fill.svg"); + background-repeat: no-repeat; + background-position: center; +} + +.slider.round { + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; +} diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars-fill.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars-fill.svg new file mode 100644 index 0000000..d2e1d6e --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars-fill.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars.svg new file mode 100644 index 0000000..b25ef86 --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-moon-stars.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun-fill.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun-fill.svg new file mode 100644 index 0000000..cc1a60e --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun.svg new file mode 100644 index 0000000..c311208 --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/bs-sun.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/icon-cart.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/icon-cart.svg index 307ea61..8d03f59 100644 --- a/projects/FrontendMentor/newbie/product-preview-card-component/images/icon-cart.svg +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/icon-cart.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/moon.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/moon.svg new file mode 100644 index 0000000..53af9ac --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/moon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/images/sun.svg b/projects/FrontendMentor/newbie/product-preview-card-component/images/sun.svg new file mode 100644 index 0000000..03c166f --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/images/sun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/index.html b/projects/FrontendMentor/newbie/product-preview-card-component/index.html index c6c5f03..dc5e609 100644 --- a/projects/FrontendMentor/newbie/product-preview-card-component/index.html +++ b/projects/FrontendMentor/newbie/product-preview-card-component/index.html @@ -1,36 +1,89 @@ + - - + + - + + + + + + + + Frontend Mentor | Product preview card component + + - Preview +
- Gabrielle Essence Eau De Parfum +
+ + + + +
+

+ perfume +

+ +

+ 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 +
+
- A floral, solar and voluptuous interpretation composed by Olivier Polge, - Perfumer-Creator for the House of CHANEL. + +
+
+
- $149.99 - $169.99 + + \ No newline at end of file diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/js/script.js b/projects/FrontendMentor/newbie/product-preview-card-component/js/script.js new file mode 100644 index 0000000..2a41f57 --- /dev/null +++ b/projects/FrontendMentor/newbie/product-preview-card-component/js/script.js @@ -0,0 +1,28 @@ +const toggle = document.getElementById("theme-toggle"); +toggle.addEventListener("click", toggleTheme); + +// function to set a given theme/color-scheme +function setTheme(themeName) { + localStorage.setItem("theme", themeName); + document.documentElement.setAttribute("data-theme", themeName); +} + +// function to toggle between light and dark theme +function toggleTheme() { + if (localStorage.getItem("theme") === "theme-dark") { + setTheme("theme-light"); + } else { + setTheme("theme-dark"); + } +} + +// Immediately invoked function to set the theme on initial load +(function () { + if (localStorage.getItem("theme") === "theme-dark") { + setTheme("theme-dark"); + document.getElementById("theme-toggle").checked = false; + } else { + setTheme("theme-light"); + document.getElementById("theme-toggle").checked = true; + } +})(); diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop-dark.png b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop-dark.png new file mode 100644 index 0000000..e4bab75 Binary files /dev/null and b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop-dark.png differ diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop.png b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop.png new file mode 100644 index 0000000..fd14cdb Binary files /dev/null and b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop.png differ diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile-dark.png b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile-dark.png new file mode 100644 index 0000000..858b3c0 Binary files /dev/null and b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile-dark.png differ diff --git a/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile.png b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile.png new file mode 100644 index 0000000..85d8c35 Binary files /dev/null and b/projects/FrontendMentor/newbie/product-preview-card-component/screenshots/mobile.png differ diff --git a/projects/devchallenges/my-team-page/README.md b/projects/devchallenges/my-team-page/README.md new file mode 100644 index 0000000..de1c042 --- /dev/null +++ b/projects/devchallenges/my-team-page/README.md @@ -0,0 +1,75 @@ + + +

{Your project name}

+ +
+ Solution for a challenge from Devchallenges.io. +
+ +
+

+ + Demo + + | + + Solution + + | + + Challenge + +

+
+ + + +## Table of Contents + +- [Overview](#overview) + - [Built With](#built-with) +- [Features](#features) +- [Contact](#contact) +- [Acknowledgements](#acknowledgements) + + + +## Overview + +![screenshot](https://user-images.githubusercontent.com/16707738/92399059-5716eb00-f132-11ea-8b14-bcacdc8ec97b.png) + +Introduce your projects by taking a screenshot or a gif. Try to tell visitors a story about your project by answering: + +- Where can I see your demo? +- What was your experience? +- What have you learned/improved? +- Your wisdom? :) + +### Built With + + + +- [React](https://reactjs.org/) +- [Vue.js](https://vuejs.org/) +- [Tailwind](https://tailwindcss.com/) + +## Features + + + +This application/site was created as a submission to a [DevChallenges](https://devchallenges.io/challenges) challenge. The [challenge](https://devchallenges.io/challenges/hhmesazsqgKXrTkYkt0U) was to build an application to complete the given user stories. + + +## Acknowledgements + + + +- [Steps to replicate a design with only HTML and CSS](https://devchallenges-blogs.web.app/how-to-replicate-design/) +- [Node.js](https://nodejs.org/) +- [Marked - a markdown parser](https://github.com/chjj/marked) + +## Contact + +- Website [your-website.com](https://{your-web-site-link}) +- GitHub [@your-username](https://{github.com/your-usermame}) +- Twitter [@your-twitter](https://{twitter.com/your-username}) diff --git a/projects/devchallenges/my-team-page/devchallenges.png b/projects/devchallenges/my-team-page/devchallenges.png new file mode 100644 index 0000000..cea8c2d Binary files /dev/null and b/projects/devchallenges/my-team-page/devchallenges.png differ diff --git a/projects/devchallenges/my-team-page/index.html b/projects/devchallenges/my-team-page/index.html new file mode 100644 index 0000000..b989f6b --- /dev/null +++ b/projects/devchallenges/my-team-page/index.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + Devchallenges + + + + +
+
+

+ Welcome to + devchallenges.io +

+ +

+ If you have any questions, don't hesitate to ask on Discord. Here are + 7 general steps to complete the challenge: +

+
+ + +
+ + diff --git a/projects/devchallenges/my-team-page/photo1.png b/projects/devchallenges/my-team-page/photo1.png new file mode 100644 index 0000000..78052df Binary files /dev/null and b/projects/devchallenges/my-team-page/photo1.png differ diff --git a/projects/devchallenges/my-team-page/photo2.png b/projects/devchallenges/my-team-page/photo2.png new file mode 100644 index 0000000..e8dfdbf Binary files /dev/null and b/projects/devchallenges/my-team-page/photo2.png differ diff --git a/projects/devchallenges/my-team-page/photo3.png b/projects/devchallenges/my-team-page/photo3.png new file mode 100644 index 0000000..1496b63 Binary files /dev/null and b/projects/devchallenges/my-team-page/photo3.png differ diff --git a/projects/devchallenges/my-team-page/photo4.png b/projects/devchallenges/my-team-page/photo4.png new file mode 100644 index 0000000..0397490 Binary files /dev/null and b/projects/devchallenges/my-team-page/photo4.png differ diff --git a/projects/devchallenges/my-team-page/photo5.png b/projects/devchallenges/my-team-page/photo5.png new file mode 100644 index 0000000..a7e7d38 Binary files /dev/null and b/projects/devchallenges/my-team-page/photo5.png differ diff --git a/projects/devchallenges/my-team-page/photo6.png b/projects/devchallenges/my-team-page/photo6.png new file mode 100644 index 0000000..0286292 Binary files /dev/null and b/projects/devchallenges/my-team-page/photo6.png differ diff --git a/src/_data/webprojects.json b/src/_data/webprojects.json index 413baab..231f381 100644 --- a/src/_data/webprojects.json +++ b/src/_data/webprojects.json @@ -29,6 +29,18 @@ "title": "Newbie", "cssClass": "frontEndMentorChallenges", "challenges": [ + { + "title": "Product Preview Card Component", + "url": "/FrontendMentor/newbie/product-preview-card-component/", + "description": "", + "techUsed": [ + "html5", + "css3", + "js" + ], + "screenshotURL": "/FrontendMentor/newbie/product-preview-card-component/screenshots/desktop.png", + "screenshotAltText": "Product Preview Card Component Challenge from FrontendMentor" + }, { "title": "QR Code Component", "url": "/FrontendMentor/newbie/qr-code-component/", diff --git a/src/svgs/bs-moon-stars-fill.svg b/src/svgs/bs-moon-stars-fill.svg new file mode 100644 index 0000000..d2e1d6e --- /dev/null +++ b/src/svgs/bs-moon-stars-fill.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/svgs/bs-moon-stars.svg b/src/svgs/bs-moon-stars.svg new file mode 100644 index 0000000..b25ef86 --- /dev/null +++ b/src/svgs/bs-moon-stars.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/svgs/bs-sun-fill.svg b/src/svgs/bs-sun-fill.svg new file mode 100644 index 0000000..cc1a60e --- /dev/null +++ b/src/svgs/bs-sun-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/svgs/bs-sun.svg b/src/svgs/bs-sun.svg new file mode 100644 index 0000000..c311208 --- /dev/null +++ b/src/svgs/bs-sun.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/svgs/moon-solid.svg b/src/svgs/moon-solid.svg new file mode 100644 index 0000000..3c2e85b --- /dev/null +++ b/src/svgs/moon-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svgs/moon.svg b/src/svgs/moon.svg new file mode 100644 index 0000000..53af9ac --- /dev/null +++ b/src/svgs/moon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svgs/sun-solid.svg b/src/svgs/sun-solid.svg new file mode 100644 index 0000000..3d5b9b3 --- /dev/null +++ b/src/svgs/sun-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svgs/sun.svg b/src/svgs/sun.svg new file mode 100644 index 0000000..03c166f --- /dev/null +++ b/src/svgs/sun.svg @@ -0,0 +1 @@ + \ No newline at end of file