-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
227 lines (209 loc) · 6.56 KB
/
index.html
File metadata and controls
227 lines (209 loc) · 6.56 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="description" content="SocialButtons - кнопки для добавления контента в социальные сети для вашего сайта" />
<title>SocialButtons - кнопки для добавления контента в социальные сети для вашего сайта</title>
<link rel="stylesheet" href="src/css/SocialButtons.css">
<script src="src/js/SocialButtons.js"></script>
<script src="src/js/es6-promise.js"></script>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
font-family: Arial, sans-serif;
background: #728194 url('grid.png');
}
.wrapper {
position: relative;
min-height: 100%;
}
.container {
width: 1200px;
margin: 0 auto;
padding-bottom: 20px;
}
.panel {
min-width: 1024px;
padding: 15px;
background: rgba(0, 0, 0, 0.40);
text-align: center;
color: #FFF;
}
.header {
margin: 0 0 40px 0;
}
.h1 {
margin: 0;
font-family: Arial, sans-serif;
font-size: 14px;
text-transform: uppercase;
font-weight: normal;
}
.title {
display: inline-block;
padding: 10px;
margin-bottom: 20px;
text-transform: uppercase;
background: rgba(0, 0, 0, 0.40);
color: #FFF;
font-size: 14px;
}
.title-small {
padding: 8px;
margin-bottom: 10px;
font-size: 12px;
}
.container-example {
margin: 10px 0;
}
.fast-start {
display: inline-block;
padding: 10px 15px;
font-size: 14px;
color: #FFF;
text-decoration: none;
background: rgba(0, 172, 237, 0.7);
border-radius: 3px;
}
.fast-start:hover {
background: rgba(0, 172, 237, 0.85);
}
</style>
<script>
document.addEventListener('DOMContentLoaded', DOMready);
function DOMready() {
// 1
var options = {
services: ['vkontakte', 'facebook', 'googleplus', 'odnoklassniki', 'twitter', 'lj', 'moimir', 'linkedin'],
id: 'social-1',
counter: true,
components: ['icon'],
url: 'https://democrator.ru/petition/trebuem-vozbuzhdeniya-ugolovnogo-dela-vsex-uchastn/',
title: 'Живодёров к ответу!',
image: 'https://democrator.ru/image/preview/petition/6c/4c/6c4c42a1-14287-petition-600x415-wm_problem.jpg',
callbacks: {
create: function(data) {
console.log('create self', data.self);
console.log('create options', data.options);
},
share: function(data) {
console.log('share self', data.self);
console.log('share service', data.service);
}
}
};
new SocialButtons(options);
options.id = 'social-2';
options.components = ['icon', 'count'];
options.callbacks = {};
new SocialButtons(options);
options.id = 'social-3';
options.components = ['icon', 'text', 'count'];
new SocialButtons(options);
var options = {
services: ['vkontakte', 'facebook', 'googleplus', 'odnoklassniki', 'moimir', 'twitter', 'lj', 'linkedin'],
id: 'social-4',
components: ['icon'],
theme: 'color',
title: 'Mail.Ru: почта, поиск в интернете, новости, игр!',
counter: true,
outputCountCallback: function(count) {
if(count >= 1000000) {
return count = parseInt(count / 1000000) + ' мл';
}
else if(count >= 1000) {
return count = parseInt(count / 1000) + ' тыс';
}
return count;
},
url: 'https://mail.ru',
helpers: {
twitter: {
counter: function() {
return 10;
}
}
}
}
new SocialButtons(options);
options.id = 'social-5';
options.components = ['icon', 'count'];
options.callbacks = {};
new SocialButtons(options);
options.id = 'social-6';
options.components = ['icon', 'text', 'count'];
new SocialButtons(options);
var options = {
services: ['vkontakte', 'facebook', 'googleplus', 'odnoklassniki', 'twitter', 'lj', 'moimir', 'linkedin'],
id: 'social-7',
theme: 'color',
counter: true,
buttonSize: 'small',
components: ['icon'],
url: 'https://democrator.ru/petition/trebuem-vozbuzhdeniya-ugolovnogo-dela-vsex-uchastn/',
title: 'Живодёров к ответу!',
image: 'https://democrator.ru/image/preview/petition/6c/4c/6c4c42a1-14287-petition-600x415-wm_problem.jpg',
};
new SocialButtons(options);
options.id = 'social-8';
options.buttonSize = 'middle';
new SocialButtons(options);
options.id = 'social-9';
options.buttonSize = 'large';
new SocialButtons(options);
}
</script>
</head>
<body>
<div class="panel header">
<h1 class="h1">
кнопки для добавления контента в социальные сети
</h1>
</div>
<div class="wrapper">
<div class="container">
<div class="title">Готовые варианты оформления: </div><br>
<div class="title-small title">default</div>
<div class="container-example">
<div id="social-1"></div>
</div>
<div class="container-example">
<div id="social-2"></div>
</div>
<div class="container-example">
<div id="social-3"></div>
</div>
<div class="title-small title">color</div>
<div class="container-example">
<div id="social-4"></div>
</div>
<div class="container-example">
<div id="social-5"></div>
</div>
<div class="container-example">
<div id="social-6"></div>
</div>
</div>
<div class="container">
<div class="title">Настройка размера кнопок: </div><br>
<div class="title-small title">small (22)</div>
<div class="container-example">
<div id="social-7"></div>
</div>
<div class="title-small title">middle (28)</div>
<div class="container-example">
<div id="social-8"></div>
</div>
<div class="title-small title">large (34)</div>
<div class="container-example">
<div id="social-9"></div>
</div>
</div>
<div class="panel footer">
<a class="fast-start" href="https://github.com/M-Ulyanov/SocialButtons">Быстрый старт</a>
</div>
</div>
</body>
</html>