/
valentingordienko
/
JavaScript_LoftSchool_course
Обзор
Документация
Войти
/
valentingordienko
/
JavaScript_LoftSchool_course
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DZ_10/MVC/index.html
140 строк
4 KB
Valentin Gordienko
DZ_10--MVC сделал две первые задачи
24 авг 2016, 15:41
24 авг 2016, 15:41
de09846
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> <script src="http://vk.com/js/api/openapi.js" type="text/javascript"></script> <style> .friend { float: left; margin: 15px; } .group, .album, .photo { display: inline-block; box-sizing: border-box; padding: 0; width: 100px; vertical-align: top; margin: 15px; } .album { width: 11.3%; margin: 15px 5px; border: 1px solid black; cursor: pointer; } .photo { width: 22%; margin: 15px 15px; } .album__img, .photo_img { width: 100%; } </style> </head> <body> <div class="container"> <div id="header"></div> <div class="btn-group btn-group-lg"> <button type="button" class="btn btn-default" onclick="Router.handle('music')">Музыка</button> <button type="button" class="btn btn-default" onclick="Router.handle('friends')">Друзья</button> <button type="button" class="btn btn-default" onclick="Router.handle('news')">Новости</button> <button type="button" class="btn btn-default" onclick="Router.handle('groups')">Группы</button> <button type="button" class="btn btn-default" onclick="Router.handle('albums')">Фотографии</button> </div> <hr> <div id="results"></div> </div> <script src="model.js"></script> <script src="view.js"></script> <script src="controller.js"></script> <script src="router.js"></script> <script src="entry.js"></script> <script type="text/x-handlebars-template" id="headerTemplate"> <h1>Данные из VK-аккаунта: {{first_name}} {{last_name}}</h1> </script> <script type="text/x-handlebars-template" id="musicTemplate"> <ul class="list-group" id="audioList"> {{#each list}} <li class="list-group-item"> <div class="row"> <div class="col-xs-10"> <span class="title">{{{artist}}} - {{{title}}}</span> </div> <div class="col-xs-2 text-right">{{formatTime duration}}</div> </div> </li> {{/each}} </ul> </script> <script type="text/x-handlebars-template" id="friendsTemplate"> <div id="friendsList"> {{#each list}} <div class="friend text-center"> <img src="{{photo_100}}" class="img-circle"> <div>{{first_name}}<br>{{last_name}}</div> </div> {{/each}} </div> </script> <script type="text/x-handlebars-template" id="newsTemplate"> <div class="news"> {{#each list}} {{#if text}} <div class="post"> <b>{{formatDate date}}</b> <div class="post-text">{{{text}}}</div> </div> <hr> {{/if}} {{/each}} </div> </script> <script type="text/x-handlebars-template" id="groupsTemplate"> <div id="groupsList"> {{#each list}} <div class="group text-center"> <img src="{{photo_100}}" class="img-circle"> <div>{{name}}</div> </div> {{/each}} </div> </script> <script type="text/x-handlebars-template" id="albumsTemplate"> <div id="albumsList"> {{#each list}} <div class="album text-center" onclick="Controller.photosRoute('{{id}}')"> <img src="{{thumb_src}}" class="album__img"> <div>{{title}}</div> </div> {{/each}} </div> </script> <script type="text/x-handlebars-template" id="photosTemplate"> <div id="photosList"> {{#each list}} <div class="photo text-center"> <img src="{{photo_604}}" class="photo_img"> <p>Понравилась: {{likes.count}} раз.</p> <p>Поделились: {{reposts.count}} раз.</p> <p>Комментариев: {{comments.count}} шт.</p> </div> {{/each}} </div> </script> </body> </html>