Added number plate filter and adjusted navbar styling

This commit is contained in:
Luke Else 2023-12-15 23:54:45 +00:00
parent cb89544a1e
commit f64c378248
2 changed files with 102 additions and 12 deletions

View File

@ -27,7 +27,7 @@ html {
body { body {
display: flex; display: flex;
height: 103vh; height: 100vh;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
} }
@ -72,7 +72,7 @@ form {
box-shadow: inset 0 0 0 10px; box-shadow: inset 0 0 0 10px;
} }
@media (max-width:600px) { @media (max-width:1000px) {
.not-required { .not-required {
display: none; display: none;
} }
@ -131,20 +131,28 @@ a:active {
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
width: 100%; width: 100%;
gap: 1rem;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;
height: 90%; height: 90%;
} }
.textbox { .search-bar {
padding: .25rem; padding: .25rem;
margin-top: .25rem; margin-top: .25rem;
font-size: 1rem; font-size: 1rem;
width: 15rem; width: 15rem;
border: none; border: none;
transition: width 0.4s ease-in-out;
background-color: var(--fg); background-color: var(--fg);
} }
@media (min-width:1500px) {
.search-bar:focus {
width: 30rem;
}
}
.search-button { .search-button {
padding: .25rem .5rem; padding: .25rem .5rem;
margin-top: .25rem; margin-top: .25rem;
@ -155,14 +163,85 @@ a:active {
background-color: orange; background-color: orange;
} }
.filter-pane { .filter-pane {
width: 70%; padding: .5rem 2rem;
margin: .5rem 0rem;
background-color: var(--bg-grad-3); background-color: var(--bg-grad-3);
border-radius: 1rem; border-radius: 1rem;
min-height: 3rem;
} }
.filter-items {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
}
.product-filter {
width: 100%;
padding: 16px 20px;
border: none;
border-radius: 4px;
background-color: var(--bg-grad-2);
color: var(--fg);
font-size: .75rem;
}
/* Number Plate*/
.number-plate {
display: flex;
align-items: center;
}
.country-identifier {
width: auto;
display: flex;
flex-direction: column;
align-items: center;
color: #ffffff;
font-weight: bold;
height: 60px;
justify-content: center;
}
.country-identifier img {
border-radius: 8px 0 0 8px;
}
.vrn {
width: 10rem;
height: 63px;
border: 1px solid #ead809;
background-color: #ead809;
border-radius: 0 8px 8px 0;
}
.vrn .vrn-text {
width: -webkit-fill-available;
height: -webkit-fill-available;
border-radius: 0;
border: 0;
font-family: "UKNumberPlate", sans-serif;
font-size: 180%;
text-transform: uppercase;
text-align: center;
outline: 0;
background-color: transparent;
}
.vrn .vrn-text:focus {
outline: 0;
}
/* Product Information*/
.product-container { .product-container {
width: 95%; width: 95%;
margin: .5rem 0rem; margin: .5rem 0rem;
@ -172,7 +251,7 @@ a:active {
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: row; flex-direction: row;
gap: 2rem 1.5rem; gap: 2rem 1.5rem;
padding: 2rem 1rem; padding: 2rem 1rem 3rem;
transition: all 0.2s; transition: all 0.2s;
overflow-y: scroll; overflow-y: scroll;
} }

View File

@ -6,13 +6,14 @@
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> <!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> -->
<link rel="stylesheet" href="css/style.css" /> <link rel="stylesheet" href="css/style.css" />
<link href="http://fonts.cdnfonts.com/css/uk-number-plate" rel="stylesheet">
<title>WMGZON</title> <title>WMGZON</title>
</head> </head>
<body> <body>
<nav class="navbar"> <nav class="navbar">
<img src="assets/img/WMGZON.png" id="logo" class="not-required" alt="WMGZON Logo"> <img src="assets/img/WMGZON.png" id="logo" class="not-required" alt="WMGZON Logo">
<form action="test.html" method="get"> <form action="test.html" method="get">
<input type="text" name="search" placeholder="Find your favourite products" class="textbox"> <input type="text" name="search" placeholder="Find your favourite products" class="search-bar">
<input type="submit" class="search-button"> <input type="submit" class="search-button">
</form> </form>
<a href="login.html">Login/Signup</a> <a href="login.html">Login/Signup</a>
@ -30,12 +31,22 @@
</div> </div>
<div class="filter-pane"> <div class="filter-pane">
<div class="number-plate-filter"> <form action="" class="filter-items">
<div class="number-plate"> <div class="number-plate">
<div class="number-plate-identifier"></div> <span class="country-identifier">
<img src="https://mycarneedsa.com/assets/flint/img/flag_europe_gb.png" alt="">
</span>
<span class="vrn">
<input type="text" class="vrn-text" placeholder="YOUR REG" name="vrn">
</span>
</div> </div>
</div>
<div class="product-ordering not-required"></div> <select class="product-filter not-required" name="filter">
<option value="relevance">Most Relevant</option>
<option value="price-lh">Price: Low -> High</option>
<option value="price-hl">Price: High -> Low</option>
</select>
</form>
</div> </div>
<div class="product-container"> <div class="product-container">