generated from moevm/nsql-clean-tempate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/moevm/nosql2h24-loans
- Loading branch information
Showing
6 changed files
with
635 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<template> | ||
<div v-if="visible" class="notification-container"> | ||
<div class="notification" :class="type"> | ||
<p>{{ message }}</p> | ||
<button @click="closeNotification">Ок</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "Notification", | ||
props: { | ||
message: { | ||
type: String, | ||
required: true, | ||
}, | ||
type: { | ||
type: String, | ||
default: "info", | ||
}, | ||
visible: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
methods: { | ||
closeNotification() { | ||
this.$emit("close"); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
<style scoped> | ||
.notification-container { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: rgba(0, 0, 0, 0.4); | ||
z-index: 1000; | ||
} | ||
.notification { | ||
background-color: #f9f9f9; | ||
padding: 20px 30px; | ||
border-radius: 10px; | ||
text-align: center; | ||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); | ||
max-width: 90%; | ||
width: 400px; | ||
font-family: Arial, sans-serif; | ||
color: #5d001e; | ||
font-size: 25px; | ||
} | ||
.notification.success { | ||
border: 2px solid #e3afbc; | ||
} | ||
.notification.error { | ||
border: 2px solid #5d001e; | ||
} | ||
.notification button { | ||
margin-top: 20px; | ||
padding: 12px 25px; | ||
background-color: #5d001e; | ||
color: white; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
font-size: 18px; | ||
} | ||
.notification button:hover { | ||
background-color: #e3afbc; | ||
color: #5d001e; | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<template> | ||
<div class="sort-arrow"> | ||
<!-- Стрелка вверх --> | ||
<div | ||
class="triangle-up" | ||
:class="{ active: sortDirection === 1, inactive: sortDirection === 0 }" | ||
></div> | ||
|
||
<!-- Стрелка вниз --> | ||
<div | ||
class="triangle-down" | ||
:class="{ active: sortDirection === -1, inactive: sortDirection === 0 }" | ||
></div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'SortArrow', | ||
props: { | ||
sortDirection: { | ||
type: Number, | ||
required: true | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.sort-arrow { | ||
display: inline-flex; | ||
flex-direction: column; /* Стрелки будут располагаться одна над другой */ | ||
align-items: center; | ||
justify-content: center; | ||
gap: 5px; /* Расстояние между стрелками */ | ||
position: absolute; /* Расположение стрелок относительно родительского элемента */ | ||
margin-left: 10px; /* Отступ от текста */ | ||
top: 50%; /* Выравнивание по вертикали на середину текста */ | ||
transform: translateY(-50%); /* Центрирование по вертикали */ | ||
z-index: 10; /* Убедитесь, что стрелки будут наверху */ | ||
} | ||
/* Стрелка вверх */ | ||
.triangle-up { | ||
width: 0; | ||
height: 0; | ||
border-left: 4px solid transparent; | ||
border-right: 4px solid transparent; | ||
border-bottom: 6px solid #e3afbc; /* Розовая стрелка вверх */ | ||
} | ||
/* Стрелка вниз */ | ||
.triangle-down { | ||
width: 0; | ||
height: 0; | ||
border-left: 4px solid transparent; | ||
border-right: 4px solid transparent; | ||
border-top: 6px solid #e3afbc; /* Розовая стрелка вниз */ | ||
} | ||
.triangle-up.active { | ||
border-bottom-color: #5d001e; | ||
} | ||
.triangle-down.active { | ||
border-top-color: #5d001e; | ||
} | ||
.triangle-up.inactive { | ||
border-bottom-color: #e3afbc; | ||
} | ||
.triangle-down.inactive { | ||
border-top-color: #e3afbc; | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.