Changes for page Project Planning & Organisation
Last modified by Veronika Kocher on Friday, 04 Sep 2026 14:45
From version 9.5
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 9.10
edited by Veronika Kocher
on Friday, 04 Sep 2026 14:45
on Friday, 04 Sep 2026 14:45
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -52,13 +52,12 @@ 52 52 } 53 53 </style> 54 54 55 - 56 56 <div class="pp"> 57 57 58 58 <section class="card" style="margin-bottom:18px;overflow:hidden;border-left:6px solid #e94b13;"> 59 59 <div class="hero"><img src="https://xwiki.uni-ak.ac.at/bin/download/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/WebHome/enable.png" alt="Planning and organising an artistic or research project"></div> 60 60 <div style="padding:18px 21px 20px"> 61 -<div class="eye" style="color:#8a4d36;margin-bottom:5px">E NABLE · PROJECT PLANNING & ORGANISATION</div>60 +<div class="eye" style="color:#8a4d36;margin-bottom:5px">PREPARE · PROJECT PLANNING & ORGANISATION</div> 62 62 <h2 style="font-size:27px;line-height:1.2;margin:0 0 8px;color:#2c2926">Build a project that can actually be hosted, funded, staffed and delivered</h2> 63 63 <p style="margin:0;color:#5e5953;line-height:1.6;max-width:1120px">Project planning at the Angewandte is not only a timeline and a budget. A workable project needs an artistic or research home, clear responsibilities, an appropriate funding and administrative route, and early coordination with the university structures triggered by your project.</p> 64 64 </div></section> ... ... @@ -97,7 +97,6 @@ 97 97 </div> 98 98 </section> 99 99 100 - 101 101 <section class="sec"> 102 102 <div class="eye" style="color:#8a4d36;margin-bottom:4px">EXAMPLES · HOW RESEARCH IS SITUATED AT THE ANGEWANDTE</div> 103 103 <h3>Use existing projects to understand possible research profiles and institutional homes</h3> ... ... @@ -415,6 +415,31 @@ 415 415 416 416 <div class="info" style="margin-bottom:14px"><strong>Need help structuring the project?</strong> For funded, artistic, scientific and arts-based research projects, Support Kunst und Forschung is a central coordination point. Bring a short project description, host unit, likely applicant, partners, duration, rough budget and the main things you need from the University.</div> 417 417 416 +<!-- ARSN_TRAINING_WORKSHOPS_V2_START --> 417 +<section class="arsn-training-workshops" data-arsn-training-workshops="v2" style="margin:27px 0 22px 0;"> 418 + <div style="padding:16px 18px;background:#eef8fa;border:1px solid #cfe8ef;border-left:5px solid #21b6d7;border-radius:9px;"> 419 + <div style="font-size:12px;font-weight:700;letter-spacing:.075em;text-transform:uppercase;color:#3f6871;margin-bottom:5px;">TRAINING & WORKSHOPS</div> 420 + <h3 style="font-size:20px;line-height:1.3;margin:0 0 7px;color:#35312d;text-align:left;">Training, workshops & consultation sessions</h3> 421 + <p style="margin:0 0 10px;color:#5e5953;line-height:1.55;">Relevant opportunities for this topic will be shown here automatically from the central calendar.</p> 422 + <span data-arsn-coming-soon="true" style="display:inline-block;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> 423 + </div> 424 +</section> 425 +<!-- ARSN_TRAINING_WORKSHOPS_V2_END --> 426 + 427 +<!-- ARSN_PRACTICAL_RESOURCES_V2_START --> 428 +<section class="arsn-practical-resources" data-arsn-practical-resources="v2" style="margin:0 0 27px;"> 429 + <div style="font-size:12px;font-weight:700;letter-spacing:.075em;text-transform:uppercase;color:#8a4d36;margin-bottom:4px;">USEFUL MATERIALS</div> 430 + <h3 style="font-size:22px;line-height:1.25;margin:0 0 8px;color:#35312d;text-align:left;">Practical Resources</h3> 431 + <p style="margin:0 0 12px;color:#5e5953;line-height:1.55;">Use practical resources when you need a concise overview, a step-by-step procedure or a ready-to-use project aid.</p> 432 + <div class="arsn-resource-grid" style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;"> 433 + <div style="padding:15px 16px;background:#fcfbf8;border:1px solid #e3ded6;border-top:3px solid #21b6d7;border-radius:9px;"><strong>Info Sheets</strong><br><span data-arsn-coming-soon="true" style="display:inline-block;margin:6px 0 8px;padding:4px 9px;border-radius:14px;background:#fff4ee;border:1px solid #efd9cc;color:#8a4d36;font-size:11px;font-weight:700;letter-spacing:.065em;">COMING SOON</span><div style="color:#625d56;line-height:1.45;">Short reference guides for common questions and decisions.</div></div> 434 + <div style="padding:15px 16px;background:#fcfbf8;border:1px solid #e3ded6;border-top:3px solid #e94b13;border-radius:9px;"><strong>Tutorials</strong><br><span data-arsn-coming-soon="true" style="display:inline-block;margin:6px 0 8px;padding:4px 9px;border-radius:14px;background:#fff4ee;border:1px solid #efd9cc;color:#8a4d36;font-size:11px;font-weight:700;letter-spacing:.065em;">COMING SOON</span><div style="color:#625d56;line-height:1.45;">Step-by-step guidance for specific tasks and workflows.</div></div> 435 + <div style="padding:15px 16px;background:#fcfbf8;border:1px solid #e3ded6;border-top:3px solid #38b76a;border-radius:9px;"><strong>Checklists & Templates</strong><br><span data-arsn-coming-soon="true" style="display:inline-block;margin:6px 0 8px;padding:4px 9px;border-radius:14px;background:#fff4ee;border:1px solid #efd9cc;color:#8a4d36;font-size:11px;font-weight:700;letter-spacing:.065em;">COMING SOON</span><div style="color:#625d56;line-height:1.45;">Ready-to-use checklists and templates for planning, managing and closing projects.</div></div> 436 + </div> 437 + <style>@media(max-width:767px){.arsn-resource-grid{grid-template-columns:1fr!important}}</style> 438 +</section> 439 +<!-- ARSN_PRACTICAL_RESOURCES_V2_END --> 440 + 418 418 <!-- ARSN_SEARCH_TERMS_START --> 419 419 <details style="margin-top:24px;padding-top:10px;border-top:1px solid #e3ded6"> 420 420 <summary style="cursor:pointer;color:#6a655e;font-size:13px">Search terms & related topics</summary> ... ... @@ -425,12 +425,13 @@ 425 425 </div> 426 426 {{/html}} 427 427 428 -\n\n 429 -\n\n{{html clean="false"}} 430 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 451 +{{html clean="false"}} 452 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 431 431 432 -<style data-sn-horizontal-box-harmonizer="7"> 433 -/* ---------- Typography: never justify headings ---------- */ 454 +<style data-sn-service-navigator-master="1"> 455 +/* ========================================================= 456 + MASTER TYPOGRAPHY 457 + ========================================================= */ 434 434 #xwikicontent h1, 435 435 #xwikicontent h2, 436 436 #xwikicontent h3, ... ... @@ -452,88 +452,105 @@ 452 452 word-spacing:normal!important; 453 453 } 454 454 455 -/* ---------- Native XWiki semantic callouts ---------- */ 456 -#xwikicontent .box.infomessage, 457 -#xwikicontent .infomessage, 458 -#xwikicontent .box.warningmessage, 459 -#xwikicontent .warningmessage, 460 -#xwikicontent .box.successmessage, 461 -#xwikicontent .successmessage, 462 -#xwikicontent .box.errormessage, 463 -#xwikicontent .errormessage, 464 -#xwikicontent [data-sn-callout-harmonized="1"]{ 479 +/* ========================================================= 480 + COMING SOON / IN VORBEREITUNG 481 + ========================================================= */ 482 +.sn-coming-soon-badge{ 483 + display:inline-block; 484 + vertical-align:middle; 485 + margin-left:10px; 486 + padding:4px 8px; 487 + border-radius:14px; 488 + border:1px solid #efd9cc; 489 + background:#fff4ee; 490 + color:#8a4d36; 491 + font-size:11px; 492 + font-weight:700; 493 + letter-spacing:.055em; 494 + line-height:1.2; 495 + white-space:nowrap; 496 +} 497 + 498 +/* ========================================================= 499 + NATIVE / DETAIL CALLOUT GEOMETRY 500 + Preserve existing backgrounds. 501 + ========================================================= */ 502 +#xwikicontent .arsn-info, 503 +#xwikicontent .dmp-info, 504 +#xwikicontent .ido-info, 505 +#xwikicontent .pp-info, 506 +#xwikicontent .infomessage{ 465 465 box-sizing:border-box!important; 466 - border-radius:8px!important; 467 - border-top:1px solid rgba(0,0,0,.08)!important; 468 - border-right:1px solid rgba(0,0,0,.08)!important; 469 - border-bottom:1px solid rgba(0,0,0,.08)!important; 470 - border-left:4px solid var(--sn-callout-accent,#21b6d7)!important; 471 - padding:14px 16px!important; 508 + border-left:4px solid #21b6d7!important; 509 + border-radius:8px; 472 472 text-align:left!important; 473 - text-justify:auto!important; 474 474 word-spacing:normal!important; 475 - box-shadow:none!important; 476 476 } 477 477 478 -#xwikicontent .box.infomessage, 479 -#xwikicontent .infomessage{ 480 - --sn-callout-accent:#21b6d7; 481 - background:#eaf7fb!important; 482 -} 483 - 484 -#xwikicontent .box.warningmessage, 485 -#xwikicontent .warningmessage{ 486 - --sn-callout-accent:#f0aa00; 487 - background:#fff8e7!important; 488 -} 489 - 490 -#xwikicontent .box.successmessage, 491 -#xwikicontent .successmessage{ 492 - --sn-callout-accent:#38b76a; 493 - background:#edf9f1!important; 494 -} 495 - 496 -#xwikicontent .box.errormessage, 514 +#xwikicontent .arsn-warn, 515 +#xwikicontent .dmp-warn, 516 +#xwikicontent .ido-warn, 517 +#xwikicontent .pp-warn, 518 +#xwikicontent .warn, 519 +#xwikicontent .warning, 520 +#xwikicontent .warningmessage, 497 497 #xwikicontent .errormessage{ 498 - --sn-callout-accent:#e94b13; 499 - background:#fff1ec!important; 522 + box-sizing:border-box!important; 523 + border-left:4px solid #e94b13!important; 524 + border-radius:8px; 525 + text-align:left!important; 526 + word-spacing:normal!important; 500 500 } 501 501 502 -#xwikicontent [data-sn-callout-harmonized="1"] > :first-child, 503 -#xwikicontent .infomessage > :first-child, 504 -#xwikicontent .warningmessage > :first-child, 505 -#xwikicontent .successmessage > :first-child, 506 -#xwikicontent .errormessage > :first-child{ 507 - margin-top:0!important; 529 +[data-sn-master-equal-height], 530 +[data-sn-master-first-row]{ 531 + box-sizing:border-box; 508 508 } 509 509 510 -#xwikicontent [data-sn-callout-harmonized="1"] > :last-child, 511 -#xwikicontent .infomessage > :last-child, 512 -#xwikicontent .warningmessage > :last-child, 513 -#xwikicontent .successmessage > :last-child, 514 -#xwikicontent .errormessage > :last-child{ 515 - margin-bottom:0!important; 534 +/* ========================================================= 535 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 536 + ========================================================= */ 537 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 538 + display:grid!important; 539 + grid-template-columns:minmax(0,1fr)!important; 540 + grid-auto-rows:auto!important; 541 + width:100%!important; 542 + max-width:none!important; 543 + box-sizing:border-box!important; 544 + justify-items:start!important; 545 + align-items:start!important; 546 + gap:2px!important; 547 + text-align:left!important; 548 + text-align-last:left!important; 549 + text-justify:auto!important; 550 + word-spacing:normal!important; 551 + white-space:normal!important; 516 516 } 517 - 518 -#xwikicontent [data-sn-equal-height-managed], 519 -#xwikicontent [data-sn-first-section-aligned], 520 -#xwikicontent [data-sn-first-content-aligned]{ 521 - box-sizing:border-box; 553 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 554 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 555 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 556 + display:block!important; 557 + width:100%!important; 558 + margin:0!important; 559 + text-align:left!important; 560 + text-align-last:left!important; 561 + text-justify:auto!important; 562 + word-spacing:normal!important; 563 + white-space:normal!important; 522 522 } 523 523 </style> 524 524 525 -<script data-sn- horizontal-box-harmonizer="7">567 +<script data-sn-service-navigator-master="1"> 526 526 (function(){ 527 527 "use strict"; 528 528 571 + var PAGE_KIND="detail"; 572 + var PLACEHOLDER=false; 573 + var PLACEHOLDER_LABEL="COMING SOON"; 574 + 529 529 var MOBILE_MAX=767; 530 530 var ROW_TOLERANCE=6; 531 - var MIN_W=150; 532 - var MIN_H=36; 533 - var MAX_PARENT_CHILDREN=18; 534 - var SEARCH_DEPTH=5; 535 535 var RESIZE_DEBOUNCE=220; 536 - var MIN_WIDTH_CHANGE=2; 537 537 538 538 var root= 539 539 document.getElementById("xwikicontent")|| ... ... @@ -543,142 +543,114 @@ 543 543 544 544 if(!root)return; 545 545 546 - var heightManaged=new Set(); 547 - var sectionManaged=new Set(); 548 - var contentManaged=new Set(); 587 + var managedHeight=new Set(); 588 + var managedMargin=new Set(); 589 + var originalHeight=new WeakMap(); 590 + var originalMargin=new WeakMap(); 549 549 550 - var originalMinHeight=new WeakMap(); 551 - var originalMarginTop=new WeakMap(); 552 - 553 553 var resizeTimer=0; 554 - var lastWidth=-1; 555 - var hasApplied=false; 556 - var applying=false; 593 + var running=false; 557 557 558 - function num(v){ 559 - var n=parseFloat(v); 560 - return Number.isFinite(n)?n:0; 561 - } 562 - 563 - function visible(el,minW,minH){ 564 - if(!el||el.nodeType!==1)return false; 565 - 566 - var s=getComputedStyle(el); 567 - 568 - if( 569 - s.display==="none"|| 570 - s.visibility==="hidden"|| 571 - Number(s.opacity)===0 572 - ){ 573 - return false; 595 + var THEMES=[ 596 + { 597 + name:"BLUE", 598 + accent:"#21b6d7", 599 + bg:"#eaf7fb", 600 + text:"#315d68", 601 + labels:[ 602 + "HIER STARTEN", 603 + "ENTSCHEIDEN", 604 + "ÜBERPRÜFEN & ANPASSEN", 605 + "START HERE", 606 + "DECIDE", 607 + "REVIEW & ADAPT" 608 + ] 609 + }, 610 + { 611 + name:"RED", 612 + accent:"#e94b13", 613 + bg:"#fff1ec", 614 + text:"#8a4d36", 615 + labels:[ 616 + "PLANEN & ORGANISIEREN", 617 + "ORGANISIEREN & DOKUMENTIEREN", 618 + "PUBLIZIEREN & PRÄSENTIEREN", 619 + "PLAN & ORGANISE", 620 + "PLAN & ORGANIZE", 621 + "ORGANISE & DOCUMENT", 622 + "ORGANIZE & DOCUMENT", 623 + "PUBLISH & PRESENT" 624 + ] 625 + }, 626 + { 627 + name:"YELLOW", 628 + accent:"#f0aa00", 629 + bg:"#fff8e7", 630 + text:"#785b17", 631 + labels:[ 632 + "SCHÜTZEN & KLÄREN", 633 + "STANDARDISIEREN & IDENTIFIZIEREN", 634 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 635 + "PROTECT & CLARIFY", 636 + "STANDARDISE & IDENTIFY", 637 + "STANDARDIZE & IDENTIFY", 638 + "OPEN, REUSE & MAKE FINDABLE" 639 + ] 640 + }, 641 + { 642 + name:"GREEN", 643 + accent:"#38b76a", 644 + bg:"#edf9f1", 645 + text:"#3f7451", 646 + labels:[ 647 + "INFRASTRUKTUR EINRICHTEN", 648 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 649 + "SPEICHERN & ZUGRIFF STEUERN", 650 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 651 + "SET UP INFRASTRUCTURE", 652 + "SET UP INFRASTRUCTURE & COLLABORATION", 653 + "STORE & CONTROL ACCESS", 654 + "REPOSITORY, PRESERVE & HAND OVER" 655 + ] 574 574 } 657 + ]; 575 575 576 - var r=el.getBoundingClientRect(); 577 - 578 - return ( 579 - r.width>=(minW||1)&& 580 - r.height>=(minH||1) 581 - ); 659 + function num(value){ 660 + var n=parseFloat(value); 661 + return Number.isFinite(n)?n:0; 582 582 } 583 583 584 - function normal izeText(text){585 - return String( text||"")664 + function norm(value){ 665 + return String(value||"") 586 586 .replace(/\s+/g," ") 587 587 .trim() 588 588 .toUpperCase(); 589 589 } 590 590 591 - function excluded(el){ 592 - return ( 593 - !el.matches|| 594 - el.matches( 595 - "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]" 596 - ) 597 - ); 598 - } 671 + function visible(el){ 672 + if(!el||el.nodeType!==1)return false; 599 599 600 - /* ---------- Custom coloured callouts ---------- */ 674 + var style=getComputedStyle(el); 675 + var rect=el.getBoundingClientRect(); 601 601 602 - function nativeCallout(el){ 603 - var c= 604 - typeof el.className==="string" 605 - ? el.className.toLowerCase() 606 - : ""; 607 - 608 608 return ( 609 - /(^|\s)(infomessage|warningmessage|successmessage|errormessage)(\s|$)/.test(c) 678 + style.display!=="none"&& 679 + style.visibility!=="hidden"&& 680 + rect.width>20&& 681 + rect.height>4 610 610 ); 611 611 } 612 612 613 - function customCallout(el){ 614 - if(!visible(el,220,42)||excluded(el))return false; 615 - 616 - var r=el.getBoundingClientRect(); 617 - 618 - if(r.height>520)return false; 619 - 620 - var s=getComputedStyle(el); 621 - 622 - var bg= 623 - s.backgroundColor&& 624 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 625 - s.backgroundColor!=="transparent"&& 626 - s.backgroundColor!=="rgb(255, 255, 255)"; 627 - 628 - var left= 629 - num(s.borderLeftWidth); 630 - 631 - return ( 632 - bg&& 633 - left>=2 634 - ); 635 - } 636 - 637 - function harmoniseCustomCallouts(){ 638 - Array.from( 639 - root.querySelectorAll( 640 - "div,aside,section" 641 - ) 642 - ).forEach(function(el){ 643 - if(nativeCallout(el))return; 644 - if(!customCallout(el))return; 645 - 646 - var s=getComputedStyle(el); 647 - 648 - el.setAttribute( 649 - "data-sn-callout-harmonized", 650 - "1" 651 - ); 652 - 653 - if( 654 - s.borderLeftColor 655 - ){ 656 - el.style.setProperty( 657 - "--sn-callout-accent", 658 - s.borderLeftColor 659 - ); 660 - } 661 - }); 662 - } 663 - 664 - /* ---------- Restore only values V7 itself changed ---------- */ 665 - 666 - function saveOriginal(el,map,property){ 685 + function saveStyle(el,map,property){ 667 667 if(map.has(el))return; 668 668 669 669 map.set(el,{ 670 - value: 671 - el.style.getPropertyValue( 672 - property 673 - ), 674 - priority: 675 - el.style.getPropertyPriority( 676 - property 677 - ) 689 + value:el.style.getPropertyValue(property), 690 + priority:el.style.getPropertyPriority(property) 678 678 }); 679 679 } 680 680 681 - function restore Original(el,map,property){694 + function restoreStyle(el,map,property){ 682 682 var original=map.get(el); 683 683 684 684 if(original&&original.value){ ... ... @@ -688,770 +688,1069 @@ 688 688 original.priority||"" 689 689 ); 690 690 }else{ 691 - el.style.removeProperty( 692 - property 693 - ); 704 + el.style.removeProperty(property); 694 694 } 695 695 } 696 696 697 697 function resetRuntime(){ 698 - heightManaged.forEach(function(el){699 - restore Original(709 + managedHeight.forEach(function(el){ 710 + restoreStyle( 700 700 el, 701 - original MinHeight,712 + originalHeight, 702 702 "min-height" 703 703 ); 704 - 705 705 el.removeAttribute( 706 - "data-sn-equal-height -managed"716 + "data-sn-master-equal-height" 707 707 ); 708 708 }); 709 709 710 - sectionManaged.forEach(function(el){711 - restore Original(720 + managedMargin.forEach(function(el){ 721 + restoreStyle( 712 712 el, 713 - originalMargin Top,723 + originalMargin, 714 714 "margin-top" 715 715 ); 716 - 717 717 el.removeAttribute( 718 - "data-sn-first- section-aligned"727 + "data-sn-master-first-row" 719 719 ); 720 720 }); 721 721 722 - contentManaged.forEach(function(el){ 723 - restoreOriginal( 724 - el, 725 - originalMarginTop, 726 - "margin-top" 727 - ); 731 + managedHeight.clear(); 732 + managedMargin.clear(); 733 + } 728 728 729 - el.removeAttribute( 730 - "data-sn-first-content-aligned" 731 - ); 732 - }); 735 + function themeFor(text){ 736 + var value=norm(text); 733 733 734 - heightManaged.clear(); 735 - sectionManaged.clear(); 736 - contentManaged.clear(); 737 - } 738 + for(var i=0;i<THEMES.length;i++){ 739 + for(var j=0;j<THEMES[i].labels.length;j++){ 740 + var label=THEMES[i].labels[j]; 738 738 739 - /* ---------- Card detection ---------- */ 742 + if( 743 + value===label|| 744 + value.indexOf(label+" ")===0|| 745 + value.indexOf(label+" -")===0|| 746 + value.indexOf(label+" ·")===0 747 + ){ 748 + return THEMES[i]; 749 + } 750 + } 751 + } 740 740 741 - function namedLikeBox(el){ 742 - var c= 743 - typeof el.className==="string" 744 - ? el.className 745 - : ""; 753 + return null; 754 + } 746 746 747 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c); 756 + /* ======================================================= 757 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 758 + ======================================================= */ 759 + 760 + function colourDistance(a,b){ 761 + return Math.sqrt( 762 + Math.pow(a[0]-b[0],2)+ 763 + Math.pow(a[1]-b[1],2)+ 764 + Math.pow(a[2]-b[2],2) 765 + ); 748 748 } 749 749 750 - function boxLike(el){ 751 - if( 752 - !visible(el,MIN_W,MIN_H)|| 753 - excluded(el) 754 - ){ 755 - return false; 756 - } 768 + function makeFilledRedOrangeCTAsBorderless(){ 769 + var RED_ORANGE=[233,75,19]; 757 757 758 - var s=getComputedStyle(el); 759 - var r=el.getBoundingClientRect(); 771 + Array.from( 772 + root.querySelectorAll( 773 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 774 + ) 775 + ).forEach(function(el){ 776 + if(!visible(el))return; 760 760 761 - var border= 762 - num(s.borderTopWidth)+ 763 - num(s.borderRightWidth)+ 764 - num(s.borderBottomWidth)+ 765 - num(s.borderLeftWidth); 778 + var style=getComputedStyle(el); 779 + var rgb=parseRGB(style.backgroundColor); 766 766 767 - var radius=Math.max( 768 - num(s.borderTopLeftRadius), 769 - num(s.borderTopRightRadius), 770 - num(s.borderBottomLeftRadius), 771 - num(s.borderBottomRightRadius) 772 - ); 781 + if(!rgb)return; 773 773 774 - var bg= 775 - s.backgroundColor&& 776 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 777 - s.backgroundColor!=="transparent"; 783 + if( 784 + colourDistance( 785 + rgb, 786 + RED_ORANGE 787 + )>55 788 + ){ 789 + return; 790 + } 778 778 779 - var shadow= 780 - s.boxShadow&& 781 - s.boxShadow!=="none"; 792 + var rect=el.getBoundingClientRect(); 782 782 783 - return ( 784 - namedLikeBox(el)|| 785 - border>=1|| 786 - (bg&&radius>=3)|| 787 - (shadow&&r.width>=180) 788 - ); 789 - } 794 + if( 795 + rect.width<80|| 796 + rect.height<24 797 + ){ 798 + return; 799 + } 790 790 791 - function pickTarget(child){ 792 - if(!visible(child,MIN_W,MIN_H))return null; 801 + el.style.setProperty( 802 + "border", 803 + "none", 804 + "important" 805 + ); 793 793 794 - if(boxLike(child))return child; 807 + el.style.setProperty( 808 + "border-left", 809 + "none", 810 + "important" 811 + ); 795 795 796 - var cr=child.getBoundingClientRect(); 797 - var q=[]; 813 + el.style.setProperty( 814 + "border-top", 815 + "none", 816 + "important" 817 + ); 798 798 799 - Array.from(child.children||[]).forEach(function(el){ 800 - q.push({el:el,depth:1}); 819 + el.style.setProperty( 820 + "border-right", 821 + "none", 822 + "important" 823 + ); 824 + 825 + el.style.setProperty( 826 + "border-bottom", 827 + "none", 828 + "important" 829 + ); 830 + 831 + el.style.setProperty( 832 + "box-shadow", 833 + "none", 834 + "important" 835 + ); 801 801 }); 837 + } 802 802 803 - var best=null; 804 - var bestScore=-Infinity; 839 + /* ======================================================= 840 + FULL-WIDTH THREE-LINE AREA LABELS 841 + ======================================================= */ 805 805 806 - while(q.length){ 807 - var item=q.shift(); 808 - var el=item.el; 843 + function compactText(value){ 844 + return String(value||"") 845 + .replace(/\s+/g," ") 846 + .trim(); 847 + } 809 809 810 - if(!visible(el,MIN_W,MIN_H))continue; 849 + function makeThreeLineAreaLabels(){ 850 + Array.from( 851 + root.querySelectorAll( 852 + ".arsn-area-label" 853 + ) 854 + ).forEach(function(label){ 855 + if( 856 + label.getAttribute( 857 + "data-sn-three-line" 858 + )==="1" 859 + ){ 860 + return; 861 + } 811 811 812 - var r=el.getBoundingClientRect(); 863 + var number= 864 + label.querySelector( 865 + ":scope > .arsn-area-number" 866 + ); 813 813 868 + var action= 869 + label.querySelector( 870 + ":scope > .arsn-area-action" 871 + ); 872 + 814 814 if( 815 - r .width>=cr.width*.68&&816 - boxLike(el)874 + !number|| 875 + !action 817 817 ){ 818 - var widthFit= 819 - 1-Math.min( 820 - 1, 821 - Math.abs(cr.width-r.width)/ 822 - Math.max(1,cr.width) 823 - ); 877 + return; 878 + } 824 824 825 - var topFit= 826 - 1-Math.min( 827 - 1, 828 - Math.abs(cr.top-r.top)/100 829 - ); 880 + var clone= 881 + label.cloneNode(true); 830 830 831 - var score= 832 - widthFit*6+ 833 - topFit*3+ 834 - Math.min(r.height,900)/450+ 835 - Math.min(r.width*r.height,900000)/900000; 883 + var cloneNumber= 884 + clone.querySelector( 885 + ":scope > .arsn-area-number" 886 + ); 836 836 837 - if(score>bestScore){ 838 - best=el; 839 - bestScore=score; 840 - } 888 + var cloneAction= 889 + clone.querySelector( 890 + ":scope > .arsn-area-action" 891 + ); 892 + 893 + if(cloneNumber){ 894 + cloneNumber.remove(); 841 841 } 842 842 843 - if(item.depth<SEARCH_DEPTH){ 844 - Array.from(el.children||[]).forEach(function(next){ 845 - q.push({ 846 - el:next, 847 - depth:item.depth+1 848 - }); 849 - }); 897 + if(cloneAction){ 898 + cloneAction.remove(); 850 850 } 851 - } 852 852 853 - return best; 854 - } 901 + var titleText= 902 + compactText( 903 + clone.textContent 904 + ); 855 855 856 - function groupRows(entries){ 857 - var groups=[]; 906 + if(!titleText){ 907 + return; 908 + } 858 858 859 - entries 860 - .slice() 861 - .sort(function(a,b){ 862 - return ( 863 - a.rect.top-b.rect.top|| 864 - a.rect.left-b.rect.left 910 + var numberNode= 911 + number.cloneNode(true); 912 + 913 + var actionNode= 914 + action.cloneNode(true); 915 + 916 + var titleNode= 917 + document.createElement( 918 + "span" 865 865 ); 866 - }) 867 - .forEach(function(entry){ 868 - var group=null; 869 869 870 - for(var i=0;i<groups.length;i++){ 871 - if( 872 - Math.abs( 873 - groups[i].top- 874 - entry.rect.top 875 - )<=ROW_TOLERANCE 876 - ){ 877 - group=groups[i]; 878 - break; 879 - } 880 - } 921 + titleNode.className= 922 + "sn-area-label-title"; 881 881 882 - if(!group){ 883 - group={ 884 - top:entry.rect.top, 885 - entries:[] 886 - }; 887 - groups.push(group); 888 - } 924 + titleNode.textContent= 925 + titleText; 889 889 890 - group.entries.push(entry); 891 - }); 927 + while(label.firstChild){ 928 + label.removeChild( 929 + label.firstChild 930 + ); 931 + } 892 892 893 - return groups; 933 + label.appendChild( 934 + numberNode 935 + ); 936 + 937 + label.appendChild( 938 + titleNode 939 + ); 940 + 941 + label.appendChild( 942 + actionNode 943 + ); 944 + 945 + label.setAttribute( 946 + "data-sn-three-line", 947 + "1" 948 + ); 949 + 950 + var head= 951 + label.closest( 952 + ".arsn-area-head" 953 + ); 954 + 955 + if(head){ 956 + head.style.setProperty( 957 + "width", 958 + "100%", 959 + "important" 960 + ); 961 + 962 + head.style.setProperty( 963 + "max-width", 964 + "100%", 965 + "important" 966 + ); 967 + 968 + head.style.setProperty( 969 + "box-sizing", 970 + "border-box", 971 + "important" 972 + ); 973 + } 974 + }); 894 894 } 895 895 896 - function validRow(group){ 897 - if(group.entries.length<2)return false; 977 + /* ======================================================= 978 + PLACEHOLDER BADGE 979 + ======================================================= */ 898 898 899 - var lefts= 900 - group.entries 901 - .map(function(e){return e.rect.left;}) 902 - .sort(function(a,b){return a-b;}); 981 + function applyPlaceholderBadge(){ 982 + if(!PLACEHOLDER)return; 903 903 904 904 if( 905 - lefts[lefts.length-1]-906 - lefts[0]<907 - 80985 + document.querySelector( 986 + ".sn-coming-soon-badge" 987 + ) 908 908 ){ 909 - return false;989 + return; 910 910 } 911 911 912 - var widths= 913 - group.entries 914 - .map(function(e){return e.rect.width;}) 915 - .filter(function(w){return w>0;}); 992 + var title= 993 + document.querySelector( 994 + "#document-title" 995 + )|| 996 + document.querySelector( 997 + "h1" 998 + ); 916 916 917 - if( widths.length<2)returnfalse;1000 + if(!title)return; 918 918 919 - var minW= 920 - Math.min.apply(Math,widths); 1002 + var badge= 1003 + document.createElement( 1004 + "span" 1005 + ); 921 921 922 - var maxW=923 - Math.max.apply(Math,widths);1007 + badge.className= 1008 + "sn-coming-soon-badge"; 924 924 925 - return ( 926 - maxW/ 927 - Math.max(1,minW)<= 928 - 1.9 1010 + badge.textContent= 1011 + PLACEHOLDER_LABEL; 1012 + 1013 + badge.setAttribute( 1014 + "aria-label", 1015 + PLACEHOLDER_LABEL 929 929 ); 930 - } 931 931 932 - /* ---------- Known ARSN first section bars ---------- */ 933 - 934 - function knownBar(el){ 935 - var text= 936 - normalizeText( 937 - el.textContent 938 - ); 939 - 940 - return ( 941 - text==="HIER STARTEN"|| 942 - text==="ORGANISIEREN & DOKUMENTIEREN"|| 943 - text==="ENTSCHEIDEN"|| 944 - text==="START HERE"|| 945 - text==="GET STARTED"|| 946 - text==="ORGANISE & DOCUMENT"|| 947 - text==="ORGANIZE & DOCUMENT"|| 948 - text==="DECIDE" 1018 + title.appendChild( 1019 + badge 949 949 ); 950 950 } 951 951 952 - functionfindKnownBar(card){953 - varcardRect=954 - card.getBoundingClientRect();1023 + /* ======================================================= 1024 + DETAIL PAGE OWN-ACCENT PROPAGATION 1025 + ======================================================= */ 955 955 956 - var rows= 957 - Array.from( 958 - card.querySelectorAll( 959 - "div,p,span,strong,h3,h4,h5,h6" 960 - ) 961 - ) 962 - .filter(function(el){ 963 - if(!visible(el,20,6))return false; 964 - if(!knownBar(el))return false; 1027 + function parseRGB(value){ 1028 + var match=String(value||"").match( 1029 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 1030 + ); 965 965 966 - varr=el.getBoundingClientRect();1032 + if(!match)return null; 967 967 968 - var rel= 969 - r.top- 970 - cardRect.top; 1034 + return [ 1035 + Number(match[1]), 1036 + Number(match[2]), 1037 + Number(match[3]) 1038 + ]; 1039 + } 971 971 972 - return ( 973 - rel>=35&& 974 - rel<= 975 - cardRect.height*.75 976 - ); 977 - }) 978 - .sort(function(a,b){ 979 - return ( 980 - a.getBoundingClientRect().top- 981 - b.getBoundingClientRect().top 982 - ); 983 - }); 984 - 985 - return rows[0]||null; 1041 + function distance(a,b){ 1042 + return Math.sqrt( 1043 + Math.pow(a[0]-b[0],2)+ 1044 + Math.pow(a[1]-b[1],2)+ 1045 + Math.pow(a[2]-b[2],2) 1046 + ); 986 986 } 987 987 988 - function alignKnownBars(cards){ 989 - var rows= 990 - cards.map(function(card){ 991 - var bar= 992 - findKnownBar(card); 1049 + function paletteMatch(cssColor){ 1050 + var rgb=parseRGB(cssColor); 993 993 994 - if(!bar)return null;1052 + if(!rgb)return null; 995 995 996 - var cr= 997 - card.getBoundingClientRect(); 1054 + var palette=[ 1055 + {hex:"#21b6d7",rgb:[33,182,215]}, 1056 + {hex:"#e94b13",rgb:[233,75,19]}, 1057 + {hex:"#f0aa00",rgb:[240,170,0]}, 1058 + {hex:"#38b76a",rgb:[56,183,106]} 1059 + ]; 998 998 999 - var br=1000 - bar.getBoundingClientRect();1061 + var best=null; 1062 + var bestDistance=Infinity; 1001 1001 1002 - return { 1003 - bar:bar, 1004 - relativeTop: 1005 - br.top- 1006 - cr.top 1007 - }; 1008 - }); 1064 + palette.forEach(function(item){ 1065 + var d=distance(rgb,item.rgb); 1009 1009 1010 - if( 1011 - rows.some(function(row){ 1012 - return !row; 1013 - }) 1014 - ){ 1015 - return false; 1016 - } 1067 + if(d<bestDistance){ 1068 + best=item; 1069 + bestDistance=d; 1070 + } 1071 + }); 1017 1017 1018 - var target= 1019 - Math.max.apply( 1020 - Math, 1021 - rows.map(function(row){ 1022 - return row.relativeTop; 1023 - }) 1024 - ); 1073 + return bestDistance<=30 1074 + ?best 1075 + :null; 1076 + } 1025 1025 1026 - rows.forEach(function(row){ 1027 - var delta= 1028 - target- 1029 - row.relativeTop; 1078 + function propagateDetailAccents(){ 1079 + if(PAGE_KIND!=="detail")return; 1030 1030 1031 - if(delta<=1)return; 1081 + Array.from( 1082 + root.querySelectorAll( 1083 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 1084 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 1085 + ) 1086 + ).forEach(function(el){ 1087 + if(!visible(el))return; 1032 1032 1033 - saveOriginal( 1034 - row.bar, 1035 - originalMarginTop, 1036 - "margin-top" 1037 - ); 1089 + var style=getComputedStyle(el); 1038 1038 1039 - var current= 1040 - num( 1041 - getComputedStyle( 1042 - row.bar 1043 - ).marginTop 1044 - ); 1091 + if( 1092 + num(style.borderTopWidth)>=2 1093 + ){ 1094 + var match= 1095 + paletteMatch( 1096 + style.borderTopColor 1097 + ); 1045 1045 1046 - row.bar.style.setProperty( 1047 - "margin-top", 1048 - ( 1049 - current+ 1050 - delta 1051 - )+"px" 1052 - ); 1099 + if(match){ 1100 + el.style.setProperty( 1101 + "border-left", 1102 + "4px solid "+match.hex, 1103 + "important" 1104 + ); 1105 + } 1106 + } 1107 + }); 1053 1053 1054 - row.bar.setAttribute( 1055 - "data-sn-first-section-aligned", 1056 - "7" 1057 - ); 1109 + // Warning families: explicit safety override. 1110 + Array.from( 1111 + root.querySelectorAll( 1112 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 1113 + ".warn,.warning,.warningmessage,.errormessage" 1114 + ) 1115 + ).forEach(function(el){ 1116 + if(!visible(el))return; 1058 1058 1059 - sectionManaged.add( 1060 - row.bar 1118 + el.style.setProperty( 1119 + "border-left", 1120 + "4px solid #e94b13", 1121 + "important" 1061 1061 ); 1062 1062 }); 1063 1063 1064 - return true; 1125 + // Info families: explicit orientation override. 1126 + Array.from( 1127 + root.querySelectorAll( 1128 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 1129 + ) 1130 + ).forEach(function(el){ 1131 + if(!visible(el))return; 1132 + 1133 + el.style.setProperty( 1134 + "border-left", 1135 + "4px solid #21b6d7", 1136 + "important" 1137 + ); 1138 + }); 1065 1065 } 1066 1066 1067 - /* ---------- Generic first content after heading ---------- */ 1141 + /* ======================================================= 1142 + OVERVIEW SEMANTIC THEME PALETTE 1143 + ======================================================= */ 1068 1068 1069 - function heading(card){ 1070 - var cr= 1071 - card.getBoundingClientRect(); 1072 - 1073 - var rows= 1074 - Array.from( 1075 - card.querySelectorAll( 1076 - "h1,h2,h3,h4,h5,h6,.box-title,[role=heading]" 1077 - ) 1145 + function smallestThemeHeaders(){ 1146 + return Array.from( 1147 + root.querySelectorAll( 1148 + "div,span,p,strong,h3,h4,h5,h6" 1078 1078 ) 1079 - .filter(function(el){ 1080 - if(!visible(el,20,8))return false; 1150 + ).filter(function(el){ 1151 + if(!visible(el))return false; 1152 + if(!themeFor(el.textContent))return false; 1081 1081 1082 - var r=el.getBoundingClientRect(); 1083 - 1084 - var rel= 1085 - r.top- 1086 - cr.top; 1087 - 1088 - return ( 1089 - rel>=0&& 1090 - rel<= 1091 - Math.min( 1092 - 160, 1093 - cr.height*.45 1094 - ) 1154 + return !Array.from( 1155 + el.children||[] 1156 + ).some(function(child){ 1157 + return !!themeFor( 1158 + child.textContent 1095 1095 ); 1096 - }) 1097 - .sort(function(a,b){ 1098 - return ( 1099 - a.getBoundingClientRect().top- 1100 - b.getBoundingClientRect().top 1101 - ); 1102 1102 }); 1103 - 1104 - return rows[0]||null; 1161 + }); 1105 1105 } 1106 1106 1107 - function firstContent(card,h){ 1108 - if(!h)return null; 1164 + function findOverviewCard(header){ 1165 + var node=header.parentElement; 1166 + var candidates=[]; 1109 1109 1110 - var cr= 1111 - card.getBoundingClientRect(); 1168 + while(node&&node!==root){ 1169 + var rect=node.getBoundingClientRect(); 1170 + var style=getComputedStyle(node); 1112 1112 1113 - var hr= 1114 - h.getBoundingClientRect(); 1172 + var border= 1173 + num(style.borderTopWidth)+ 1174 + num(style.borderRightWidth)+ 1175 + num(style.borderBottomWidth)+ 1176 + num(style.borderLeftWidth); 1115 1115 1116 - var rows= 1117 - Array.from( 1118 - card.querySelectorAll( 1119 - "p,div,ul,ol,dl,blockquote" 1120 - ) 1121 - ) 1122 - .filter(function(el){ 1123 - if( 1124 - el===h|| 1125 - h.contains(el)|| 1126 - el.contains(h) 1127 - ){ 1128 - return false; 1129 - } 1178 + if( 1179 + rect.width>=220&& 1180 + rect.width<=800&& 1181 + rect.height>=120&& 1182 + border>=1 1183 + ){ 1184 + candidates.push(node); 1185 + } 1130 1130 1131 - if(!visible(el,30,8))return false; 1187 + node=node.parentElement; 1188 + } 1132 1132 1133 - var text= 1134 - String(el.textContent||"") 1135 - .replace(/\s+/g," ") 1136 - .trim(); 1190 + if(!candidates.length)return null; 1137 1137 1138 - if(text.length<3)return false; 1192 + candidates.sort(function(a,b){ 1193 + return ( 1194 + b.getBoundingClientRect().height- 1195 + a.getBoundingClientRect().height 1196 + ); 1197 + }); 1139 1139 1140 - var r=el.getBoundingClientRect(); 1199 + return candidates[0]; 1200 + } 1141 1141 1142 - if( 1143 - r.top< 1144 - hr.bottom-1 1145 - ){ 1146 - return false; 1147 - } 1202 + function rowCandidates(link,card){ 1203 + var result=[]; 1204 + var cardRect= 1205 + card.getBoundingClientRect(); 1148 1148 1149 - if( 1150 - r.top-cr.top> 1151 - Math.min( 1152 - 280, 1153 - cr.height*.65 1154 - ) 1155 - ){ 1156 - return false; 1157 - } 1207 + var node=link; 1158 1158 1209 + while(node&&node!==card){ 1210 + if(visible(node)){ 1211 + var rect= 1212 + node.getBoundingClientRect(); 1213 + 1159 1159 if( 1160 - r.height> 1161 - cr.height*.58 1215 + rect.height<=105&& 1216 + rect.width>= 1217 + cardRect.width*.50&& 1218 + rect.width<= 1219 + cardRect.width*1.03 1162 1162 ){ 1163 - re turn false;1221 + result.push(node); 1164 1164 } 1223 + } 1165 1165 1166 - return true; 1167 - }) 1168 - .sort(function(a,b){ 1169 - var ar= 1170 - a.getBoundingClientRect(); 1225 + node=node.parentElement; 1226 + } 1171 1171 1172 - varbr=1173 - b.getBoundingClientRect();1228 + return result; 1229 + } 1174 1174 1231 + function chooseOuterRow( 1232 + candidates, 1233 + link 1234 + ){ 1235 + if(!candidates.length){ 1236 + return link; 1237 + } 1238 + 1239 + var bordered= 1240 + candidates.filter(function(el){ 1175 1175 return ( 1176 - ar.top-br.top|| 1177 - ar.height-br.height 1242 + num( 1243 + getComputedStyle(el) 1244 + .borderLeftWidth 1245 + )>=1 1178 1178 ); 1179 1179 }); 1180 1180 1181 - return rows[0]||null; 1182 - } 1249 + var pool= 1250 + bordered.length 1251 + ?bordered 1252 + :candidates; 1183 1183 1184 - function alignGeneric(cards){ 1185 - var rows= 1186 - cards.map(function(card){ 1187 - var h= 1188 - heading(card); 1254 + pool.sort(function(a,b){ 1255 + var ar= 1256 + a.getBoundingClientRect(); 1189 1189 1190 - var c= 1191 - firstContent( 1192 - card, 1193 - h 1194 - ); 1258 + var br= 1259 + b.getBoundingClientRect(); 1195 1195 1196 - if(!h||!c)return null; 1261 + return ( 1262 + ar.left-br.left|| 1263 + br.width-ar.width 1264 + ); 1265 + }); 1197 1197 1198 - varcr=1199 - card.getBoundingClientRect();1267 + return pool[0]||link; 1268 + } 1200 1200 1201 - var rr= 1202 - c.getBoundingClientRect(); 1203 - 1204 - return { 1205 - content:c, 1206 - relativeTop: 1207 - rr.top-cr.top 1208 - }; 1209 - }); 1210 - 1211 - if( 1212 - rows.some(function(row){ 1213 - return !row; 1214 - }) 1215 - ){ 1216 - return false; 1270 + function applyOverviewPalette(){ 1271 + if(PAGE_KIND!=="overview"){ 1272 + return []; 1217 1217 } 1218 1218 1219 - var target= 1220 - Math.max.apply( 1221 - Math, 1222 - rows.map(function(row){ 1223 - return row.relativeTop; 1275 + var headers= 1276 + smallestThemeHeaders() 1277 + .map(function(el){ 1278 + return { 1279 + el:el, 1280 + theme: 1281 + themeFor( 1282 + el.textContent 1283 + ), 1284 + card: 1285 + findOverviewCard( 1286 + el 1287 + ) 1288 + }; 1224 1224 }) 1225 - ); 1290 + .filter(function(row){ 1291 + return !!row.card; 1292 + }); 1226 1226 1227 - rows.forEach(function(row){ 1228 - var delta= 1229 - target- 1230 - row.relativeTop; 1294 + var unique=[]; 1295 + var seenHeaders=new Set(); 1231 1231 1232 - if(delta<=1)return; 1297 + headers.forEach(function(row){ 1298 + var key= 1299 + row.theme.name+ 1300 + "|"+ 1301 + Math.round( 1302 + row.card 1303 + .getBoundingClientRect() 1304 + .left 1305 + )+ 1306 + "|"+ 1307 + Math.round( 1308 + row.el 1309 + .getBoundingClientRect() 1310 + .top 1311 + ); 1233 1233 1234 - sa veOriginal(1235 - r ow.content,1236 - originalMarginTop,1237 - "margin-top"1238 - );1313 + if(!seenHeaders.has(key)){ 1314 + seenHeaders.add(key); 1315 + unique.push(row); 1316 + } 1317 + }); 1239 1239 1240 - var current= 1241 - num( 1242 - getComputedStyle( 1243 - row.content 1244 - ).marginTop 1245 - ); 1319 + unique.forEach(function(row){ 1320 + var headerRect= 1321 + row.el 1322 + .getBoundingClientRect(); 1246 1246 1247 - row.content.style.setProperty( 1248 - "margin-top", 1249 - ( 1250 - current+ 1251 - delta 1252 - )+"px" 1324 + row.el.style.setProperty( 1325 + "background", 1326 + row.theme.bg, 1327 + "important" 1253 1253 ); 1254 1254 1255 - row.content.setAttribute( 1256 - "data-sn-first-content-aligned", 1257 - "7" 1330 + row.el.style.setProperty( 1331 + "color", 1332 + row.theme.text, 1333 + "important" 1258 1258 ); 1259 1259 1260 - contentManaged.add( 1261 - row.content 1336 + row.el.style.setProperty( 1337 + "text-align", 1338 + "left", 1339 + "important" 1262 1262 ); 1341 + 1342 + row.el.style.setProperty( 1343 + "word-spacing", 1344 + "normal", 1345 + "important" 1346 + ); 1347 + 1348 + var later= 1349 + unique 1350 + .filter(function(other){ 1351 + return ( 1352 + other.card===row.card&& 1353 + other.el 1354 + .getBoundingClientRect() 1355 + .top> 1356 + headerRect.top+2 1357 + ); 1358 + }) 1359 + .sort(function(a,b){ 1360 + return ( 1361 + a.el 1362 + .getBoundingClientRect() 1363 + .top- 1364 + b.el 1365 + .getBoundingClientRect() 1366 + .top 1367 + ); 1368 + }); 1369 + 1370 + var stopTop= 1371 + later.length 1372 + ?later[0].el 1373 + .getBoundingClientRect() 1374 + .top 1375 + :Infinity; 1376 + 1377 + Array.from( 1378 + row.card.querySelectorAll("a") 1379 + ).forEach(function(link){ 1380 + if(!visible(link))return; 1381 + 1382 + var rect= 1383 + link.getBoundingClientRect(); 1384 + 1385 + if( 1386 + rect.top<= 1387 + headerRect.bottom-2|| 1388 + rect.top>= 1389 + stopTop-2 1390 + ){ 1391 + return; 1392 + } 1393 + 1394 + var candidates= 1395 + rowCandidates( 1396 + link, 1397 + row.card 1398 + ); 1399 + 1400 + var target= 1401 + chooseOuterRow( 1402 + candidates, 1403 + link 1404 + ); 1405 + 1406 + candidates.forEach(function(el){ 1407 + el.style.setProperty( 1408 + "border-left", 1409 + "0 solid transparent", 1410 + "important" 1411 + ); 1412 + }); 1413 + 1414 + target.style.setProperty( 1415 + "border-left", 1416 + "3px solid "+ 1417 + row.theme.accent, 1418 + "important" 1419 + ); 1420 + 1421 + target.style.setProperty( 1422 + "box-sizing", 1423 + "border-box", 1424 + "important" 1425 + ); 1426 + }); 1263 1263 }); 1264 1264 1265 - return true;1429 + return unique; 1266 1266 } 1267 1267 1268 - function applyRow(group){ 1269 - if(!validRow(group))return false; 1432 + /* ======================================================= 1433 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1434 + ======================================================= */ 1270 1270 1436 + function alignOverviewCards(headers){ 1437 + if( 1438 + PAGE_KIND!=="overview"|| 1439 + window.innerWidth<=MOBILE_MAX 1440 + ){ 1441 + return; 1442 + } 1443 + 1271 1271 var cards=[]; 1272 1272 var seen=new Set(); 1273 1273 1274 - group.entries.forEach(function(entry){1275 - if(!seen.has( entry.target)){1276 - seen.add( entry.target);1277 - cards.push( entry.target);1447 + headers.forEach(function(row){ 1448 + if(!seen.has(row.card)){ 1449 + seen.add(row.card); 1450 + cards.push(row.card); 1278 1278 } 1279 1279 }); 1280 1280 1281 - if(cards.length<2)return false; 1282 - 1283 - if( 1284 - !alignKnownBars(cards) 1285 - ){ 1286 - alignGeneric(cards); 1454 + if(cards.length<2){ 1455 + return; 1287 1287 } 1288 1288 1289 - var maxHeight=0; 1458 + // Group cards by actual top position. 1459 + var groups=[]; 1290 1290 1291 1291 cards.forEach(function(card){ 1292 - maxHeight= 1293 - Math.max( 1294 - maxHeight, 1295 - card.getBoundingClientRect().height 1296 - ); 1462 + var top= 1463 + card.getBoundingClientRect().top; 1464 + 1465 + var group=null; 1466 + 1467 + for(var i=0;i<groups.length;i++){ 1468 + if( 1469 + Math.abs( 1470 + groups[i].top-top 1471 + )<=ROW_TOLERANCE 1472 + ){ 1473 + group=groups[i]; 1474 + break; 1475 + } 1476 + } 1477 + 1478 + if(!group){ 1479 + group={ 1480 + top:top, 1481 + cards:[] 1482 + }; 1483 + groups.push(group); 1484 + } 1485 + 1486 + group.cards.push(card); 1297 1297 }); 1298 1298 1299 - maxHeight=1300 - Math.ceil(1301 - maxHeight1302 - );1489 + groups.forEach(function(group){ 1490 + if(group.cards.length<2){ 1491 + return; 1492 + } 1303 1303 1304 - if(maxHeight<MIN_H)return false; 1494 + var firstHeaders= 1495 + group.cards.map(function(card){ 1496 + var candidates= 1497 + headers 1498 + .filter(function(row){ 1499 + return row.card===card; 1500 + }) 1501 + .sort(function(a,b){ 1502 + return ( 1503 + a.el 1504 + .getBoundingClientRect() 1505 + .top- 1506 + b.el 1507 + .getBoundingClientRect() 1508 + .top 1509 + ); 1510 + }); 1305 1305 1306 - cards.forEach(function(card){ 1307 - saveOriginal( 1308 - card, 1309 - originalMinHeight, 1310 - "min-height" 1311 - ); 1512 + return candidates.length 1513 + ?candidates[0] 1514 + :null; 1515 + }); 1312 1312 1313 - card.style.setProperty( 1314 - "min-height", 1315 - maxHeight+"px" 1316 - ); 1517 + if( 1518 + !firstHeaders.some(function(row){ 1519 + return !row; 1520 + }) 1521 + ){ 1522 + var targetTop= 1523 + Math.max.apply( 1524 + Math, 1525 + firstHeaders.map(function(row){ 1526 + return ( 1527 + row.el 1528 + .getBoundingClientRect() 1529 + .top- 1530 + row.card 1531 + .getBoundingClientRect() 1532 + .top 1533 + ); 1534 + }) 1535 + ); 1317 1317 1318 - card.setAttribute( 1319 - "data-sn-equal-height-managed", 1320 - "7" 1321 - ); 1537 + firstHeaders.forEach(function(row){ 1538 + var relativeTop= 1539 + row.el 1540 + .getBoundingClientRect() 1541 + .top- 1542 + row.card 1543 + .getBoundingClientRect() 1544 + .top; 1322 1322 1323 - heightManaged.add(card);1324 - });1546 + var delta= 1547 + targetTop-relativeTop; 1325 1325 1326 - return true; 1327 - } 1549 + if(delta>1){ 1550 + saveStyle( 1551 + row.el, 1552 + originalMargin, 1553 + "margin-top" 1554 + ); 1328 1328 1329 - function calculate(force){ 1330 - if(applying)return; 1556 + var current= 1557 + num( 1558 + getComputedStyle( 1559 + row.el 1560 + ).marginTop 1561 + ); 1331 1331 1332 - var width= 1333 - Math.round( 1334 - window.innerWidth 1335 - ); 1563 + row.el.style.setProperty( 1564 + "margin-top", 1565 + ( 1566 + current+delta 1567 + )+"px" 1568 + ); 1336 1336 1337 - var meaningful= 1338 - lastWidth<0|| 1339 - Math.abs( 1340 - width- 1341 - lastWidth 1342 - )>= 1343 - MIN_WIDTH_CHANGE; 1570 + row.el.setAttribute( 1571 + "data-sn-master-first-row", 1572 + "1" 1573 + ); 1344 1344 1575 + managedMargin.add( 1576 + row.el 1577 + ); 1578 + } 1579 + }); 1580 + } 1581 + 1582 + var maxHeight=0; 1583 + 1584 + group.cards.forEach(function(card){ 1585 + maxHeight= 1586 + Math.max( 1587 + maxHeight, 1588 + card 1589 + .getBoundingClientRect() 1590 + .height 1591 + ); 1592 + }); 1593 + 1594 + maxHeight= 1595 + Math.ceil(maxHeight); 1596 + 1597 + group.cards.forEach(function(card){ 1598 + saveStyle( 1599 + card, 1600 + originalHeight, 1601 + "min-height" 1602 + ); 1603 + 1604 + card.style.setProperty( 1605 + "min-height", 1606 + maxHeight+"px" 1607 + ); 1608 + 1609 + card.setAttribute( 1610 + "data-sn-master-equal-height", 1611 + "1" 1612 + ); 1613 + 1614 + managedHeight.add( 1615 + card 1616 + ); 1617 + }); 1618 + }); 1619 + } 1620 + 1621 + /* ======================================================= 1622 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1623 + ======================================================= */ 1624 + 1625 + function equaliseDetailGrids(){ 1345 1345 if( 1346 - hasApplied&& 1347 - !force&& 1348 - !meaningful 1627 + PAGE_KIND!=="detail"|| 1628 + window.innerWidth<=MOBILE_MAX 1349 1349 ){ 1350 1350 return; 1351 1351 } 1352 1352 1353 - applying=true; 1633 + var selectors=[ 1634 + ".arsn-grid", 1635 + ".arsn-grid-2", 1636 + ".arsn-grid-3", 1637 + ".dmp-grid", 1638 + ".ido-grid", 1639 + ".pp-grid" 1640 + ]; 1354 1354 1355 - try{ 1356 - harmoniseCustomCallouts(); 1642 + selectors.forEach(function(selector){ 1643 + Array.from( 1644 + root.querySelectorAll(selector) 1645 + ).forEach(function(grid){ 1646 + var children= 1647 + Array.from( 1648 + grid.children||[] 1649 + ).filter(visible); 1357 1357 1358 - if(width<=MOBILE_MAX){ 1359 - if(hasApplied){ 1360 - resetRuntime(); 1651 + if(children.length<2){ 1652 + return; 1361 1361 } 1362 1362 1363 - hasApplied=false; 1364 - lastWidth=width; 1365 - return; 1366 - } 1655 + var groups=[]; 1367 1367 1368 - if(hasApplied){ 1369 - resetRuntime(); 1370 - } 1657 + children.forEach(function(child){ 1658 + var top= 1659 + child 1660 + .getBoundingClientRect() 1661 + .top; 1371 1371 1372 - var parents= 1373 - Array.from( 1374 - root.querySelectorAll("*") 1375 - ) 1376 - .filter(function(parent){ 1377 - return ( 1378 - visible( 1379 - parent, 1380 - MIN_W, 1381 - MIN_H 1382 - )&& 1383 - parent.children&& 1384 - parent.children.length>=2&& 1385 - parent.children.length<= 1386 - MAX_PARENT_CHILDREN 1387 - ); 1388 - }); 1663 + var group=null; 1389 1389 1390 - var touched= 1391 - new Set(); 1665 + for(var i=0;i<groups.length;i++){ 1666 + if( 1667 + Math.abs( 1668 + groups[i].top-top 1669 + )<=ROW_TOLERANCE 1670 + ){ 1671 + group=groups[i]; 1672 + break; 1673 + } 1674 + } 1392 1392 1393 - parents.forEach(function(parent){ 1394 - var entries=[]; 1676 + if(!group){ 1677 + group={ 1678 + top:top, 1679 + items:[] 1680 + }; 1681 + groups.push(group); 1682 + } 1395 1395 1396 - Array.from( 1397 - parent.children 1398 - ).forEach(function(child){ 1399 - if( 1400 - !visible( 1401 - child, 1402 - MIN_W, 1403 - MIN_H 1404 - ) 1405 - ){ 1684 + group.items.push(child); 1685 + }); 1686 + 1687 + groups.forEach(function(group){ 1688 + if(group.items.length<2){ 1406 1406 return; 1407 1407 } 1408 1408 1409 - var target= 1410 - pickTarget(child); 1692 + var maxHeight=0; 1411 1411 1412 - if(!target)return; 1413 - 1414 - entries.push({ 1415 - target:target, 1416 - rect: 1417 - target.getBoundingClientRect() 1694 + group.items.forEach(function(item){ 1695 + maxHeight= 1696 + Math.max( 1697 + maxHeight, 1698 + item 1699 + .getBoundingClientRect() 1700 + .height 1701 + ); 1418 1418 }); 1419 - }); 1420 1420 1421 - groupRows( 1422 - entries 1423 - ).forEach(function(group){ 1424 - if(!validRow(group))return; 1704 + maxHeight= 1705 + Math.ceil(maxHeight); 1425 1425 1426 - var targets= 1427 - group.entries.map(function(entry){ 1428 - return entry.target; 1429 - }); 1707 + group.items.forEach(function(item){ 1708 + saveStyle( 1709 + item, 1710 + originalHeight, 1711 + "min-height" 1712 + ); 1430 1430 1431 - if( 1432 - !targets.some(function(el){ 1433 - return !touched.has(el); 1434 - }) 1435 - ){ 1436 - return; 1437 - } 1714 + item.style.setProperty( 1715 + "min-height", 1716 + maxHeight+"px" 1717 + ); 1438 1438 1439 - if(applyRow(group)){ 1440 - targets.forEach(function(el){ 1441 - touched.add(el); 1442 - }); 1443 - } 1719 + item.setAttribute( 1720 + "data-sn-master-equal-height", 1721 + "1" 1722 + ); 1723 + 1724 + managedHeight.add(item); 1725 + }); 1444 1444 }); 1445 1445 }); 1728 + }); 1729 + } 1446 1446 1447 - lastWidth=width; 1448 - hasApplied=true; 1731 + /* ======================================================= 1732 + RUN / RESPONSIVE SCHEDULING 1733 + ======================================================= */ 1734 + 1735 + function run(){ 1736 + if(running)return; 1737 + 1738 + running=true; 1739 + 1740 + try{ 1741 + resetRuntime(); 1742 + applyPlaceholderBadge(); 1743 + propagateDetailAccents(); 1744 + 1745 + var headers= 1746 + applyOverviewPalette(); 1747 + 1748 + makeThreeLineAreaLabels(); 1749 + makeFilledRedOrangeCTAsBorderless(); 1750 + 1751 + if( 1752 + window.innerWidth> 1753 + MOBILE_MAX 1754 + ){ 1755 + alignOverviewCards( 1756 + headers 1757 + ); 1758 + 1759 + equaliseDetailGrids(); 1760 + } 1449 1449 }finally{ 1450 - applying=false;1762 + running=false; 1451 1451 } 1452 1452 } 1453 1453 1454 - function resize(){1766 + function onResize(){ 1455 1455 if(resizeTimer){ 1456 1456 clearTimeout( 1457 1457 resizeTimer ... ... @@ -1462,19 +1462,40 @@ 1462 1462 setTimeout( 1463 1463 function(){ 1464 1464 resizeTimer=0; 1465 - calculate(false);1777 + run(); 1466 1466 }, 1467 1467 RESIZE_DEBOUNCE 1468 1468 ); 1469 1469 } 1470 1470 1471 - function waitImages(){ 1783 + async function waitForReady(){ 1784 + if( 1785 + document.readyState!=="complete" 1786 + ){ 1787 + await new Promise(function(resolve){ 1788 + window.addEventListener( 1789 + "load", 1790 + resolve, 1791 + {once:true} 1792 + ); 1793 + }); 1794 + } 1795 + 1796 + if( 1797 + document.fonts&& 1798 + document.fonts.ready 1799 + ){ 1800 + try{ 1801 + await document.fonts.ready; 1802 + }catch(error){} 1803 + } 1804 + 1472 1472 var images= 1473 1473 Array.from( 1474 1474 root.querySelectorAll("img") 1475 1475 ); 1476 1476 1477 - returnPromise.all(1810 + await Promise.all( 1478 1478 images.map(function(img){ 1479 1479 if(img.complete){ 1480 1480 return Promise.resolve(); ... ... @@ -1499,46 +1499,20 @@ 1499 1499 }); 1500 1500 }) 1501 1501 ); 1502 - } 1503 1503 1504 - async function initial(){ 1505 - if( 1506 - document.readyState!== 1507 - "complete" 1508 - ){ 1509 - await new Promise(function(resolve){ 1510 - addEventListener( 1511 - "load", 1512 - resolve, 1513 - {once:true} 1514 - ); 1515 - }); 1516 - } 1517 - 1518 - if( 1519 - document.fonts&& 1520 - document.fonts.ready 1521 - ){ 1522 - try{ 1523 - await document.fonts.ready; 1524 - }catch(error){} 1525 - } 1526 - 1527 - await waitImages(); 1528 - 1529 - // Exactly one initial layout calculation. 1530 - calculate(true); 1836 + run(); 1531 1531 } 1532 1532 1533 - addEventListener( 1839 + window.addEventListener( 1534 1534 "resize", 1535 - resize,1841 + onResize, 1536 1536 {passive:true} 1537 1537 ); 1538 1538 1539 - i nitial();1845 + waitForReady(); 1540 1540 })(); 1541 1541 </script> 1542 1542 1543 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 1544 -{{/html}}\n 1849 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END --> 1850 +{{/html}} 1851 +