-
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
Part5 #4
base: main
Are you sure you want to change the base?
Part5 #4
Changes from 10 commits
80d1a2b
ef155b1
116210e
0719df6
6e403e6
ba2b830
05b2804
1e06ebe
b699b08
4091db5
c30cb89
2bdef0e
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 @@ | ||
node_modules |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1 +1 @@ | ||
# Galeev_Artur | ||
# Galeev_Artur |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Если нужен такого рода импорт, придется поставить rollup scss plugin | ||
// В остальных случаях все стили подтянет gulp, просто по маске src/styles/**/*.less и скомпилирует их в единый css файл | ||
// import './styles/layout.scss'; | ||
|
||
function changeTheme() { | ||
let bodyCardClassList = document.querySelector("body").classList; | ||
bodyCardClassList.toggle("dark-theme"); | ||
bodyCardClassList.toggle("light-theme"); | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", function (event) { | ||
document.body.addEventListener('click', changeTheme); | ||
}); | ||
|
||
function toElement(name, progress) { | ||
let newSkillDiv = document.createElement('div'); | ||
newSkillDiv.classList.add('skills-list_skill'); | ||
newSkillDiv.innerHTML = | ||
' <section class="skill-left">' + | ||
' <div class="skill-left_name">' + | ||
' ' + name.toString() + | ||
' </div>' + | ||
' <div class="skill-left_progress">' + | ||
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. Просто для информации есть возможность использовать темплейты для реализации https://developer.mozilla.org/ru/docs/Web/HTML/Element/template, но текущий способ тоже ок, если подправить на современные литералы строки |
||
' <div class="skill_bar" style="width:' + progress.toString() + '%"></div>' + | ||
' </div>' + | ||
' </section>' + | ||
' <section class="skill-right">' + | ||
' <div class="skill-right_delete">' + | ||
' <img class="skill-right_delete_img" src="assets/minus-light.png" alt="h">' + | ||
' </div>' + | ||
' </section>' | ||
; | ||
let img = newSkillDiv.getElementsByClassName("skill-right_delete_img").item(0); | ||
img.addEventListener('click', () => { | ||
newSkillDiv.remove(); | ||
}); | ||
return newSkillDiv; | ||
} | ||
|
||
|
||
var list = document.getElementById('skills_list'); | ||
var applyBtn = document.getElementById("apply-button"); | ||
var nameField = document.getElementById("name"); | ||
var numberField = document.getElementById("number"); | ||
|
||
// Example | ||
list.appendChild(toElement('JAVA', 90)); | ||
list.appendChild(toElement('C++', 60)); | ||
|
||
applyBtn.addEventListener('click', () => { | ||
if (!(nameField.value === '') && !(numberField.value === '') ) { | ||
list.appendChild(toElement(nameField.value, numberField.value)); | ||
} | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Curriculum vitae</title> | ||
<!-- inject:css --> | ||
<link rel="stylesheet" href="./style.css"> | ||
<!-- endinject --> | ||
</head> | ||
<body class="light-theme"> | ||
<div class="main-card"> | ||
<section class="left-part-wrapper"> | ||
<div class="left-part_main"> | ||
<div class="left-part_photo"> | ||
<img class="left-part_photo-img" src="assets/face.jpg" alt="photo"/> | ||
</div> | ||
<div class="left-part_employee-FIO"> | ||
Alex Smith | ||
</div> | ||
<div class="left-part_employee-speciality"> | ||
Web Designer | ||
</div> | ||
<div class="left-part_social-networks"> | ||
<a href="https://www.vk.com/coradead"> | ||
<img class="left-part_social-networks-img" src="assets/vk-logo.png" height="24" alt="vk-logo"> | ||
</a> | ||
<a href="https://www.telegram.me/coradead"> | ||
<img class="left-part_social-networks-img" src="assets/tg-logo.png" height="24" alt="telegram-logo"> | ||
</a> | ||
<a href="https://www.github.com/coradead"> | ||
<img class="left-part_social-networks-img" src="assets/git-logo.png" height="24" alt="github-logo"> | ||
</a> | ||
</div> | ||
<div class="left-part_download"> | ||
<button class="left-part_download-button"> | ||
Download CV | ||
</button> | ||
</div> | ||
<footer class="left-part_copyright"> | ||
© 2021 All rights reserved. | ||
</footer> | ||
</div> | ||
</section> | ||
<section class="right-part-wrapper"> | ||
<div class="right-part_main"> | ||
<div class="right-part_second-page"> | ||
<div class="right-part_second-page_title"> | ||
Coding skills: | ||
</div> | ||
<div class="right-part_second-page_skills-list" id="skills_list"> | ||
|
||
</div> | ||
<div class="right-part_second-page_new-skill_form"> | ||
<div class="form"> | ||
<input type="text" id="name" class="form_input" autocomplete="off" placeholder=" "> | ||
<label for="name" class="form_label">Name of skill</label> | ||
</div> | ||
<p></p> | ||
<div class="form"> | ||
<input type="number" id="number" class="form_input" autocomplete="off" placeholder=" "> | ||
<label for="number" class="form_label">Level of skill</label> | ||
</div> | ||
<p></p> | ||
<button id="apply-button" class="apply-button" role="button">ADD NEW</button> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<!-- inject:js --> | ||
<script src="./app.js"></script> | ||
<!-- endinject --> | ||
</body> | ||
</html> |
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.
Почму используется конструкция раздельных строк кода через сложения, есть же литералы
Hello! ${name.toString()}
, также вызов toString() не имеет смысла переменная сама приводится к строке