Skip to content

Commit

Permalink
change README, forms in html files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbShar committed Sep 12, 2022
1 parent 2f9b23b commit 94cc63b
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 26 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ https://albshar.github.io/ubereats/

- Light/dark mode toggle
- Search list
- Authorization (email: '[email protected]', password: 'simple_password')
- Authorization (email: '[email protected]', password: 'simple_password') / registration
- Slider/tabs
- Shopping cart
- Function of create order


## Preview
Expand Down
4 changes: 2 additions & 2 deletions blocks/common.blocks/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ const loginUser = (e) => {
.then(json => {
try {
if (document.querySelector('#remember').checked) {
Cookie.set('accessToken', json.data.access_token, {
Cookies.set('accessToken', json.data.access_token, {
secure: true,
sameSite: 'strict',
path: '/',
expires: 10
});
Cookie.set('refreshToken', json.data.refresh_token, {
Cookies.set('refreshToken', json.data.refresh_token, {
secure: true,
sameSite: 'strict',
path: '/',
Expand Down
1 change: 1 addition & 0 deletions create/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
Expand Down
Binary file removed gifs/filter_list.gif
Binary file not shown.
Binary file added gifs/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gifs/signup_form.gif
Binary file not shown.
Binary file removed gifs/slider_tabs.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h1 class="logo__text">UBER <span>EATS</span></h1>
<div class="container">
<section class="row">
<article class="col-xs-12 col-md-12 col-lg-12">
<form class="search-form" action="#">
<form autocomplete="off" class="search-form" action="#">
<input
id="search"
class="search-form__input"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: scroll;
overflow-y: auto;
}
}
2 changes: 0 additions & 2 deletions pushkin/blocks/desktop.blocks/cart-content/cart-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

@media screen and (max-width: 370px) {
width: 320px;


}
}

Expand Down
33 changes: 21 additions & 12 deletions pushkin/blocks/desktop.blocks/cart/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,35 @@ const makeDisableChooseBtn = () => {

const updateDataCartfromLocalStorage = () => {
// Если есть что-то в localStorage
if (localStorage.getItem('products')) {
cartProductsList.innerHTML = '';
cartProductsList.insertAdjacentHTML('beforeend', localStorage.getItem('products'));
printQuantity();
try {
if (localStorage.getItem('products')) {
cartProductsList.innerHTML = '';
cartProductsList.insertAdjacentHTML('beforeend', localStorage.getItem('products'));
printQuantity();
}
countSum();
makeDisableChooseBtn();
} catch(error) {
console.log(error.message);
}
countSum();
makeDisableChooseBtn();


};

const updateStorage = () => {
let parent = cartProductsList;
let html = parent.innerHTML;

if (html.length) {
localStorage.setItem('products', html.trim());

} else {
localStorage.removeItem('products');
try {
if (html.length) {
localStorage.setItem('products', html.trim());

} else {
localStorage.removeItem('products');
}
} catch(error) {
console.log(error.message);
}

};

const visibleCart = () => {
Expand Down
3 changes: 2 additions & 1 deletion pushkin/blocks/desktop.blocks/order-modal/order-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
padding: 40px;
overflow: scroll;
overflow-y: auto;
overflow-x: hidden;

@media screen and (max-width: 767.7px) {
width: 450px;
Expand Down
5 changes: 3 additions & 2 deletions pushkin/blocks/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pushkin/blocks/style.css.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pushkin/pushkin.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Pushkin - ресторан с большим количеством блюд по низким ценам.
Быстрое время доставки блюд на дом - 40-50 минут. ">
Expand Down Expand Up @@ -149,7 +150,7 @@ <h3 class="order-modal__product-title">Бургер</h3>
</li> -->
</ul>
</div>
<form action="https://my-store2.p.rapidapi.com/order/new" method="POST" class="order-modal__form order" enctype="multipart/form-data">
<form autocomplete="off" action="https://my-store2.p.rapidapi.com/order/new" method="POST" class="order-modal__form order" enctype="multipart/form-data">
<label class="order__label">
<span class="order__text" >Ваше имя:</span>
<input type="text" class="order__input" id="nameClient" name="Name">
Expand All @@ -172,7 +173,7 @@ <h3 class="order-modal__product-title">Бургер</h3>
</div>
</div>
<div class="modal" id="modal">
<form class="form" id="loginForm" method="POST" enctype="application/json" action="https://api.storerestapi.com/auth/login">
<form autocomplete="off" class="form" id="loginForm" method="POST" enctype="application/json" action="https://api.storerestapi.com/auth/login">
<button
class="form__close"
id="close"
Expand All @@ -189,7 +190,6 @@ <h3 class="order-modal__product-title">Бургер</h3>
type="email"
name="email"
placeholder="Введите email"
autocomplete="name"
required
/>
</li>
Expand Down

0 comments on commit 94cc63b

Please sign in to comment.