forked from oshwa/certification-mark-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfacts.html
288 lines (283 loc) · 14.9 KB
/
facts.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Facts generator</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body class="container">
<br />
<h3>Open Source Licenses "Facts" generator</h3>
<p>This generator (<a href="https://github.com/jywarren/certification-mark-generator">source</a>) builds on an idea by <a href="https://twitter.com/pipix">Alicia Gibb</a> to present the three licenses that cover an Open Source Hardware project, in the form of the classic US "Nutrition Facts" food labeling design. It was created by <a href="https://unterbahn.com">Jeffrey Yoo Warren</a>, who at time of writing is a member of the OSHWA board.</p>
<div class="row">
<div class="col-md-6">
<p>Enter your licenses:</p>
<form id="form" class="form">
<input id="hardLicense" class="form-control mb-2" type="text" value="CERN-OHL-1.2" />
<input id="softLicense" class="form-control mb-2" type="text" value="GPL-3.0-or-later" />
<input id="docLicense" class="form-control mb-2" type="text" value="CC-BY-SA-4.0" />
<button class="btn btn-primary" type="submit" id="go">Go</button>
</form>
</div>
<div class="col-md-6">
<br />
<div style="display:inline-block;border: 6px solid #fdd;min-width:100px;min-height:100px;" id="svg-container"></div>
<br />
</div>
</div>
<br />
<p>Pre-generated SVGs can be found <a href="https://github.com/jywarren/certification-mark-generator#pregenerated">in the project repository</a></p>
<br />
<p>Source:</p>
<textarea rows="10" class="form-control" id="svg-textarea"></textarea>
<br />
<script>
(function() {
var hardLicenseSel = document.getElementById('hardLicense');
var softLicenseSel = document.getElementById('softLicense');
var docLicenseSel = document.getElementById('docLicense');
var go = document.getElementById('go');
var textarea = document.getElementById('svg-textarea');
form.onclick = function(e) {
e.preventDefault();
insertCode(hardLicenseSel.value, softLicenseSel.value, docLicenseSel.value);
}
function insertCode(hardLicense, softLicense, docLicense) {
var hardCode = "XXXXXXXXXXXXXX",
softCode = "YYYYYYYYYYYYYY",
docCode = "ZZZZZZZZZZZZZZ";
var svgEl = document.getElementById('svg-source').innerHTML;
svgEl = svgEl.replace(hardCode, hardLicense);
svgEl = svgEl.replace(softCode, softLicense);
svgEl = svgEl.replace(docCode, docLicense);
document.getElementById('svg-container').innerHTML = svgEl;
textarea.value = svgEl;
}
})();
</script>
<h3>SVG Template:</h3>
<div id="svg-source"><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 210.51138 109.06277"
height="109.06277"
width="210.51138"
xml:space="preserve"
id="svg1011"
version="1.1"><metadata
id="metadata1017"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs1015"><clipPath
id="clipPath1029"
clipPathUnits="userSpaceOnUse"><path
id="path1027"
d="M 0,0 H 365760 V 205740 H 0 Z" /></clipPath></defs><g
transform="matrix(1.3333333,0,0,-1.3333333,-3.4343762,536.56561)"
id="g1019"><g
transform="matrix(1,0,0,-1,0,405)"
id="g1021"><g
transform="scale(0.0019685)"
id="g1023"><g
clip-path="url(#clipPath1029)"
id="g1025"><g
id="g1037"><g
id="g1039"><path
id="path1041"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="M 1499,1499 H 81323 V 42671 H 1499 Z" /></g><path
id="path1043"
style="fill:none;stroke:#595959;stroke-width:381;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:1"
d="M 1499,1499 H 81323 V 42671 H 1499 Z" /></g><g
id="g1045"><g
id="g1047"><g
id="g1049"><path
id="path1051"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 3882.196,12543.278 H 78942.195" /></g></g><path
id="path1053"
style="fill:none;stroke:#595959;stroke-width:1524;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:1"
d="M 3882.196,12543.278 H 78942.195" /></g><g
id="g1055"><g
id="g1057"><g
id="g1059"><path
id="path1061"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 4509.141,3507.0806 H 78309.14 V 11043.08 H 4509.141 Z" /></g></g></g><g
transform="scale(381)"
id="g1063"><g
transform="translate(11.835016,9.204936)"
id="g1065"><g
id="g1067"><text
id="text1071"
style="font-variant:normal;font-weight:bold;font-size:16px;font-family:'Helvetica Neue','Helvetica',Arial,sans-serif;-inkscape-font-specification:HelveticaNeue-Bold;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(0,15.749763)"><tspan
id="tspan1069"
y="0"
x="0 12.432 22.191999 31.375999 40.848 45.279999 55.647999 65.407997 74.879997 80.991997 90.176003 99.360001 103.792 113.264 117.376 126.56 135.744 145.216 153.808 162.992 171.584">Open Source Licenses </tspan></text></g></g></g><g
transform="scale(381)"
id="g1073" /><g
id="g1075"><g
id="g1077"><g
id="g1079"><path
id="path1081"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 4811.468,13579.788 H 40151.47 v 7535.999 H 4811.468 Z" /></g></g></g><g
transform="scale(381)"
id="g1083"><g
transform="translate(12.628525,35.642487)"
id="g1085"><g
id="g1087"><text
id="text1091"
style="font-variant:normal;font-weight:normal;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(0,13.629764)"><tspan
id="tspan1089"
y="0"
x="0 7.7013335 13.429334 16.789333 23.104 31.178667 36.90667 40.266666">Hardware</tspan></text></g></g></g><g
transform="scale(381)"
id="g1093" /><g
id="g1095"><g
id="g1097"><g
id="g1099"><path
id="path1101"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 4811.468,22147.285 H 40151.47 v 7536 H 4811.468 Z" /></g></g></g><g
transform="scale(381)"
id="g1103"><g
transform="translate(12.628525,58.129356)"
id="g1105"><g
id="g1107"><text
id="text1111"
style="font-variant:normal;font-weight:normal;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(0,13.629764)"><tspan
id="tspan1109"
y="0"
x="0 6.9013333 13.024 16.170668 19.52 27.594667 33.322666 36.682667">Software</tspan></text></g></g></g><g
transform="scale(381)"
id="g1113" /><g
id="g1115"><g
id="g1117"><g
id="g1119"><path
id="path1121"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="m 4811.227,30714.783 h 35340 v 7535.997 h -35340 z" /></g></g></g><g
transform="scale(381)"
id="g1123"><g
transform="translate(12.627893,80.61623)"
id="g1125"><g
id="g1127"><text
id="text1131"
style="font-variant:normal;font-weight:normal;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(0,13.629764)"><tspan
id="tspan1129"
y="0"
x="0 7.5093336 13.632 19.360001 25.290667 34.389336 40.117336 46.048 49.397335 55.125336 58.474667 60.84267 66.965332">Documentation</tspan></text></g></g></g><g
transform="scale(381)"
id="g1133" /><g
id="g1135"><g
id="g1137"><g
id="g1139"><path
id="path1141"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 3882.196,39149.8 H 78942.195" /></g></g><path
id="path1143"
style="fill:none;stroke:#595959;stroke-width:1524;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:1"
d="M 3882.196,39149.8 H 78942.195" /></g><g
id="g1145"><g
id="g1147"><g
id="g1149"><path
id="path1151"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 3255.2507,30714.947 H 78315.25" /></g></g><path
id="path1153"
style="fill:none;stroke:#595959;stroke-width:381;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:1"
d="M 3255.2507,30714.947 H 78315.25" /></g><g
id="g1155"><g
id="g1157"><g
id="g1159"><path
id="path1161"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 3882.196,21745.566 H 78942.195" /></g></g><path
id="path1163"
style="fill:none;stroke:#595959;stroke-width:381;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:1"
d="M 3882.196,21745.566 H 78942.195" /></g><g
id="g1165"><g
id="g1167"><g
id="g1169"><path
id="path1171"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 42970.066,13638.395 H 78310.06 v 7536.001 H 42970.066 Z" /></g></g></g><g
transform="matrix(381,0,0,381,1709.972,0)"
id="g1173"><g
transform="translate(112.78233,35.796314)"
id="g1175"><g
id="g1177"><text
y="0"
x="71.357224"
id="text1181"
style="font-variant:normal;font-weight:bold;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue-Bold;text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(16.971207,13.629764)"><tspan
y="0"
x="71.357224"
id="tspan1179">XXXXXXXXXXXXXX</tspan></text></g></g><text
id="text1788"
y="-45.219803"
x="138.91757"
style="font-style:normal;font-weight:normal;font-size:40.0001px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1"
xml:space="preserve"><tspan
style="stroke-width:1"
y="-45.219803"
x="138.91757"
id="tspan1786"></tspan></text></g><g
transform="scale(381)"
id="g1183" /><g
id="g1185"><g
id="g1187"><g
id="g1189"><path
id="path1191"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 42970.066,22205.893 H 78310.06 v 7536 H 42970.066 Z" /></g></g></g><g
transform="scale(381)"
id="g1193"><g
transform="translate(112.78233,58.283184)"
id="g1195"><g
id="g1197"><text
y="13.629764"
x="92.784546"
id="text1201"
style="font-variant:normal;font-weight:bold;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue-Bold;text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"><tspan
style="text-align:end;text-anchor:end"
y="13.629764"
x="92.784546"
id="tspan1199">YYYYYYYYYYYYYY</tspan></text></g></g></g><g
transform="scale(381)"
id="g1203" /><g
id="g1205"><g
id="g1207"><g
id="g1209"><path
id="path1211"
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none"
d="M 42969.824,30773.39 H 78309.83 v 7536 H 42969.824 Z" /></g></g></g><g
transform="matrix(381,0,0,381,135.54911,0)"
id="g1213"><g
transform="translate(112.78169,80.77006)"
id="g1215"><g
id="g1217"><text
y="13.629764"
x="92.765083"
id="text1221"
style="font-variant:normal;font-weight:bold;font-size:10.6667px;font-family:'Helvetica Neue','Helvetica',Arial,sans-;-inkscape-font-specification:HelveticaNeue-Bold;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"><tspan
style="text-align:end;text-anchor:end"
y="13.629764"
x="92.765083"
id="tspan1219">ZZZZZZZZZZZZZZ</tspan></text></g></g></g><g
transform="scale(381)"
id="g1223" /></g></g></g></g></svg>
</div>
</body>
</html>