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

CSS and Theme task #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Binary file added images/Mountain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/social/github-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/social/ok-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 57 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,67 @@
<head>
<meta charset="UTF-8">
<title>Personal Webpage</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script>
document.addEventListener("DOMContentLoaded", function(event) {
document.querySelector("#switch-theme").addEventListener('click', switchTheme);
});

function switchTheme() {
let bodyCardClassList = document.querySelector("body").classList;
bodyCardClassList.toggle("_dark-theme");
bodyCardClassList.toggle("_light-theme");
}
</script>
</head>
<body>
<div class="left_block" style="display: inline-block;">
<div class="avatar">
/*put some picture here*/
</div>
<div class="left_block_name">
Artem Shevtsov
</div>
<div class="left_block_position">
Student, 2 course
</div>
<div class="social_media">
<div class="first_social">

</div>
<div class="second_social">

</div>
<div class="third_social">

</div>
</div>
<div class="cv_button">
<button>
Download CV
</button>
</div>
<div class="copyright">
©2021 All right reserved.
</div>
<div class="theme_switch">
<button class="theme_switch_button" onclick=switchTheme()>
SWITCH
</button>
</div>
<div class="right_block" style="display: inline-block;">
<div class="right_block_name">
Artem Shevtsov
<div class="card">
<div class="info_block">
<div class="info_block_content">
<div class="info_block_content_avatar">
<img class="info_block_content_avatar_image" src="images/Mountain.png" />
</div>
<div class="info_block_content_name">
Shevtsov Artem
</div>
<div class="info_block_content_prof">
Mad Scientist
</div>
<div class="info_block_content_socials">
<a class="info_block_content_socials_link" href="https://ok.ru/profile/584914008503">
<img class="info_block_content_socials_link_image" src="images/social/ok-logo.jpg" />
</a>
<a class="info_block_content_socials_link" href="https://github.com/PrimeFall">
<img class="info_block_content_socials_link_image" src="images/social/github-logo.png" />
</a>
<a class="info_block_content_socials_link" href="https://ok.ru/profile/584914008503">
<img class="info_block_content_socials_link_image" src="images/social/ok-logo.jpg" />
</a>
</div>
<div>
<button class="info_block_content_download_button">
Download CV
</button>
</div>
</div>
<footer class="info_block_copyright">
©2021 All rights reserved.
</footer>
</div>
<div class="right_block_position">
Student, 3 course
<div class="right_block">
<div class="right_block_content">
<div class="right_block_content_name">
Shevtsov Artem
</div>
<div class="right_block_content_prof">
Mad Scientist
</div>
</div>
</div>
</div>
</body>
Expand Down
163 changes: 163 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
body {
font-family: Helvetica, sans-serif;
display: flex;
align-content: center;
justify-content: center;
margin: 0;
padding: 0;
}

body._light-theme {
background-color: #FFFFFF;
}

body._dark-theme {
background-color: #000000;
}

.theme_switch {
position: absolute;
right: 10px;
top: 10px;
}

.theme_switch_button {
color: #FFFFFF;
font-style: normal;
font-weight: normal;
font-size: 17px;
text-align: center;
padding: 10px 30px;
border: 3px solid #FFFFFF;
border-radius: 40px;
}

.card {
position: absolute;
display: flex;
height: 595px;
width: 1127px;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
border-radius: 30px;
background-color: #444444;
}

.info_block {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 34%;
}

.info_block_content {
display: flex;
flex-direction: column;
flex-grow: 1;
text-align: center;
}

.info_block_content_avatar {
display: flex;
justify-content: center;
margin-top: 70px;
}

.info_block_content_avatar_image {
display: flex;
height: 180px;
width: 180px;
border-radius: 50%;
}

.info_block_content_name {
color: #FFFFFF;
font-style: normal;
font-weight: bold;
font-size: 38px;
text-align: center;
line-height: 44px;
margin-top: 30px;
}

.info_block_content_prof {
color: #FFFFFF;
font-style: normal;
font-weight: normal;
font-size: 20px;
text-align: center;
line-height: 23px;
margin-top: 8px;
}

.info_block_content_socials {
display: flex;
align-self: center;
justify-content: space-between;
margin-top: 16px;
}

.info_block_content_socials_link_image {
height: 24px;
width: 24px;
border-radius: 50%;
margin-left: 5px;
margin-right: 5px;
background-color: #888888;
}

.info_block_content_download_button {
color: #FFFFFF;
font-style: normal;
font-weight: normal;
font-size: 17px;
text-align: center;
margin-top: 57px;
padding: 10px 30px;
background: transparent;
border: 3px solid #FFFFFF;
border-radius: 40px;
}

.info_block_copyright {
color: #FFFFFF;
font-style: normal;
font-weight: normal;
font-size: 14px;
margin-bottom: 16px;
}

.right_block {
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 66%;
border-radius: 30px;
background-color: #222222;
}

.right_block_content {
position: relative;
top: 42%;
}

.right_block_content_name {
color: #FFFFFF;
font-style: normal;
font-weight: bold;
font-size: 62px;
text-align: center;
line-height: 71px;
}

.right_block_content_prof {
color: #FFFFFF;
font-style: normal;
font-weight: normal;
font-size: 22px;
text-align: center;
line-height: 25px;
margin-top: 8px
}