-
Notifications
You must be signed in to change notification settings - Fork 0
/
vk.html
89 lines (81 loc) · 2.88 KB
/
vk.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.12/handlebars.min.js"></script>
<script src="https://vk.com/js/api/openapi.js" type="text/javascript"></script>
<title>Document</title>
</head>
<body>
<div class="container">
<div id="header"></div>
<div class="btn-group btn-group-lg">
<a href="#friends" class="btn btn-default" data-role="nav-friends">Друзья</a>
<a href="#news" class="btn btn-default" data-role="nav-news">Новости</a>
</div>
<hr>
<div id="results"></div>
</div>
<script src="entry.js" type="module"></script>
<script id="headerTemplate" type="text/template">
<h1>Данные из vk-аккаунта {{ first_name }} {{ last_name }}</h1>
</script>
<script id="friendsTemplate" type="text/template">
<div>
<select data-role="sort">
<option value="name">По имени</option>
<option value="bday">По дате рождения</option>
</select>
<div class="flex-container">
{{#each list}}
<div class="friend text-center">
<a href="#friends/{{id}}"><img src="{{photo_100}}" alt="Person's photo" class="img-circle"></a>
<div>{{first_name}} {{last_name}}</div>
<div>{{formatBDay bdate}}</div>
{{#if online}}
<div>Статус: Online</div>
{{/if}}
</div>
{{/each}}
</div>
</div>
</script>
<script id="friendTemplate" type="text/template">
<div>
<img src="{{photo_100}}" alt="Person's photo" class="img-circle">
<div>Имя: {{first_name}} </div>
<div>Фамилия: {{last_name}}</div>
<div>Страна:{{country.title}} </div>
{{#if city}}
<div>Город:{{city.title}}</div>
{{/if}}
{{#if bdate}}
<div>День Рождения: {{formatBDay bdate}}</div>
{{/if}}
{{#if online}}
<div>Статус: Online</div>
{{/if}}
</div>
</script>
<script id="newsTemplate" type="text/template">
<div class="news">
{{#each list}}
{{#if text}}
<div class="post">
<b>{{formatDate date}}</b>
<div class="post-text">{{text}}</div>
<div><b>❤️ {{likes.count}} ⮞ {{reposts.count}} 👁️ {{views.count}}</b></div>
</div>
<hr>
{{/if}}
{{/each}}
</div>
</script>
</body>
</html>
<!--VK.Auth.revokeGrants();-->