forked from polppol/openpollslack-i18n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_orginal.html
221 lines (215 loc) · 7.75 KB
/
index_orginal.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
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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="slack-app-id" content="A0162QE8600" />
<link rel="icon" type="image/png" href="/assets/logo.png" />
<title>Open source poll for Slack</title>
<!-- STYLES -->
<link rel="stylesheet" type="text/css" href="/assets/css/index.css" />
<link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet" />
<!-- SCRIPTS -->
<script type="text/javascript" src="/assets/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="navigation">
<div class="up" onclick="goUp()">
🡅
</div>
<div class="down" onclick="goDown()">
🡇
</div>
</div>
<div id="main">
<h1>
Open source poll for <img alt="slack" height="180" src="/assets/slack_logo_white.svg" />
</h1>
<div id="oauth-success">
<div class="alert alert-success" role="alert">
<strong>Success !</strong>
<span>The app has been added to your workspace.</span>
</div>
</div>
<div id="oauth-error">
<div class="alert alert-danger" role="alert">
<strong>Error !</strong>
<span>Cannot add the app to your workspace. Try again.</span>
</div>
</div>
<div id="buttons">
<a target="_blank" href="https://slack.com/oauth/v2/authorize?client_id=768246087712.1206830278000&scope=commands,chat:write,chat:write.public&state=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnN0YWxsT3B0aW9ucyI6eyJzY29wZXMiOlsiY29tbWFuZHMiLCJjaGF0OndyaXRlLnB1YmxpYyIsImNoYXQ6d3JpdGUiXX0sIm5vdyI6IjIwMjAtMDYtMTdUMjA6NTc6MjYuMzI1WiIsImlhdCI6MTU5MjQyNzQ0Nn0.ZmnhLDbqxYGf0SBjqb7PzBXIe0Ud_NQ2RrURg-4va_E">
<img alt="Add to Slack" src="https://platform.slack-edge.com/img/[email protected]" srcset="https://platform.slack-edge.com/img/add_to_slack.png 2x, https://platform.slack-edge.com/img/[email protected] 4x" height="80" />
</a>
<a href="https://www.buymeacoffee.com/kazualex" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 77px !important;width: 278px !important;" ></a>
</div>
</div>
<div id="usage">
<div class="usage">
<h1>How to use it ?</h1>
</div>
<div id="simple-poll" class="light-grey">
<div>
<div class="title">
<h2>Simple poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="/assets/poll-simple.png" alt="Simple poll" />
</div>
</div>
</div>
</div>
</div>
<div id="anonymous-poll">
<div>
<div class="title">
<h2>Anonymous poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll anonymous "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="/assets/poll-anonymous.png" alt="Anonymous poll" />
</div>
</div>
</div>
</div>
</div>
<div id="limited-poll" class="light-grey">
<div>
<div class="title">
<h2>Limited choice poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll limit 2 "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="/assets/poll-limited.png" alt="Limited poll" />
</div>
</div>
</div>
</div>
</div>
<div id="hidden-poll">
<div>
<div class="title">
<h2>Hidden poll votes</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll hidden "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="/assets/poll-hidden.png" alt="Hidden poll votes" />
</div>
</div>
</div>
</div>
</div>
<div id="both-poll" class="light-grey">
<div>
<div class="title">
<h2>Anonymous limited choice poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll anonymous limit 2 "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="/assets/poll-both.png" alt="Anonymous limited poll" />
</div>
</div>
</div>
</div>
</div>
<div id="help">
<div>
<div class="title">
<h2>Need help ?</h2>
</div>
<div class="card">
<div class="card-body">
Please use <a target="_blank" href="https://gitlab.com/KazuAlex/openpollslack/-/issues">GitLab issues</a> or <a target="_blank" href="https://github.com/KazuAlex/openpollslack/issues">Github issues</a> if you have any question or issue with the app or contact me by mail : kazualex [at] pm [dot] me.
</div>
</div>
</div>
</div>
</div>
<div id="bottom">
<div class="row">
<div class="cell col-12 col-sm-4">
<a href="https://gitlab.com/KazuAlex/openpollslack">GitLab | Source code</a>
</div>
<div class="cell col-12 col-sm-4">
<a href="/privacy/">Privacy Policy</a>
</div>
<div class="cell col-12 col-sm-4">
<div>
Contact
</div>
<div>
kazualex [at] pm [dot] me
</div>
</div>
</div>
</div>
<script type="text/javascript">
const urlParams = new URLSearchParams(window.location.search);
const oauth = urlParams.get('oauth');
if ('error' === oauth) {
const oauthDiv = document.getElementById('oauth-error');
oauthDiv.className = 'show';
} else if ('success' === oauth) {
const oauthDiv = document.getElementById('oauth-success');
oauthDiv.className = 'show';
}
function goUp() {
const screenHeight = window.innerHeight;
let currentY = window.scrollY - (window.scrollY % screenHeight);
let nextY = currentY;
if (0 === (window.scrollY % screenHeight)) {
nextY = currentY - screenHeight;
}
window.scrollTo(window.scrollX, nextY);
}
function goDown() {
const screenHeight = window.innerHeight;
let currentY = window.scrollY - (window.scrollY % screenHeight);
let nextY = currentY + screenHeight;
window.scrollTo(window.scrollX, nextY);
}
const ARROW_LEFT = 37;
const ARROW_UP = 38;
const ARROW_RIGHT = 39;
const ARROW_DOWN = 40;
document.addEventListener('keyup', function(event) {
if (
ARROW_UP === event.which
|| ARROW_LEFT === event.which
) {
event.preventDefault();
event.stopPropagation();
goUp();
} else if (
ARROW_DOWN === event.which
|| ARROW_RIGHT === event.which
) {
event.preventDefault();
event.stopPropagation();
goDown();
}
});
</script>
</body>
</html>