Add haml and css for custom modals

This commit is contained in:
Meron Ogbai
2021-09-09 06:18:46 +03:00
parent f8486bcbf8
commit d4f7b318e7
3 changed files with 49 additions and 0 deletions

View File

@@ -134,3 +134,33 @@ table.index td.actions {
color: $warning-red;
}
}
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.4);
text-align: center;
.modal-content {
background-color: $color-1;
margin: 15% auto;
padding: 1.2em;
width: 30%;
border-radius: 1em;
border: 1px solid $color-border;
}
.modal-title {
font-size: $h4-size;
}
.message {
font-size: $h5-size;
padding: 1.2em 0;
}
}

View File

@@ -0,0 +1,8 @@
#custom-alert.modal
.modal-content
.modal-title
%i.icon-warning-sign
.message
.action-buttons
%button.confirm
= t(:ok)

View File

@@ -0,0 +1,11 @@
#custom-confirm.modal
.modal-content
.modal-title
%i.icon-question-sign
.message
= t(:are_you_sure)
.action-buttons
%button.cancel
= t(:cancel)
%button.confirm.red
= t(:ok)