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

Loft photo #479

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
9 changes: 9 additions & 0 deletions projects/loft-photo/commentsTemplate.html.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{#each list}}
<div class="component-comment">
<div class="component-comment-photo" style="background-image: url('{{photo}}')"></div>
<div class="component-comment-content">
<div class="component-comment-name">{{name}}</div>
<div class="component-comment-text">{{text}}</div>
</div>
</div>
{{/each}}
4 changes: 4 additions & 0 deletions projects/loft-photo/images/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions projects/loft-photo/images/button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/loft-photo/images/chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions projects/loft-photo/images/exit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/loft-photo/images/heart-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/loft-photo/images/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions projects/loft-photo/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/loft-photo/images/send.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions projects/loft-photo/images/vert1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions projects/loft-photo/images/vert2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions projects/loft-photo/images/vert3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions projects/loft-photo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pages from './pages';
import mainPage from './mainPage';
import loginPage from './loginPage';
// import profilePage from './profilePage';
import('./styles.css');

pages.openPage('login');
loginPage.handleEvents();
mainPage.handleEvents();
66 changes: 66 additions & 0 deletions projects/loft-photo/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=360,user-scalable=false" />
<title>Loft Photo</title>
<script src="http://vk.com/js/api/openapi.js"></script>
</head>

<body>
<div id="app">
<div class="page page-login hidden">
<div class="page-login-vert1"></div>
<div class="page-login-vert2"></div>
<div class="page-login-vert3"></div>
<div class="page-login-logo">
<div class="page-login-image"></div>
<div class="page-login-text">Не пропустите лучшие моменты из жизни ваших друзей!</div>
</div>
<button class="page-login-button"></button>
</div>
<div class="page page-main hidden">
<div class="component-photo"></div>
<div class="component-header">
<a class="component-header-profile-link" href="#">
<div class="component-header-photo"></div>
<div class="component-header-name"></div>
</a>
</div>
<div class="component-footer">
<div class="component-footer-container">
<a href="#" class="component-footer-container-social-comments">
0
</a>
<a href="#" class="component-footer-container-social-likes">
0
</a>
<a class="component-footer-container-profile-link" href="#">
<div class="component-footer-photo"></div>
</a>
<div class="component-comments hidden">
<div class="component-comments-container">
<div class="component-comments-container-title">Комментарии</div>
<div class="component-comments-container-list"></div>
<div class="component-comments-container-form">
<input type="text" class="component-comments-container-form-input" placeholder="Введите текст"/>
<div class="component-comments-container-form-send"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="page page-profile hidden">
<a href="#" class="page-profile-back"></a>
<a href="#" class="page-profile-exit"></a>
<div class="component-user-info">
<div class="component-user-info-photo"></div>
<div class="component-user-info-name"></div>
</div>
<div class="component-user-photos"></div>
</div>

</div>
</body>
</html>
15 changes: 15 additions & 0 deletions projects/loft-photo/loginPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import model from './model';
import pages from './pages';
import mainPage from './mainPage';

export default {
handleEvents() {
document.querySelector('.page-login-button').addEventListener('click', async () => {
await model.login();
await model.init();

pages.openPage('main');
await mainPage.getNextPhoto();
});
},
};
Loading