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

Merge branch 'feat/saleandcart' into 'dev'

feat: new navbar and cart frontend prototype

See merge request if3110-2023-01-i/tugas-besar-1!5
parents e4f709f5 a0ddcfb9
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 @@
background-size: cover;
position: relative;
place-items: center;
display: grid;
display: block;
}
.saleform-group {
position: relative;
/* width: 31%;
height: 31%; */
margin-top: 5vh;
min-width: 300px;
flex-shrink: 0;
display: grid;
......
img{
float: left;
margin: 10px;
min-width: 100px;
min-height: 50px;
}
.tabgroup{
.navbar-container {
display: flex;
justify-content: space-evenly;
background-color: #AA1E1E;
color: #eaeaea;
float: left;
border: none;
outline: none;
color: #eaeaea;
/* float: left; */
font-size: 17px;
width: 100%;
height: 8%;
}
img{
/* float: left; */
margin: 5px;
min-width: 100px;
min-height: 50px;
}
.searchbar {
float: left;
/* float: left; */
padding: 6px;
background: linear-gradient(rgba(255,255,255,0.67), rgba(255,255,255,0.67));
margin-top: 15px;
margin-left: 10%;
border-radius: 10px;
display: flex;
align-items: center;
/* align-items: center; */
max-height: 35px;
transition: max-height 0.5s;
overflow: hidden;
......@@ -33,32 +36,28 @@ img{
.searchbar input{
background: transparent;
background-color: transparent;
border: none;
outline: none;
font-size: 20px;
margin-left: 10px;
width: 100%;
}
input{
width: 100%;
background: transparent;
border: 0;
outline: 0;
}
}
.tabexpand{
background-color: #AA1E1E;
color: #eaeaea;
float: left;
border: none;
outline: none;
text-decoration: none;
text-align: center;
cursor: pointer;
font-size: 30px;
padding: 14px 14px;
font-size: 5vh;
padding: 10px 14px;
width: 5%;
height: 100%;
}
......@@ -67,73 +66,74 @@ input{
background-color: transparent;
color: #eaeaea;
border: none;
outline: none;
cursor: pointer;
font-size: 17px;
padding: 17px 0px;
/* padding: 17px 0px; */
width: 10%;
text-align: center;
border-radius: 10px;
height: 100%;
}
.tabbutton{
background-color: #AA1E1E;
/* .tabbutton{
color: #eaeaea;
float: left;
border: none;
outline: none;
cursor: pointer;
font-size: 17px;
padding: 14px 16px;
width: 13%;
}
} */
.tabright{
background-color: #AA1E1E;
color: #eaeaea;
float: right;
border: none;
outline: none;
text-decoration: none;
text-align: center;
cursor: pointer;
font-size: 30px;
font-size: 3vh;
padding: 17px 14px;
width: 13%;
height: 100%;
/* height: 100%; */
}
.tabaccount{
background-color: #AA1E1E;
/* .tabaccount{
color: #eaeaea;
float: right;
border: none;
outline: none;
cursor: pointer;
text-align: center;
font-size: 30px;
padding: 14px 16px;
width: 5%;
margin-left: 50px;
}
} */
@media screen and (max-width: 850px){
.tabaccount, .tabright{
font-size: 8px;
font-size: 3vh;
width: 17%;
height: 100%;
}
.tabexpand{
font-size: 15px;
font-size: 3vh;
width: 10%;
}
.searchbar{
margin-left: 5%;
width: 50%;
margin-top: 7px;
margin-top: 3.5px;
margin-bottom: 3.5px;
}
img{
display: none;
......@@ -142,10 +142,16 @@ input{
@media screen and (max-width: 1350px) and (min-width: 851px) {
.tabaccount, .tabright{
font-size: 25px;
font-size: 3.5vh;
}
.tabexpand{
font-size: 25px;
font-size: 3.5vh;
}
.searchbar{
margin: 5px;
}
img{
margin: 5px;
}
}
......
addnavbar = () => {
return document.getElementById("tabgroup").innerHTML =`
<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 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>
<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 @@
<body>
<div class="container">
<!-- <div class="tabgroup" id="tabgroup">
<div class="tabgroup" id="tabgroup">
<script>addnavbar();</script>
</div> -->
</div>
<div class="saleform-group">
<h1 id="title">Make A Sale</h1>
<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