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

Homework 3 #6

Open
wants to merge 1 commit 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
152 changes: 152 additions & 0 deletions app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
:root .dark-theme {
color: white;
background-color: white;
--visit-card-background: #444444;
--visit-card__big-field-background: #222222;
--avatar-shadow-background: grey;
--button-color: white;
--visit-card__theme-switcher-color: #606060;
}

:root .light-theme {
color: black;
background-color: #606060;
--visit-card-background: #BBBBBB;
--visit-card__big-field-background: #DDDDDD;
--avatar-shadow-background: white;
--button-color: black;
--visit-card__theme-switcher-color: #C4C3C3;
}

body {
font-family: Helvetica, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 595px;
flex-direction: column;
}

.visit-card {
display: flex;
justify-content: center;
background-color: var(--visit-card-background);
width: 1127px;
height: 595px;
top: 50%;
left: 50%;
border-radius: 30px;
}

.visit-card__main-information {
width: 380px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}

.main-column__connection {
display: flex;
width: 100px;
justify-content: space-between;
align-items: center;
}

.main-information__cv-button {
display: flex;
align-items: center;
justify-content: center;
border: 3px solid var(--button-color);
color: var(--button-color);
width: 168px;
height: 46px;
border-radius: 40px;
font-size: 17px;
background-color: var(--visit-card-background);
//transition: padding 0.5s, background-color 0.5s, font-size 0.5s;
}

.visit-card__switch-theme {
display: flex;
position: absolute;
top: 10px;
right: 10px;
align-items: center;
justify-content: center;
border: 3px solid var(--button-color);
color: var(--button-color);
width: 60px;
height: 30px;
border-radius: 20px;
font-size: 12px;
background-color: var(--visit-card-background);
}

.visit-card__big-field {
height: 595px;
width: 747px;
left: 380px;
border-radius: 30px;
background-color: var(--visit-card__big-field-background);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.main-column__avatar {
width: 180px;
margin-top: 23px;
margin-bottom: 8px;
border-radius: 50%;
box-shadow: 12px 12px 0 var(--avatar-shadow-background);
}

.visit-card__my-name {
text-align: center;
font-size: 36px;
font-weight: bold;
}

.visit-card__my-profession {
font-size: 20px;
}

.icon {
width: 24px;
border-radius: 50%;
display: block;
}

.visit-card__main {
display: flex;
flex-direction: column;
text-align: center;
justify-content: center;
}

footer {
font-size: 14px;
margin-bottom: 15px;
}

.visit-card__name {
font-weight: bold;
font-size: 62px;
line-height: 71px;
text-align: center;
}

.visit-card__profession {
font-size: 22px;
}

.visit-card__main-column {
margin-top: 12.5%;
height: 350px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
9 changes: 9 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
document.addEventListener("DOMContentLoaded", function(event) {
document.querySelector("#visit-card__switch-theme").addEventListener('click', switchTheme);
});

function switchTheme() {
let bodyCardClassList = document.querySelector("body").classList;
bodyCardClassList.toggle("dark-theme");
bodyCardClassList.toggle("light-theme");
}
Binary file added assets/avatar.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 assets/github.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 assets/ok.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 assets/vk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions visit_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Ekaterina Borisova</title>
<link rel="stylesheet" href="app.css">
</head>

<body class="dark-theme">
<div class="visit-card">
<div class="visit-card__main-information">
<div class="visit-card__main-column">

<img class="main-column__avatar visit-card"
src="assets/avatar.png"
alt="avatar"/>

<div class="visit-card__my-name">Ekaterina Borisova</div>
<div class="visit-card__my-profession">Software engineer</div>

<nav class="main-column__connection visit-card">
<a href="https://ok.ru/profile/569442670075" target="_blank"><img class="icon" src="assets/ok.png" alt="ok"/></a>
<a href="https://vk.com/kateboriso" target="_blank"><img class="icon" src="assets/vk.png" alt="vk"/></a>
<a href="https://github.com/KateBor" target="_blank"><img class="icon" src="assets/github.png" alt="github"/></a>
</nav>
</div>
<button class="main-information__cv-button visit-card">
<span>Download CV</span>
</button>
<footer>
<div>©2020 All rights reserved.</div>
</footer>
</div>
<div class="visit-card__big-field">
<div class="visit-card__main">
<div class="visit-card__name">Ekaterina Borisova</div>
<div class="visit-card__profession">Software engineer</div>
</div>
</div>
<div id="visit-card__switch-theme" class="visit-card__switch-theme">
<span>Switch</span>
</div>
</div>
<script src="./app.js"></script>
</body>
</html>