Skip to content
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

Document Object Model - practice #159

Merged
merged 20 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add minor changes accordingly to remarks
  • Loading branch information
zhenyakornilov committed Aug 26, 2022
commit 5d71b53f983e8b58ed37f48d7be280144c1115f1
14 changes: 5 additions & 9 deletions submissions/zhenyakornilov/js-dom/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ button {
outline: inherit;
}

:root {
html {
font-size: 62.5%;
width: 100%;
height: 100%;
Expand Down Expand Up @@ -85,10 +85,6 @@ button {
right: 2rem;
}

.header .check-switch:checked + .theme-switcher .circle {
transform: translatex(2.4rem);
}

.header .theme-switcher {
position: relative;
display: flex;
Expand Down Expand Up @@ -129,8 +125,8 @@ button {
color: #f5f5dc;
}

.dropdown-wrap {
display: inline;
.check-switch:checked + .theme-switcher .circle {
transform: translateX(2.4rem);
}

.dropdown {
Expand Down Expand Up @@ -396,7 +392,7 @@ button {
}

@media screen and (max-width: 356px) {
:root {
html {
font-size: 50%;
}

Expand All @@ -406,7 +402,7 @@ button {
}

@media screen and (max-width: 290px) {
:root {
html {
font-size: 43%;
}

Expand Down
6 changes: 4 additions & 2 deletions submissions/zhenyakornilov/js-dom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ <h1 class="title">Top 5 Museums of Kyiv</h1>
</main>
<footer class="footer">
<a class="footer-link" href="https://github.com/zhenyakornilov" target="_blank">
<span><i class="fa-brands fa-github"></i> Yevhen Kornilov</span>
<span>
<i class="fa-brands fa-github"></i> Yevhen Kornilov
</span>
</a>
</footer>
</div>
<script src="js/index.js" type="module"></script>
</body>
</html>
</html>
10 changes: 5 additions & 5 deletions submissions/zhenyakornilov/js-dom/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ document.addEventListener("DOMContentLoaded", main);
function renderButtons(museumsObj, menu) {
let buttonsHTML = museumsObj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have plural, better name it like buttonsListHtml

.map(({ btnName }) => {
return (
`<li class="nav-item">` +
` <button class="btn-text">${btnName}</button>` +
`</li>`
);
return `
<li class="nav-item">
<button class="btn-text">${btnName}</button>
</li>
`;
})
.join("");

Expand Down