Skip to content

Conversation

@GeorgeTsendra
Copy link
Collaborator

No description provided.

Copy link
Member

@OlegLustenko OlegLustenko left a comment

Choose a reason for hiding this comment

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

please move bootstrap to cdn and remove scss from git

</form>
<table class="table table-hover contacts">
${createTh(['Name',"Last name", "Number"])}
Copy link
Member

Choose a reason for hiding this comment

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

please move function methods to the class

${createNav("glyphicon glyphicon-search", ``,`true`)}
${createNav("tab-text", `Context`)}
</a>
<a href="keypad.html" class="tab">
Copy link
Member

Choose a reason for hiding this comment

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

I believe you could make links more reusable.

What if one day you have to set class but the click ? or something more expensive.

I guess it could look that way

<nav class="main-nav">
 this.renderLink({ content:'Contacts', className:'active', icon:'search'});
 this.renderLink({ content:'Keypad', icon:'th'});
 this.renderLink({ content:'Edit contact' });
 ...
</nav>

We could reuse some HTML parts and create a smaller reusable blocks

let buildHtmlTags = () => {
let body = document.body;

body.innerHTML += `<header class="header">
Copy link
Member

Choose a reason for hiding this comment

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

document.body.innerHTML not sure I like to use document.body.

You have to create an additional tag at index.html and call it, for example,

<div id="mountNode"></div>

And update content only inside such node. updating the whole document.body is too risky



<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

please remove bootstrap and jquery

numberAdd(arr){

let numbArr = arr.map( value =>
`<button class="key" OnClick=" myKeyad.outputNumb(${value}) ">${value}</button>`
Copy link
Member

Choose a reason for hiding this comment

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

are you sure about OnClick handler ?

<span id="numberInput" class ="numbers"></span>
<span class="glyphicon glyphicon-circle-arrow-left" aria-hidden="true" OnClick="myKeyad.glyphicon()"></span>
</div>
${this.numberAdd(['1','2','3','4','5','6','7','8','9'," \* " ,'0',"\#" ])}
Copy link
Member

Choose a reason for hiding this comment

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

?????

main.innerHTML += `<header class="header">
<div class="container top-radius">
<div class="user-top-line">
<a href="index.html">
Copy link
Member

Choose a reason for hiding this comment

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

please make layout pretty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants