Last active
June 30, 2016 12:10
-
-
Save konstantinlis/b63e71074fa4a1948add23ef00587c4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTIONS = { | |
func1: function () { | |
}, | |
func2: function () { | |
}, | |
func3: function () { | |
}, | |
func4: function () { | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MENU.DRAW = { | |
init: function () { | |
for (var iten in MENU.ITEMS) { | |
this.drawItem(MENU.ITEMS[item]); | |
} | |
}, | |
drawItem: function (item) { | |
var newElement = MENU.ELEMENTS.getDiv(); | |
var newElement = MENU.ELEMENTS.getButton(); | |
newElement.appendChild(newElementA); | |
newElementA.innerHTML = item.title; | |
MENU.DRAW.menuElement.appendChild(newElement); | |
}, | |
menuElement: document.getElementById('menu') | |
}; | |
PAGE.DRAW = { | |
pageLayout: document.getElementById('pageLayout'), | |
init: function (pageContent) { | |
if (pageContent.type = 'main') { | |
PAGE.DRAW.drewMainPage(pageContent) | |
} | |
}, | |
drawMainPage: function (pageContent) { | |
var newElement = PAGE.ELEMENTS.getH2(); | |
newElement.innerText = pageContent.title; | |
var elementP = PAGE.ELEMENTS.getP(); | |
elementP.innerText = pageContent.description; | |
PAGE.DRAW.pageLayout.appendChild(newElement); | |
PAGE.DRAW.pageLayout.appendChild(elementP); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
border: 2px solid #000000; | |
} | |
table td{ | |
border: 1px solid #000000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="css/style.css"> | |
<title>Web-project</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<div id="menu" style="display: inline-block;"></div> | |
<div id="pageLayout" style="display: inline-block;"></div> | |
<script type="text/javascript" src='js/menu.js'></script> | |
<script type="text/javascript" src='js/page.js'></script> | |
<script type="text/javascript" src='js/action.js'></script> | |
<script type="text/javascript" src='js/drawer.js'></script> | |
<script type="text/javascript" src='js/index.js'></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MENU.DRAW.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PAGE = { | |
ELEMENTS: { | |
getDiv: function () { | |
return document.createElement('div'); | |
}, | |
getH2: function () { | |
return document.createElement('h2'); | |
}, | |
getP: function () { | |
return document.createElement('p'); | |
} | |
}, | |
MAINPAGE: { | |
title: 'Продаж рессорів', | |
discription: 'Каждый веб-разработчик знает, что такое текст-«рыба».'+ | |
'Текст этот, несмотря на название, не имеет никакого отношения к обитателям водоемов.'+ | |
'Используется он веб-дизайнерами для вставки на интернет-страницы и'+ | |
'демонстрации внешнего вида контента, просмотра шрифтов, абзацев, отступов и т.д.'+ | |
'Так как цель применения такого текста исключительно демонстрационная, то и смысловую'+ | |
'нагрузку ему нести совсем необязательно. Более того, нечитабельность текста сыграет на'+ | |
'руку при оценке качества восприятия макета.', | |
type: 'main', | |
logo: '' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment