Wiki source code of Copyright, Rights & Licences

Version 5.11 by Veronika Kocher on Thursday, 03 Sep 2026 13:04

Hide last authors
Veronika Kocher 2.1 1 Clarify copyright, third-party rights, permissions and licensing before materials are reused, shared or published.
2
3 == Overview ==
4
5 Add a concise explanation of this topic and why it matters for Art & Research projects.
6
7 == What you need to know ==
8
9 * Key concepts
10 * Relevant requirements
11 * Important distinctions
12
13 == What you need to do ==
14
15 1. Identify what applies to your project.
16 2. Document the relevant decisions.
17 3. Use appropriate institutional services and support where needed.
18
19 == Key questions ==
20
21 * What needs to be decided?
22 * Who is responsible?
23 * What needs to be documented?
24 * Are there legal, ethical or technical constraints?
25 * What needs to happen before the next project phase?
26
27 == Services & Tools ==
28
29 Add links to relevant institutional services, infrastructure and tools.
30
31 == Info Sheets & Checklists ==
32
33 Add links to related Info Sheets, checklists and templates.
34
35 == Tutorials ==
36
Veronika Kocher 5.6 37
38 {{html}}<span data-arsn-coming-soon="true" style="display:inline-block;margin:6px 0 8px 0;padding:4px 9px;border-radius:14px;background:#fff4ee;border:1px solid #efd9cc;color:#8a4d36;font-size:11px;font-weight:700;letter-spacing:.065em;line-height:1.2;">COMING SOON</span>{{/html}}
Veronika Kocher 2.1 39 Add links to step-by-step tutorials for this topic.
40
41 == Related Topics ==
42
43 Add links to related pages in Enable, Work & Manage, and Publish & Share.
44
Veronika Kocher 5.7 45 == Who is responsible? ==
Veronika Kocher 2.1 46
Veronika Kocher 5.11 47
Veronika Kocher 5.7 48 {{info title="Service routing"}}
49 **Primary specialist service(s):** Legal Department for binding legal questions and contracts; Publications and/or University Library for publication and licensing practice where relevant.
Veronika Kocher 2.1 50
Veronika Kocher 5.7 51 **Role of Support Kunst und Forschung (SKF):** Coordinates funder and project requirements and routes legal questions; it is not the legal authority.
52 {{/info}}
Veronika Kocher 4.1 53
Veronika Kocher 5.7 54 If you are unsure which route applies, start with the service named above. For funded or project-based research where several units are involved, SKF can coordinate the project route.
55
Veronika Kocher 4.1 56 {{html}}
57 <!-- ARSN_SEARCH_TERMS_START -->
58 <details class="arsn-search-terms" style="margin-top:28px;padding-top:10px;border-top:1px solid #eee;">
59 <summary style="cursor:pointer;color:#666;font-size:13px;">Search terms &amp; related topics</summary>
60 <div style="margin-top:9px;color:#555;font-size:13px;">
61 <p style="margin:0 0 8px 0;">
Veronika Kocher 5.2 62 This topic can also be found through related terms, synonyms and common search queries.
63 Select a term to search the Art &amp; Research Services Navigator.
Veronika Kocher 4.1 64 </p>
Veronika Kocher 5.2 65 <p style="margin:0;"><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=art%20and%20research#arsn-search-input" class="arsn-search-term" data-search-term="art and research" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">art and research</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=enable#arsn-search-input" class="arsn-search-term" data-search-term="enable" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">enable</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=copyright#arsn-search-input" class="arsn-search-term" data-search-term="copyright" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">copyright</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=rights#arsn-search-input" class="arsn-search-term" data-search-term="rights" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">rights</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=licensing#arsn-search-input" class="arsn-search-term" data-search-term="licensing" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">licensing</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=licences#arsn-search-input" class="arsn-search-term" data-search-term="licences" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">licences</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=third-party%20rights#arsn-search-input" class="arsn-search-term" data-search-term="third-party rights" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">third-party rights</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=creative%20commons#arsn-search-input" class="arsn-search-term" data-search-term="creative commons" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">creative commons</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=permissions#arsn-search-input" class="arsn-search-term" data-search-term="permissions" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">permissions</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=urheberrecht#arsn-search-input" class="arsn-search-term" data-search-term="urheberrecht" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">urheberrecht</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=rights%20clearance#arsn-search-input" class="arsn-search-term" data-search-term="rights clearance" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">rights clearance</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=cc%20licence#arsn-search-input" class="arsn-search-term" data-search-term="cc licence" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">cc licence</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=cc%20license#arsn-search-input" class="arsn-search-term" data-search-term="cc license" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">cc license</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=usage%20rights#arsn-search-input" class="arsn-search-term" data-search-term="usage rights" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">usage rights</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=nutzungsrechte#arsn-search-input" class="arsn-search-term" data-search-term="nutzungsrechte" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">nutzungsrechte</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=rechtekl%C3%A4rung#arsn-search-input" class="arsn-search-term" data-search-term="rechteklärung" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">rechteklärung</a></p>
Veronika Kocher 4.1 66 </div>
67 </details>
68 <!-- ARSN_SEARCH_TERMS_END -->
69 {{/html}}
Veronika Kocher 5.8 70
Veronika Kocher 5.11 71 {{html clean="false"}}
72 <!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
Veronika Kocher 5.10 73
Veronika Kocher 5.11 74 <style data-sn-service-navigator-master="1">
75 /* =========================================================
76 MASTER TYPOGRAPHY
77 ========================================================= */
Veronika Kocher 5.10 78 #xwikicontent h1,
79 #xwikicontent h2,
80 #xwikicontent h3,
81 #xwikicontent h4,
82 #xwikicontent h5,
83 #xwikicontent h6,
84 #xwikicontent .box-title,
85 #xwikicontent [role="heading"],
86 #xwikicontent h1 a,
87 #xwikicontent h2 a,
88 #xwikicontent h3 a,
89 #xwikicontent h4 a,
90 #xwikicontent h5 a,
91 #xwikicontent h6 a,
92 #xwikicontent .box-title a,
93 #xwikicontent [role="heading"] a{
94 text-align:left!important;
95 text-justify:auto!important;
96 word-spacing:normal!important;
97 }
98
Veronika Kocher 5.11 99 /* =========================================================
100 COMING SOON / IN VORBEREITUNG
101 ========================================================= */
102 .sn-coming-soon-badge{
103 display:inline-block;
104 vertical-align:middle;
105 margin-left:10px;
106 padding:4px 8px;
107 border-radius:14px;
108 border:1px solid #efd9cc;
109 background:#fff4ee;
110 color:#8a4d36;
111 font-size:11px;
112 font-weight:700;
113 letter-spacing:.055em;
114 line-height:1.2;
115 white-space:nowrap;
116 }
117
118 /* =========================================================
119 NATIVE / DETAIL CALLOUT GEOMETRY
120 Preserve existing backgrounds.
121 ========================================================= */
122 #xwikicontent .arsn-info,
123 #xwikicontent .dmp-info,
124 #xwikicontent .ido-info,
125 #xwikicontent .pp-info,
126 #xwikicontent .infomessage{
Veronika Kocher 5.10 127 box-sizing:border-box!important;
Veronika Kocher 5.11 128 border-left:4px solid #21b6d7!important;
129 border-radius:8px;
Veronika Kocher 5.10 130 text-align:left!important;
131 word-spacing:normal!important;
132 }
133
Veronika Kocher 5.11 134 #xwikicontent .arsn-warn,
135 #xwikicontent .dmp-warn,
136 #xwikicontent .ido-warn,
137 #xwikicontent .pp-warn,
138 #xwikicontent .warn,
139 #xwikicontent .warning,
140 #xwikicontent .warningmessage,
Veronika Kocher 5.10 141 #xwikicontent .errormessage{
Veronika Kocher 5.11 142 box-sizing:border-box!important;
143 border-left:4px solid #e94b13!important;
144 border-radius:8px;
145 text-align:left!important;
146 word-spacing:normal!important;
Veronika Kocher 5.10 147 }
148
Veronika Kocher 5.11 149 [data-sn-master-equal-height],
150 [data-sn-master-first-row]{
Veronika Kocher 5.9 151 box-sizing:border-box;
Veronika Kocher 5.8 152 }
153 </style>
Veronika Kocher 5.10 154
Veronika Kocher 5.11 155 <script data-sn-service-navigator-master="1">
Veronika Kocher 5.8 156 (function(){
157 "use strict";
158
Veronika Kocher 5.11 159 var PAGE_KIND="detail";
160 var PLACEHOLDER=true;
161 var PLACEHOLDER_LABEL="COMING SOON";
162
Veronika Kocher 5.8 163 var MOBILE_MAX=767;
Veronika Kocher 5.9 164 var ROW_TOLERANCE=6;
Veronika Kocher 5.10 165 var RESIZE_DEBOUNCE=220;
Veronika Kocher 5.8 166
167 var root=
168 document.getElementById("xwikicontent")||
169 document.querySelector(".xwiki-rendering-content")||
170 document.querySelector("main")||
171 document.body;
172
173 if(!root)return;
174
Veronika Kocher 5.11 175 var managedHeight=new Set();
176 var managedMargin=new Set();
177 var originalHeight=new WeakMap();
178 var originalMargin=new WeakMap();
Veronika Kocher 5.10 179
180 var resizeTimer=0;
Veronika Kocher 5.11 181 var running=false;
Veronika Kocher 5.10 182
Veronika Kocher 5.11 183 var THEMES=[
184 {
185 name:"BLUE",
186 accent:"#21b6d7",
187 bg:"#eaf7fb",
188 text:"#315d68",
189 labels:[
190 "HIER STARTEN",
191 "ENTSCHEIDEN",
192 "ÜBERPRÜFEN & ANPASSEN",
193 "START HERE",
194 "DECIDE",
195 "REVIEW & ADAPT"
196 ]
197 },
198 {
199 name:"RED",
200 accent:"#e94b13",
201 bg:"#fff1ec",
202 text:"#8a4d36",
203 labels:[
204 "PLANEN & ORGANISIEREN",
205 "ORGANISIEREN & DOKUMENTIEREN",
206 "PUBLIZIEREN & PRÄSENTIEREN",
207 "PLAN & ORGANISE",
208 "PLAN & ORGANIZE",
209 "ORGANISE & DOCUMENT",
210 "ORGANIZE & DOCUMENT",
211 "PUBLISH & PRESENT"
212 ]
213 },
214 {
215 name:"YELLOW",
216 accent:"#f0aa00",
217 bg:"#fff8e7",
218 text:"#785b17",
219 labels:[
220 "SCHÜTZEN & KLÄREN",
221 "STANDARDISIEREN & IDENTIFIZIEREN",
222 "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
223 "PROTECT & CLARIFY",
224 "STANDARDISE & IDENTIFY",
225 "STANDARDIZE & IDENTIFY",
226 "OPEN, REUSE & MAKE FINDABLE"
227 ]
228 },
229 {
230 name:"GREEN",
231 accent:"#38b76a",
232 bg:"#edf9f1",
233 text:"#3f7451",
234 labels:[
235 "INFRASTRUKTUR EINRICHTEN",
236 "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
237 "SPEICHERN & ZUGRIFF STEUERN",
238 "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
239 "SET UP INFRASTRUCTURE",
240 "SET UP INFRASTRUCTURE & COLLABORATION",
241 "STORE & CONTROL ACCESS",
242 "REPOSITORY, PRESERVE & HAND OVER"
243 ]
Veronika Kocher 5.9 244 }
Veronika Kocher 5.11 245 ];
Veronika Kocher 5.9 246
Veronika Kocher 5.11 247 function num(value){
248 var n=parseFloat(value);
249 return Number.isFinite(n)?n:0;
Veronika Kocher 5.8 250 }
251
Veronika Kocher 5.11 252 function norm(value){
253 return String(value||"")
Veronika Kocher 5.10 254 .replace(/\s+/g," ")
255 .trim()
256 .toUpperCase();
257 }
258
Veronika Kocher 5.11 259 function visible(el){
260 if(!el||el.nodeType!==1)return false;
Veronika Kocher 5.8 261
Veronika Kocher 5.11 262 var style=getComputedStyle(el);
263 var rect=el.getBoundingClientRect();
Veronika Kocher 5.10 264
265 return (
Veronika Kocher 5.11 266 style.display!=="none"&&
267 style.visibility!=="hidden"&&
268 rect.width>20&&
269 rect.height>4
Veronika Kocher 5.10 270 );
Veronika Kocher 5.8 271 }
272
Veronika Kocher 5.11 273 function saveStyle(el,map,property){
Veronika Kocher 5.9 274 if(map.has(el))return;
275
276 map.set(el,{
Veronika Kocher 5.11 277 value:el.style.getPropertyValue(property),
278 priority:el.style.getPropertyPriority(property)
Veronika Kocher 5.9 279 });
280 }
281
Veronika Kocher 5.11 282 function restoreStyle(el,map,property){
Veronika Kocher 5.9 283 var original=map.get(el);
284
285 if(original&&original.value){
286 el.style.setProperty(
287 property,
288 original.value,
289 original.priority||""
290 );
291 }else{
Veronika Kocher 5.11 292 el.style.removeProperty(property);
Veronika Kocher 5.9 293 }
294 }
295
Veronika Kocher 5.10 296 function resetRuntime(){
Veronika Kocher 5.11 297 managedHeight.forEach(function(el){
298 restoreStyle(
Veronika Kocher 5.9 299 el,
Veronika Kocher 5.11 300 originalHeight,
Veronika Kocher 5.9 301 "min-height"
302 );
303 el.removeAttribute(
Veronika Kocher 5.11 304 "data-sn-master-equal-height"
Veronika Kocher 5.9 305 );
306 });
307
Veronika Kocher 5.11 308 managedMargin.forEach(function(el){
309 restoreStyle(
Veronika Kocher 5.9 310 el,
Veronika Kocher 5.11 311 originalMargin,
Veronika Kocher 5.9 312 "margin-top"
313 );
314 el.removeAttribute(
Veronika Kocher 5.11 315 "data-sn-master-first-row"
Veronika Kocher 5.9 316 );
317 });
318
Veronika Kocher 5.11 319 managedHeight.clear();
320 managedMargin.clear();
321 }
Veronika Kocher 5.10 322
Veronika Kocher 5.11 323 function themeFor(text){
324 var value=norm(text);
Veronika Kocher 5.10 325
Veronika Kocher 5.11 326 for(var i=0;i<THEMES.length;i++){
327 for(var j=0;j<THEMES[i].labels.length;j++){
328 var label=THEMES[i].labels[j];
329
330 if(
331 value===label||
332 value.indexOf(label+" ")===0||
333 value.indexOf(label+" -")===0||
334 value.indexOf(label+" ·")===0
335 ){
336 return THEMES[i];
337 }
338 }
339 }
340
341 return null;
Veronika Kocher 5.9 342 }
343
Veronika Kocher 5.11 344 /* =======================================================
345 PLACEHOLDER BADGE
346 ======================================================= */
Veronika Kocher 5.10 347
Veronika Kocher 5.11 348 function applyPlaceholderBadge(){
349 if(!PLACEHOLDER)return;
Veronika Kocher 5.10 350
351 if(
Veronika Kocher 5.11 352 document.querySelector(
353 ".sn-coming-soon-badge"
354 )
Veronika Kocher 5.10 355 ){
Veronika Kocher 5.11 356 return;
Veronika Kocher 5.10 357 }
358
Veronika Kocher 5.11 359 var title=
360 document.querySelector(
361 "#document-title"
362 )||
363 document.querySelector(
364 "h1"
365 );
Veronika Kocher 5.10 366
Veronika Kocher 5.11 367 if(!title)return;
Veronika Kocher 5.10 368
Veronika Kocher 5.11 369 var badge=
370 document.createElement(
371 "span"
372 );
373
374 badge.className=
375 "sn-coming-soon-badge";
376
377 badge.textContent=
378 PLACEHOLDER_LABEL;
379
380 badge.setAttribute(
381 "aria-label",
382 PLACEHOLDER_LABEL
Veronika Kocher 5.10 383 );
384
Veronika Kocher 5.11 385 title.appendChild(
386 badge
387 );
388 }
Veronika Kocher 5.10 389
Veronika Kocher 5.11 390 /* =======================================================
391 DETAIL PAGE OWN-ACCENT PROPAGATION
392 ======================================================= */
Veronika Kocher 5.10 393
Veronika Kocher 5.11 394 function parseRGB(value){
395 var match=String(value||"").match(
396 /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
Veronika Kocher 5.10 397 );
Veronika Kocher 5.11 398
399 if(!match)return null;
400
401 return [
402 Number(match[1]),
403 Number(match[2]),
404 Number(match[3])
405 ];
Veronika Kocher 5.10 406 }
407
Veronika Kocher 5.11 408 function distance(a,b){
409 return Math.sqrt(
410 Math.pow(a[0]-b[0],2)+
411 Math.pow(a[1]-b[1],2)+
412 Math.pow(a[2]-b[2],2)
413 );
414 }
Veronika Kocher 5.8 415
Veronika Kocher 5.11 416 function paletteMatch(cssColor){
417 var rgb=parseRGB(cssColor);
Veronika Kocher 5.9 418
Veronika Kocher 5.11 419 if(!rgb)return null;
Veronika Kocher 5.9 420
Veronika Kocher 5.11 421 var palette=[
422 {hex:"#21b6d7",rgb:[33,182,215]},
423 {hex:"#e94b13",rgb:[233,75,19]},
424 {hex:"#f0aa00",rgb:[240,170,0]},
425 {hex:"#38b76a",rgb:[56,183,106]}
426 ];
Veronika Kocher 5.8 427
Veronika Kocher 5.9 428 var best=null;
Veronika Kocher 5.11 429 var bestDistance=Infinity;
Veronika Kocher 5.8 430
Veronika Kocher 5.11 431 palette.forEach(function(item){
432 var d=distance(rgb,item.rgb);
Veronika Kocher 5.8 433
Veronika Kocher 5.11 434 if(d<bestDistance){
435 best=item;
436 bestDistance=d;
437 }
438 });
Veronika Kocher 5.9 439
Veronika Kocher 5.11 440 return bestDistance<=30
441 ?best
442 :null;
443 }
Veronika Kocher 5.8 444
Veronika Kocher 5.11 445 function propagateDetailAccents(){
446 if(PAGE_KIND!=="detail")return;
447
448 Array.from(
449 root.querySelectorAll(
450 ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
451 ".arsn-source,.dmp-source,.ido-source,.pp-source"
452 )
453 ).forEach(function(el){
454 if(!visible(el))return;
455
456 var style=getComputedStyle(el);
457
Veronika Kocher 5.9 458 if(
Veronika Kocher 5.11 459 num(style.borderTopWidth)>=2
Veronika Kocher 5.9 460 ){
Veronika Kocher 5.11 461 var match=
462 paletteMatch(
463 style.borderTopColor
Veronika Kocher 5.9 464 );
465
Veronika Kocher 5.11 466 if(match){
467 el.style.setProperty(
468 "border-left",
469 "4px solid "+match.hex,
470 "important"
Veronika Kocher 5.9 471 );
Veronika Kocher 5.8 472 }
473 }
Veronika Kocher 5.11 474 });
Veronika Kocher 5.8 475
Veronika Kocher 5.11 476 // Warning families: explicit safety override.
477 Array.from(
478 root.querySelectorAll(
479 ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
480 ".warn,.warning,.warningmessage,.errormessage"
481 )
482 ).forEach(function(el){
483 if(!visible(el))return;
Veronika Kocher 5.8 484
Veronika Kocher 5.11 485 el.style.setProperty(
486 "border-left",
487 "4px solid #e94b13",
488 "important"
489 );
490 });
Veronika Kocher 5.8 491
Veronika Kocher 5.11 492 // Info families: explicit orientation override.
493 Array.from(
494 root.querySelectorAll(
495 ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
496 )
497 ).forEach(function(el){
498 if(!visible(el))return;
Veronika Kocher 5.9 499
Veronika Kocher 5.11 500 el.style.setProperty(
501 "border-left",
502 "4px solid #21b6d7",
503 "important"
504 );
505 });
506 }
Veronika Kocher 5.9 507
Veronika Kocher 5.11 508 /* =======================================================
509 OVERVIEW SEMANTIC THEME PALETTE
510 ======================================================= */
Veronika Kocher 5.9 511
Veronika Kocher 5.11 512 function smallestThemeHeaders(){
513 return Array.from(
514 root.querySelectorAll(
515 "div,span,p,strong,h3,h4,h5,h6"
516 )
517 ).filter(function(el){
518 if(!visible(el))return false;
519 if(!themeFor(el.textContent))return false;
Veronika Kocher 5.9 520
Veronika Kocher 5.11 521 return !Array.from(
522 el.children||[]
523 ).some(function(child){
524 return !!themeFor(
525 child.textContent
526 );
Veronika Kocher 5.9 527 });
Veronika Kocher 5.11 528 });
Veronika Kocher 5.8 529 }
530
Veronika Kocher 5.11 531 function findOverviewCard(header){
532 var node=header.parentElement;
533 var candidates=[];
Veronika Kocher 5.9 534
Veronika Kocher 5.11 535 while(node&&node!==root){
536 var rect=node.getBoundingClientRect();
537 var style=getComputedStyle(node);
Veronika Kocher 5.9 538
Veronika Kocher 5.11 539 var border=
540 num(style.borderTopWidth)+
541 num(style.borderRightWidth)+
542 num(style.borderBottomWidth)+
543 num(style.borderLeftWidth);
Veronika Kocher 5.9 544
Veronika Kocher 5.11 545 if(
546 rect.width>=220&&
547 rect.width<=800&&
548 rect.height>=120&&
549 border>=1
550 ){
551 candidates.push(node);
552 }
Veronika Kocher 5.9 553
Veronika Kocher 5.11 554 node=node.parentElement;
555 }
Veronika Kocher 5.9 556
Veronika Kocher 5.11 557 if(!candidates.length)return null;
Veronika Kocher 5.9 558
Veronika Kocher 5.11 559 candidates.sort(function(a,b){
560 return (
561 b.getBoundingClientRect().height-
562 a.getBoundingClientRect().height
Veronika Kocher 5.10 563 );
Veronika Kocher 5.11 564 });
Veronika Kocher 5.9 565
Veronika Kocher 5.11 566 return candidates[0];
Veronika Kocher 5.9 567 }
568
Veronika Kocher 5.11 569 function rowCandidates(link,card){
570 var result=[];
Veronika Kocher 5.10 571 var cardRect=
572 card.getBoundingClientRect();
Veronika Kocher 5.9 573
Veronika Kocher 5.11 574 var node=link;
Veronika Kocher 5.9 575
Veronika Kocher 5.11 576 while(node&&node!==card){
577 if(visible(node)){
578 var rect=
579 node.getBoundingClientRect();
Veronika Kocher 5.9 580
Veronika Kocher 5.11 581 if(
582 rect.height<=105&&
583 rect.width>=
584 cardRect.width*.50&&
585 rect.width<=
586 cardRect.width*1.03
587 ){
588 result.push(node);
589 }
590 }
Veronika Kocher 5.9 591
Veronika Kocher 5.11 592 node=node.parentElement;
593 }
594
595 return result;
596 }
597
598 function chooseOuterRow(
599 candidates,
600 link
601 ){
602 if(!candidates.length){
603 return link;
604 }
605
606 var bordered=
607 candidates.filter(function(el){
Veronika Kocher 5.10 608 return (
Veronika Kocher 5.11 609 num(
610 getComputedStyle(el)
611 .borderLeftWidth
612 )>=1
Veronika Kocher 5.10 613 );
614 });
Veronika Kocher 5.9 615
Veronika Kocher 5.11 616 var pool=
617 bordered.length
618 ?bordered
619 :candidates;
Veronika Kocher 5.9 620
Veronika Kocher 5.11 621 pool.sort(function(a,b){
622 var ar=
623 a.getBoundingClientRect();
Veronika Kocher 5.9 624
Veronika Kocher 5.11 625 var br=
626 b.getBoundingClientRect();
Veronika Kocher 5.9 627
Veronika Kocher 5.11 628 return (
629 ar.left-br.left||
630 br.width-ar.width
631 );
632 });
Veronika Kocher 5.9 633
Veronika Kocher 5.11 634 return pool[0]||link;
635 }
Veronika Kocher 5.9 636
Veronika Kocher 5.11 637 function applyOverviewPalette(){
638 if(PAGE_KIND!=="overview"){
639 return [];
Veronika Kocher 5.10 640 }
Veronika Kocher 5.9 641
Veronika Kocher 5.11 642 var headers=
643 smallestThemeHeaders()
644 .map(function(el){
645 return {
646 el:el,
647 theme:
648 themeFor(
649 el.textContent
650 ),
651 card:
652 findOverviewCard(
653 el
654 )
655 };
Veronika Kocher 5.10 656 })
Veronika Kocher 5.11 657 .filter(function(row){
658 return !!row.card;
659 });
Veronika Kocher 5.9 660
Veronika Kocher 5.11 661 var unique=[];
662 var seenHeaders=new Set();
Veronika Kocher 5.9 663
Veronika Kocher 5.11 664 headers.forEach(function(row){
665 var key=
666 row.theme.name+
667 "|"+
668 Math.round(
669 row.card
670 .getBoundingClientRect()
671 .left
672 )+
673 "|"+
674 Math.round(
675 row.el
676 .getBoundingClientRect()
677 .top
678 );
Veronika Kocher 5.9 679
Veronika Kocher 5.11 680 if(!seenHeaders.has(key)){
681 seenHeaders.add(key);
682 unique.push(row);
683 }
684 });
Veronika Kocher 5.9 685
Veronika Kocher 5.11 686 unique.forEach(function(row){
687 var headerRect=
688 row.el
689 .getBoundingClientRect();
Veronika Kocher 5.9 690
Veronika Kocher 5.11 691 row.el.style.setProperty(
692 "background",
693 row.theme.bg,
694 "important"
Veronika Kocher 5.10 695 );
696
Veronika Kocher 5.11 697 row.el.style.setProperty(
698 "color",
699 row.theme.text,
700 "important"
Veronika Kocher 5.10 701 );
702
Veronika Kocher 5.11 703 row.el.style.setProperty(
704 "text-align",
705 "left",
706 "important"
Veronika Kocher 5.10 707 );
Veronika Kocher 5.9 708
Veronika Kocher 5.11 709 row.el.style.setProperty(
710 "word-spacing",
711 "normal",
712 "important"
713 );
Veronika Kocher 5.10 714
Veronika Kocher 5.11 715 var later=
716 unique
717 .filter(function(other){
718 return (
719 other.card===row.card&&
720 other.el
721 .getBoundingClientRect()
722 .top>
723 headerRect.top+2
724 );
725 })
726 .sort(function(a,b){
727 return (
728 a.el
729 .getBoundingClientRect()
730 .top-
731 b.el
732 .getBoundingClientRect()
733 .top
734 );
735 });
Veronika Kocher 5.10 736
Veronika Kocher 5.11 737 var stopTop=
738 later.length
739 ?later[0].el
740 .getBoundingClientRect()
741 .top
742 :Infinity;
Veronika Kocher 5.10 743
744 Array.from(
Veronika Kocher 5.11 745 row.card.querySelectorAll("a")
746 ).forEach(function(link){
747 if(!visible(link))return;
Veronika Kocher 5.10 748
Veronika Kocher 5.11 749 var rect=
750 link.getBoundingClientRect();
Veronika Kocher 5.10 751
Veronika Kocher 5.11 752 if(
753 rect.top<=
754 headerRect.bottom-2||
755 rect.top>=
756 stopTop-2
757 ){
758 return;
759 }
Veronika Kocher 5.10 760
Veronika Kocher 5.11 761 var candidates=
762 rowCandidates(
763 link,
764 row.card
765 );
766
767 var target=
768 chooseOuterRow(
769 candidates,
770 link
771 );
772
773 candidates.forEach(function(el){
774 el.style.setProperty(
775 "border-left",
776 "0 solid transparent",
777 "important"
778 );
779 });
780
781 target.style.setProperty(
782 "border-left",
783 "3px solid "+
784 row.theme.accent,
785 "important"
Veronika Kocher 5.10 786 );
Veronika Kocher 5.11 787
788 target.style.setProperty(
789 "box-sizing",
790 "border-box",
791 "important"
Veronika Kocher 5.10 792 );
Veronika Kocher 5.9 793 });
Veronika Kocher 5.11 794 });
Veronika Kocher 5.9 795
Veronika Kocher 5.11 796 return unique;
Veronika Kocher 5.10 797 }
Veronika Kocher 5.9 798
Veronika Kocher 5.11 799 /* =======================================================
800 OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
801 ======================================================= */
Veronika Kocher 5.10 802
Veronika Kocher 5.11 803 function alignOverviewCards(headers){
804 if(
805 PAGE_KIND!=="overview"||
806 window.innerWidth<=MOBILE_MAX
807 ){
808 return;
809 }
Veronika Kocher 5.10 810
Veronika Kocher 5.11 811 var cards=[];
812 var seen=new Set();
Veronika Kocher 5.10 813
Veronika Kocher 5.11 814 headers.forEach(function(row){
815 if(!seen.has(row.card)){
816 seen.add(row.card);
817 cards.push(row.card);
818 }
819 });
Veronika Kocher 5.10 820
Veronika Kocher 5.11 821 if(cards.length<2){
822 return;
823 }
Veronika Kocher 5.10 824
Veronika Kocher 5.11 825 // Group cards by actual top position.
826 var groups=[];
Veronika Kocher 5.10 827
Veronika Kocher 5.11 828 cards.forEach(function(card){
829 var top=
830 card.getBoundingClientRect().top;
Veronika Kocher 5.10 831
Veronika Kocher 5.11 832 var group=null;
Veronika Kocher 5.10 833
Veronika Kocher 5.11 834 for(var i=0;i<groups.length;i++){
Veronika Kocher 5.10 835 if(
Veronika Kocher 5.11 836 Math.abs(
837 groups[i].top-top
838 )<=ROW_TOLERANCE
Veronika Kocher 5.10 839 ){
Veronika Kocher 5.11 840 group=groups[i];
841 break;
Veronika Kocher 5.10 842 }
Veronika Kocher 5.11 843 }
Veronika Kocher 5.10 844
Veronika Kocher 5.11 845 if(!group){
846 group={
847 top:top,
848 cards:[]
849 };
850 groups.push(group);
851 }
Veronika Kocher 5.10 852
Veronika Kocher 5.11 853 group.cards.push(card);
854 });
Veronika Kocher 5.10 855
Veronika Kocher 5.11 856 groups.forEach(function(group){
857 if(group.cards.length<2){
858 return;
859 }
Veronika Kocher 5.10 860
Veronika Kocher 5.11 861 var firstHeaders=
862 group.cards.map(function(card){
863 var candidates=
864 headers
865 .filter(function(row){
866 return row.card===card;
867 })
868 .sort(function(a,b){
869 return (
870 a.el
871 .getBoundingClientRect()
872 .top-
873 b.el
874 .getBoundingClientRect()
875 .top
876 );
877 });
Veronika Kocher 5.10 878
Veronika Kocher 5.11 879 return candidates.length
880 ?candidates[0]
881 :null;
882 });
Veronika Kocher 5.10 883
Veronika Kocher 5.11 884 if(
885 !firstHeaders.some(function(row){
886 return !row;
887 })
888 ){
889 var targetTop=
890 Math.max.apply(
891 Math,
892 firstHeaders.map(function(row){
893 return (
894 row.el
895 .getBoundingClientRect()
896 .top-
897 row.card
898 .getBoundingClientRect()
899 .top
900 );
901 })
902 );
Veronika Kocher 5.8 903
Veronika Kocher 5.11 904 firstHeaders.forEach(function(row){
905 var relativeTop=
906 row.el
907 .getBoundingClientRect()
908 .top-
909 row.card
910 .getBoundingClientRect()
911 .top;
Veronika Kocher 5.9 912
Veronika Kocher 5.11 913 var delta=
914 targetTop-relativeTop;
Veronika Kocher 5.9 915
Veronika Kocher 5.11 916 if(delta>1){
917 saveStyle(
918 row.el,
919 originalMargin,
920 "margin-top"
921 );
Veronika Kocher 5.10 922
Veronika Kocher 5.11 923 var current=
924 num(
925 getComputedStyle(
926 row.el
927 ).marginTop
928 );
Veronika Kocher 5.9 929
Veronika Kocher 5.11 930 row.el.style.setProperty(
931 "margin-top",
932 (
933 current+delta
934 )+"px"
935 );
Veronika Kocher 5.9 936
Veronika Kocher 5.11 937 row.el.setAttribute(
938 "data-sn-master-first-row",
939 "1"
940 );
Veronika Kocher 5.9 941
Veronika Kocher 5.11 942 managedMargin.add(
943 row.el
944 );
945 }
946 });
947 }
Veronika Kocher 5.9 948
Veronika Kocher 5.11 949 var maxHeight=0;
Veronika Kocher 5.9 950
Veronika Kocher 5.11 951 group.cards.forEach(function(card){
952 maxHeight=
953 Math.max(
954 maxHeight,
955 card
956 .getBoundingClientRect()
957 .height
958 );
959 });
Veronika Kocher 5.9 960
Veronika Kocher 5.11 961 maxHeight=
962 Math.ceil(maxHeight);
Veronika Kocher 5.9 963
Veronika Kocher 5.11 964 group.cards.forEach(function(card){
965 saveStyle(
966 card,
967 originalHeight,
968 "min-height"
969 );
Veronika Kocher 5.9 970
Veronika Kocher 5.11 971 card.style.setProperty(
972 "min-height",
973 maxHeight+"px"
Veronika Kocher 5.9 974 );
975
Veronika Kocher 5.11 976 card.setAttribute(
977 "data-sn-master-equal-height",
978 "1"
979 );
Veronika Kocher 5.9 980
Veronika Kocher 5.11 981 managedHeight.add(
982 card
983 );
984 });
Veronika Kocher 5.9 985 });
986 }
987
Veronika Kocher 5.11 988 /* =======================================================
989 DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
990 ======================================================= */
Veronika Kocher 5.9 991
Veronika Kocher 5.11 992 function equaliseDetailGrids(){
Veronika Kocher 5.10 993 if(
Veronika Kocher 5.11 994 PAGE_KIND!=="detail"||
995 window.innerWidth<=MOBILE_MAX
Veronika Kocher 5.10 996 ){
Veronika Kocher 5.11 997 return;
Veronika Kocher 5.10 998 }
Veronika Kocher 5.9 999
Veronika Kocher 5.11 1000 var selectors=[
1001 ".arsn-grid",
1002 ".arsn-grid-2",
1003 ".arsn-grid-3",
1004 ".dmp-grid",
1005 ".ido-grid",
1006 ".pp-grid"
1007 ];
Veronika Kocher 5.9 1008
Veronika Kocher 5.11 1009 selectors.forEach(function(selector){
1010 Array.from(
1011 root.querySelectorAll(selector)
1012 ).forEach(function(grid){
1013 var children=
1014 Array.from(
1015 grid.children||[]
1016 ).filter(visible);
Veronika Kocher 5.9 1017
Veronika Kocher 5.11 1018 if(children.length<2){
1019 return;
1020 }
Veronika Kocher 5.9 1021
Veronika Kocher 5.11 1022 var groups=[];
Veronika Kocher 5.9 1023
Veronika Kocher 5.11 1024 children.forEach(function(child){
1025 var top=
1026 child
1027 .getBoundingClientRect()
1028 .top;
Veronika Kocher 5.9 1029
Veronika Kocher 5.11 1030 var group=null;
Veronika Kocher 5.9 1031
Veronika Kocher 5.11 1032 for(var i=0;i<groups.length;i++){
1033 if(
1034 Math.abs(
1035 groups[i].top-top
1036 )<=ROW_TOLERANCE
1037 ){
1038 group=groups[i];
1039 break;
1040 }
1041 }
Veronika Kocher 5.9 1042
Veronika Kocher 5.11 1043 if(!group){
1044 group={
1045 top:top,
1046 items:[]
1047 };
1048 groups.push(group);
1049 }
Veronika Kocher 5.9 1050
Veronika Kocher 5.11 1051 group.items.push(child);
1052 });
Veronika Kocher 5.9 1053
Veronika Kocher 5.11 1054 groups.forEach(function(group){
1055 if(group.items.length<2){
1056 return;
1057 }
Veronika Kocher 5.8 1058
Veronika Kocher 5.11 1059 var maxHeight=0;
Veronika Kocher 5.10 1060
Veronika Kocher 5.11 1061 group.items.forEach(function(item){
1062 maxHeight=
1063 Math.max(
1064 maxHeight,
1065 item
1066 .getBoundingClientRect()
1067 .height
1068 );
1069 });
Veronika Kocher 5.10 1070
Veronika Kocher 5.11 1071 maxHeight=
1072 Math.ceil(maxHeight);
Veronika Kocher 5.8 1073
Veronika Kocher 5.11 1074 group.items.forEach(function(item){
1075 saveStyle(
1076 item,
1077 originalHeight,
1078 "min-height"
1079 );
Veronika Kocher 5.8 1080
Veronika Kocher 5.11 1081 item.style.setProperty(
1082 "min-height",
1083 maxHeight+"px"
1084 );
Veronika Kocher 5.9 1085
Veronika Kocher 5.11 1086 item.setAttribute(
1087 "data-sn-master-equal-height",
1088 "1"
1089 );
Veronika Kocher 5.8 1090
Veronika Kocher 5.11 1091 managedHeight.add(item);
1092 });
Veronika Kocher 5.8 1093 });
Veronika Kocher 5.11 1094 });
1095 });
1096 }
Veronika Kocher 5.8 1097
Veronika Kocher 5.11 1098 /* =======================================================
1099 RUN / RESPONSIVE SCHEDULING
1100 ======================================================= */
Veronika Kocher 5.8 1101
Veronika Kocher 5.11 1102 function run(){
1103 if(running)return;
Veronika Kocher 5.8 1104
Veronika Kocher 5.11 1105 running=true;
Veronika Kocher 5.10 1106
Veronika Kocher 5.11 1107 try{
1108 resetRuntime();
1109 applyPlaceholderBadge();
1110 propagateDetailAccents();
Veronika Kocher 5.10 1111
Veronika Kocher 5.11 1112 var headers=
1113 applyOverviewPalette();
Veronika Kocher 5.10 1114
Veronika Kocher 5.11 1115 if(
1116 window.innerWidth>
1117 MOBILE_MAX
1118 ){
1119 alignOverviewCards(
1120 headers
1121 );
Veronika Kocher 5.8 1122
Veronika Kocher 5.11 1123 equaliseDetailGrids();
1124 }
Veronika Kocher 5.10 1125 }finally{
Veronika Kocher 5.11 1126 running=false;
Veronika Kocher 5.10 1127 }
Veronika Kocher 5.8 1128 }
1129
Veronika Kocher 5.11 1130 function onResize(){
Veronika Kocher 5.10 1131 if(resizeTimer){
1132 clearTimeout(
1133 resizeTimer
1134 );
1135 }
Veronika Kocher 5.9 1136
Veronika Kocher 5.10 1137 resizeTimer=
1138 setTimeout(
1139 function(){
1140 resizeTimer=0;
Veronika Kocher 5.11 1141 run();
Veronika Kocher 5.10 1142 },
1143 RESIZE_DEBOUNCE
1144 );
Veronika Kocher 5.8 1145 }
1146
Veronika Kocher 5.11 1147 async function waitForReady(){
1148 if(
1149 document.readyState!=="complete"
1150 ){
1151 await new Promise(function(resolve){
1152 window.addEventListener(
1153 "load",
1154 resolve,
1155 {once:true}
1156 );
1157 });
1158 }
1159
1160 if(
1161 document.fonts&&
1162 document.fonts.ready
1163 ){
1164 try{
1165 await document.fonts.ready;
1166 }catch(error){}
1167 }
1168
Veronika Kocher 5.10 1169 var images=
1170 Array.from(
1171 root.querySelectorAll("img")
1172 );
Veronika Kocher 5.8 1173
Veronika Kocher 5.11 1174 await Promise.all(
Veronika Kocher 5.10 1175 images.map(function(img){
1176 if(img.complete){
1177 return Promise.resolve();
1178 }
Veronika Kocher 5.8 1179
Veronika Kocher 5.10 1180 return new Promise(function(resolve){
1181 var done=function(){
1182 resolve();
1183 };
1184
1185 img.addEventListener(
1186 "load",
1187 done,
1188 {once:true}
1189 );
1190
1191 img.addEventListener(
1192 "error",
1193 done,
1194 {once:true}
1195 );
1196 });
1197 })
1198 );
1199
Veronika Kocher 5.11 1200 run();
Veronika Kocher 5.8 1201 }
1202
Veronika Kocher 5.11 1203 window.addEventListener(
Veronika Kocher 5.10 1204 "resize",
Veronika Kocher 5.11 1205 onResize,
Veronika Kocher 5.10 1206 {passive:true}
1207 );
1208
Veronika Kocher 5.11 1209 waitForReady();
Veronika Kocher 5.8 1210 })();
1211 </script>
Veronika Kocher 5.10 1212
Veronika Kocher 5.11 1213 <!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
1214 {{/html}}
1215