-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #5078
base: master
Are you sure you want to change the base?
Develop #5078
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm test | ||
- name: Upload HTML report(backstop data) | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: report | ||
path: backstop_data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,61 @@ | |
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin="anonymous" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<div | ||
class="card" | ||
data-qa="card" | ||
> | ||
<img | ||
class="card__img" | ||
src="images/imac.jpeg" | ||
alt="picture product" | ||
/> | ||
<div class="product card__prod"> | ||
<h3 class="product__title"> | ||
APPLE A1419 iMac 27" Retina 5K (MNED2UA/A) | ||
</h3> | ||
<p class="product__code">Product code: 195434</p> | ||
</div> | ||
<div class="rewiews card__rewie"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typographical error in the class name 'rewiews'. It should be 'reviews' to maintain consistency and avoid potential styling issues. |
||
<div class="stars stars--4 rewiews__stars"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typo in the class name 'rewiews__stars'. It should be 'reviews__stars'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The class name 'rewiews__stars' contains a typographical error. It should be 'reviews__stars'. |
||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
</div> | ||
<div class="rewiews__count">Reviews: 5</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typo in the class name 'rewiews__count'. It should be 'reviews__count'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The class name 'rewiews__count' contains a typographical error. It should be 'reviews__count'. |
||
</div> | ||
<div class="price card__price"> | ||
<p class="price__titel">Price:</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typo in the class name 'price__titel'. It should be 'price__title'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typographical error in the class name 'price__titel'. It should be 'price__title'. |
||
<div class="price__current">$2,199</div> | ||
</div> | ||
<a | ||
class="btn-link btn-link--hover" | ||
data-qa="hover" | ||
href="#" | ||
> | ||
Buy | ||
</a> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
@use 'utils/variables' as v; | ||
@import 'utils/stars-block'; | ||
@import 'utils/bem-block'; | ||
|
||
html { | ||
box-sizing: border-box; | ||
} | ||
|
||
*, | ||
*::after, | ||
*::before { | ||
box-sizing: inherit; | ||
} | ||
|
||
h3, | ||
p { | ||
margin: 0; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
font-family: Roboto, sans-serif; | ||
font-weight: 400; | ||
font-style: normal; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
.card { | ||
max-width: 200px; | ||
width: 100%; | ||
padding: 32px 16px 16px; | ||
border-radius: 5px; | ||
|
||
&__img { | ||
width: 100%; | ||
margin-bottom: 40px; | ||
} | ||
&__prod { | ||
margin-bottom: 16px; | ||
} | ||
&__rewie { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typographical error in the class name 'rewie'. It should be 'review' to maintain consistency with the HTML and avoid potential styling issues. |
||
margin-bottom: 24px; | ||
} | ||
&__price { | ||
margin-bottom: 16px; | ||
} | ||
} | ||
|
||
.product { | ||
&__title { | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 150%; | ||
color: v.$col-blue; | ||
margin-bottom: 4px; | ||
} | ||
&__code { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 140%; | ||
color: v.$col-grey; | ||
} | ||
} | ||
|
||
.rewiews { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The class name 'rewiews' contains a typographical error. It should be 'reviews'. |
||
display: flex; | ||
justify-content: space-between; | ||
height: 16px; | ||
min-width: 116px; | ||
width: 100%; | ||
gap: 17px; | ||
|
||
&__stars { | ||
flex-grow: 1; | ||
} | ||
|
||
&__count { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 140%; | ||
text-align: right; | ||
color: v.$col-blue; | ||
} | ||
} | ||
|
||
.price { | ||
display: flex; | ||
justify-content: space-between; | ||
|
||
&__titel { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typographical error in the class name 'titel'. It should be 'title'. |
||
font-weight: 400; | ||
font-size: 12px; | ||
line-height: 150%; | ||
color: v.$col-grey; | ||
} | ||
|
||
&__current { | ||
font-weight: 700; | ||
font-size: 16px; | ||
line-height: 112%; | ||
text-align: right; | ||
color: v.$col-blue; | ||
} | ||
} | ||
|
||
.btn-link { | ||
display: block; | ||
border-radius: 5px; | ||
width: 166px; | ||
height: 40px; | ||
background-color: #00acdc; | ||
|
||
text-decoration: none; | ||
color: #fff; | ||
text-transform: uppercase; | ||
text-align: center; | ||
font-weight: 700; | ||
font-size: 14px; | ||
line-height: 40px; | ||
transition: all 0.3s; | ||
|
||
&--hover:hover { | ||
background-color: #fff; | ||
color: #00acdc; | ||
border: solid 1px #00acdc; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.stars { | ||
display: flex; | ||
|
||
&__star { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(../images/star.svg); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
margin-right: 4px; | ||
} | ||
|
||
&__star:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
&--1 &__star:nth-child(1), | ||
&--2 &__star:nth-child(-n + 2), | ||
&--3 &__star:nth-child(-n + 3), | ||
&--4 &__star:nth-child(-n + 4), | ||
&--5 &__star:nth-child(-n + 5) { | ||
background-image: url(../images/star-active.svg); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$col-blue: #060b35; | ||
$col-grey: #616070; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the class name 'rewiews'. It should be 'reviews' to maintain consistency and avoid potential issues with styling or JavaScript functionality.