Changes for page Service Navigator
Last modified by Veronika Kocher on Friday, 09 Oct 2026 12:12
From version 22.15
edited by Veronika Kocher
on Thursday, 03 Sep 2026 10:09
on Thursday, 03 Sep 2026 10:09
Change comment:
There is no comment for this version
To version 25.2
edited by Veronika Kocher
on Friday, 09 Oct 2026 12:12
on Friday, 09 Oct 2026 12:12
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -42,6 +42,27 @@ 42 42 43 43 <!-- 1. PEOPLE, EQUALITY, HEALTH & WORK --> 44 44 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #f0aa00;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 45 +<!-- SN_DRAFT_BANNER_START --> 46 +<div 47 + data-sn-draft-banner="1" 48 + style=" 49 + width:100%; 50 + box-sizing:border-box; 51 + padding:9px 18px 8px; 52 + margin:0; 53 + background:#e94b13; 54 + color:#ffffff; 55 + border-bottom:1px solid #cf3f0d; 56 + font-size:13px; 57 + font-weight:800; 58 + line-height:1.2; 59 + letter-spacing:.10em; 60 + text-transform:uppercase; 61 + text-align:left; 62 + " 63 +>Draft!</div> 64 +<!-- SN_DRAFT_BANNER_END --> 65 + 45 45 <div style="padding:18px 18px 14px 18px;flex:1;"> 46 46 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">PEOPLE & WORK</div> 47 47 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">People, Equality, Health & Work</h3> ... ... @@ -65,6 +65,27 @@ 65 65 66 66 <!-- 2. IT & DIGITAL SERVICES --> 67 67 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #38b76a;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 89 +<!-- SN_DRAFT_BANNER_START --> 90 +<div 91 + data-sn-draft-banner="1" 92 + style=" 93 + width:100%; 94 + box-sizing:border-box; 95 + padding:9px 18px 8px; 96 + margin:0; 97 + background:#e94b13; 98 + color:#ffffff; 99 + border-bottom:1px solid #cf3f0d; 100 + font-size:13px; 101 + font-weight:800; 102 + line-height:1.2; 103 + letter-spacing:.10em; 104 + text-transform:uppercase; 105 + text-align:left; 106 + " 107 +>Draft!</div> 108 +<!-- SN_DRAFT_BANNER_END --> 109 + 68 68 <div style="padding:18px 18px 14px 18px;flex:1;"> 69 69 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">IT & DIGITAL</div> 70 70 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">IT & Digital Services</h3> ... ... @@ -88,6 +88,27 @@ 88 88 89 89 <!-- 3. ROOMS, BUILDINGS & CAMPUS --> 90 90 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #38b76a;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 133 +<!-- SN_DRAFT_BANNER_START --> 134 +<div 135 + data-sn-draft-banner="1" 136 + style=" 137 + width:100%; 138 + box-sizing:border-box; 139 + padding:9px 18px 8px; 140 + margin:0; 141 + background:#e94b13; 142 + color:#ffffff; 143 + border-bottom:1px solid #cf3f0d; 144 + font-size:13px; 145 + font-weight:800; 146 + line-height:1.2; 147 + letter-spacing:.10em; 148 + text-transform:uppercase; 149 + text-align:left; 150 + " 151 +>Draft!</div> 152 +<!-- SN_DRAFT_BANNER_END --> 153 + 91 91 <div style="padding:18px 18px 14px 18px;flex:1;"> 92 92 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">CAMPUS</div> 93 93 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Rooms, Buildings & Campus</h3> ... ... @@ -111,6 +111,27 @@ 111 111 112 112 <!-- 4. ART & RESEARCH SERVICES --> 113 113 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #21b6d7;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 177 +<!-- SN_DRAFT_BANNER_START --> 178 +<div 179 + data-sn-draft-banner="1" 180 + style=" 181 + width:100%; 182 + box-sizing:border-box; 183 + padding:9px 18px 8px; 184 + margin:0; 185 + background:#e94b13; 186 + color:#ffffff; 187 + border-bottom:1px solid #cf3f0d; 188 + font-size:13px; 189 + font-weight:800; 190 + line-height:1.2; 191 + letter-spacing:.10em; 192 + text-transform:uppercase; 193 + text-align:left; 194 + " 195 +>Draft!</div> 196 +<!-- SN_DRAFT_BANNER_END --> 197 + 114 114 <div style="padding:18px 18px 14px 18px;flex:1;"> 115 115 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">ART & RESEARCH</div> 116 116 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Art & Research Services</h3> ... ... @@ -136,6 +136,27 @@ 136 136 137 137 <!-- 5. STUDY, TEACHING & CURRICULUM --> 138 138 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #21b6d7;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 223 +<!-- SN_DRAFT_BANNER_START --> 224 +<div 225 + data-sn-draft-banner="1" 226 + style=" 227 + width:100%; 228 + box-sizing:border-box; 229 + padding:9px 18px 8px; 230 + margin:0; 231 + background:#e94b13; 232 + color:#ffffff; 233 + border-bottom:1px solid #cf3f0d; 234 + font-size:13px; 235 + font-weight:800; 236 + line-height:1.2; 237 + letter-spacing:.10em; 238 + text-transform:uppercase; 239 + text-align:left; 240 + " 241 +>Draft!</div> 242 +<!-- SN_DRAFT_BANNER_END --> 243 + 139 139 <div style="padding:18px 18px 14px 18px;flex:1;"> 140 140 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">STUDY & TEACHING</div> 141 141 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Study, Teaching & Curriculum</h3> ... ... @@ -159,6 +159,27 @@ 159 159 160 160 <!-- 6. RESEARCH & DISCOVERY RESOURCES --> 161 161 <section style="display:flex;flex-direction:column;min-height:340px;border:1px solid #e3ded6;border-left:6px solid #21b6d7;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 267 +<!-- SN_DRAFT_BANNER_START --> 268 +<div 269 + data-sn-draft-banner="1" 270 + style=" 271 + width:100%; 272 + box-sizing:border-box; 273 + padding:9px 18px 8px; 274 + margin:0; 275 + background:#e94b13; 276 + color:#ffffff; 277 + border-bottom:1px solid #cf3f0d; 278 + font-size:13px; 279 + font-weight:800; 280 + line-height:1.2; 281 + letter-spacing:.10em; 282 + text-transform:uppercase; 283 + text-align:left; 284 + " 285 +>Draft!</div> 286 +<!-- SN_DRAFT_BANNER_END --> 287 + 162 162 <div style="padding:18px 18px 14px 18px;flex:1;"> 163 163 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">FIND · SEARCH · DISCOVER</div> 164 164 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Research & Discovery Resources</h3> ... ... @@ -182,6 +182,27 @@ 182 182 183 183 <!-- 7. PURCHASING, FINANCE & LOGISTICS --> 184 184 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #38b76a;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 311 +<!-- SN_DRAFT_BANNER_START --> 312 +<div 313 + data-sn-draft-banner="1" 314 + style=" 315 + width:100%; 316 + box-sizing:border-box; 317 + padding:9px 18px 8px; 318 + margin:0; 319 + background:#e94b13; 320 + color:#ffffff; 321 + border-bottom:1px solid #cf3f0d; 322 + font-size:13px; 323 + font-weight:800; 324 + line-height:1.2; 325 + letter-spacing:.10em; 326 + text-transform:uppercase; 327 + text-align:left; 328 + " 329 +>Draft!</div> 330 +<!-- SN_DRAFT_BANNER_END --> 331 + 185 185 <div style="padding:18px 18px 14px 18px;flex:1;"> 186 186 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">PURCHASE & MOVE</div> 187 187 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Purchasing, Finance & Logistics</h3> ... ... @@ -205,6 +205,27 @@ 205 205 206 206 <!-- 8. LEGAL, DATA PROTECTION & GOVERNANCE --> 207 207 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #f0aa00;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 355 +<!-- SN_DRAFT_BANNER_START --> 356 +<div 357 + data-sn-draft-banner="1" 358 + style=" 359 + width:100%; 360 + box-sizing:border-box; 361 + padding:9px 18px 8px; 362 + margin:0; 363 + background:#e94b13; 364 + color:#ffffff; 365 + border-bottom:1px solid #cf3f0d; 366 + font-size:13px; 367 + font-weight:800; 368 + line-height:1.2; 369 + letter-spacing:.10em; 370 + text-transform:uppercase; 371 + text-align:left; 372 + " 373 +>Draft!</div> 374 +<!-- SN_DRAFT_BANNER_END --> 375 + 208 208 <div style="padding:18px 18px 14px 18px;flex:1;"> 209 209 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">RIGHTS & RULES</div> 210 210 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Legal, Data Protection & Governance</h3> ... ... @@ -228,6 +228,27 @@ 228 228 229 229 <!-- 9. COMMUNICATION, MEDIA & EVENTS --> 230 230 <section style="display:flex;flex-direction:column;min-height:320px;border:1px solid #e3ded6;border-left:6px solid #e94b13;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 399 +<!-- SN_DRAFT_BANNER_START --> 400 +<div 401 + data-sn-draft-banner="1" 402 + style=" 403 + width:100%; 404 + box-sizing:border-box; 405 + padding:9px 18px 8px; 406 + margin:0; 407 + background:#e94b13; 408 + color:#ffffff; 409 + border-bottom:1px solid #cf3f0d; 410 + font-size:13px; 411 + font-weight:800; 412 + line-height:1.2; 413 + letter-spacing:.10em; 414 + text-transform:uppercase; 415 + text-align:left; 416 + " 417 +>Draft!</div> 418 +<!-- SN_DRAFT_BANNER_END --> 419 + 231 231 <div style="padding:18px 18px 14px 18px;flex:1;"> 232 232 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">COMMUNICATE & ORGANISE</div> 233 233 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">Communication, Media & Events</h3> ... ... @@ -251,6 +251,27 @@ 251 251 252 252 <!-- 10. INTERNATIONAL OFFICE --> 253 253 <section style="display:flex;flex-direction:column;min-height:300px;border:1px solid #e3ded6;border-left:6px solid #21b6d7;border-radius:12px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);overflow:hidden;"> 443 +<!-- SN_DRAFT_BANNER_START --> 444 +<div 445 + data-sn-draft-banner="1" 446 + style=" 447 + width:100%; 448 + box-sizing:border-box; 449 + padding:9px 18px 8px; 450 + margin:0; 451 + background:#e94b13; 452 + color:#ffffff; 453 + border-bottom:1px solid #cf3f0d; 454 + font-size:13px; 455 + font-weight:800; 456 + line-height:1.2; 457 + letter-spacing:.10em; 458 + text-transform:uppercase; 459 + text-align:left; 460 + " 461 +>Draft!</div> 462 +<!-- SN_DRAFT_BANNER_END --> 463 + 254 254 <div style="padding:18px 18px 14px 18px;flex:1;"> 255 255 <div style="display:inline-block;font-size:12px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin-bottom:8px;padding:4px 7px;background:#f3efe8;border-radius:4px;">GO INTERNATIONAL</div> 256 256 <h3 style="font-size:21px;line-height:1.25;margin:0 0 8px 0;color:#252321;">International Office</h3> ... ... @@ -285,12 +285,13 @@ 285 285 </div> 286 286 {{/html}} 287 287 288 -\n\n 289 -\n\n{{html clean="false"}} 290 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 498 +{{html clean="false"}} 499 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 291 291 292 -<style data-sn-horizontal-box-harmonizer="7"> 293 -/* ---------- Typography: never justify headings ---------- */ 501 +<style data-sn-service-navigator-master="1"> 502 +/* ========================================================= 503 + MASTER TYPOGRAPHY 504 + ========================================================= */ 294 294 #xwikicontent h1, 295 295 #xwikicontent h2, 296 296 #xwikicontent h3, ... ... @@ -312,88 +312,105 @@ 312 312 word-spacing:normal!important; 313 313 } 314 314 315 -/* ---------- Native XWiki semantic callouts ---------- */ 316 -#xwikicontent .box.infomessage, 317 -#xwikicontent .infomessage, 318 -#xwikicontent .box.warningmessage, 319 -#xwikicontent .warningmessage, 320 -#xwikicontent .box.successmessage, 321 -#xwikicontent .successmessage, 322 -#xwikicontent .box.errormessage, 323 -#xwikicontent .errormessage, 324 -#xwikicontent [data-sn-callout-harmonized="1"]{ 526 +/* ========================================================= 527 + COMING SOON / IN VORBEREITUNG 528 + ========================================================= */ 529 +.sn-coming-soon-badge{ 530 + display:inline-block; 531 + vertical-align:middle; 532 + margin-left:10px; 533 + padding:4px 8px; 534 + border-radius:14px; 535 + border:1px solid #efd9cc; 536 + background:#fff4ee; 537 + color:#8a4d36; 538 + font-size:11px; 539 + font-weight:700; 540 + letter-spacing:.055em; 541 + line-height:1.2; 542 + white-space:nowrap; 543 +} 544 + 545 +/* ========================================================= 546 + NATIVE / DETAIL CALLOUT GEOMETRY 547 + Preserve existing backgrounds. 548 + ========================================================= */ 549 +#xwikicontent .arsn-info, 550 +#xwikicontent .dmp-info, 551 +#xwikicontent .ido-info, 552 +#xwikicontent .pp-info, 553 +#xwikicontent .infomessage{ 325 325 box-sizing:border-box!important; 326 - border-radius:8px!important; 327 - border-top:1px solid rgba(0,0,0,.08)!important; 328 - border-right:1px solid rgba(0,0,0,.08)!important; 329 - border-bottom:1px solid rgba(0,0,0,.08)!important; 330 - border-left:4px solid var(--sn-callout-accent,#21b6d7)!important; 331 - padding:14px 16px!important; 555 + border-left:4px solid #21b6d7!important; 556 + border-radius:8px; 332 332 text-align:left!important; 333 - text-justify:auto!important; 334 334 word-spacing:normal!important; 335 - box-shadow:none!important; 336 336 } 337 337 338 -#xwikicontent .box.infomessage, 339 -#xwikicontent .infomessage{ 340 - --sn-callout-accent:#21b6d7; 341 - background:#eaf7fb!important; 342 -} 343 - 344 -#xwikicontent .box.warningmessage, 345 -#xwikicontent .warningmessage{ 346 - --sn-callout-accent:#f0aa00; 347 - background:#fff8e7!important; 348 -} 349 - 350 -#xwikicontent .box.successmessage, 351 -#xwikicontent .successmessage{ 352 - --sn-callout-accent:#38b76a; 353 - background:#edf9f1!important; 354 -} 355 - 356 -#xwikicontent .box.errormessage, 561 +#xwikicontent .arsn-warn, 562 +#xwikicontent .dmp-warn, 563 +#xwikicontent .ido-warn, 564 +#xwikicontent .pp-warn, 565 +#xwikicontent .warn, 566 +#xwikicontent .warning, 567 +#xwikicontent .warningmessage, 357 357 #xwikicontent .errormessage{ 358 - --sn-callout-accent:#e94b13; 359 - background:#fff1ec!important; 569 + box-sizing:border-box!important; 570 + border-left:4px solid #e94b13!important; 571 + border-radius:8px; 572 + text-align:left!important; 573 + word-spacing:normal!important; 360 360 } 361 361 362 -#xwikicontent [data-sn-callout-harmonized="1"] > :first-child, 363 -#xwikicontent .infomessage > :first-child, 364 -#xwikicontent .warningmessage > :first-child, 365 -#xwikicontent .successmessage > :first-child, 366 -#xwikicontent .errormessage > :first-child{ 367 - margin-top:0!important; 576 +[data-sn-master-equal-height], 577 +[data-sn-master-first-row]{ 578 + box-sizing:border-box; 368 368 } 369 369 370 -#xwikicontent [data-sn-callout-harmonized="1"] > :last-child, 371 -#xwikicontent .infomessage > :last-child, 372 -#xwikicontent .warningmessage > :last-child, 373 -#xwikicontent .successmessage > :last-child, 374 -#xwikicontent .errormessage > :last-child{ 375 - margin-bottom:0!important; 581 +/* ========================================================= 582 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 583 + ========================================================= */ 584 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 585 + display:grid!important; 586 + grid-template-columns:minmax(0,1fr)!important; 587 + grid-auto-rows:auto!important; 588 + width:100%!important; 589 + max-width:none!important; 590 + box-sizing:border-box!important; 591 + justify-items:start!important; 592 + align-items:start!important; 593 + gap:2px!important; 594 + text-align:left!important; 595 + text-align-last:left!important; 596 + text-justify:auto!important; 597 + word-spacing:normal!important; 598 + white-space:normal!important; 376 376 } 377 - 378 -#xwikicontent [data-sn-equal-height-managed], 379 -#xwikicontent [data-sn-first-section-aligned], 380 -#xwikicontent [data-sn-first-content-aligned]{ 381 - box-sizing:border-box; 600 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 601 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 602 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 603 + display:block!important; 604 + width:100%!important; 605 + margin:0!important; 606 + text-align:left!important; 607 + text-align-last:left!important; 608 + text-justify:auto!important; 609 + word-spacing:normal!important; 610 + white-space:normal!important; 382 382 } 383 383 </style> 384 384 385 -<script data-sn- horizontal-box-harmonizer="7">614 +<script data-sn-service-navigator-master="1"> 386 386 (function(){ 387 387 "use strict"; 388 388 618 + var PAGE_KIND="overview"; 619 + var PLACEHOLDER=false; 620 + var PLACEHOLDER_LABEL="COMING SOON"; 621 + 389 389 var MOBILE_MAX=767; 390 390 var ROW_TOLERANCE=6; 391 - var MIN_W=150; 392 - var MIN_H=36; 393 - var MAX_PARENT_CHILDREN=18; 394 - var SEARCH_DEPTH=5; 395 395 var RESIZE_DEBOUNCE=220; 396 - var MIN_WIDTH_CHANGE=2; 397 397 398 398 var root= 399 399 document.getElementById("xwikicontent")|| ... ... @@ -403,142 +403,114 @@ 403 403 404 404 if(!root)return; 405 405 406 - var heightManaged=new Set(); 407 - var sectionManaged=new Set(); 408 - var contentManaged=new Set(); 634 + var managedHeight=new Set(); 635 + var managedMargin=new Set(); 636 + var originalHeight=new WeakMap(); 637 + var originalMargin=new WeakMap(); 409 409 410 - var originalMinHeight=new WeakMap(); 411 - var originalMarginTop=new WeakMap(); 412 - 413 413 var resizeTimer=0; 414 - var lastWidth=-1; 415 - var hasApplied=false; 416 - var applying=false; 640 + var running=false; 417 417 418 - function num(v){ 419 - var n=parseFloat(v); 420 - return Number.isFinite(n)?n:0; 421 - } 422 - 423 - function visible(el,minW,minH){ 424 - if(!el||el.nodeType!==1)return false; 425 - 426 - var s=getComputedStyle(el); 427 - 428 - if( 429 - s.display==="none"|| 430 - s.visibility==="hidden"|| 431 - Number(s.opacity)===0 432 - ){ 433 - return false; 642 + var THEMES=[ 643 + { 644 + name:"BLUE", 645 + accent:"#21b6d7", 646 + bg:"#eaf7fb", 647 + text:"#315d68", 648 + labels:[ 649 + "HIER STARTEN", 650 + "ENTSCHEIDEN", 651 + "ÜBERPRÜFEN & ANPASSEN", 652 + "START HERE", 653 + "DECIDE", 654 + "REVIEW & ADAPT" 655 + ] 656 + }, 657 + { 658 + name:"RED", 659 + accent:"#e94b13", 660 + bg:"#fff1ec", 661 + text:"#8a4d36", 662 + labels:[ 663 + "PLANEN & ORGANISIEREN", 664 + "ORGANISIEREN & DOKUMENTIEREN", 665 + "PUBLIZIEREN & PRÄSENTIEREN", 666 + "PLAN & ORGANISE", 667 + "PLAN & ORGANIZE", 668 + "ORGANISE & DOCUMENT", 669 + "ORGANIZE & DOCUMENT", 670 + "PUBLISH & PRESENT" 671 + ] 672 + }, 673 + { 674 + name:"YELLOW", 675 + accent:"#f0aa00", 676 + bg:"#fff8e7", 677 + text:"#785b17", 678 + labels:[ 679 + "SCHÜTZEN & KLÄREN", 680 + "STANDARDISIEREN & IDENTIFIZIEREN", 681 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 682 + "PROTECT & CLARIFY", 683 + "STANDARDISE & IDENTIFY", 684 + "STANDARDIZE & IDENTIFY", 685 + "OPEN, REUSE & MAKE FINDABLE" 686 + ] 687 + }, 688 + { 689 + name:"GREEN", 690 + accent:"#38b76a", 691 + bg:"#edf9f1", 692 + text:"#3f7451", 693 + labels:[ 694 + "INFRASTRUKTUR EINRICHTEN", 695 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 696 + "SPEICHERN & ZUGRIFF STEUERN", 697 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 698 + "SET UP INFRASTRUCTURE", 699 + "SET UP INFRASTRUCTURE & COLLABORATION", 700 + "STORE & CONTROL ACCESS", 701 + "REPOSITORY, PRESERVE & HAND OVER" 702 + ] 434 434 } 704 + ]; 435 435 436 - var r=el.getBoundingClientRect(); 437 - 438 - return ( 439 - r.width>=(minW||1)&& 440 - r.height>=(minH||1) 441 - ); 706 + function num(value){ 707 + var n=parseFloat(value); 708 + return Number.isFinite(n)?n:0; 442 442 } 443 443 444 - function normal izeText(text){445 - return String( text||"")711 + function norm(value){ 712 + return String(value||"") 446 446 .replace(/\s+/g," ") 447 447 .trim() 448 448 .toUpperCase(); 449 449 } 450 450 451 - function excluded(el){ 452 - return ( 453 - !el.matches|| 454 - el.matches( 455 - "button,input,select,textarea,option,label,img,svg,canvas,table,thead,tbody,tfoot,tr,td,th,summary,script,style,noscript,template,.btn,.chip,[role=button]" 456 - ) 457 - ); 458 - } 718 + function visible(el){ 719 + if(!el||el.nodeType!==1)return false; 459 459 460 - /* ---------- Custom coloured callouts ---------- */ 721 + var style=getComputedStyle(el); 722 + var rect=el.getBoundingClientRect(); 461 461 462 - function nativeCallout(el){ 463 - var c= 464 - typeof el.className==="string" 465 - ? el.className.toLowerCase() 466 - : ""; 467 - 468 468 return ( 469 - /(^|\s)(infomessage|warningmessage|successmessage|errormessage)(\s|$)/.test(c) 725 + style.display!=="none"&& 726 + style.visibility!=="hidden"&& 727 + rect.width>20&& 728 + rect.height>4 470 470 ); 471 471 } 472 472 473 - function customCallout(el){ 474 - if(!visible(el,220,42)||excluded(el))return false; 475 - 476 - var r=el.getBoundingClientRect(); 477 - 478 - if(r.height>520)return false; 479 - 480 - var s=getComputedStyle(el); 481 - 482 - var bg= 483 - s.backgroundColor&& 484 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 485 - s.backgroundColor!=="transparent"&& 486 - s.backgroundColor!=="rgb(255, 255, 255)"; 487 - 488 - var left= 489 - num(s.borderLeftWidth); 490 - 491 - return ( 492 - bg&& 493 - left>=2 494 - ); 495 - } 496 - 497 - function harmoniseCustomCallouts(){ 498 - Array.from( 499 - root.querySelectorAll( 500 - "div,aside,section" 501 - ) 502 - ).forEach(function(el){ 503 - if(nativeCallout(el))return; 504 - if(!customCallout(el))return; 505 - 506 - var s=getComputedStyle(el); 507 - 508 - el.setAttribute( 509 - "data-sn-callout-harmonized", 510 - "1" 511 - ); 512 - 513 - if( 514 - s.borderLeftColor 515 - ){ 516 - el.style.setProperty( 517 - "--sn-callout-accent", 518 - s.borderLeftColor 519 - ); 520 - } 521 - }); 522 - } 523 - 524 - /* ---------- Restore only values V7 itself changed ---------- */ 525 - 526 - function saveOriginal(el,map,property){ 732 + function saveStyle(el,map,property){ 527 527 if(map.has(el))return; 528 528 529 529 map.set(el,{ 530 - value: 531 - el.style.getPropertyValue( 532 - property 533 - ), 534 - priority: 535 - el.style.getPropertyPriority( 536 - property 537 - ) 736 + value:el.style.getPropertyValue(property), 737 + priority:el.style.getPropertyPriority(property) 538 538 }); 539 539 } 540 540 541 - function restore Original(el,map,property){741 + function restoreStyle(el,map,property){ 542 542 var original=map.get(el); 543 543 544 544 if(original&&original.value){ ... ... @@ -548,770 +548,1069 @@ 548 548 original.priority||"" 549 549 ); 550 550 }else{ 551 - el.style.removeProperty( 552 - property 553 - ); 751 + el.style.removeProperty(property); 554 554 } 555 555 } 556 556 557 557 function resetRuntime(){ 558 - heightManaged.forEach(function(el){559 - restore Original(756 + managedHeight.forEach(function(el){ 757 + restoreStyle( 560 560 el, 561 - original MinHeight,759 + originalHeight, 562 562 "min-height" 563 563 ); 564 - 565 565 el.removeAttribute( 566 - "data-sn-equal-height -managed"763 + "data-sn-master-equal-height" 567 567 ); 568 568 }); 569 569 570 - sectionManaged.forEach(function(el){571 - restore Original(767 + managedMargin.forEach(function(el){ 768 + restoreStyle( 572 572 el, 573 - originalMargin Top,770 + originalMargin, 574 574 "margin-top" 575 575 ); 576 - 577 577 el.removeAttribute( 578 - "data-sn-first- section-aligned"774 + "data-sn-master-first-row" 579 579 ); 580 580 }); 581 581 582 - contentManaged.forEach(function(el){ 583 - restoreOriginal( 584 - el, 585 - originalMarginTop, 586 - "margin-top" 587 - ); 778 + managedHeight.clear(); 779 + managedMargin.clear(); 780 + } 588 588 589 - el.removeAttribute( 590 - "data-sn-first-content-aligned" 591 - ); 592 - }); 782 + function themeFor(text){ 783 + var value=norm(text); 593 593 594 - heightManaged.clear(); 595 - sectionManaged.clear(); 596 - contentManaged.clear(); 597 - } 785 + for(var i=0;i<THEMES.length;i++){ 786 + for(var j=0;j<THEMES[i].labels.length;j++){ 787 + var label=THEMES[i].labels[j]; 598 598 599 - /* ---------- Card detection ---------- */ 789 + if( 790 + value===label|| 791 + value.indexOf(label+" ")===0|| 792 + value.indexOf(label+" -")===0|| 793 + value.indexOf(label+" ·")===0 794 + ){ 795 + return THEMES[i]; 796 + } 797 + } 798 + } 600 600 601 - function namedLikeBox(el){ 602 - var c= 603 - typeof el.className==="string" 604 - ? el.className 605 - : ""; 800 + return null; 801 + } 606 606 607 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c); 803 + /* ======================================================= 804 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 805 + ======================================================= */ 806 + 807 + function colourDistance(a,b){ 808 + return Math.sqrt( 809 + Math.pow(a[0]-b[0],2)+ 810 + Math.pow(a[1]-b[1],2)+ 811 + Math.pow(a[2]-b[2],2) 812 + ); 608 608 } 609 609 610 - function boxLike(el){ 611 - if( 612 - !visible(el,MIN_W,MIN_H)|| 613 - excluded(el) 614 - ){ 615 - return false; 616 - } 815 + function makeFilledRedOrangeCTAsBorderless(){ 816 + var RED_ORANGE=[233,75,19]; 617 617 618 - var s=getComputedStyle(el); 619 - var r=el.getBoundingClientRect(); 818 + Array.from( 819 + root.querySelectorAll( 820 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 821 + ) 822 + ).forEach(function(el){ 823 + if(!visible(el))return; 620 620 621 - var border= 622 - num(s.borderTopWidth)+ 623 - num(s.borderRightWidth)+ 624 - num(s.borderBottomWidth)+ 625 - num(s.borderLeftWidth); 825 + var style=getComputedStyle(el); 826 + var rgb=parseRGB(style.backgroundColor); 626 626 627 - var radius=Math.max( 628 - num(s.borderTopLeftRadius), 629 - num(s.borderTopRightRadius), 630 - num(s.borderBottomLeftRadius), 631 - num(s.borderBottomRightRadius) 632 - ); 828 + if(!rgb)return; 633 633 634 - var bg= 635 - s.backgroundColor&& 636 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 637 - s.backgroundColor!=="transparent"; 830 + if( 831 + colourDistance( 832 + rgb, 833 + RED_ORANGE 834 + )>55 835 + ){ 836 + return; 837 + } 638 638 639 - var shadow= 640 - s.boxShadow&& 641 - s.boxShadow!=="none"; 839 + var rect=el.getBoundingClientRect(); 642 642 643 - return ( 644 - namedLikeBox(el)|| 645 - border>=1|| 646 - (bg&&radius>=3)|| 647 - (shadow&&r.width>=180) 648 - ); 649 - } 841 + if( 842 + rect.width<80|| 843 + rect.height<24 844 + ){ 845 + return; 846 + } 650 650 651 - function pickTarget(child){ 652 - if(!visible(child,MIN_W,MIN_H))return null; 848 + el.style.setProperty( 849 + "border", 850 + "none", 851 + "important" 852 + ); 653 653 654 - if(boxLike(child))return child; 854 + el.style.setProperty( 855 + "border-left", 856 + "none", 857 + "important" 858 + ); 655 655 656 - var cr=child.getBoundingClientRect(); 657 - var q=[]; 860 + el.style.setProperty( 861 + "border-top", 862 + "none", 863 + "important" 864 + ); 658 658 659 - Array.from(child.children||[]).forEach(function(el){ 660 - q.push({el:el,depth:1}); 866 + el.style.setProperty( 867 + "border-right", 868 + "none", 869 + "important" 870 + ); 871 + 872 + el.style.setProperty( 873 + "border-bottom", 874 + "none", 875 + "important" 876 + ); 877 + 878 + el.style.setProperty( 879 + "box-shadow", 880 + "none", 881 + "important" 882 + ); 661 661 }); 884 + } 662 662 663 - var best=null; 664 - var bestScore=-Infinity; 886 + /* ======================================================= 887 + FULL-WIDTH THREE-LINE AREA LABELS 888 + ======================================================= */ 665 665 666 - while(q.length){ 667 - var item=q.shift(); 668 - var el=item.el; 890 + function compactText(value){ 891 + return String(value||"") 892 + .replace(/\s+/g," ") 893 + .trim(); 894 + } 669 669 670 - if(!visible(el,MIN_W,MIN_H))continue; 896 + function makeThreeLineAreaLabels(){ 897 + Array.from( 898 + root.querySelectorAll( 899 + ".arsn-area-label" 900 + ) 901 + ).forEach(function(label){ 902 + if( 903 + label.getAttribute( 904 + "data-sn-three-line" 905 + )==="1" 906 + ){ 907 + return; 908 + } 671 671 672 - var r=el.getBoundingClientRect(); 910 + var number= 911 + label.querySelector( 912 + ":scope > .arsn-area-number" 913 + ); 673 673 915 + var action= 916 + label.querySelector( 917 + ":scope > .arsn-area-action" 918 + ); 919 + 674 674 if( 675 - r .width>=cr.width*.68&&676 - boxLike(el)921 + !number|| 922 + !action 677 677 ){ 678 - var widthFit= 679 - 1-Math.min( 680 - 1, 681 - Math.abs(cr.width-r.width)/ 682 - Math.max(1,cr.width) 683 - ); 924 + return; 925 + } 684 684 685 - var topFit= 686 - 1-Math.min( 687 - 1, 688 - Math.abs(cr.top-r.top)/100 689 - ); 927 + var clone= 928 + label.cloneNode(true); 690 690 691 - var score= 692 - widthFit*6+ 693 - topFit*3+ 694 - Math.min(r.height,900)/450+ 695 - Math.min(r.width*r.height,900000)/900000; 930 + var cloneNumber= 931 + clone.querySelector( 932 + ":scope > .arsn-area-number" 933 + ); 696 696 697 - if(score>bestScore){ 698 - best=el; 699 - bestScore=score; 700 - } 935 + var cloneAction= 936 + clone.querySelector( 937 + ":scope > .arsn-area-action" 938 + ); 939 + 940 + if(cloneNumber){ 941 + cloneNumber.remove(); 701 701 } 702 702 703 - if(item.depth<SEARCH_DEPTH){ 704 - Array.from(el.children||[]).forEach(function(next){ 705 - q.push({ 706 - el:next, 707 - depth:item.depth+1 708 - }); 709 - }); 944 + if(cloneAction){ 945 + cloneAction.remove(); 710 710 } 711 - } 712 712 713 - return best; 714 - } 948 + var titleText= 949 + compactText( 950 + clone.textContent 951 + ); 715 715 716 - function groupRows(entries){ 717 - var groups=[]; 953 + if(!titleText){ 954 + return; 955 + } 718 718 719 - entries 720 - .slice() 721 - .sort(function(a,b){ 722 - return ( 723 - a.rect.top-b.rect.top|| 724 - a.rect.left-b.rect.left 957 + var numberNode= 958 + number.cloneNode(true); 959 + 960 + var actionNode= 961 + action.cloneNode(true); 962 + 963 + var titleNode= 964 + document.createElement( 965 + "span" 725 725 ); 726 - }) 727 - .forEach(function(entry){ 728 - var group=null; 729 729 730 - for(var i=0;i<groups.length;i++){ 731 - if( 732 - Math.abs( 733 - groups[i].top- 734 - entry.rect.top 735 - )<=ROW_TOLERANCE 736 - ){ 737 - group=groups[i]; 738 - break; 739 - } 740 - } 968 + titleNode.className= 969 + "sn-area-label-title"; 741 741 742 - if(!group){ 743 - group={ 744 - top:entry.rect.top, 745 - entries:[] 746 - }; 747 - groups.push(group); 748 - } 971 + titleNode.textContent= 972 + titleText; 749 749 750 - group.entries.push(entry); 751 - }); 974 + while(label.firstChild){ 975 + label.removeChild( 976 + label.firstChild 977 + ); 978 + } 752 752 753 - return groups; 980 + label.appendChild( 981 + numberNode 982 + ); 983 + 984 + label.appendChild( 985 + titleNode 986 + ); 987 + 988 + label.appendChild( 989 + actionNode 990 + ); 991 + 992 + label.setAttribute( 993 + "data-sn-three-line", 994 + "1" 995 + ); 996 + 997 + var head= 998 + label.closest( 999 + ".arsn-area-head" 1000 + ); 1001 + 1002 + if(head){ 1003 + head.style.setProperty( 1004 + "width", 1005 + "100%", 1006 + "important" 1007 + ); 1008 + 1009 + head.style.setProperty( 1010 + "max-width", 1011 + "100%", 1012 + "important" 1013 + ); 1014 + 1015 + head.style.setProperty( 1016 + "box-sizing", 1017 + "border-box", 1018 + "important" 1019 + ); 1020 + } 1021 + }); 754 754 } 755 755 756 - function validRow(group){ 757 - if(group.entries.length<2)return false; 1024 + /* ======================================================= 1025 + PLACEHOLDER BADGE 1026 + ======================================================= */ 758 758 759 - var lefts= 760 - group.entries 761 - .map(function(e){return e.rect.left;}) 762 - .sort(function(a,b){return a-b;}); 1028 + function applyPlaceholderBadge(){ 1029 + if(!PLACEHOLDER)return; 763 763 764 764 if( 765 - lefts[lefts.length-1]-766 - lefts[0]<767 - 801032 + document.querySelector( 1033 + ".sn-coming-soon-badge" 1034 + ) 768 768 ){ 769 - return false;1036 + return; 770 770 } 771 771 772 - var widths= 773 - group.entries 774 - .map(function(e){return e.rect.width;}) 775 - .filter(function(w){return w>0;}); 1039 + var title= 1040 + document.querySelector( 1041 + "#document-title" 1042 + )|| 1043 + document.querySelector( 1044 + "h1" 1045 + ); 776 776 777 - if( widths.length<2)returnfalse;1047 + if(!title)return; 778 778 779 - var minW= 780 - Math.min.apply(Math,widths); 1049 + var badge= 1050 + document.createElement( 1051 + "span" 1052 + ); 781 781 782 - var maxW=783 - Math.max.apply(Math,widths);1054 + badge.className= 1055 + "sn-coming-soon-badge"; 784 784 785 - return ( 786 - maxW/ 787 - Math.max(1,minW)<= 788 - 1.9 1057 + badge.textContent= 1058 + PLACEHOLDER_LABEL; 1059 + 1060 + badge.setAttribute( 1061 + "aria-label", 1062 + PLACEHOLDER_LABEL 789 789 ); 790 - } 791 791 792 - /* ---------- Known ARSN first section bars ---------- */ 793 - 794 - function knownBar(el){ 795 - var text= 796 - normalizeText( 797 - el.textContent 798 - ); 799 - 800 - return ( 801 - text==="HIER STARTEN"|| 802 - text==="ORGANISIEREN & DOKUMENTIEREN"|| 803 - text==="ENTSCHEIDEN"|| 804 - text==="START HERE"|| 805 - text==="GET STARTED"|| 806 - text==="ORGANISE & DOCUMENT"|| 807 - text==="ORGANIZE & DOCUMENT"|| 808 - text==="DECIDE" 1065 + title.appendChild( 1066 + badge 809 809 ); 810 810 } 811 811 812 - functionfindKnownBar(card){813 - varcardRect=814 - card.getBoundingClientRect();1070 + /* ======================================================= 1071 + DETAIL PAGE OWN-ACCENT PROPAGATION 1072 + ======================================================= */ 815 815 816 - var rows= 817 - Array.from( 818 - card.querySelectorAll( 819 - "div,p,span,strong,h3,h4,h5,h6" 820 - ) 821 - ) 822 - .filter(function(el){ 823 - if(!visible(el,20,6))return false; 824 - if(!knownBar(el))return false; 1074 + function parseRGB(value){ 1075 + var match=String(value||"").match( 1076 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 1077 + ); 825 825 826 - varr=el.getBoundingClientRect();1079 + if(!match)return null; 827 827 828 - var rel= 829 - r.top- 830 - cardRect.top; 1081 + return [ 1082 + Number(match[1]), 1083 + Number(match[2]), 1084 + Number(match[3]) 1085 + ]; 1086 + } 831 831 832 - return ( 833 - rel>=35&& 834 - rel<= 835 - cardRect.height*.75 836 - ); 837 - }) 838 - .sort(function(a,b){ 839 - return ( 840 - a.getBoundingClientRect().top- 841 - b.getBoundingClientRect().top 842 - ); 843 - }); 844 - 845 - return rows[0]||null; 1088 + function distance(a,b){ 1089 + return Math.sqrt( 1090 + Math.pow(a[0]-b[0],2)+ 1091 + Math.pow(a[1]-b[1],2)+ 1092 + Math.pow(a[2]-b[2],2) 1093 + ); 846 846 } 847 847 848 - function alignKnownBars(cards){ 849 - var rows= 850 - cards.map(function(card){ 851 - var bar= 852 - findKnownBar(card); 1096 + function paletteMatch(cssColor){ 1097 + var rgb=parseRGB(cssColor); 853 853 854 - if(!bar)return null;1099 + if(!rgb)return null; 855 855 856 - var cr= 857 - card.getBoundingClientRect(); 1101 + var palette=[ 1102 + {hex:"#21b6d7",rgb:[33,182,215]}, 1103 + {hex:"#e94b13",rgb:[233,75,19]}, 1104 + {hex:"#f0aa00",rgb:[240,170,0]}, 1105 + {hex:"#38b76a",rgb:[56,183,106]} 1106 + ]; 858 858 859 - var br=860 - bar.getBoundingClientRect();1108 + var best=null; 1109 + var bestDistance=Infinity; 861 861 862 - return { 863 - bar:bar, 864 - relativeTop: 865 - br.top- 866 - cr.top 867 - }; 868 - }); 1111 + palette.forEach(function(item){ 1112 + var d=distance(rgb,item.rgb); 869 869 870 - if( 871 - rows.some(function(row){ 872 - return !row; 873 - }) 874 - ){ 875 - return false; 876 - } 1114 + if(d<bestDistance){ 1115 + best=item; 1116 + bestDistance=d; 1117 + } 1118 + }); 877 877 878 - var target= 879 - Math.max.apply( 880 - Math, 881 - rows.map(function(row){ 882 - return row.relativeTop; 883 - }) 884 - ); 1120 + return bestDistance<=30 1121 + ?best 1122 + :null; 1123 + } 885 885 886 - rows.forEach(function(row){ 887 - var delta= 888 - target- 889 - row.relativeTop; 1125 + function propagateDetailAccents(){ 1126 + if(PAGE_KIND!=="detail")return; 890 890 891 - if(delta<=1)return; 1128 + Array.from( 1129 + root.querySelectorAll( 1130 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 1131 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 1132 + ) 1133 + ).forEach(function(el){ 1134 + if(!visible(el))return; 892 892 893 - saveOriginal( 894 - row.bar, 895 - originalMarginTop, 896 - "margin-top" 897 - ); 1136 + var style=getComputedStyle(el); 898 898 899 - var current= 900 - num( 901 - getComputedStyle( 902 - row.bar 903 - ).marginTop 904 - ); 1138 + if( 1139 + num(style.borderTopWidth)>=2 1140 + ){ 1141 + var match= 1142 + paletteMatch( 1143 + style.borderTopColor 1144 + ); 905 905 906 - row.bar.style.setProperty( 907 - "margin-top", 908 - ( 909 - current+ 910 - delta 911 - )+"px" 912 - ); 1146 + if(match){ 1147 + el.style.setProperty( 1148 + "border-left", 1149 + "4px solid "+match.hex, 1150 + "important" 1151 + ); 1152 + } 1153 + } 1154 + }); 913 913 914 - row.bar.setAttribute( 915 - "data-sn-first-section-aligned", 916 - "7" 917 - ); 1156 + // Warning families: explicit safety override. 1157 + Array.from( 1158 + root.querySelectorAll( 1159 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 1160 + ".warn,.warning,.warningmessage,.errormessage" 1161 + ) 1162 + ).forEach(function(el){ 1163 + if(!visible(el))return; 918 918 919 - sectionManaged.add( 920 - row.bar 1165 + el.style.setProperty( 1166 + "border-left", 1167 + "4px solid #e94b13", 1168 + "important" 921 921 ); 922 922 }); 923 923 924 - return true; 1172 + // Info families: explicit orientation override. 1173 + Array.from( 1174 + root.querySelectorAll( 1175 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 1176 + ) 1177 + ).forEach(function(el){ 1178 + if(!visible(el))return; 1179 + 1180 + el.style.setProperty( 1181 + "border-left", 1182 + "4px solid #21b6d7", 1183 + "important" 1184 + ); 1185 + }); 925 925 } 926 926 927 - /* ---------- Generic first content after heading ---------- */ 1188 + /* ======================================================= 1189 + OVERVIEW SEMANTIC THEME PALETTE 1190 + ======================================================= */ 928 928 929 - function heading(card){ 930 - var cr= 931 - card.getBoundingClientRect(); 932 - 933 - var rows= 934 - Array.from( 935 - card.querySelectorAll( 936 - "h1,h2,h3,h4,h5,h6,.box-title,[role=heading]" 937 - ) 1192 + function smallestThemeHeaders(){ 1193 + return Array.from( 1194 + root.querySelectorAll( 1195 + "div,span,p,strong,h3,h4,h5,h6" 938 938 ) 939 - .filter(function(el){ 940 - if(!visible(el,20,8))return false; 1197 + ).filter(function(el){ 1198 + if(!visible(el))return false; 1199 + if(!themeFor(el.textContent))return false; 941 941 942 - var r=el.getBoundingClientRect(); 943 - 944 - var rel= 945 - r.top- 946 - cr.top; 947 - 948 - return ( 949 - rel>=0&& 950 - rel<= 951 - Math.min( 952 - 160, 953 - cr.height*.45 954 - ) 1201 + return !Array.from( 1202 + el.children||[] 1203 + ).some(function(child){ 1204 + return !!themeFor( 1205 + child.textContent 955 955 ); 956 - }) 957 - .sort(function(a,b){ 958 - return ( 959 - a.getBoundingClientRect().top- 960 - b.getBoundingClientRect().top 961 - ); 962 962 }); 963 - 964 - return rows[0]||null; 1208 + }); 965 965 } 966 966 967 - function firstContent(card,h){ 968 - if(!h)return null; 1211 + function findOverviewCard(header){ 1212 + var node=header.parentElement; 1213 + var candidates=[]; 969 969 970 - var cr= 971 - card.getBoundingClientRect(); 1215 + while(node&&node!==root){ 1216 + var rect=node.getBoundingClientRect(); 1217 + var style=getComputedStyle(node); 972 972 973 - var hr= 974 - h.getBoundingClientRect(); 1219 + var border= 1220 + num(style.borderTopWidth)+ 1221 + num(style.borderRightWidth)+ 1222 + num(style.borderBottomWidth)+ 1223 + num(style.borderLeftWidth); 975 975 976 - var rows= 977 - Array.from( 978 - card.querySelectorAll( 979 - "p,div,ul,ol,dl,blockquote" 980 - ) 981 - ) 982 - .filter(function(el){ 983 - if( 984 - el===h|| 985 - h.contains(el)|| 986 - el.contains(h) 987 - ){ 988 - return false; 989 - } 1225 + if( 1226 + rect.width>=220&& 1227 + rect.width<=800&& 1228 + rect.height>=120&& 1229 + border>=1 1230 + ){ 1231 + candidates.push(node); 1232 + } 990 990 991 - if(!visible(el,30,8))return false; 1234 + node=node.parentElement; 1235 + } 992 992 993 - var text= 994 - String(el.textContent||"") 995 - .replace(/\s+/g," ") 996 - .trim(); 1237 + if(!candidates.length)return null; 997 997 998 - if(text.length<3)return false; 1239 + candidates.sort(function(a,b){ 1240 + return ( 1241 + b.getBoundingClientRect().height- 1242 + a.getBoundingClientRect().height 1243 + ); 1244 + }); 999 999 1000 - var r=el.getBoundingClientRect(); 1246 + return candidates[0]; 1247 + } 1001 1001 1002 - if( 1003 - r.top< 1004 - hr.bottom-1 1005 - ){ 1006 - return false; 1007 - } 1249 + function rowCandidates(link,card){ 1250 + var result=[]; 1251 + var cardRect= 1252 + card.getBoundingClientRect(); 1008 1008 1009 - if( 1010 - r.top-cr.top> 1011 - Math.min( 1012 - 280, 1013 - cr.height*.65 1014 - ) 1015 - ){ 1016 - return false; 1017 - } 1254 + var node=link; 1018 1018 1256 + while(node&&node!==card){ 1257 + if(visible(node)){ 1258 + var rect= 1259 + node.getBoundingClientRect(); 1260 + 1019 1019 if( 1020 - r.height> 1021 - cr.height*.58 1262 + rect.height<=105&& 1263 + rect.width>= 1264 + cardRect.width*.50&& 1265 + rect.width<= 1266 + cardRect.width*1.03 1022 1022 ){ 1023 - re turn false;1268 + result.push(node); 1024 1024 } 1270 + } 1025 1025 1026 - return true; 1027 - }) 1028 - .sort(function(a,b){ 1029 - var ar= 1030 - a.getBoundingClientRect(); 1272 + node=node.parentElement; 1273 + } 1031 1031 1032 - varbr=1033 - b.getBoundingClientRect();1275 + return result; 1276 + } 1034 1034 1278 + function chooseOuterRow( 1279 + candidates, 1280 + link 1281 + ){ 1282 + if(!candidates.length){ 1283 + return link; 1284 + } 1285 + 1286 + var bordered= 1287 + candidates.filter(function(el){ 1035 1035 return ( 1036 - ar.top-br.top|| 1037 - ar.height-br.height 1289 + num( 1290 + getComputedStyle(el) 1291 + .borderLeftWidth 1292 + )>=1 1038 1038 ); 1039 1039 }); 1040 1040 1041 - return rows[0]||null; 1042 - } 1296 + var pool= 1297 + bordered.length 1298 + ?bordered 1299 + :candidates; 1043 1043 1044 - function alignGeneric(cards){ 1045 - var rows= 1046 - cards.map(function(card){ 1047 - var h= 1048 - heading(card); 1301 + pool.sort(function(a,b){ 1302 + var ar= 1303 + a.getBoundingClientRect(); 1049 1049 1050 - var c= 1051 - firstContent( 1052 - card, 1053 - h 1054 - ); 1305 + var br= 1306 + b.getBoundingClientRect(); 1055 1055 1056 - if(!h||!c)return null; 1308 + return ( 1309 + ar.left-br.left|| 1310 + br.width-ar.width 1311 + ); 1312 + }); 1057 1057 1058 - varcr=1059 - card.getBoundingClientRect();1314 + return pool[0]||link; 1315 + } 1060 1060 1061 - var rr= 1062 - c.getBoundingClientRect(); 1063 - 1064 - return { 1065 - content:c, 1066 - relativeTop: 1067 - rr.top-cr.top 1068 - }; 1069 - }); 1070 - 1071 - if( 1072 - rows.some(function(row){ 1073 - return !row; 1074 - }) 1075 - ){ 1076 - return false; 1317 + function applyOverviewPalette(){ 1318 + if(PAGE_KIND!=="overview"){ 1319 + return []; 1077 1077 } 1078 1078 1079 - var target= 1080 - Math.max.apply( 1081 - Math, 1082 - rows.map(function(row){ 1083 - return row.relativeTop; 1322 + var headers= 1323 + smallestThemeHeaders() 1324 + .map(function(el){ 1325 + return { 1326 + el:el, 1327 + theme: 1328 + themeFor( 1329 + el.textContent 1330 + ), 1331 + card: 1332 + findOverviewCard( 1333 + el 1334 + ) 1335 + }; 1084 1084 }) 1085 - ); 1337 + .filter(function(row){ 1338 + return !!row.card; 1339 + }); 1086 1086 1087 - rows.forEach(function(row){ 1088 - var delta= 1089 - target- 1090 - row.relativeTop; 1341 + var unique=[]; 1342 + var seenHeaders=new Set(); 1091 1091 1092 - if(delta<=1)return; 1344 + headers.forEach(function(row){ 1345 + var key= 1346 + row.theme.name+ 1347 + "|"+ 1348 + Math.round( 1349 + row.card 1350 + .getBoundingClientRect() 1351 + .left 1352 + )+ 1353 + "|"+ 1354 + Math.round( 1355 + row.el 1356 + .getBoundingClientRect() 1357 + .top 1358 + ); 1093 1093 1094 - sa veOriginal(1095 - r ow.content,1096 - originalMarginTop,1097 - "margin-top"1098 - );1360 + if(!seenHeaders.has(key)){ 1361 + seenHeaders.add(key); 1362 + unique.push(row); 1363 + } 1364 + }); 1099 1099 1100 - var current= 1101 - num( 1102 - getComputedStyle( 1103 - row.content 1104 - ).marginTop 1105 - ); 1366 + unique.forEach(function(row){ 1367 + var headerRect= 1368 + row.el 1369 + .getBoundingClientRect(); 1106 1106 1107 - row.content.style.setProperty( 1108 - "margin-top", 1109 - ( 1110 - current+ 1111 - delta 1112 - )+"px" 1371 + row.el.style.setProperty( 1372 + "background", 1373 + row.theme.bg, 1374 + "important" 1113 1113 ); 1114 1114 1115 - row.content.setAttribute( 1116 - "data-sn-first-content-aligned", 1117 - "7" 1377 + row.el.style.setProperty( 1378 + "color", 1379 + row.theme.text, 1380 + "important" 1118 1118 ); 1119 1119 1120 - contentManaged.add( 1121 - row.content 1383 + row.el.style.setProperty( 1384 + "text-align", 1385 + "left", 1386 + "important" 1122 1122 ); 1388 + 1389 + row.el.style.setProperty( 1390 + "word-spacing", 1391 + "normal", 1392 + "important" 1393 + ); 1394 + 1395 + var later= 1396 + unique 1397 + .filter(function(other){ 1398 + return ( 1399 + other.card===row.card&& 1400 + other.el 1401 + .getBoundingClientRect() 1402 + .top> 1403 + headerRect.top+2 1404 + ); 1405 + }) 1406 + .sort(function(a,b){ 1407 + return ( 1408 + a.el 1409 + .getBoundingClientRect() 1410 + .top- 1411 + b.el 1412 + .getBoundingClientRect() 1413 + .top 1414 + ); 1415 + }); 1416 + 1417 + var stopTop= 1418 + later.length 1419 + ?later[0].el 1420 + .getBoundingClientRect() 1421 + .top 1422 + :Infinity; 1423 + 1424 + Array.from( 1425 + row.card.querySelectorAll("a") 1426 + ).forEach(function(link){ 1427 + if(!visible(link))return; 1428 + 1429 + var rect= 1430 + link.getBoundingClientRect(); 1431 + 1432 + if( 1433 + rect.top<= 1434 + headerRect.bottom-2|| 1435 + rect.top>= 1436 + stopTop-2 1437 + ){ 1438 + return; 1439 + } 1440 + 1441 + var candidates= 1442 + rowCandidates( 1443 + link, 1444 + row.card 1445 + ); 1446 + 1447 + var target= 1448 + chooseOuterRow( 1449 + candidates, 1450 + link 1451 + ); 1452 + 1453 + candidates.forEach(function(el){ 1454 + el.style.setProperty( 1455 + "border-left", 1456 + "0 solid transparent", 1457 + "important" 1458 + ); 1459 + }); 1460 + 1461 + target.style.setProperty( 1462 + "border-left", 1463 + "3px solid "+ 1464 + row.theme.accent, 1465 + "important" 1466 + ); 1467 + 1468 + target.style.setProperty( 1469 + "box-sizing", 1470 + "border-box", 1471 + "important" 1472 + ); 1473 + }); 1123 1123 }); 1124 1124 1125 - return true;1476 + return unique; 1126 1126 } 1127 1127 1128 - function applyRow(group){ 1129 - if(!validRow(group))return false; 1479 + /* ======================================================= 1480 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1481 + ======================================================= */ 1130 1130 1483 + function alignOverviewCards(headers){ 1484 + if( 1485 + PAGE_KIND!=="overview"|| 1486 + window.innerWidth<=MOBILE_MAX 1487 + ){ 1488 + return; 1489 + } 1490 + 1131 1131 var cards=[]; 1132 1132 var seen=new Set(); 1133 1133 1134 - group.entries.forEach(function(entry){1135 - if(!seen.has( entry.target)){1136 - seen.add( entry.target);1137 - cards.push( entry.target);1494 + headers.forEach(function(row){ 1495 + if(!seen.has(row.card)){ 1496 + seen.add(row.card); 1497 + cards.push(row.card); 1138 1138 } 1139 1139 }); 1140 1140 1141 - if(cards.length<2)return false; 1142 - 1143 - if( 1144 - !alignKnownBars(cards) 1145 - ){ 1146 - alignGeneric(cards); 1501 + if(cards.length<2){ 1502 + return; 1147 1147 } 1148 1148 1149 - var maxHeight=0; 1505 + // Group cards by actual top position. 1506 + var groups=[]; 1150 1150 1151 1151 cards.forEach(function(card){ 1152 - maxHeight= 1153 - Math.max( 1154 - maxHeight, 1155 - card.getBoundingClientRect().height 1156 - ); 1509 + var top= 1510 + card.getBoundingClientRect().top; 1511 + 1512 + var group=null; 1513 + 1514 + for(var i=0;i<groups.length;i++){ 1515 + if( 1516 + Math.abs( 1517 + groups[i].top-top 1518 + )<=ROW_TOLERANCE 1519 + ){ 1520 + group=groups[i]; 1521 + break; 1522 + } 1523 + } 1524 + 1525 + if(!group){ 1526 + group={ 1527 + top:top, 1528 + cards:[] 1529 + }; 1530 + groups.push(group); 1531 + } 1532 + 1533 + group.cards.push(card); 1157 1157 }); 1158 1158 1159 - maxHeight=1160 - Math.ceil(1161 - maxHeight1162 - );1536 + groups.forEach(function(group){ 1537 + if(group.cards.length<2){ 1538 + return; 1539 + } 1163 1163 1164 - if(maxHeight<MIN_H)return false; 1541 + var firstHeaders= 1542 + group.cards.map(function(card){ 1543 + var candidates= 1544 + headers 1545 + .filter(function(row){ 1546 + return row.card===card; 1547 + }) 1548 + .sort(function(a,b){ 1549 + return ( 1550 + a.el 1551 + .getBoundingClientRect() 1552 + .top- 1553 + b.el 1554 + .getBoundingClientRect() 1555 + .top 1556 + ); 1557 + }); 1165 1165 1166 - cards.forEach(function(card){ 1167 - saveOriginal( 1168 - card, 1169 - originalMinHeight, 1170 - "min-height" 1171 - ); 1559 + return candidates.length 1560 + ?candidates[0] 1561 + :null; 1562 + }); 1172 1172 1173 - card.style.setProperty( 1174 - "min-height", 1175 - maxHeight+"px" 1176 - ); 1564 + if( 1565 + !firstHeaders.some(function(row){ 1566 + return !row; 1567 + }) 1568 + ){ 1569 + var targetTop= 1570 + Math.max.apply( 1571 + Math, 1572 + firstHeaders.map(function(row){ 1573 + return ( 1574 + row.el 1575 + .getBoundingClientRect() 1576 + .top- 1577 + row.card 1578 + .getBoundingClientRect() 1579 + .top 1580 + ); 1581 + }) 1582 + ); 1177 1177 1178 - card.setAttribute( 1179 - "data-sn-equal-height-managed", 1180 - "7" 1181 - ); 1584 + firstHeaders.forEach(function(row){ 1585 + var relativeTop= 1586 + row.el 1587 + .getBoundingClientRect() 1588 + .top- 1589 + row.card 1590 + .getBoundingClientRect() 1591 + .top; 1182 1182 1183 - heightManaged.add(card);1184 - });1593 + var delta= 1594 + targetTop-relativeTop; 1185 1185 1186 - return true; 1187 - } 1596 + if(delta>1){ 1597 + saveStyle( 1598 + row.el, 1599 + originalMargin, 1600 + "margin-top" 1601 + ); 1188 1188 1189 - function calculate(force){ 1190 - if(applying)return; 1603 + var current= 1604 + num( 1605 + getComputedStyle( 1606 + row.el 1607 + ).marginTop 1608 + ); 1191 1191 1192 - var width= 1193 - Math.round( 1194 - window.innerWidth 1195 - ); 1610 + row.el.style.setProperty( 1611 + "margin-top", 1612 + ( 1613 + current+delta 1614 + )+"px" 1615 + ); 1196 1196 1197 - var meaningful= 1198 - lastWidth<0|| 1199 - Math.abs( 1200 - width- 1201 - lastWidth 1202 - )>= 1203 - MIN_WIDTH_CHANGE; 1617 + row.el.setAttribute( 1618 + "data-sn-master-first-row", 1619 + "1" 1620 + ); 1204 1204 1622 + managedMargin.add( 1623 + row.el 1624 + ); 1625 + } 1626 + }); 1627 + } 1628 + 1629 + var maxHeight=0; 1630 + 1631 + group.cards.forEach(function(card){ 1632 + maxHeight= 1633 + Math.max( 1634 + maxHeight, 1635 + card 1636 + .getBoundingClientRect() 1637 + .height 1638 + ); 1639 + }); 1640 + 1641 + maxHeight= 1642 + Math.ceil(maxHeight); 1643 + 1644 + group.cards.forEach(function(card){ 1645 + saveStyle( 1646 + card, 1647 + originalHeight, 1648 + "min-height" 1649 + ); 1650 + 1651 + card.style.setProperty( 1652 + "min-height", 1653 + maxHeight+"px" 1654 + ); 1655 + 1656 + card.setAttribute( 1657 + "data-sn-master-equal-height", 1658 + "1" 1659 + ); 1660 + 1661 + managedHeight.add( 1662 + card 1663 + ); 1664 + }); 1665 + }); 1666 + } 1667 + 1668 + /* ======================================================= 1669 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1670 + ======================================================= */ 1671 + 1672 + function equaliseDetailGrids(){ 1205 1205 if( 1206 - hasApplied&& 1207 - !force&& 1208 - !meaningful 1674 + PAGE_KIND!=="detail"|| 1675 + window.innerWidth<=MOBILE_MAX 1209 1209 ){ 1210 1210 return; 1211 1211 } 1212 1212 1213 - applying=true; 1680 + var selectors=[ 1681 + ".arsn-grid", 1682 + ".arsn-grid-2", 1683 + ".arsn-grid-3", 1684 + ".dmp-grid", 1685 + ".ido-grid", 1686 + ".pp-grid" 1687 + ]; 1214 1214 1215 - try{ 1216 - harmoniseCustomCallouts(); 1689 + selectors.forEach(function(selector){ 1690 + Array.from( 1691 + root.querySelectorAll(selector) 1692 + ).forEach(function(grid){ 1693 + var children= 1694 + Array.from( 1695 + grid.children||[] 1696 + ).filter(visible); 1217 1217 1218 - if(width<=MOBILE_MAX){ 1219 - if(hasApplied){ 1220 - resetRuntime(); 1698 + if(children.length<2){ 1699 + return; 1221 1221 } 1222 1222 1223 - hasApplied=false; 1224 - lastWidth=width; 1225 - return; 1226 - } 1702 + var groups=[]; 1227 1227 1228 - if(hasApplied){ 1229 - resetRuntime(); 1230 - } 1704 + children.forEach(function(child){ 1705 + var top= 1706 + child 1707 + .getBoundingClientRect() 1708 + .top; 1231 1231 1232 - var parents= 1233 - Array.from( 1234 - root.querySelectorAll("*") 1235 - ) 1236 - .filter(function(parent){ 1237 - return ( 1238 - visible( 1239 - parent, 1240 - MIN_W, 1241 - MIN_H 1242 - )&& 1243 - parent.children&& 1244 - parent.children.length>=2&& 1245 - parent.children.length<= 1246 - MAX_PARENT_CHILDREN 1247 - ); 1248 - }); 1710 + var group=null; 1249 1249 1250 - var touched= 1251 - new Set(); 1712 + for(var i=0;i<groups.length;i++){ 1713 + if( 1714 + Math.abs( 1715 + groups[i].top-top 1716 + )<=ROW_TOLERANCE 1717 + ){ 1718 + group=groups[i]; 1719 + break; 1720 + } 1721 + } 1252 1252 1253 - parents.forEach(function(parent){ 1254 - var entries=[]; 1723 + if(!group){ 1724 + group={ 1725 + top:top, 1726 + items:[] 1727 + }; 1728 + groups.push(group); 1729 + } 1255 1255 1256 - Array.from( 1257 - parent.children 1258 - ).forEach(function(child){ 1259 - if( 1260 - !visible( 1261 - child, 1262 - MIN_W, 1263 - MIN_H 1264 - ) 1265 - ){ 1731 + group.items.push(child); 1732 + }); 1733 + 1734 + groups.forEach(function(group){ 1735 + if(group.items.length<2){ 1266 1266 return; 1267 1267 } 1268 1268 1269 - var target= 1270 - pickTarget(child); 1739 + var maxHeight=0; 1271 1271 1272 - if(!target)return; 1273 - 1274 - entries.push({ 1275 - target:target, 1276 - rect: 1277 - target.getBoundingClientRect() 1741 + group.items.forEach(function(item){ 1742 + maxHeight= 1743 + Math.max( 1744 + maxHeight, 1745 + item 1746 + .getBoundingClientRect() 1747 + .height 1748 + ); 1278 1278 }); 1279 - }); 1280 1280 1281 - groupRows( 1282 - entries 1283 - ).forEach(function(group){ 1284 - if(!validRow(group))return; 1751 + maxHeight= 1752 + Math.ceil(maxHeight); 1285 1285 1286 - var targets= 1287 - group.entries.map(function(entry){ 1288 - return entry.target; 1289 - }); 1754 + group.items.forEach(function(item){ 1755 + saveStyle( 1756 + item, 1757 + originalHeight, 1758 + "min-height" 1759 + ); 1290 1290 1291 - if( 1292 - !targets.some(function(el){ 1293 - return !touched.has(el); 1294 - }) 1295 - ){ 1296 - return; 1297 - } 1761 + item.style.setProperty( 1762 + "min-height", 1763 + maxHeight+"px" 1764 + ); 1298 1298 1299 - if(applyRow(group)){ 1300 - targets.forEach(function(el){ 1301 - touched.add(el); 1302 - }); 1303 - } 1766 + item.setAttribute( 1767 + "data-sn-master-equal-height", 1768 + "1" 1769 + ); 1770 + 1771 + managedHeight.add(item); 1772 + }); 1304 1304 }); 1305 1305 }); 1775 + }); 1776 + } 1306 1306 1307 - lastWidth=width; 1308 - hasApplied=true; 1778 + /* ======================================================= 1779 + RUN / RESPONSIVE SCHEDULING 1780 + ======================================================= */ 1781 + 1782 + function run(){ 1783 + if(running)return; 1784 + 1785 + running=true; 1786 + 1787 + try{ 1788 + resetRuntime(); 1789 + applyPlaceholderBadge(); 1790 + propagateDetailAccents(); 1791 + 1792 + var headers= 1793 + applyOverviewPalette(); 1794 + 1795 + makeThreeLineAreaLabels(); 1796 + makeFilledRedOrangeCTAsBorderless(); 1797 + 1798 + if( 1799 + window.innerWidth> 1800 + MOBILE_MAX 1801 + ){ 1802 + alignOverviewCards( 1803 + headers 1804 + ); 1805 + 1806 + equaliseDetailGrids(); 1807 + } 1309 1309 }finally{ 1310 - applying=false;1809 + running=false; 1311 1311 } 1312 1312 } 1313 1313 1314 - function resize(){1813 + function onResize(){ 1315 1315 if(resizeTimer){ 1316 1316 clearTimeout( 1317 1317 resizeTimer ... ... @@ -1322,19 +1322,40 @@ 1322 1322 setTimeout( 1323 1323 function(){ 1324 1324 resizeTimer=0; 1325 - calculate(false);1824 + run(); 1326 1326 }, 1327 1327 RESIZE_DEBOUNCE 1328 1328 ); 1329 1329 } 1330 1330 1331 - function waitImages(){ 1830 + async function waitForReady(){ 1831 + if( 1832 + document.readyState!=="complete" 1833 + ){ 1834 + await new Promise(function(resolve){ 1835 + window.addEventListener( 1836 + "load", 1837 + resolve, 1838 + {once:true} 1839 + ); 1840 + }); 1841 + } 1842 + 1843 + if( 1844 + document.fonts&& 1845 + document.fonts.ready 1846 + ){ 1847 + try{ 1848 + await document.fonts.ready; 1849 + }catch(error){} 1850 + } 1851 + 1332 1332 var images= 1333 1333 Array.from( 1334 1334 root.querySelectorAll("img") 1335 1335 ); 1336 1336 1337 - returnPromise.all(1857 + await Promise.all( 1338 1338 images.map(function(img){ 1339 1339 if(img.complete){ 1340 1340 return Promise.resolve(); ... ... @@ -1359,46 +1359,326 @@ 1359 1359 }); 1360 1360 }) 1361 1361 ); 1882 + 1883 + run(); 1362 1362 } 1363 1363 1364 - async function initial(){ 1365 - if( 1366 - document.readyState!== 1367 - "complete" 1368 - ){ 1369 - await new Promise(function(resolve){ 1370 - addEventListener( 1371 - "load", 1372 - resolve, 1373 - {once:true} 1374 - ); 1886 + window.addEventListener( 1887 + "resize", 1888 + onResize, 1889 + {passive:true} 1890 + ); 1891 + 1892 + waitForReady(); 1893 +})(); 1894 +</script> 1895 + 1896 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END --> 1897 +{{/html}} 1898 + 1899 +{{html clean="false"}} 1900 +<!-- SN_LAST_MODIFIED_FOOTER_V3_START --> 1901 +<script data-sn-last-modified-footer="3"> 1902 +(function () { 1903 + "use strict"; 1904 + 1905 + function visible(el) { 1906 + if (!el) return false; 1907 + 1908 + var style = window.getComputedStyle(el); 1909 + 1910 + return ( 1911 + style.display !== "none" && 1912 + style.visibility !== "hidden" && 1913 + el.getClientRects().length > 0 1914 + ); 1915 + } 1916 + 1917 + 1918 + function moveLastModified() { 1919 + var content = 1920 + document.getElementById("xwikicontent"); 1921 + 1922 + if (!content) { 1923 + return false; 1924 + } 1925 + 1926 + 1927 + /* 1928 + * XWiki kann ID, Klasse oder responsive Duplikate ausgeben. 1929 + */ 1930 + var nodes = 1931 + Array.from( 1932 + document.querySelectorAll( 1933 + ".xdocLastModification, #xdocLastModification" 1934 + ) 1935 + ); 1936 + 1937 + 1938 + nodes = 1939 + nodes.filter(function (node, index, list) { 1940 + return list.indexOf(node) === index; 1375 1375 }); 1942 + 1943 + 1944 + if (!nodes.length) { 1945 + return false; 1376 1376 } 1377 1377 1378 - if( 1379 - document.fonts&& 1380 - document.fonts.ready 1381 - ){ 1382 - try{ 1383 - await document.fonts.ready; 1384 - }catch(error){} 1948 + 1949 + var info = 1950 + nodes.find(visible) || 1951 + nodes[0]; 1952 + 1953 + 1954 + /* 1955 + * Eventuelle zweite responsive Variante ausblenden. 1956 + */ 1957 + nodes.forEach(function (node) { 1958 + if (node !== info) { 1959 + node.style.setProperty( 1960 + "display", 1961 + "none", 1962 + "important" 1963 + ); 1964 + } 1965 + }); 1966 + 1967 + 1968 + var footer = 1969 + document.getElementById( 1970 + "sn-last-modified-footer" 1971 + ); 1972 + 1973 + 1974 + if (!footer) { 1975 + footer = 1976 + document.createElement("div"); 1977 + 1978 + footer.id = 1979 + "sn-last-modified-footer"; 1980 + 1981 + footer.setAttribute( 1982 + "data-sn-last-modified-footer", 1983 + "3" 1984 + ); 1985 + 1986 + 1987 + footer.style.setProperty( 1988 + "box-sizing", 1989 + "border-box" 1990 + ); 1991 + 1992 + footer.style.setProperty( 1993 + "width", 1994 + "100%" 1995 + ); 1996 + 1997 + footer.style.setProperty( 1998 + "max-width", 1999 + "1400px" 2000 + ); 2001 + 2002 + footer.style.setProperty( 2003 + "margin", 2004 + "34px auto 0" 2005 + ); 2006 + 2007 + footer.style.setProperty( 2008 + "padding", 2009 + "10px 0 0" 2010 + ); 2011 + 2012 + footer.style.setProperty( 2013 + "border-top", 2014 + "1px solid #e3ded6" 2015 + ); 2016 + 2017 + footer.style.setProperty( 2018 + "color", 2019 + "#8a837b" 2020 + ); 2021 + 2022 + footer.style.setProperty( 2023 + "font-size", 2024 + "12px" 2025 + ); 2026 + 2027 + footer.style.setProperty( 2028 + "line-height", 2029 + "1.45" 2030 + ); 2031 + 2032 + footer.style.setProperty( 2033 + "text-align", 2034 + "left" 2035 + ); 2036 + 2037 + footer.style.setProperty( 2038 + "word-spacing", 2039 + "normal" 2040 + ); 1385 1385 } 1386 1386 1387 - await waitImages(); 1388 1388 1389 - // Exactly one initial layout calculation. 1390 - calculate(true); 2044 + /* 2045 + * Footer wirklich ans Ende des Seiteninhalts hängen. 2046 + * appendChild verschiebt ein bestehendes Element automatisch. 2047 + */ 2048 + content.appendChild( 2049 + footer 2050 + ); 2051 + 2052 + 2053 + /* 2054 + * ORIGINAL-XWiki-Element verschieben. 2055 + * 2056 + * Deshalb bleiben automatisch korrekt: 2057 + * - Benutzername 2058 + * - Profil-Link 2059 + * - Datum 2060 + * - DE / EN 2061 + */ 2062 + if (info.parentNode !== footer) { 2063 + footer.appendChild( 2064 + info 2065 + ); 2066 + } 2067 + 2068 + 2069 + info.setAttribute( 2070 + "data-sn-last-modified-moved", 2071 + "3" 2072 + ); 2073 + 2074 + 2075 + info.style.setProperty( 2076 + "display", 2077 + "block", 2078 + "important" 2079 + ); 2080 + 2081 + info.style.setProperty( 2082 + "margin", 2083 + "0", 2084 + "important" 2085 + ); 2086 + 2087 + info.style.setProperty( 2088 + "padding", 2089 + "0", 2090 + "important" 2091 + ); 2092 + 2093 + info.style.setProperty( 2094 + "font-size", 2095 + "12px", 2096 + "important" 2097 + ); 2098 + 2099 + info.style.setProperty( 2100 + "line-height", 2101 + "1.45", 2102 + "important" 2103 + ); 2104 + 2105 + info.style.setProperty( 2106 + "color", 2107 + "inherit", 2108 + "important" 2109 + ); 2110 + 2111 + info.style.setProperty( 2112 + "text-align", 2113 + "left", 2114 + "important" 2115 + ); 2116 + 2117 + 2118 + Array.from( 2119 + info.querySelectorAll("a") 2120 + ).forEach(function (link) { 2121 + 2122 + link.style.setProperty( 2123 + "color", 2124 + "inherit", 2125 + "important" 2126 + ); 2127 + 2128 + link.style.setProperty( 2129 + "text-decoration", 2130 + "underline", 2131 + "important" 2132 + ); 2133 + 2134 + }); 2135 + 2136 + 2137 + return true; 1391 1391 } 1392 1392 1393 - addEventListener( 1394 - "resize", 1395 - resize, 1396 - {passive:true} 1397 - ); 1398 1398 1399 - initial(); 2141 + function start() { 2142 + if (moveLastModified()) { 2143 + return; 2144 + } 2145 + 2146 + 2147 + /* 2148 + * Falls der Skin die Zeile erst später rendert. 2149 + */ 2150 + var observer = 2151 + new MutationObserver(function () { 2152 + 2153 + if (moveLastModified()) { 2154 + observer.disconnect(); 2155 + } 2156 + 2157 + }); 2158 + 2159 + 2160 + observer.observe( 2161 + document.documentElement, 2162 + { 2163 + childList: true, 2164 + subtree: true 2165 + } 2166 + ); 2167 + 2168 + 2169 + window.setTimeout( 2170 + function () { 2171 + observer.disconnect(); 2172 + }, 2173 + 5000 2174 + ); 2175 + } 2176 + 2177 + 2178 + if (document.readyState === "loading") { 2179 + 2180 + document.addEventListener( 2181 + "DOMContentLoaded", 2182 + start, 2183 + { once: true } 2184 + ); 2185 + 2186 + } else { 2187 + 2188 + start(); 2189 + 2190 + } 2191 + 2192 + 2193 + /* 2194 + * Absicherung gegen verzögertes XWiki-Rendering. 2195 + */ 2196 + window.setTimeout(moveLastModified, 250); 2197 + window.setTimeout(moveLastModified, 1000); 2198 + window.setTimeout(moveLastModified, 2500); 2199 + 1400 1400 })(); 1401 1401 </script> 2202 +<!-- SN_LAST_MODIFIED_FOOTER_V3_END --> 2203 +{{/html}} 1402 1402 1403 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 1404 -{{/html}}\n
- XWiki.JavaScriptExtension[0]
-
- parse
-
... ... @@ -1,0 +1,1 @@ 1 +No - code
-
... ... @@ -1,0 +1,189 @@ 1 +(function () { 2 + "use strict"; 3 + 4 + function isServiceNavigatorPage() { 5 + var path; 6 + 7 + try { 8 + path = decodeURIComponent(window.location.pathname); 9 + } catch (e) { 10 + path = window.location.pathname; 11 + } 12 + 13 + /* 14 + * Nur normale VIEW-Seiten innerhalb des Service Navigators. 15 + */ 16 + return /^\/bin\/view\/Service Navigator(?:\/|$)/.test(path); 17 + } 18 + 19 + 20 + function moveLastModified() { 21 + if (!isServiceNavigatorPage()) { 22 + return; 23 + } 24 + 25 + var info = 26 + document.querySelector( 27 + ".xdocLastModification" 28 + ); 29 + 30 + var content = 31 + document.getElementById( 32 + "xwikicontent" 33 + ); 34 + 35 + if (!info || !content) { 36 + return; 37 + } 38 + 39 + 40 + if ( 41 + info.getAttribute( 42 + "data-sn-last-modified-moved" 43 + ) === "1" 44 + ) { 45 + return; 46 + } 47 + 48 + 49 + var footer = 50 + document.getElementById( 51 + "sn-last-modified-footer" 52 + ); 53 + 54 + 55 + if (!footer) { 56 + footer = 57 + document.createElement( 58 + "div" 59 + ); 60 + 61 + footer.id = 62 + "sn-last-modified-footer"; 63 + 64 + footer.setAttribute( 65 + "data-sn-last-modified-footer", 66 + "1" 67 + ); 68 + 69 + footer.style.cssText = [ 70 + "margin-top:34px", 71 + "padding-top:10px", 72 + "border-top:1px solid #e3ded6", 73 + "color:#8a837b", 74 + "font-size:12px", 75 + "line-height:1.45", 76 + "text-align:left", 77 + "word-spacing:normal" 78 + ].join(";"); 79 + 80 + content.appendChild( 81 + footer 82 + ); 83 + } 84 + 85 + 86 + /* 87 + * Original-XWiki-Element verschieben. 88 + * Dadurch bleiben Benutzername, Profil-Link, 89 + * Datum und Sprachfassung erhalten. 90 + */ 91 + footer.appendChild( 92 + info 93 + ); 94 + 95 + 96 + info.setAttribute( 97 + "data-sn-last-modified-moved", 98 + "1" 99 + ); 100 + 101 + 102 + info.style.setProperty( 103 + "margin", 104 + "0", 105 + "important" 106 + ); 107 + 108 + info.style.setProperty( 109 + "padding", 110 + "0", 111 + "important" 112 + ); 113 + 114 + info.style.setProperty( 115 + "font-size", 116 + "12px", 117 + "important" 118 + ); 119 + 120 + info.style.setProperty( 121 + "line-height", 122 + "1.45", 123 + "important" 124 + ); 125 + 126 + info.style.setProperty( 127 + "color", 128 + "inherit", 129 + "important" 130 + ); 131 + 132 + info.style.setProperty( 133 + "text-align", 134 + "left", 135 + "important" 136 + ); 137 + 138 + 139 + Array.from( 140 + info.querySelectorAll("a") 141 + ).forEach(function (link) { 142 + 143 + link.style.setProperty( 144 + "color", 145 + "inherit", 146 + "important" 147 + ); 148 + 149 + link.style.setProperty( 150 + "text-decoration", 151 + "underline", 152 + "important" 153 + ); 154 + 155 + }); 156 + } 157 + 158 + 159 + if ( 160 + document.readyState === "loading" 161 + ) { 162 + 163 + document.addEventListener( 164 + "DOMContentLoaded", 165 + moveLastModified, 166 + { once: true } 167 + ); 168 + 169 + } else { 170 + 171 + moveLastModified(); 172 + 173 + } 174 + 175 + 176 + /* 177 + * Für verzögertes XWiki-Rendering. 178 + */ 179 + window.setTimeout( 180 + moveLastModified, 181 + 250 182 + ); 183 + 184 + window.setTimeout( 185 + moveLastModified, 186 + 1000 187 + ); 188 + 189 +})(); - name
-
... ... @@ -1,0 +1,1 @@ 1 +Service Navigator · Last modified footer - cache
-
... ... @@ -1,0 +1,1 @@ 1 +default - use
-
... ... @@ -1,0 +1,1 @@ 1 +always