Skip to content

Commit

Permalink
Login done
Browse files Browse the repository at this point in the history
  • Loading branch information
Koryakinaisen committed Nov 15, 2024
1 parent f8c77ed commit 4b97ea8
Show file tree
Hide file tree
Showing 29 changed files with 419 additions and 39 deletions.
3 changes: 3 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<title>Vite App</title>
</head>
<body>
Expand Down
27 changes: 0 additions & 27 deletions frontend/src/assets/css/fonts.css

This file was deleted.

1 change: 1 addition & 0 deletions frontend/src/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}

body {
font-family: 'Montserrat', 'sans-serif';
background-color: #D9D9D9;
}

Expand Down
Binary file removed frontend/src/assets/fonts/Poppins/Poppins-Black.ttf
Binary file not shown.
Binary file not shown.
Binary file removed frontend/src/assets/fonts/Poppins/Poppins-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed frontend/src/assets/fonts/Poppins/Poppins-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed frontend/src/assets/fonts/Poppins/Poppins-Thin.ttf
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions frontend/src/assets/svg/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/svg/eye/closedEye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/assets/svg/eye/openedEye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 14 additions & 6 deletions frontend/src/components/TheHeader.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<script>
import LoginModal from "@/components/modals/LoginModal.vue";
export default {
name: 'HeaderComp',
components: {LoginModal},
data() {
return {
showLoginModal: false,
}
},
methods: {
openRegistrationModal() {
return 0
openProfile() {
this.showLoginModal = true
}
}
}
Expand All @@ -20,15 +28,15 @@ export default {
</div>
<div class="profile-basket">
<button>
<img src="../assets/svg/profile.svg" alt="profile"/>
<img src="../assets/svg/profile.svg" alt="profile" @click="openProfile"/>
</button>
<button>
<img src="../assets/svg/basket.svg" alt="basket" @click="openRegistrationModal"/>
<img src="../assets/svg/basket.svg" alt="basket"/>
</button>

</div>
</div>
</div>
<LoginModal :isVisible="showLoginModal" @update:isVisible="showLoginModal = $event"></LoginModal>
</template>

<style scoped>
Expand Down
76 changes: 76 additions & 0 deletions frontend/src/components/modals/ErrorModal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<template>
<div v-if="show" class="modal">
<div class="modal-content">
<button @click="closeModal" class="close">
<img src="../../assets/svg/close.svg" alt="close"/>
</button>
<p v-for="error in errors">{{ error }}</p>
</div>
</div>
</template>

<script>
export default {
name: 'ErrorModal',
props: {
show: {
type: Boolean,
required: true
},
errors: {
type: Array,
required: true
}
},
methods: {
closeModal() {
this.$emit('close')
}
},
};
</script>

<style scoped>
/* Стили для модального окна */
.modal {
display: block;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
background-color: #DA686A;
margin: 15% auto;
padding: 32px 64px;
border: 3px solid #760A0C;
width: 50%;
border-radius: 10px;
}
.close {
display: inline;
left: 70%;
position: absolute;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
p:has(+ p) {
margin-bottom: 16px;
}
p {
font-size: 24px;
}
</style>
Loading

0 comments on commit 4b97ea8

Please sign in to comment.