Skip to content

Commit

Permalink
Merge pull request #14 from Jagpreet153/main
Browse files Browse the repository at this point in the history
feat: styled navbar and made responsive added current tab feature
  • Loading branch information
Prayas248 authored Mar 25, 2024
2 parents 658858f + 855b8f8 commit 9eafadb
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 48 deletions.
3 changes: 3 additions & 0 deletions Unit Converter/CSS/Currency.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cur{
background-color: grey;
}
7 changes: 4 additions & 3 deletions Unit Converter/CSS/length.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
body {
margin: 0;
body{
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}
Expand All @@ -14,7 +13,9 @@ body {
background-size: cover;
background-position: center;
}

.len{
background-color: grey;
}
.containment {
display: flex;
flex-direction: column;
Expand Down
3 changes: 3 additions & 0 deletions Unit Converter/CSS/temperature.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.temp{
background-color: grey;
}
3 changes: 3 additions & 0 deletions Unit Converter/CSS/volume.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vol{
background-color: grey;
}
3 changes: 3 additions & 0 deletions Unit Converter/CSS/weight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wei{
background-color: grey;
}
25 changes: 23 additions & 2 deletions Unit Converter/HTML/currency.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,30 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Currency</title>
<link rel="stylesheet" href="../styles.css">
<link rel="stylesheet" href="../CSS/Currency.css">
</head>
<body>


<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="../HTML/currency.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a href="./length.html">Length</a></li>
<li><a href="./weight.html">Weight</a></li>
<li><a href="./volume.html">Volume</a></li>
<li><a class="cur" href="./currency.html">Currency</a></li>
<li><a href="./temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="../index.html">Unit Convertor</a></li>
<li class="hideOnMobile"><a href="./length.html">Length</a></li>
<li class="hideOnMobile"><a href="./weight.html">Weight</a></li>
<li class="hideOnMobile"><a href="./volume.html">Volume</a></li>
<li class="hideOnMobile cur"><a href="./currency.html">Currency</a></li>
<li class="hideOnMobile"><a href="./temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>

<p id="desc">This is a simple unit converter.</p>

Expand Down Expand Up @@ -42,6 +63,6 @@
</div>

</form>

<script src="../script.js"></script>
</body>
</html>
25 changes: 24 additions & 1 deletion Unit Converter/HTML/length.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,30 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Length</title>
<link rel="stylesheet" href="../CSS/length.css">
<link rel="stylesheet" href="../styles.css">
</head>
<body>

<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="../HTML/length.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a class="len" href="./length.html">Length</a></li>
<li><a href="./weight.html">Weight</a></li>
<li><a href="./volume.html">Volume</a></li>
<li><a href="./currency.html">Currency</a></li>
<li><a href="./temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="../index.html">Unit Convertor</a></li>
<li class="hideOnMobile len"><a href="./length.html">Length</a></li>
<li class="hideOnMobile"><a href="./weight.html">Weight</a></li>
<li class="hideOnMobile "><a href="./volume.html">Volume</a></li>
<li class="hideOnMobile"><a href="./currency.html">Currency</a></li>
<li class="hideOnMobile"><a href="./temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>

<div class="bg">
<div class="containment">
<p id="desc">This is a simple unit converter.</p>
Expand Down Expand Up @@ -41,6 +63,7 @@
</form>
</div>
</div>
</div>
</div>
<script src="../script.js"></script>
</body>
</html>
26 changes: 23 additions & 3 deletions Unit Converter/HTML/temperature.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,31 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Temperature</title>
<link rel="stylesheet" href="../styles.css">
<link rel="stylesheet" href="../CSS/temperature.css">
</head>
<body>



<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="../HTML/temperature.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a href="./length.html">Length</a></li>
<li><a href="./weight.html">Weight</a></li>
<li><a href="./volume.html">Volume</a></li>
<li><a href="./currency.html">Currency</a></li>
<li><a class="temp" href="./temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="../index.html">Unit Convertor</a></li>
<li class="hideOnMobile"><a href="./length.html">Length</a></li>
<li class="hideOnMobile"><a href="./weight.html">Weight</a></li>
<li class="hideOnMobile"><a href="./volume.html">Volume</a></li>
<li class="hideOnMobile"><a href="./currency.html">Currency</a></li>
<li class="hideOnMobile temp"><a href="./temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>

<p id="desc">This is a simple unit converter.</p>

<p>You can also convert from one unit to another unit.</p>
Expand Down Expand Up @@ -42,6 +62,6 @@


</form>

<script src="../script.js"></script>
</body>
</html>
26 changes: 23 additions & 3 deletions Unit Converter/HTML/volume.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,30 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Volume</title>
<link rel="stylesheet" href="../styles.css">
<link rel="stylesheet" href="../CSS/volume.css">
</head>
<body>

<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="../HTML/volume.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a href="./length.html">Length</a></li>
<li><a href="./weight.html">Weight</a></li>
<li><a class="vol" href="./volume.html">Volume</a></li>
<li><a href="./currency.html">Currency</a></li>
<li><a href="./temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="../index.html">Unit Convertor</a></li>
<li class="hideOnMobile"><a href="./length.html">Length</a></li>
<li class="hideOnMobile"><a href="./weight.html">Weight</a></li>
<li class="hideOnMobile vol"><a href="./volume.html">Volume</a></li>
<li class="hideOnMobile"><a href="./currency.html">Currency</a></li>
<li class="hideOnMobile"><a href="./temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>


<p id="desc">This is a simple unit converter.</p>

Expand Down Expand Up @@ -45,7 +66,6 @@

</form>



<script src="../script.js"></script>
</body>
</html>
26 changes: 24 additions & 2 deletions Unit Converter/HTML/weight.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,32 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weight</title>
<link rel="stylesheet" href="../styles.css">
<link rel="stylesheet" href="../CSS/weight.css">
</head>
<body>



<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="../HTML/weight.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a href="./length.html">Length</a></li>
<li><a class="wei" href="./weight.html">Weight</a></li>
<li><a href="./volume.html">Volume</a></li>
<li><a href="./currency.html">Currency</a></li>
<li><a href="./temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="../index.html">Unit Convertor</a></li>
<li class="hideOnMobile"><a href="./length.html">Length</a></li>
<li class="hideOnMobile wei"><a href="./weight.html">Weight</a></li>
<li class="hideOnMobile"><a href="./volume.html">Volume</a></li>
<li class="hideOnMobile"><a href="./currency.html">Currency</a></li>
<li class="hideOnMobile"><a href="./temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>

<p id="desc">This is a simple unit converter.</p>

<p>You can also convert from one unit to another unit.</p>
Expand Down Expand Up @@ -43,6 +65,6 @@


</form>

<script src="../script.js"></script>
</body>
</html>
36 changes: 23 additions & 13 deletions Unit Converter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@

</head>
<body>

<div class="navbar">
<span class="unit">Unit Convertor</span>
<div>
<a href="">Length</a>
<a href="">Weight</a>
<a href="">Volume</a>
<a href="">Currency</a>
<a href="">Temperature</a>
</div>

</div>
<nav>
<ul class="sidebar">
<li onclick=hideSidebar()><a href="index.html"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg></a></li>
<li><a href="./HTML/length.html">Length</a></li>
<li><a href="./HTML/weight.html">Weight</a></li>
<li><a href="./HTML/volume.html">Volume</a></li>
<li><a href="./HTML/currency.html">Currency</a></li>
<li><a href="./HTML/temperature.html">Temperature</a></li>
</ul>
<ul>
<li><a href="index.html">Unit Convertor</a></li>
<li class="hideOnMobile"><a href="./HTML/length.html">Length</a></li>
<li class="hideOnMobile"><a href="./HTML/weight.html">Weight</a></li>
<li class="hideOnMobile"><a href="./HTML/volume.html">Volume</a></li>
<li class="hideOnMobile"><a href="./HTML/currency.html">Currency</a></li>
<li class="hideOnMobile"><a href="./HTML/temperature.html">Temperature</a></li>
<li class="menu-button" onclick=showSidebar()><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="26" viewBox="0 96 960 960" width="26"><path d="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z"/></svg></a></li>
</ul>
</nav>
<h2>
This is the Home Page
This is home page
</h2>


<script src="script.js"></script>
</body>
</html>
11 changes: 10 additions & 1 deletion Unit Converter/script.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
//Javascript for index.html will be written here
//Javascript for index.html will be written here

function showSidebar(){
const sidebar = document.querySelector('.sidebar')
sidebar.style.display = 'flex'
}
function hideSidebar(){
const sidebar = document.querySelector('.sidebar')
sidebar.style.display = 'none'
}
Loading

0 comments on commit 9eafadb

Please sign in to comment.