-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
add task solution #5742
base: master
Are you sure you want to change the base?
add task solution #5742
Changes from all 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 |
---|---|---|
|
@@ -15,8 +15,50 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header> | ||
<div class="logo"> | ||
<a href="http://localhost:8080/"> | ||
<img | ||
src="./images/logo.png" | ||
alt="Moyo_shop_Gadgets" | ||
width="40px" | ||
height="40px" | ||
/> | ||
</a> | ||
</div> | ||
<nav aria-label="Main navigation"> | ||
<ul> | ||
<li> | ||
<a | ||
href="#" | ||
class="is-active" | ||
> | ||
APPLE | ||
</a> | ||
</li> | ||
<li><a href="#">SAMSUNG</a></li> | ||
<li><a href="#">SMARTPHONES</a></li> | ||
<li> | ||
<a | ||
href="#" | ||
data-qa="hover" | ||
> | ||
LAPTOPS & COMPUTERS | ||
</a> | ||
</li> | ||
<li><a href="#">GADGETS</a></li> | ||
<li><a href="#">TABLETS</a></li> | ||
<li><a href="#">PHOTO</a></li> | ||
<li><a href="#">VIDEO</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
Comment on lines
+25
to
+62
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. Consider adding more ARIA attributes or roles to improve accessibility, especially for the navigation menu. This can help users with assistive technologies better understand the structure and purpose of the navigation elements. |
||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,91 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
Comment on lines
+1
to
+5
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. Using the universal selector |
||
|
||
body { | ||
font-family: Roboto, sans-serif; | ||
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. Consider setting a default font-size for the body to ensure consistent text sizing across different browsers and devices. |
||
font-size: 12px; | ||
} | ||
|
||
header { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.logo { | ||
height: 60px; | ||
display: flex; | ||
align-items: center; | ||
margin-left: 50px; | ||
} | ||
|
||
.logo img { | ||
height: 40px; | ||
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 |
||
margin: 0; | ||
} | ||
|
||
nav { | ||
display: flex; | ||
align-items: center; | ||
margin-right: 50px; | ||
} | ||
|
||
nav a { | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
color: #000; | ||
text-decoration: none; | ||
font-family: Roboto, sans-serif; | ||
font-weight: 500; | ||
font-size: 12px; | ||
} | ||
|
||
nav ul { | ||
display: flex; | ||
list-style: none; | ||
align-items: center; | ||
gap: 20px; | ||
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 |
||
} | ||
|
||
nav ul li { | ||
height: 60px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
nav ul li:first-child { | ||
margin-left: 0; | ||
margin-top: 0; | ||
} | ||
|
||
nav ul li:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
nav a:hover { | ||
color: #00acdc; | ||
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. Consider defining a CSS variable for the blue color |
||
} | ||
|
||
nav a.is-active { | ||
color: #00acdc; | ||
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. Consider defining a CSS variable for the blue color |
||
text-transform: uppercase; | ||
position: relative; | ||
} | ||
Comment on lines
+74
to
+78
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 |
||
|
||
nav a.is-active::after { | ||
content: ''; | ||
display: block; | ||
width: 37px; | ||
height: 4px; | ||
background-color: #00acdc; | ||
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. Consider defining a CSS variable for the blue color |
||
border-radius: 8px; | ||
position: absolute; | ||
bottom: 0; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} |
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.
Consider adding a
<h1>
tag within the header to provide a main heading for the page. This is important for accessibility and SEO, as it helps screen readers and search engines understand the main topic of the page.