-
-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathindex.html
371 lines (366 loc) · 22.5 KB
/
index.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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GSOC - Choose A License</title>
<link id="favicon" rel="shortcut icon" type="image/png" href="assets/favicon.ico.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles/styles.css">
<link rel="stylesheet" href="styles/bulma-mods.css"> <!--ALWAYS import this last-->
<noscript>
Sorry, but the Creative Commons License Chooser requires JavaScript to work :(
<style>
.site-container{
opacity: 0;
}
</style>
</noscript>
</head>
<body onload="set_license()">
<header style="padding-bottom: 1%">
<br>
<img src="assets/cc-logo_white.png" style="width: 20%; margin-left: 5%">
</header>
<div class="container site-container" id="chooser-app">
<br>
<div class="container" id="education-content" hidden>
<h1 class="title is-1">[Some Title]</h1>
<div class="columns">
<div class="column is-one-third" id="icons-explanation">
<p>
Creative Commons licenses can be represented by their names, their
associated icons, or both.
</p> <br>
<div class="edu-icons-icon">
<div class="edu-icons-section">
<img src="assets/license-icons/cc-by_icon.svg">
CC BY;
You must attribute the work in the manner specified by the author or licensor. <br>
</div>
<div class="edu-icons-section">
<img src="assets/license-icons/cc-nd_icon.svg">
CC ND (No Derivatives);
<p>
You may not create derivatives of the licensed work.
</p>
<p hidden>
The licensor permits others to copy, distribute and transmit only unaltered copies of the work --
not derivative works based on it.</p><br>
</div>
<div class="edu-icons-section">
<img src="assets/license-icons/cc-sa_icon.svg">
CC SA (Share-Alike);
<p>
You may create and distribute derivative works, but only under the same or a compatible license.
</p>
<p hidden>
The licensor permits others to distribute derivative works, only under the same
license or one compatible with the one that governs the licensor's work.</p><br>
</div>
<div class="edu-icons-section">
<img src="assets/license-icons/cc-nc_icon.svg">
CC NC (Non-Commercial);
<p>
The licensor permits others to copy, distribute and transmit the work. In return,
licensees may not use the work for commercial purposes -- unless they get the
licensor's permission.</p><br>
</div>
</div>
</div>
<div class="column columns" id="questions-buttons">
<div class="column is-one-half">
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q1')">What Are Creative Commons Licenses?</a><br>
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q3')">How do the Licenses Work?</a><br>
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q5')">Want Public Domain Instead?</a>
</div>
<div class="column is-one-half">
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q2')">Considerations Before Licensing</a><br>
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q4')">How do I Formally License my Work?</a><br>
<a class="button is-light is-large is-fullwidth" onclick="spawn_modal('q6')">Question 6</a>
</div>
</div>
</div>
<div align="center">
<b>Tip:</b> You can click any <img class="modal-icon" src="assets/info-icon.svg" title="Except this one ;)">
icons you see to get more information!
</div>
<button onclick="spawn_modal('allow_adaptations')" data-target="testmodal" hidden>Test</button>
</div>
<hr>
<div class="container" id="license-chooser">
<p align="center">
Have a work you want to license with the Creative Commons plaform, <br>
but not sure which one is right for you? Use our license chooser!
</p>
<h1 class="title is-2">Choose a License</h1>
<div class="columns">
<!--
<div class="column" id="chooser-controls-radio">
<p align="center">Changes to the options below will affect the license choice to the right.</p> <br>
<div id="license-chooser-allow-adaptations">
<span>
<h4 class="title is-4">
Do you want to allow adaptations of your work?
<a class="modal-icon" onclick="spawn_modal('allow_adaptations')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%">
<label class="radio">
<input type="radio" name="allow-adaptations-radio">
Yes
</label> <br>
<label class="radio">
<input type="radio" name="allow-adaptations-radio">
No
</label> <br>
<label class="radio">
<input type="radio" name="allow-adaptations-radio">
Yes, as long as others share alike
</label> <br>
</div>
</div> <br>
<div class="license-chooser-allow-commercial">
<span>
<h4 class="title is-4">
Do you want to allow commercial uses of your work?
<a class="modal-icon" onclick="spawn_modal('allow_commercial')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%">
<label class="radio">
<input type="radio" name="allow-commercial-radio">
Yes
</label> <br>
<label class="radio">
<input type="radio" name="allow-commercial-radio">
No
</label> <br>
</div>
</div>
</div>-->
<div class="column" id="chooser-controls-switch">
<p align="center">Changes to the options below will affect the license choice to the right.</p> <br><br>
<div id="license-chooser-allow-adaptations">
<span>
<h4 class="title is-4">
Do you want to allow adaptations of your work?
<a class="modal-icon" onclick="spawn_modal('allow_adaptations')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%; padding-top: 1%;">
<div class="columns is-gapless">
<div class="field column is-one-fifth">
<label for="allow-adaptations-switch">No</label>
<input id="allow-adaptations-switch" type="checkbox"
name="allow-adaptations-switch" class="switch is-thin"
checked="checked" onchange="switch_callback(this)">
<label for="allow-adaptations-switch">Yes</label>
</div>
<div class="field column is-pulled-left" style="display: inline;">
<p class="control is-pulled-left">
<div class="b-checkbox is-primary" id="sa-checkbox" style="display: inline;">
<input id="checkbox" class="styled" type="checkbox" onchange="sa_check_callback(this)">
<label for="checkbox">
SA Checkbox
</label>
</div>
</p>
</div>
</div>
</div>
</div> <br><br>
<div class="license-chooser-allow-commercial">
<span>
<h4 class="title is-4">
Do you want to allow commercial uses of your work?
<a class="modal-icon" onclick="spawn_modal('allow_commercial')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%; padding-top: 1%;">
<div class="field">
<label for="allow-commercial-switch">No</label>
<input id="allow-commercial-switch" type="checkbox"
name="allow-commercial-switch" class="switch is-thin"
checked="checked" onchange="switch_callback(this)">
<label for="allow-commercial-switch">Yes</label>
</div>
</div>
</div> <br><br>
</div><!--
<div class="column" id="chooser-controls-images">
<p align="center">Changes to the options below will affect the license choice to the right.</p> <br><br>
<div id="license-chooser-allow-adaptations">
<span>
<h4 class="title is-4">
Do you want to allow adaptations of your work?
<a class="modal-icon" onclick="spawn_modal('allow_adaptations')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%; padding-top: 1%;">
<div class="columns is-gapless">
<div class="field column is-one-fifth">
<label for="allow-adaptations-switch">No</label>
<input id="allow-adaptations-switch" type="checkbox" name="allow-adaptations-switch" class="switch is-thin" checked="checked">
<label for="allow-adaptations-switch">Yes</label>
</div>
<div class="field column is-pulled-left" style="display: inline;">
<p class="control is-pulled-left">
<div class="b-checkbox is-primary" style="display: inline;">
<input id="checkbox" class="styled" checked type="checkbox">
<label for="checkbox">
SA Checkbox
</label>
</div>
</p>
</div>
</div>
</div>
</div> <br><br>
<div class="license-chooser-allow-commercial">
<span>
<h4 class="title is-4">
Do you want to allow commercial uses of your work?
<a class="modal-icon" onclick="spawn_modal('allow_commercial')"><img src="assets/info-icon.svg" class="modal-icon"></a>
</h4>
</span>
<div class="control" style="margin-left: 9%; padding-top: 1%;">
<div class="field">
<p>Selected Example</p>
<img src="assets/license-icons/cc-nc_icon.svg" class="chooser-controls-icons">
<p>Unselected Example</p>
<img src="assets/license-icons/cc-nc_icon.svg" class="unselected">
</div>
</div>
</div> <br><br>
</div>-->
<div class="column" align="center">
<h3 class="title is-3">Your License!</h3> <br><br>
<a v-bind:href="chooser.selected_license_link" align="center">{{chooser.selected_license}}</a> <br>
<p>{{chooser.selected_license_short}}</p> <br>
<span id="license-chooser-icons">
<img src="assets/cc.svg" class="chooser-license-icon" id="cc-logo-icon">
<img src="assets/license-icons/cc-by_icon.svg" class="chooser-license-icon" id="attribution-icon">
<img src="assets/license-icons/cc-nc_icon.svg" class="chooser-license-icon" id="commercial-icon">
<img v-bind:src="'assets/license-icons/' + chooser.icons.nd_sa_src" class="chooser-license-icon" id="adaptations-icon">
</span>
</div>
</div>
</div>
<hr>
<div class="" id="html-generator-dropdown" style="border-width: 2px; border-style: solid; padding: 1.5%;">
<h1 class="title is-1">This is the dropdown click area</h1>
</div> <br>
<div class="" id="html-generator">
<div id="html-generator-generated">
<h1 class="title is-2">Have a web page? Embed your license info!</h1>
<span id="html-generator-generated-richtext-container">
[Work] by [Author] is licenced under <a>CC BY NC 4.0</a>
<span id="html-generator-richtext-container-icons">
<img src="assets/license-icons/cc_icon.svg" style="width: 20px;">
<img src="assets/license-icons/cc-by_icon.svg" style="width: 20px;">
<img src="assets/license-icons/cc-nc_icon.svg" style="width: 20px;">
</span>
</span> <br>
<a class="button is-link generator-copy-button">Copy Rich Text</a>
<div class="control" id="html-generator-generated-HTML-container">
<textarea class="textarea" readonly>Some HTML</textarea>
</div>
<a class="button is-link generator-copy-button">Copy HTML</a>
</div>
<div class="html-generator-metadata">
<p align="center">
Filling out these boxes is optional, but it adds machine-readable
metadata to the generated HTML above!
</p>
<div class="columns" style="padding-top: 1%">
<div class="column">
<div class="field">
<label class="label">Title of Work</label>
<div class="control">
<input class="input" type="text" placeholder="Text input">
</div>
<p class="help">The title of the work being licensed.</p>
</div>
<div class="field">
<label class="label">Attribute Work to Name</label>
<div class="control">
<input class="input" type="text" placeholder="Text input">
</div>
<p class="help">The name of the person who should receive attribution for the work.</p>
</div>
<div class="field">
<label class="label">Attribute Work to URL</label>
<div class="control">
<input class="input" type="text" placeholder="Text input">
</div>
<p class="help">The URL to which the work should be attributed.</p>
</div>
</div>
<div class="column">
<div class="field">
<label class="label">Source Work URL</label>
<div class="control">
<input class="input" type="text" placeholder="Text input">
</div>
<p class="help">The URL of the work upon which this work is based or derived.</p>
</div>
<div class="field">
<label class="label">More Permissions URL</label>
<div class="control">
<input class="input" type="text" placeholder="Text input">
</div>
<p class="help">A URL where a user can find information about obtaining rights that are not already permitted by the CC license.</p>
</div>
</div>
</div>
<div class="field is-horizontal" style="margin-left: 35%; margin-right: 35%;">
<label class="label">Format of Work </label>
<div class="select">
<select>
<option>Other/ Multiple Formats</option>
<option>Audio</option>
<option>Video</option>
<option>Image</option>
<option>Text</option>
<option>Dataset</option>
<option>Interactive</option>
</select>
</div>
</div>
</div>
</div> <br><br><br><br><br><br><br><br><br>
<!--
This is the only modal element in the site, contents are set
based on which button spawns it. Contents and titles can be found
in src/index.js
-->
<div id="modal" v-bind:class="modals.modal_toggle">
<div class="modal-background" onclick="destroy_modal()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">{{modals.modal_title}}</p>
<button class="delete" aria-label="close" onclick="destroy_modal()"></button>
</header>
<section class="modal-card-body">
<!-- Content ... -->
{{modals.modal_content}}
<!--Will be hidden if no more_info_link defined for the modal in src/index.js-->
<div id="modal-more-info">
<p>
For more information, please see
<a v-bind:href="modals.more_info_url">{{modals.more_info_text}}</a>.
</p>
</div>
</section>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="scripts/page-controls.js"></script>
<script type="text/javascript" src="scripts/HTML-generator.js"></script>
<script type="text/javascript" src="scripts/choose-a-license.js"></script>
<script type="text/javascript" src="scripts/scripts.js"></script>
</body>
</html>
<!-- </> by Ari Madian :)-->