瀏覽代碼

Menu items and offers page Mobile UI completed

master
kj1352 5 年之前
父節點
當前提交
2aee4515fe
共有 4 個檔案被更改,包括 189 行新增52 行删除
  1. +87
    -1
      src/app/menu-items/menu-items.component.html
  2. +100
    -49
      src/app/menu-items/menu-items.component.scss
  3. +1
    -1
      src/app/menu-items/menu-items.component.ts
  4. +1
    -1
      src/app/widgets-holder/widgets-holder.component.ts

+ 87
- 1
src/app/menu-items/menu-items.component.html 查看文件

@@ -10,7 +10,7 @@
</div> </div>
</div> </div>


<table *ngIf="selectedTab === 'items'">
<table *ngIf="selectedTab === 'items'" class="item-table">
<tr> <tr>
<th> Item No </th> <th> Item No </th>
<th> Item Name </th> <th> Item Name </th>
@@ -72,6 +72,92 @@
</tr> </tr>
</table> </table>


<ul *ngIf="selectedTab === 'items'" class="item-list">
<li class="card">
<div class="info-holder">
<header> #1234 8 PC Hot &amp; Crispy </header>
<div class="info">
<label> Preperation Time: </label>
<span> 15 Min </span>
</div>
<div class="info">
<label> Amount: </label>
<span> &#x20B9; 750 </span>
</div>
</div>
<div class="status">
Availability Status
<div class="toggle" [ngClass]="{'on' : productAvailable }"
(click)="productAvailable = !productAvailable">
<div class="knob"></div>
</div>
</div>
</li>

<li class="card">
<div class="info-holder">
<header> #1234 8 PC Hot &amp; Crispy </header>
<div class="info">
<label> Preperation Time: </label>
<span> 15 Min </span>
</div>
<div class="info">
<label> Amount: </label>
<span> &#x20B9; 750 </span>
</div>
</div>
<div class="status">
Availability Status
<div class="toggle" [ngClass]="{'on' : productAvailable }"
(click)="productAvailable = !productAvailable">
<div class="knob"></div>
</div>
</div>
</li>

<li class="card">
<div class="info-holder">
<header> #1234 8 PC Hot &amp; Crispy </header>
<div class="info">
<label> Preperation Time: </label>
<span> 15 Min </span>
</div>
<div class="info">
<label> Amount: </label>
<span> &#x20B9; 750 </span>
</div>
</div>
<div class="status">
Availability Status
<div class="toggle" [ngClass]="{'on' : productAvailable }"
(click)="productAvailable = !productAvailable">
<div class="knob"></div>
</div>
</div>
</li>

<li class="card">
<div class="info-holder">
<header> #1234 8 PC Hot &amp; Crispy </header>
<div class="info">
<label> Preperation Time: </label>
<span> 15 Min </span>
</div>
<div class="info">
<label> Amount: </label>
<span> &#x20B9; 750 </span>
</div>
</div>
<div class="status">
Availability Status
<div class="toggle" [ngClass]="{'on' : productAvailable }"
(click)="productAvailable = !productAvailable">
<div class="knob"></div>
</div>
</div>
</li>
</ul>

<ul class="offer-list" *ngIf="selectedTab === 'offers'"> <ul class="offer-list" *ngIf="selectedTab === 'offers'">
<li> <li>
<div class="info"> <div class="info">


+ 100
- 49
src/app/menu-items/menu-items.component.scss 查看文件

@@ -4,26 +4,34 @@
margin-left: auto; margin-left: auto;
align-items: stretch; align-items: stretch;
height: 100%; height: 100%;

@media screen and (max-width: 1023px) {
width: 100%;
}
.item-details { .item-details {
padding: 0 2.5%; padding: 0 2.5%;
width: 70%; width: 70%;
height: calc(100vh - 70px); height: calc(100vh - 70px);
overflow: auto; overflow: auto;
margin-right: auto; margin-right: auto;

@media screen and (max-width: 1023px) {
width: 100%;
padding: 0 5%;
margin: 0 auto;
height: 100%;
}
&:hover { &:hover {
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: block;
display: block;
@media screen and (max-width: 1023px) {
display: none;
}
} }
} }

&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 8px; width: 8px;
display: none; display: none;
} }

/* Track */
/* Track */
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background-color: white; background-color: white;
} }
@@ -37,11 +45,9 @@
} }
} }
} }

.widget-heading-holder { .widget-heading-holder {
width: 100%; width: 100%;
} }

.tabs-holder { .tabs-holder {
display: flex; display: flex;
width: auto; width: auto;
@@ -50,7 +56,6 @@
background-color: white; background-color: white;
width: 150px; width: 150px;
position: relative; position: relative;

&.left { &.left {
button { button {
&:first-child { &:first-child {
@@ -58,19 +63,16 @@
} }
} }
} }

&.right { &.right {
button { button {
&:last-child { &:last-child {
color: white; color: white;
} }
} }

&::before { &::before {
transform: translateX(100%); transform: translateX(100%);
} }
} }

&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
@@ -80,7 +82,6 @@
height: 100%; height: 100%;
transition: transform 0.5s; transition: transform 0.5s;
} }

button { button {
position: relative; position: relative;
border-radius: 20px; border-radius: 20px;
@@ -94,13 +95,13 @@
transition: color 0.3s; transition: color 0.3s;
} }
} }


table {
.item-table {
width: 100%; width: 100%;
margin: 30px 0; margin: 30px 0;
text-align: left; text-align: left;

@media screen and (max-width: 1023px) {
display: none;
}
th { th {
color: var(--grey); color: var(--grey);
font-size: 14px; font-size: 14px;
@@ -108,7 +109,6 @@ table {
padding: 10px 0; padding: 10px 0;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }

td { td {
border-top: 1px solid rgba(#cecece, 0.5); border-top: 1px solid rgba(#cecece, 0.5);
padding: 10px 0; padding: 10px 0;
@@ -119,33 +119,31 @@ table {
line-height: 2; line-height: 2;
vertical-align: top; vertical-align: top;
width: calc(100% / 5); width: calc(100% / 5);

&:nth-child(3) { &:nth-child(3) {
padding-left: 20px; padding-left: 20px;
} }
} }
} }

.subscribed-offers { .subscribed-offers {
width: 30%; width: 30%;
background-color: white; background-color: white;
padding: 30px 30px;
padding: 30px;
list-style: none; list-style: none;
height: calc(100vh - 70px); height: calc(100vh - 70px);
overflow: auto; overflow: auto;

@media screen and (max-width: 1023px) {
display: none;
}
&:hover { &:hover {
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: block;
display: block;
} }
} }

&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 8px; width: 8px;
display: none; display: none;
} }

/* Track */
/* Track */
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background-color: white; background-color: white;
} }
@@ -157,39 +155,32 @@ table {
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {
background-color: rgba(black, 0.5); background-color: rgba(black, 0.5);
} }

.heading { .heading {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;


header { header {
font-size: 16px; font-size: 16px;
letter-spacing: 1px; letter-spacing: 1px;
font-weight: 500; font-weight: 500;
} }

a { a {
color: var(--brand-blue); color: var(--brand-blue);
text-decoration: underline; text-decoration: underline;
font-size: 14px; font-size: 14px;
} }
} }

li { li {
padding: 10px 0; padding: 10px 0;
border-top: 1px solid #cecece; border-top: 1px solid #cecece;

header { header {
margin: 10px 0; margin: 10px 0;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: var(--dark-grey); color: var(--dark-grey);
} }

p { p {
font-size: 13px; font-size: 13px;
color: var(--grey); color: var(--grey);
@@ -198,12 +189,9 @@ table {
} }
} }
} }


.offer-list { .offer-list {
margin: 30px 0; margin: 30px 0;
list-style: none; list-style: none;

li { li {
display: flex; display: flex;
width: 100%; width: 100%;
@@ -211,69 +199,87 @@ table {
background-color: white; background-color: white;
border-radius: 10px; border-radius: 10px;
margin-bottom: 30px; margin-bottom: 30px;
}
position: relative;


@media screen and (max-width: 1023px) {
box-shadow: 0px 0px 5px var(--grey);
flex-direction: column;
padding-bottom: 60px;
}
}
.info { .info {
width: 60%; width: 60%;
padding: 20px; padding: 20px;


@media screen and (max-width: 1023px) {
width: 100%;
}

header { header {
font-size: 16px; font-size: 16px;
color: var(--dark-grey); color: var(--dark-grey);
font-weight: 500; font-weight: 500;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }

p { p {
color: var(--grey); color: var(--grey);
font-size: 13px; font-size: 13px;
line-height: 1.5; line-height: 1.5;
margin: 15px 0; margin: 15px 0;
} }

button { button {
&.active { &.active {
background-color: var(--brand-blue); background-color: var(--brand-blue);
} }

@media screen and (max-width: 1023px) {
display: block;
margin: 0 auto;
position: absolute;
width: 150px;
bottom: 15px;
left: calc((100% - 150px) / 2);
}
} }
} }

.time-limit { .time-limit {
width: 40%; width: 40%;
padding: 20px; padding: 20px;
border-left: 1px solid #efefef; border-left: 1px solid #efefef;
text-align: center; text-align: center;


@media screen and (max-width: 1023px) {
width: 80%;
margin: 0 auto;
border: 1px solid #ebf4fa;
border-radius: 3px;
}

header { header {
font-size: 16px; font-size: 16px;
color: var(--dark-grey); color: var(--dark-grey);
font-weight: 500; font-weight: 500;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }

.caption { .caption {
margin: 10px 0; margin: 10px 0;
letter-spacing: 1px; letter-spacing: 1px;
font-size: 12px; font-size: 12px;
color: var(--grey); color: var(--grey);
} }

.counters-holder { .counters-holder {
display: flex; display: flex;
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
justify-content: space-between; justify-content: space-between;

.counter { .counter {
width: 20%; width: 20%;

.heading { .heading {
font-size: 10px; font-size: 10px;
color: var(--grey); color: var(--grey);
letter-spacing: 0.5px; letter-spacing: 0.5px;
font-weight: 500; font-weight: 500;
} }

.count { .count {
color: var(--brand-blue); color: var(--brand-blue);
font-weight: 700; font-weight: 700;
@@ -281,7 +287,6 @@ table {
position: relative; position: relative;
padding: 5px 0; padding: 5px 0;
margin-top: 10px; margin-top: 10px;

&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
@@ -289,10 +294,9 @@ table {
left: 0; left: 0;
height: 48%; height: 48%;
width: 100%; width: 100%;
box-shadow: 0px 0px 5px #cecece;
box-shadow: 0 0 5px #cecece;
border-radius: 3px; border-radius: 3px;
} }

&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
@@ -300,7 +304,7 @@ table {
left: 0; left: 0;
height: 48%; height: 48%;
width: 100%; width: 100%;
box-shadow: 0px 0px 5px #cecece;
box-shadow: 0 0 5px #cecece;
border-radius: 3px; border-radius: 3px;
} }
} }
@@ -308,3 +312,50 @@ table {
} }
} }
} }
.item-list {
list-style: none;
width: 100%;

@media screen and (min-width: 1023px) {
display: none;
}

.card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 5px var(--grey);
margin: 30px auto;
display: flex;
width: 100%;
.info-holder {
flex-grow: 1;
padding: 15px;
line-height: 1.8;
}
header {
font-size: 14px;
font-weight: 500;
color: var(--dark-grey);
}
.info {
color: var(--dark-grey);
font-size: 12px;
label {
color: var(--grey);
}
}
.status {
align-self: center;
padding: 10px;
width: 100px;
text-align: center;
font-size: 12px;
color: var(--dark-grey);
font-weight: 500;
.toggle {
margin-top: 10px;
}
}
}
}

+ 1
- 1
src/app/menu-items/menu-items.component.ts 查看文件

@@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./menu-items.component.scss'] styleUrls: ['./menu-items.component.scss']
}) })
export class MenuItemsComponent implements OnInit { export class MenuItemsComponent implements OnInit {
selectedTab: string = 'offers';
selectedTab: string = 'items';
productAvailable: boolean = false; productAvailable: boolean = false;


constructor() { } constructor() { }


+ 1
- 1
src/app/widgets-holder/widgets-holder.component.ts 查看文件

@@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./widgets-holder.component.scss'] styleUrls: ['./widgets-holder.component.scss']
}) })
export class WidgetsHolderComponent implements OnInit { export class WidgetsHolderComponent implements OnInit {
selected_nav: string = 'orders';
selected_nav: string = 'items';


constructor() { } constructor() { }




Loading…
取消
儲存