Skip to content

Commit

Permalink
added the project 16
Browse files Browse the repository at this point in the history
  • Loading branch information
Debshibraj123 committed Dec 19, 2023
1 parent 5da9dc5 commit ef1f66e
Show file tree
Hide file tree
Showing 8 changed files with 390 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ This repository contains a collection of frontend projects.Each project is built
<td>Currency Converter</td>
<td><a href="./project-15_currency_converter">Click Here</a></td>
</tr>
<tr>
<td>16</td>
<td>Currency Converter</td>
<td><a href="./project-16_pricing_component/>Click Here</a></td>
</tr>
</table>

## Installation 🚀
Expand Down
24 changes: 24 additions & 0 deletions project-16_pricing_component/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"use strict";

const toggleBtn = document.querySelector(".toggle-btn");
const toggleArea = document.querySelector(".toggle-area");
const basicPrice = document.querySelector(".price-1");
const profPrice = document.querySelector(".price-2");
const masterPrice = document.querySelector(".price-3");

toggleArea.addEventListener("click", function (e) {
e.preventDefault();
if (toggleArea.classList.contains("monthly")) {
toggleArea.classList.remove("monthly");
toggleArea.classList.add("anually");
basicPrice.innerHTML = `<p class="price-1"> <span class="dollar-sign">&dollar;</span>199.99</p>`;
profPrice.innerHTML = ` <p class="price-2"> <span class="dollar-sign">&dollar;</span>249.99</p>`;
masterPrice.innerHTML = ` <p class="price-3"> <span class="dollar-sign">&dollar;</span>399.99</p>`;
} else {
toggleArea.classList.add("monthly");
toggleArea.classList.remove("anually");
basicPrice.innerHTML = `<p class="price-1"> <span class="dollar-sign">&dollar;</span>19.99</p>`;
profPrice.innerHTML = ` <p class="price-2"> <span class="dollar-sign">&dollar;</span>24.99</p>`;
masterPrice.innerHTML = ` <p class="price-3"> <span class="dollar-sign">&dollar;</span>39.99</p>`;
}
});
1 change: 1 addition & 0 deletions project-16_pricing_component/images/bg-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions project-16_pricing_component/images/bg-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions project-16_pricing_component/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="description" content="Frontend Mentor - Pricing Component With Toggle">
<meta name="keywords" content="Pricing Component With Toggle, Frontend Mentor">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="stylesheet" href="styles.css">
<title>Pricing Component With Toggle</title>

</head>

<body>
<header>
<h1> Our Pricing</h1>
<nav>
<p>Annually</p>
<button class="toggle-area monthly">
<div class="toggle-btn"></div>
</button>
<p>Monthly</p>
</nav>
</header>
<main>
<section class="pricing-container">
<!-- Container 1 -->
<article class="pricing container-1">
<h2>Basic</h2>
<p class="price-1"><span class="dollar-sign">&dollar;</span>19.99</p>
<ul>
<hr>
<li> 500 GB Storage</li>
<hr>
<li> 2 Users Allowed</li>
<hr>
<li> Send up to 3 GB</li>
<hr>
</ul>
<button>Learn more</button>
</article>
<!-- Container 2 -->
<article class="pricing container-2">
<h2>Professional</h2>
<p class="price-2"> <span class="dollar-sign">&dollar;</span>24.99</p>
<ul>
<hr>
<li> 1 TB Storage</li>
<hr>
<li> 5 Users Allowed</li>
<hr>
<li> Send up to 10 GB</li>
<hr>
</ul>
<button>Learn more</button>
</article>
<!-- Container 3 -->
<article class="pricing container-3">
<h2>Master</h2>
<p class="price-3"><span class="dollar-sign">&dollar;</span>39.99</p>
<ul>
<hr>
<li> 2 TB Storage</li>
<hr>
<li>10 Users Allowed</li>
<hr>
<li> Send up to 20 GB</li>
<hr>
</ul>
<button>Learn more</button>
</article>
</section>
</main>

<script src="app.js"></script>

</body>

</html>
Loading

0 comments on commit ef1f66e

Please sign in to comment.