-
Notifications
You must be signed in to change notification settings - Fork 0
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
Part 3 - Week 3 #3
base: main
Are you sure you want to change the base?
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,61 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>My CV</title> | ||
<link href="styles/style.css" rel="stylesheet"/> | ||
</head> | ||
<body class="dark"> | ||
<main class="business-card"> | ||
<article class="info"> | ||
<section class="info-general"> | ||
<div class="info-general__avatar"> | ||
<img id="avatar" src="assets/view/avatar.png" alt="my_avatar"> | ||
</div> | ||
<div class="info-general__name"> | ||
Sasha Rudnev | ||
</div> | ||
<div class="info-general__position"> | ||
Idler | ||
</div> | ||
<div class="info__links link"> | ||
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. неожиданно на обертке видеть класс link. Линк обычно это |
||
<section class="link__github"> | ||
<a href="https://github.com/Ralex2105"> | ||
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. скорее вот это должен быть |
||
<img id="github" src="assets/view/Octocat.png" alt="github"> | ||
</a> | ||
</section> | ||
<section class="link__vk"> | ||
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. section, по-смыслу (семантически) что-то более крупное - секция страницы с контентом. Для одной ссылки это мелкова-то. |
||
<a href="https://github.com/Ralex2105"> | ||
<img id="vk" src="assets/view/vk.png" alt="vk"> | ||
</a> | ||
</section> | ||
<section class="link__tg"> | ||
<a href="https://github.com/Ralex2105"> | ||
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. рекомендую ссылкам всегда давать классы, это обычно наиболее важные части страницы. Тогда базовые стили будет а в оповещении оверайд: или как элемент: |
||
<img id="telegram" src="assets/view/tg.png" alt="telegram"> | ||
</a> | ||
</section> | ||
</div> | ||
<section class="info-general__download-button"> | ||
<button id="download-button" type="submit">Download CV</button> | ||
</section> | ||
</section> | ||
<footer class="info-general__copyright">©2021 All rights reserved.</footer> | ||
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. а тут футер хорошо смотрится |
||
</article> | ||
<article class="experience"> | ||
<section class="experience-general"> | ||
<div class="experience-general__name"> | ||
Саша Руднев | ||
</div> | ||
<div class="experience-general__position"> | ||
Бездельник | ||
</div> | ||
<section class="change-theme" onclick="script()"> | ||
<button id="switch" type="submit">Change theme</button> | ||
</section> | ||
</section> | ||
</article> | ||
<script type="text/javascript" src="script.js"></script> | ||
</main> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function script() { | ||
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. в названии лучше отражать логику работы функции. Будет проще читать код и стектрейс. |
||
if (document.body.classList.contains("dark")) { | ||
document.body.classList.replace("dark", "light"); | ||
} else { | ||
document.body.classList.replace("light", "dark"); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
@import "themes.css"; | ||
|
||
html { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
display: flex; | ||
height: 100%; | ||
justify-content: center; | ||
align-items: center; | ||
font-family: Helevetica, sans-serif; | ||
} | ||
|
||
.business-card { | ||
width: 1127px; | ||
height: 595px; | ||
display: flex; | ||
left: 0; | ||
top:0; | ||
background: var(--bg); | ||
border-radius: 30px; | ||
color: var(--text); | ||
} | ||
|
||
.info { | ||
width: 380px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.info-general { | ||
height: 563px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-self: center; | ||
align-items: center; | ||
margin-top: 70px; | ||
} | ||
|
||
#avatar { | ||
border-radius: 50%; | ||
width: 180px; | ||
height: 180px; | ||
box-shadow: 12px 12px 7px rgba(0,0,0,0.2); | ||
} | ||
|
||
.info-general__name{ | ||
margin-top: 25px; | ||
margin-bottom: 8px; | ||
font-size: 38px; | ||
} | ||
|
||
.info__links { | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 16px; | ||
margin-bottom: 51px; | ||
} | ||
|
||
.link__vk { | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
} | ||
|
||
#github, #vk, #telegram { | ||
width: 24px; | ||
height: 24px; | ||
border-radius: 50%; | ||
background: var(--page); | ||
} | ||
|
||
#download-button { | ||
color: var(--text); | ||
padding: 12px 32px 12px 32px; | ||
text-align: center; | ||
font-size: 18px; | ||
border-radius: 40px; | ||
border: 3px solid var(--text); | ||
background-color: var(--bg); | ||
} | ||
|
||
#download-button:hover { | ||
background-color: var(--backgtround-another); | ||
color: var(--text-another); | ||
} | ||
|
||
.info-general__copyright { | ||
display: flex; | ||
font-size: 14px; | ||
margin-top: 66px; | ||
margin-bottom: 14px; | ||
height: 16px; | ||
} | ||
|
||
.experience-general { | ||
width: 747px; | ||
height: 595px; | ||
display: flex; | ||
flex-direction: column; | ||
background: var(--background-experience); | ||
border-radius: 30px; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
#switch { | ||
color: var(--text); | ||
padding: 10px 16px; | ||
text-align: center; | ||
font-size: 7px; | ||
border-radius: 40px; | ||
border: 3px solid var(--text); | ||
background-color: var(--background-experience); | ||
} | ||
|
||
.change-theme { | ||
margin-top: 10px; | ||
} | ||
|
||
#switch:hover { | ||
background-color: var(--backgtround-another); | ||
color: var(--text-another); | ||
} | ||
|
||
.experience-general__name { | ||
font-size: 62px; | ||
} | ||
|
||
.experience-general__position { | ||
font-size: 22px; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
:root .dark { | ||
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. все правильно. |
||
--page: #C4C4C4; | ||
--bg: #444444; | ||
--background-experience: #222222; | ||
--text: #FFFFFF; | ||
--backgtround-another: #FFFFFF; | ||
--text-another: #111111; | ||
} | ||
|
||
:root .light { | ||
--page: #C4C4C4; | ||
--bg: #FFFFFF; | ||
--background-experience: #bababa; | ||
--text: #111111; | ||
--backgtround-another: #444444; | ||
--text-another: #FFFFFF; | ||
} |
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.
не забывай, что id на странице должен быть уникальный, что требует и более уникальных названий.