Skip to content
Snippets Groups Projects
Commit a0ddcfb9 authored by Christophorus Dharma Winata's avatar Christophorus Dharma Winata
Browse files

feat: new navbar and cart frontend prototype

parent e4f709f5
Branches
Tags
No related merge requests found
@import url('https://fonts.googleapis.com/css?family=Inter');
*{
margin: 0;
padding: 0;
font-family: Inter;
box-sizing: border-box;
transition: 0.5;
}
.container{
position: relative;
max-width: 100%;
height: 100vh;
mix-blend-mode: multiply;
background-position: center;
background-size: cover;
display: block;
place-items: center;
}
.cart-group{
padding-top: 10%;
display: block;
/* background-color: red; */
}
.cart-group h1{
margin-bottom: 10px;
margin-left: 5%;
font-size: 30px;
}
.cart-list{
/* border-style: solid; */
border-radius: 10px;
margin-left: 5%;
margin-right: 5%;
display: block;
}
.item{
margin: 15px;
border-radius: 10px;
background-color: #eaeaea;
padding: 1%;
display: flex;
}
.item-picture-group{
display:inline-block;
min-width: 20%;
min-height: 15vw;
background-color: azure;
border-radius: 10px;
margin: 10px;
}
.item-text-fields{
display:inline-block;
}
/* .item-picture{} */
.item-label{
display: block;
margin: 10px;
}
.button-field {
display:flex;
padding: 10px;
justify-content: right;
}
#checkout-button {
cursor: pointer;
color: white;
background-color: rgb(137, 62, 137);
min-width: 25%;
height: 10vh;
font-size: 20px;
border-radius : 10px;
border-color: transparent;
margin-right: 15px;
margin-bottom: 15px;
}
@media screen and ((max-width: 400px) or (max-height: 750px)) {
.cart-group{
height: 750px;
}
}
\ No newline at end of file
...@@ -18,13 +18,14 @@ ...@@ -18,13 +18,14 @@
background-size: cover; background-size: cover;
position: relative; position: relative;
place-items: center; place-items: center;
display: grid; display: block;
} }
.saleform-group { .saleform-group {
position: relative; position: relative;
/* width: 31%; /* width: 31%;
height: 31%; */ height: 31%; */
margin-top: 5vh;
min-width: 300px; min-width: 300px;
flex-shrink: 0; flex-shrink: 0;
display: grid; display: grid;
......
.navbar-container {
img{ display: flex;
float: left; justify-content: space-evenly;
margin: 10px;
min-width: 100px;
min-height: 50px;
}
.tabgroup{
background-color: #AA1E1E; background-color: #AA1E1E;
color: #eaeaea; border: none;
float: left;
outline: none; outline: none;
color: #eaeaea;
/* float: left; */
font-size: 17px; font-size: 17px;
width: 100%; width: 100%;
height: 8%; height: 8%;
} }
img{
/* float: left; */
margin: 5px;
min-width: 100px;
min-height: 50px;
}
.searchbar { .searchbar {
float: left; /* float: left; */
padding: 6px; padding: 6px;
background: linear-gradient(rgba(255,255,255,0.67), rgba(255,255,255,0.67)); background: linear-gradient(rgba(255,255,255,0.67), rgba(255,255,255,0.67));
margin-top: 15px; margin-top: 15px;
margin-left: 10%; margin-left: 10%;
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
align-items: center; /* align-items: center; */
max-height: 35px; max-height: 35px;
transition: max-height 0.5s; transition: max-height 0.5s;
overflow: hidden; overflow: hidden;
...@@ -33,32 +36,28 @@ img{ ...@@ -33,32 +36,28 @@ img{
.searchbar input{ .searchbar input{
background: transparent;
background-color: transparent; background-color: transparent;
border: none; border: none;
outline: none;
font-size: 20px; font-size: 20px;
margin-left: 10px; margin-left: 10px;
width: 100%; width: 100%;
}
input{
width: 100%;
background: transparent;
border: 0; border: 0;
outline: 0;
}
}
.tabexpand{ .tabexpand{
background-color: #AA1E1E;
color: #eaeaea; color: #eaeaea;
float: left; float: left;
border: none; border: none;
outline: none;
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
font-size: 30px; font-size: 5vh;
padding: 14px 14px; padding: 10px 14px;
width: 5%; width: 5%;
height: 100%; height: 100%;
} }
...@@ -67,73 +66,74 @@ input{ ...@@ -67,73 +66,74 @@ input{
background-color: transparent; background-color: transparent;
color: #eaeaea; color: #eaeaea;
border: none; border: none;
outline: none;
cursor: pointer; cursor: pointer;
font-size: 17px; font-size: 17px;
padding: 17px 0px; /* padding: 17px 0px; */
width: 10%; width: 10%;
text-align: center; text-align: center;
border-radius: 10px; border-radius: 10px;
height: 100%; height: 100%;
} }
.tabbutton{ /* .tabbutton{
background-color: #AA1E1E;
color: #eaeaea; color: #eaeaea;
float: left; float: left;
border: none; border: none;
outline: none;
cursor: pointer; cursor: pointer;
font-size: 17px; font-size: 17px;
padding: 14px 16px; padding: 14px 16px;
width: 13%; width: 13%;
} } */
.tabright{ .tabright{
background-color: #AA1E1E;
color: #eaeaea; color: #eaeaea;
float: right; float: right;
border: none; border: none;
outline: none;
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
font-size: 30px; font-size: 3vh;
padding: 17px 14px; padding: 17px 14px;
width: 13%; width: 13%;
height: 100%; /* height: 100%; */
} }
.tabaccount{ /* .tabaccount{
background-color: #AA1E1E;
color: #eaeaea; color: #eaeaea;
float: right; float: right;
border: none; border: none;
outline: none;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
font-size: 30px; font-size: 30px;
padding: 14px 16px; padding: 14px 16px;
width: 5%; width: 5%;
margin-left: 50px; margin-left: 50px;
} } */
@media screen and (max-width: 850px){ @media screen and (max-width: 850px){
.tabaccount, .tabright{ .tabaccount, .tabright{
font-size: 8px; font-size: 3vh;
width: 17%; width: 17%;
height: 100%; height: 100%;
} }
.tabexpand{ .tabexpand{
font-size: 15px; font-size: 3vh;
width: 10%; width: 10%;
} }
.searchbar{ .searchbar{
margin-left: 5%; margin-left: 5%;
width: 50%; width: 50%;
margin-top: 7px; margin-top: 3.5px;
margin-bottom: 3.5px;
} }
img{ img{
display: none; display: none;
...@@ -142,10 +142,16 @@ input{ ...@@ -142,10 +142,16 @@ input{
@media screen and (max-width: 1350px) and (min-width: 851px) { @media screen and (max-width: 1350px) and (min-width: 851px) {
.tabaccount, .tabright{ .tabaccount, .tabright{
font-size: 25px; font-size: 3.5vh;
} }
.tabexpand{ .tabexpand{
font-size: 25px; font-size: 3.5vh;
}
.searchbar{
margin: 5px;
}
img{
margin: 5px;
} }
} }
......
addnavbar = () => { addnavbar = () => {
return document.getElementById("tabgroup").innerHTML =` return document.getElementById("tabgroup").innerHTML =`
<a class="tabexpand" href="#"> <div class="navbar-container">
<i class="fa-solid fa-bars"></i> <a class="tabexpand" href="#">
</a> <i class="fa-solid fa-bars"></i>
<img src="../image/logoregis.svg" alt="icon" width="10%" height="5%"> </a>
<div class="searchbar"> <img src="../image/logoregis.svg" alt="icon" width="10%" height="5%">
<input id="Searchinput" type="text" placeholder="Search..." value="" onkeypress=""> <div class="searchbar">
<button class="search" onclick=""> <input id="Searchinput" type="text" placeholder="Search..." value="" onkeypress="">
<i class="fa-solid fa-magnifying-glass"></i> <button class="search" onclick="">
</button> <i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
<a class="tabright" href="#">
<i class="fa-solid fa-cart-shopping"></i>
Cart
</a>
<a class="tabright" href="../pages/catalog.php">
<i class="fa-solid fa-clipboard-list"></i>
Catalog
</a>
</div> </div>
<a class="tabright" href="#">
<i class="fa-solid fa-cart-shopping"></i>
Cart
</a>
<a class="tabright" href="../pages/catalog.php">
<i class="fa-solid fa-clipboard-list"></i>
Catalog
</a>
` `
} }
\ No newline at end of file
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<body> <body>
<div class="container"> <div class="container">
<!-- <div class="tabgroup" id="tabgroup"> <div class="tabgroup" id="tabgroup">
<script>addnavbar();</script> <script>addnavbar();</script>
</div> --> </div>
<div class="saleform-group"> <div class="saleform-group">
<h1 id="title">Make A Sale</h1> <h1 id="title">Make A Sale</h1>
<form id="saleform"> <form id="saleform">
......
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial scale=1.0">
<title>Cart</title>
<link rel="stylesheet" href="../css/cart.css">
<link rel="stylesheet" href="../css/navbar.css">
<script src="https://kit.fontawesome.com/8505941c5b.js" crossorigin="anonymous"></script>
<script src="../js/navbar.js"></script>
</head>
<body>
<div class="container">
<div id="tabgroup">
<script>
addnavbar();
</script>
</div>
<div class="cart-group">
<h1>
Cart
</h1>
<div class="cart-list">
<div class="item">
<div class="item-picture-group">
<image src="#" class="item-picture"></image>
</div>
<div class="item-text-fields">
<label class="item-label">Name</label>
<label class="item-label">Quantity</label>
<label class="item-label">Price</label>
</div>
</div>
<div class="item">
<div class="item-picture-group">
<image src="#" class="item-picture"></image>
</div>
<div class="item-text-fields">
<label class="item-label">Name</label>
<label class="item-label">Quantity</label>
<label class="item-label">Price</label>
</div>
</div>
<div class="item">
<div class="item-picture-group">
<image src="#" class="item-picture"></image>
</div>
<div class="item-text-fields">
<label class="item-label">Name</label>
<label class="item-label">Quantity</label>
<label class="item-label">Price</label>
</div>
</div>
<!-- contains item divs according to data -->
</div>
<div class="button-field">
<button id="checkout-button">
Checkout
</button>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial scale=1.0">
<link rel="stylesheet" href="../css/navbar.css">
<script src="https://kit.fontawesome.com/8505941c5b.js" crossorigin="anonymous"></script>
<!-- <script src="../js/navbar.js"></script> -->
</head>
<body>
<div class="navbar-container">
<a class="tabexpand" href="#">
<i class="fa-solid fa-bars"></i>
</a>
<img src="../image/logoregis.svg" alt="icon" width="10%" height="5%">
<div class="searchbar">
<input id="Searchinput" type="text" placeholder="Search..." value="" onkeypress="">
<button class="search" onclick="">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
<a class="tabright" href="#">
<i class="fa-solid fa-cart-shopping"></i>
Cart
</a>
<a class="tabright" href="../pages/catalog.php">
<i class="fa-solid fa-clipboard-list"></i>
Catalog
</a>
</div>
</body>
</html>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment