Skip to content

Commit

Permalink
Merge pull request #61 from ViktorSvertoka/rating_modal
Browse files Browse the repository at this point in the history
add: rating modal
  • Loading branch information
ViktorSvertoka authored Aug 14, 2024
2 parents 78480ad + c31c961 commit e1d245e
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 187 deletions.
2 changes: 1 addition & 1 deletion src/css/layout/05-modal-exercise.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
display: flex;
align-items: center;
justify-content: center;
padding: 0;
padding: 0px;
stroke: var(--color-white);
background-color: rgba(0, 0, 0, 0);
border: none;
Expand Down
203 changes: 141 additions & 62 deletions src/css/layout/06-modal-rating.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,89 +17,45 @@
}
}

.rating-fieldset {
margin: 0;
padding: 0;
border: none;
display: flex;
gap: 2px;
}

.rating-close-btn {
position: absolute;
top: 14px;
right: 14px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 7px;
margin: 0;
border: none;
background-color: transparent;
cursor: pointer;
}

.rating-icon-close {
width: 24px;
height: 24px;
width: 20px;
height: 20px;
stroke-width: 1.5px;
stroke: #f4f4f4;
transition: all var(--transition-dur-and-func);
}

@media screen and (min-width: 768px) {
.rating-icon-close {
width: 28px;
height: 28px;
}
.rating-icon-close:hover {
transform: rotate(270deg);
}

.rating-icon-close:hover,
.rating-icon-close:focus {
cursor: pointer;
border-radius: 50%;
background-color: #000000;
}

.rating-input {
display: none;
transform: rotate(270deg);
}

.rating-star {
fill: rgba(244, 244, 244, 0.2);
}

.rating-star.rated {
fill: #eea10c;
}

.rating-label {
display: flex;
cursor: pointer;
margin: 2px;
width: 24px;
height: 24px;
}

.rating-title {
color: #f4f4f4;
opacity: 0.4;
font-feature-settings: 'clig' off, 'liga' off;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 18px;
.form__label {
margin-bottom: 8px;
}

.rating-value {
color: #f4f4f4;
font-family: 'DM Sans';
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 18px;
height: 19px;
margin: 5px;
}

.rating-form {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: rgba(244, 244, 244, 0.4);
}

.rating-email {
Expand Down Expand Up @@ -152,7 +108,7 @@
}
}

.rating-submit-btn {
.form__btn {
font-size: 14px;
font-style: normal;
font-weight: 400;
Expand All @@ -168,9 +124,132 @@
}

@media screen and (min-width: 768px) {
.rating-submit-btn {
.form__btn {
font-size: 16px;
line-height: 24px;
margin-top: 32px;
}
}

.form__btn[disabled] {
background-color: #f0f0f0;
color: #a0a0a0;
cursor: not-allowed;
}

.rating {
display: flex;
align-items: flex-start;
gap: 4px;
margin-bottom: 8px;
}

.rating__value {
color: #f4f4f4;
font-feature-settings: 'liga' off, 'clig' off;
font-family: 'DM Sans';
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 18px;
padding-top: 1px;
margin-top: 1px;
}

.rating__body {
position: relative;
}

.rating__body::before {
content: '★★★★★';
display: block;
color: rgba(244, 244, 244, 0.2);
font-size: 20px;
letter-spacing: 6px;
}

.rating__active {
position: absolute;
width: 0;
height: 100%;
top: 0;
left: 0;
overflow: hidden;
font-size: 20px;
letter-spacing: 6px;
}

.rating__active::before {
content: '★★★★★';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
color: #eea10c;
}

.rating__items {
display: flex;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}

.rating__item {
flex: 0 0 20%;
height: 100%;
opacity: 0;
}

.rating-email {
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 18px;
display: inline-flex;
align-items: center;
width: 100%;
margin-top: 20px;
padding: 12px 14px;
border-radius: 30px;
border: 1px solid #f4f4f4;
color: #f4f4f4;
background-color: transparent;
}

@media screen and (min-width: 768px) {
.rating-email {
font-size: 16px;
line-height: 24px;
margin-top: 32px;
}
}

.rating-comment {
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 18px;
display: inline-flex;
align-items: center;
height: 94px;
width: 100%;
margin-top: 10px;
padding: 12px 14px;
gap: 10px;
border: 1px solid #f4f4f4;
border-radius: 15px;
color: #f4f4f4;
background-color: transparent;
}

@media screen and (min-width: 768px) {
.rating-comment {
font-size: 16px;
line-height: 24px;
margin-top: 16px;
}
}
2 changes: 1 addition & 1 deletion src/img/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e1d245e

Please sign in to comment.