Changes for page Project Planning & Organisation
Last modified by Veronika Kocher on Friday, 04 Sep 2026 14:45
From version 9.4
edited by Veronika Kocher
on Thursday, 03 Sep 2026 9:34
on Thursday, 03 Sep 2026 9:34
Change comment:
There is no comment for this version
To version 9.9
edited by Veronika Kocher
on Friday, 04 Sep 2026 14:23
on Friday, 04 Sep 2026 14:23
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -58,7 +58,7 @@ 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>61 +<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> ... ... @@ -415,6 +415,14 @@ 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 418 +<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_START --> 419 +{{include reference="Service Navigator.Art & Research Services Navigator.Code.TrainingWorkshopsBlock" author="target" /}} 420 +<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_END --> 421 + 422 +<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_START --> 423 +{{include reference="Service Navigator.Art & Research Services Navigator.Code.PracticalResourcesFallbackBlock" author="target" /}} 424 +<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_END --> 425 + 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> ... ... @@ -426,23 +426,132 @@ 426 426 {{/html}} 427 427 428 428 {{html clean="false"}} 429 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 430 -<style data-sn-horizontal-box-harmonizer="4"> 431 -[data-sn-equal-height-managed], 432 -[data-sn-first-section-aligned]{ 437 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 438 + 439 +<style data-sn-service-navigator-master="1"> 440 +/* ========================================================= 441 + MASTER TYPOGRAPHY 442 + ========================================================= */ 443 +#xwikicontent h1, 444 +#xwikicontent h2, 445 +#xwikicontent h3, 446 +#xwikicontent h4, 447 +#xwikicontent h5, 448 +#xwikicontent h6, 449 +#xwikicontent .box-title, 450 +#xwikicontent [role="heading"], 451 +#xwikicontent h1 a, 452 +#xwikicontent h2 a, 453 +#xwikicontent h3 a, 454 +#xwikicontent h4 a, 455 +#xwikicontent h5 a, 456 +#xwikicontent h6 a, 457 +#xwikicontent .box-title a, 458 +#xwikicontent [role="heading"] a{ 459 + text-align:left!important; 460 + text-justify:auto!important; 461 + word-spacing:normal!important; 462 +} 463 + 464 +/* ========================================================= 465 + COMING SOON / IN VORBEREITUNG 466 + ========================================================= */ 467 +.sn-coming-soon-badge{ 468 + display:inline-block; 469 + vertical-align:middle; 470 + margin-left:10px; 471 + padding:4px 8px; 472 + border-radius:14px; 473 + border:1px solid #efd9cc; 474 + background:#fff4ee; 475 + color:#8a4d36; 476 + font-size:11px; 477 + font-weight:700; 478 + letter-spacing:.055em; 479 + line-height:1.2; 480 + white-space:nowrap; 481 +} 482 + 483 +/* ========================================================= 484 + NATIVE / DETAIL CALLOUT GEOMETRY 485 + Preserve existing backgrounds. 486 + ========================================================= */ 487 +#xwikicontent .arsn-info, 488 +#xwikicontent .dmp-info, 489 +#xwikicontent .ido-info, 490 +#xwikicontent .pp-info, 491 +#xwikicontent .infomessage{ 492 + box-sizing:border-box!important; 493 + border-left:4px solid #21b6d7!important; 494 + border-radius:8px; 495 + text-align:left!important; 496 + word-spacing:normal!important; 497 +} 498 + 499 +#xwikicontent .arsn-warn, 500 +#xwikicontent .dmp-warn, 501 +#xwikicontent .ido-warn, 502 +#xwikicontent .pp-warn, 503 +#xwikicontent .warn, 504 +#xwikicontent .warning, 505 +#xwikicontent .warningmessage, 506 +#xwikicontent .errormessage{ 507 + box-sizing:border-box!important; 508 + border-left:4px solid #e94b13!important; 509 + border-radius:8px; 510 + text-align:left!important; 511 + word-spacing:normal!important; 512 +} 513 + 514 +[data-sn-master-equal-height], 515 +[data-sn-master-first-row]{ 433 433 box-sizing:border-box; 434 434 } 518 + 519 +/* ========================================================= 520 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 521 + ========================================================= */ 522 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 523 + display:grid!important; 524 + grid-template-columns:minmax(0,1fr)!important; 525 + grid-auto-rows:auto!important; 526 + width:100%!important; 527 + max-width:none!important; 528 + box-sizing:border-box!important; 529 + justify-items:start!important; 530 + align-items:start!important; 531 + gap:2px!important; 532 + text-align:left!important; 533 + text-align-last:left!important; 534 + text-justify:auto!important; 535 + word-spacing:normal!important; 536 + white-space:normal!important; 537 +} 538 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 539 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 540 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 541 + display:block!important; 542 + width:100%!important; 543 + margin:0!important; 544 + text-align:left!important; 545 + text-align-last:left!important; 546 + text-justify:auto!important; 547 + word-spacing:normal!important; 548 + white-space:normal!important; 549 +} 435 435 </style> 436 -<script data-sn-horizontal-box-harmonizer="4"> 551 + 552 +<script data-sn-service-navigator-master="1"> 437 437 (function(){ 438 438 "use strict"; 439 439 556 + var PAGE_KIND="detail"; 557 + var PLACEHOLDER=false; 558 + var PLACEHOLDER_LABEL="COMING SOON"; 559 + 440 440 var MOBILE_MAX=767; 441 441 var ROW_TOLERANCE=6; 442 - var MIN_W=150; 443 - var MIN_H=36; 444 - var MAX_PARENT_CHILDREN=16; 445 - var SEARCH_DEPTH=5; 562 + var RESIZE_DEBOUNCE=220; 446 446 447 447 var root= 448 448 document.getElementById("xwikicontent")|| ... ... @@ -452,93 +452,105 @@ 452 452 453 453 if(!root)return; 454 454 455 - var heightManaged=new Set(); 456 - var sectionManaged=new Set(); 457 - var originalMinHeight=new WeakMap(); 458 - var originalMarginTop=new WeakMap(); 459 - var raf=0; 572 + var managedHeight=new Set(); 573 + var managedMargin=new Set(); 574 + var originalHeight=new WeakMap(); 575 + var originalMargin=new WeakMap(); 460 460 461 - function num(v){ 462 - var n=parseFloat(v); 463 - return Number.isFinite(n)?n:0; 464 - } 577 + var resizeTimer=0; 578 + var running=false; 465 465 466 - function visible(el,minW,minH){ 467 - if(!el||el.nodeType!==1)return false; 468 - 469 - var s=getComputedStyle(el); 470 - 471 - if( 472 - s.display==="none"|| 473 - s.visibility==="hidden"|| 474 - Number(s.opacity)===0 475 - ){ 476 - return false; 580 + var THEMES=[ 581 + { 582 + name:"BLUE", 583 + accent:"#21b6d7", 584 + bg:"#eaf7fb", 585 + text:"#315d68", 586 + labels:[ 587 + "HIER STARTEN", 588 + "ENTSCHEIDEN", 589 + "ÜBERPRÜFEN & ANPASSEN", 590 + "START HERE", 591 + "DECIDE", 592 + "REVIEW & ADAPT" 593 + ] 594 + }, 595 + { 596 + name:"RED", 597 + accent:"#e94b13", 598 + bg:"#fff1ec", 599 + text:"#8a4d36", 600 + labels:[ 601 + "PLANEN & ORGANISIEREN", 602 + "ORGANISIEREN & DOKUMENTIEREN", 603 + "PUBLIZIEREN & PRÄSENTIEREN", 604 + "PLAN & ORGANISE", 605 + "PLAN & ORGANIZE", 606 + "ORGANISE & DOCUMENT", 607 + "ORGANIZE & DOCUMENT", 608 + "PUBLISH & PRESENT" 609 + ] 610 + }, 611 + { 612 + name:"YELLOW", 613 + accent:"#f0aa00", 614 + bg:"#fff8e7", 615 + text:"#785b17", 616 + labels:[ 617 + "SCHÜTZEN & KLÄREN", 618 + "STANDARDISIEREN & IDENTIFIZIEREN", 619 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 620 + "PROTECT & CLARIFY", 621 + "STANDARDISE & IDENTIFY", 622 + "STANDARDIZE & IDENTIFY", 623 + "OPEN, REUSE & MAKE FINDABLE" 624 + ] 625 + }, 626 + { 627 + name:"GREEN", 628 + accent:"#38b76a", 629 + bg:"#edf9f1", 630 + text:"#3f7451", 631 + labels:[ 632 + "INFRASTRUKTUR EINRICHTEN", 633 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 634 + "SPEICHERN & ZUGRIFF STEUERN", 635 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 636 + "SET UP INFRASTRUCTURE", 637 + "SET UP INFRASTRUCTURE & COLLABORATION", 638 + "STORE & CONTROL ACCESS", 639 + "REPOSITORY, PRESERVE & HAND OVER" 640 + ] 477 477 } 642 + ]; 478 478 479 - var r=el.getBoundingClientRect(); 480 - 481 - return ( 482 - r.width>=(minW||1)&& 483 - r.height>=(minH||1) 484 - ); 644 + function num(value){ 645 + var n=parseFloat(value); 646 + return Number.isFinite(n)?n:0; 485 485 } 486 486 487 - function excluded(el){ 488 - return ( 489 - !el.matches|| 490 - el.matches( 491 - "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]" 492 - ) 493 - ); 649 + function norm(value){ 650 + return String(value||"") 651 + .replace(/\s+/g," ") 652 + .trim() 653 + .toUpperCase(); 494 494 } 495 495 496 - function namedLikeBox(el){ 497 - var c= 498 - typeof el.className==="string" 499 - ? el.className 500 - : ""; 656 + function visible(el){ 657 + if(!el||el.nodeType!==1)return false; 501 501 502 - r eturn/(^|[s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([s_-]|$)/i.test(c);503 - }659 + var style=getComputedStyle(el); 660 + var rect=el.getBoundingClientRect(); 504 504 505 - function boxLike(el){ 506 - if(!visible(el,MIN_W,MIN_H)||excluded(el))return false; 507 - 508 - var s=getComputedStyle(el); 509 - var r=el.getBoundingClientRect(); 510 - 511 - var border= 512 - num(s.borderTopWidth)+ 513 - num(s.borderRightWidth)+ 514 - num(s.borderBottomWidth)+ 515 - num(s.borderLeftWidth); 516 - 517 - var radius=Math.max( 518 - num(s.borderTopLeftRadius), 519 - num(s.borderTopRightRadius), 520 - num(s.borderBottomLeftRadius), 521 - num(s.borderBottomRightRadius) 522 - ); 523 - 524 - var bg= 525 - s.backgroundColor&& 526 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 527 - s.backgroundColor!=="transparent"; 528 - 529 - var shadow= 530 - s.boxShadow&& 531 - s.boxShadow!=="none"; 532 - 533 533 return ( 534 - namedLikeBox(el)||535 - b order>=1||536 - (bg&&radius>=3)||537 - (shadow&&r.width>=180)663 + style.display!=="none"&& 664 + style.visibility!=="hidden"&& 665 + rect.width>20&& 666 + rect.height>4 538 538 ); 539 539 } 540 540 541 - function save Original(el,map,property){670 + function saveStyle(el,map,property){ 542 542 if(map.has(el))return; 543 543 544 544 map.set(el,{ ... ... @@ -547,7 +547,7 @@ 547 547 }); 548 548 } 549 549 550 - function restore Original(el,map,property){679 + function restoreStyle(el,map,property){ 551 551 var original=map.get(el); 552 552 553 553 if(original&&original.value){ ... ... @@ -561,247 +561,470 @@ 561 561 } 562 562 } 563 563 564 - function reset(){ 565 - heightManaged.forEach(function(el){566 - restore Original(693 + function resetRuntime(){ 694 + managedHeight.forEach(function(el){ 695 + restoreStyle( 567 567 el, 568 - original MinHeight,697 + originalHeight, 569 569 "min-height" 570 570 ); 571 - 572 572 el.removeAttribute( 573 - "data-sn-equal-height -managed"701 + "data-sn-master-equal-height" 574 574 ); 575 575 }); 576 576 577 - sectionManaged.forEach(function(el){578 - restore Original(705 + managedMargin.forEach(function(el){ 706 + restoreStyle( 579 579 el, 580 - originalMargin Top,708 + originalMargin, 581 581 "margin-top" 582 582 ); 583 - 584 584 el.removeAttribute( 585 - "data-sn-first- section-aligned"712 + "data-sn-master-first-row" 586 586 ); 587 587 }); 588 588 589 - heightManaged.clear();590 - sectionManaged.clear();716 + managedHeight.clear(); 717 + managedMargin.clear(); 591 591 } 592 592 593 - function pickTarget(child){594 - if(!visible(child,MIN_W,MIN_H))return null;720 + function themeFor(text){ 721 + var value=norm(text); 595 595 596 - if(boxLike(child)){ 597 - return child; 723 + for(var i=0;i<THEMES.length;i++){ 724 + for(var j=0;j<THEMES[i].labels.length;j++){ 725 + var label=THEMES[i].labels[j]; 726 + 727 + if( 728 + value===label|| 729 + value.indexOf(label+" ")===0|| 730 + value.indexOf(label+" -")===0|| 731 + value.indexOf(label+" ·")===0 732 + ){ 733 + return THEMES[i]; 734 + } 735 + } 598 598 } 599 599 600 - varcr=child.getBoundingClientRect();601 - var q=[];738 + return null; 739 + } 602 602 603 - Array.from(child.children||[]).forEach(function(el){ 604 - q.push({el:el,depth:1}); 741 + /* ======================================================= 742 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 743 + ======================================================= */ 744 + 745 + function colourDistance(a,b){ 746 + return Math.sqrt( 747 + Math.pow(a[0]-b[0],2)+ 748 + Math.pow(a[1]-b[1],2)+ 749 + Math.pow(a[2]-b[2],2) 750 + ); 751 + } 752 + 753 + function makeFilledRedOrangeCTAsBorderless(){ 754 + var RED_ORANGE=[233,75,19]; 755 + 756 + Array.from( 757 + root.querySelectorAll( 758 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 759 + ) 760 + ).forEach(function(el){ 761 + if(!visible(el))return; 762 + 763 + var style=getComputedStyle(el); 764 + var rgb=parseRGB(style.backgroundColor); 765 + 766 + if(!rgb)return; 767 + 768 + if( 769 + colourDistance( 770 + rgb, 771 + RED_ORANGE 772 + )>55 773 + ){ 774 + return; 775 + } 776 + 777 + var rect=el.getBoundingClientRect(); 778 + 779 + if( 780 + rect.width<80|| 781 + rect.height<24 782 + ){ 783 + return; 784 + } 785 + 786 + el.style.setProperty( 787 + "border", 788 + "none", 789 + "important" 790 + ); 791 + 792 + el.style.setProperty( 793 + "border-left", 794 + "none", 795 + "important" 796 + ); 797 + 798 + el.style.setProperty( 799 + "border-top", 800 + "none", 801 + "important" 802 + ); 803 + 804 + el.style.setProperty( 805 + "border-right", 806 + "none", 807 + "important" 808 + ); 809 + 810 + el.style.setProperty( 811 + "border-bottom", 812 + "none", 813 + "important" 814 + ); 815 + 816 + el.style.setProperty( 817 + "box-shadow", 818 + "none", 819 + "important" 820 + ); 605 605 }); 822 + } 606 606 607 - var best=null; 608 - var bestScore=-Infinity; 824 + /* ======================================================= 825 + FULL-WIDTH THREE-LINE AREA LABELS 826 + ======================================================= */ 609 609 610 - while(q.length){ 611 - var item=q.shift(); 612 - var el=item.el; 828 + function compactText(value){ 829 + return String(value||"") 830 + .replace(/\s+/g," ") 831 + .trim(); 832 + } 613 613 614 - if(!visible(el,MIN_W,MIN_H))continue; 834 + function makeThreeLineAreaLabels(){ 835 + Array.from( 836 + root.querySelectorAll( 837 + ".arsn-area-label" 838 + ) 839 + ).forEach(function(label){ 840 + if( 841 + label.getAttribute( 842 + "data-sn-three-line" 843 + )==="1" 844 + ){ 845 + return; 846 + } 615 615 616 - var r=el.getBoundingClientRect(); 848 + var number= 849 + label.querySelector( 850 + ":scope > .arsn-area-number" 851 + ); 617 617 853 + var action= 854 + label.querySelector( 855 + ":scope > .arsn-area-action" 856 + ); 857 + 618 618 if( 619 - r .width>=cr.width*.68&&620 - boxLike(el)859 + !number|| 860 + !action 621 621 ){ 622 - var widthFit= 623 - 1-Math.min( 624 - 1, 625 - Math.abs(cr.width-r.width)/ 626 - Math.max(1,cr.width) 627 - ); 862 + return; 863 + } 628 628 629 - var topFit= 630 - 1-Math.min( 631 - 1, 632 - Math.abs(cr.top-r.top)/100 633 - ); 865 + var clone= 866 + label.cloneNode(true); 634 634 635 - var score= 636 - widthFit*6+ 637 - topFit*3+ 638 - Math.min(r.height,900)/450+ 639 - Math.min(r.width*r.height,900000)/900000; 868 + var cloneNumber= 869 + clone.querySelector( 870 + ":scope > .arsn-area-number" 871 + ); 640 640 641 - if(score>bestScore){ 642 - best=el; 643 - bestScore=score; 644 - } 873 + var cloneAction= 874 + clone.querySelector( 875 + ":scope > .arsn-area-action" 876 + ); 877 + 878 + if(cloneNumber){ 879 + cloneNumber.remove(); 645 645 } 646 646 647 - if(item.depth<SEARCH_DEPTH){ 648 - Array.from(el.children||[]).forEach(function(next){ 649 - q.push({ 650 - el:next, 651 - depth:item.depth+1 652 - }); 653 - }); 882 + if(cloneAction){ 883 + cloneAction.remove(); 654 654 } 655 - } 656 656 657 - return best; 658 - } 886 + var titleText= 887 + compactText( 888 + clone.textContent 889 + ); 659 659 660 - function groupsByVisualRow(entries){ 661 - var groups=[]; 891 + if(!titleText){ 892 + return; 893 + } 662 662 663 - entries 664 - .slice() 665 - .sort(function(a,b){ 666 - return ( 667 - a.rect.top-b.rect.top|| 668 - a.rect.left-b.rect.left 895 + var numberNode= 896 + number.cloneNode(true); 897 + 898 + var actionNode= 899 + action.cloneNode(true); 900 + 901 + var titleNode= 902 + document.createElement( 903 + "span" 669 669 ); 670 - }) 671 - .forEach(function(entry){ 672 - var group=null; 673 673 674 - for(var i=0;i<groups.length;i++){ 675 - if( 676 - Math.abs( 677 - groups[i].top- 678 - entry.rect.top 679 - )<=ROW_TOLERANCE 680 - ){ 681 - group=groups[i]; 682 - break; 683 - } 684 - } 906 + titleNode.className= 907 + "sn-area-label-title"; 685 685 686 - if(!group){ 687 - group={ 688 - top:entry.rect.top, 689 - entries:[] 690 - }; 691 - groups.push(group); 692 - } 909 + titleNode.textContent= 910 + titleText; 693 693 694 - group.entries.push(entry); 695 - }); 912 + while(label.firstChild){ 913 + label.removeChild( 914 + label.firstChild 915 + ); 916 + } 696 696 697 - return groups; 918 + label.appendChild( 919 + numberNode 920 + ); 921 + 922 + label.appendChild( 923 + titleNode 924 + ); 925 + 926 + label.appendChild( 927 + actionNode 928 + ); 929 + 930 + label.setAttribute( 931 + "data-sn-three-line", 932 + "1" 933 + ); 934 + 935 + var head= 936 + label.closest( 937 + ".arsn-area-head" 938 + ); 939 + 940 + if(head){ 941 + head.style.setProperty( 942 + "width", 943 + "100%", 944 + "important" 945 + ); 946 + 947 + head.style.setProperty( 948 + "max-width", 949 + "100%", 950 + "important" 951 + ); 952 + 953 + head.style.setProperty( 954 + "box-sizing", 955 + "border-box", 956 + "important" 957 + ); 958 + } 959 + }); 698 698 } 699 699 700 - function validHorizontalGroup(group){ 701 - if(group.entries.length<2)return false; 962 + /* ======================================================= 963 + PLACEHOLDER BADGE 964 + ======================================================= */ 702 702 703 - var lefts= 704 - group.entries 705 - .map(function(e){return e.rect.left;}) 706 - .sort(function(a,b){return a-b;}); 966 + function applyPlaceholderBadge(){ 967 + if(!PLACEHOLDER)return; 707 707 708 708 if( 709 - lefts[lefts.length-1]-710 - lefts[0]<711 - 80970 + document.querySelector( 971 + ".sn-coming-soon-badge" 972 + ) 712 712 ){ 713 - return false;974 + return; 714 714 } 715 715 716 - var widths= 717 - group.entries 718 - .map(function(e){return e.rect.width;}) 719 - .filter(function(w){return w>0;}); 977 + var title= 978 + document.querySelector( 979 + "#document-title" 980 + )|| 981 + document.querySelector( 982 + "h1" 983 + ); 720 720 721 - if( widths.length<2)returnfalse;985 + if(!title)return; 722 722 723 - var minWidth=Math.min.apply(Math,widths); 724 - var maxWidth=Math.max.apply(Math,widths); 987 + var badge= 988 + document.createElement( 989 + "span" 990 + ); 725 725 726 - return ( 727 - maxWidth/ 728 - Math.max(1,minWidth)<= 729 - 1.9 992 + badge.className= 993 + "sn-coming-soon-badge"; 994 + 995 + badge.textContent= 996 + PLACEHOLDER_LABEL; 997 + 998 + badge.setAttribute( 999 + "aria-label", 1000 + PLACEHOLDER_LABEL 730 730 ); 731 - } 732 732 733 - function normalizeText(text){ 734 - return String(text||"") 735 - .replace(/s+/g," ") 736 - .trim() 737 - .toUpperCase(); 1003 + title.appendChild( 1004 + badge 1005 + ); 738 738 } 739 739 740 - function exactKnownFirstSection(el){ 741 - var text=normalizeText(el.textContent); 1008 + /* ======================================================= 1009 + DETAIL PAGE OWN-ACCENT PROPAGATION 1010 + ======================================================= */ 742 742 743 - return ( 744 - text==="HIER STARTEN"|| 745 - text==="ORGANISIEREN & DOKUMENTIEREN"|| 746 - text==="ENTSCHEIDEN"|| 747 - text==="START HERE"|| 748 - text==="GET STARTED"|| 749 - text==="ORGANISE & DOCUMENT"|| 750 - text==="ORGANIZE & DOCUMENT"|| 751 - text==="DECIDE" 1012 + function parseRGB(value){ 1013 + var match=String(value||"").match( 1014 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 752 752 ); 1016 + 1017 + if(!match)return null; 1018 + 1019 + return [ 1020 + Number(match[1]), 1021 + Number(match[2]), 1022 + Number(match[3]) 1023 + ]; 753 753 } 754 754 755 - function visuallyFirstSectionBar(card){ 756 - var cardRect=card.getBoundingClientRect(); 757 - var candidates=[]; 1026 + function distance(a,b){ 1027 + return Math.sqrt( 1028 + Math.pow(a[0]-b[0],2)+ 1029 + Math.pow(a[1]-b[1],2)+ 1030 + Math.pow(a[2]-b[2],2) 1031 + ); 1032 + } 758 758 1034 + function paletteMatch(cssColor){ 1035 + var rgb=parseRGB(cssColor); 1036 + 1037 + if(!rgb)return null; 1038 + 1039 + var palette=[ 1040 + {hex:"#21b6d7",rgb:[33,182,215]}, 1041 + {hex:"#e94b13",rgb:[233,75,19]}, 1042 + {hex:"#f0aa00",rgb:[240,170,0]}, 1043 + {hex:"#38b76a",rgb:[56,183,106]} 1044 + ]; 1045 + 1046 + var best=null; 1047 + var bestDistance=Infinity; 1048 + 1049 + palette.forEach(function(item){ 1050 + var d=distance(rgb,item.rgb); 1051 + 1052 + if(d<bestDistance){ 1053 + best=item; 1054 + bestDistance=d; 1055 + } 1056 + }); 1057 + 1058 + return bestDistance<=30 1059 + ?best 1060 + :null; 1061 + } 1062 + 1063 + function propagateDetailAccents(){ 1064 + if(PAGE_KIND!=="detail")return; 1065 + 759 759 Array.from( 760 - card.querySelectorAll( 761 - "div,p,span,strong,h3,h4,h5,h6" 1067 + root.querySelectorAll( 1068 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 1069 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 762 762 ) 763 763 ).forEach(function(el){ 764 - if(!visible(el,20,6))return; 765 - if(excluded(el))return; 1072 + if(!visible(el))return; 766 766 767 - var r=el.getBoundingClientRect(); 768 - var relativeTop=r.top-cardRect.top; 1074 + var style=getComputedStyle(el); 769 769 770 770 if( 771 - relativeTop<45|| 772 - relativeTop>cardRect.height*.72 1077 + num(style.borderTopWidth)>=2 773 773 ){ 774 - return; 1079 + var match= 1080 + paletteMatch( 1081 + style.borderTopColor 1082 + ); 1083 + 1084 + if(match){ 1085 + el.style.setProperty( 1086 + "border-left", 1087 + "4px solid "+match.hex, 1088 + "important" 1089 + ); 1090 + } 775 775 } 1092 + }); 776 776 777 - var widthRatio= 778 - r.width/ 779 - Math.max(1,cardRect.width); 1094 + // Warning families: explicit safety override. 1095 + Array.from( 1096 + root.querySelectorAll( 1097 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 1098 + ".warn,.warning,.warningmessage,.errormessage" 1099 + ) 1100 + ).forEach(function(el){ 1101 + if(!visible(el))return; 780 780 781 - if( 782 - widthRatio<.55|| 783 - widthRatio>1.05|| 784 - r.height>54 785 - ){ 786 - return; 787 - } 1103 + el.style.setProperty( 1104 + "border-left", 1105 + "4px solid #e94b13", 1106 + "important" 1107 + ); 1108 + }); 788 788 789 - var text=normalizeText(el.textContent); 1110 + // Info families: explicit orientation override. 1111 + Array.from( 1112 + root.querySelectorAll( 1113 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 1114 + ) 1115 + ).forEach(function(el){ 1116 + if(!visible(el))return; 790 790 791 - if( 792 - text.length<2|| 793 - text.length>90 794 - ){ 795 - return; 796 - } 1118 + el.style.setProperty( 1119 + "border-left", 1120 + "4px solid #21b6d7", 1121 + "important" 1122 + ); 1123 + }); 1124 + } 797 797 798 - var style=getComputedStyle(el); 1126 + /* ======================================================= 1127 + OVERVIEW SEMANTIC THEME PALETTE 1128 + ======================================================= */ 799 799 800 - var bg= 801 - style.backgroundColor&& 802 - style.backgroundColor!=="rgba(0, 0, 0, 0)"&& 803 - style.backgroundColor!=="transparent"; 1130 + function smallestThemeHeaders(){ 1131 + return Array.from( 1132 + root.querySelectorAll( 1133 + "div,span,p,strong,h3,h4,h5,h6" 1134 + ) 1135 + ).filter(function(el){ 1136 + if(!visible(el))return false; 1137 + if(!themeFor(el.textContent))return false; 804 804 1139 + return !Array.from( 1140 + el.children||[] 1141 + ).some(function(child){ 1142 + return !!themeFor( 1143 + child.textContent 1144 + ); 1145 + }); 1146 + }); 1147 + } 1148 + 1149 + function findOverviewCard(header){ 1150 + var node=header.parentElement; 1151 + var candidates=[]; 1152 + 1153 + while(node&&node!==root){ 1154 + var rect=node.getBoundingClientRect(); 1155 + var style=getComputedStyle(node); 1156 + 805 805 var border= 806 806 num(style.borderTopWidth)+ 807 807 num(style.borderRightWidth)+ ... ... @@ -808,315 +808,677 @@ 808 808 num(style.borderBottomWidth)+ 809 809 num(style.borderLeftWidth); 810 810 811 - var mostlyUpper= 812 - text.length>=3&& 813 - text===text.toUpperCase(); 814 - 815 - var exact=exactKnownFirstSection(el); 816 - 817 - var score= 818 - (exact?20:0)+ 819 - (bg?6:0)+ 820 - (border>=1?2:0)+ 821 - (mostlyUpper?4:0)+ 822 - (num(style.fontWeight)>=600?1:0); 823 - 824 - if(score>=7){ 825 - candidates.push({ 826 - el:el, 827 - relativeTop:relativeTop, 828 - width:r.width, 829 - score:score 830 - }); 1163 + if( 1164 + rect.width>=220&& 1165 + rect.width<=800&& 1166 + rect.height>=120&& 1167 + border>=1 1168 + ){ 1169 + candidates.push(node); 831 831 } 832 - }); 833 833 1172 + node=node.parentElement; 1173 + } 1174 + 834 834 if(!candidates.length)return null; 835 835 836 836 candidates.sort(function(a,b){ 837 - if(a.score!==b.score)return b.score-a.score; 838 - if(Math.abs(a.relativeTop-b.relativeTop)>3){ 839 - return a.relativeTop-b.relativeTop; 840 - } 841 - return b.width-a.width; 1178 + return ( 1179 + b.getBoundingClientRect().height- 1180 + a.getBoundingClientRect().height 1181 + ); 842 842 }); 843 843 844 - // For exact known labels always prefer the earliest exact match. 845 - var exacts=candidates.filter(function(c){ 846 - return exactKnownFirstSection(c.el); 847 - }); 1184 + return candidates[0]; 1185 + } 848 848 849 - if(exacts.length){ 850 - exacts.sort(function(a,b){ 851 - return a.relativeTop-b.relativeTop||b.width-a.width; 852 - }); 853 - return exacts[0].el; 854 - } 1187 + function rowCandidates(link,card){ 1188 + var result=[]; 1189 + var cardRect= 1190 + card.getBoundingClientRect(); 855 855 856 - // Generic fallback: earliest high-confidence bar. 857 - candidates.sort(function(a,b){ 858 - return a.relativeTop-b.relativeTop||b.score-a.score||b.width-a.width; 859 - }); 1192 + var node=link; 860 860 861 - return candidates[0].el; 862 - } 1194 + while(node&&node!==card){ 1195 + if(visible(node)){ 1196 + var rect= 1197 + node.getBoundingClientRect(); 863 863 864 - function alignFirstSections(cards){ 865 - var rows= 866 - cards.map(function(card){ 867 - var bar= 868 - visuallyFirstSectionBar(card); 1199 + if( 1200 + rect.height<=105&& 1201 + rect.width>= 1202 + cardRect.width*.50&& 1203 + rect.width<= 1204 + cardRect.width*1.03 1205 + ){ 1206 + result.push(node); 1207 + } 1208 + } 869 869 870 - if(!bar)return null; 1210 + node=node.parentElement; 1211 + } 871 871 872 - varcardRect=873 - card.getBoundingClientRect();1213 + return result; 1214 + } 874 874 875 - var barRect= 876 - bar.getBoundingClientRect(); 1216 + function chooseOuterRow( 1217 + candidates, 1218 + link 1219 + ){ 1220 + if(!candidates.length){ 1221 + return link; 1222 + } 877 877 878 - return {879 - card:card,880 - bar:bar,881 - relativeTop:882 - barRect.top-cardRect.top,883 - label:884 - normalizeText(bar.textContent)885 - };1224 + var bordered= 1225 + candidates.filter(function(el){ 1226 + return ( 1227 + num( 1228 + getComputedStyle(el) 1229 + .borderLeftWidth 1230 + )>=1 1231 + ); 886 886 }); 887 887 888 - // Conservative: only align when every card in the horizontal row 889 - // has a reliable first section bar. 890 - if( 891 - rows.some(function(row){ 892 - return !row; 893 - }) 894 - ){ 895 - return null; 1234 + var pool= 1235 + bordered.length 1236 + ?bordered 1237 + :candidates; 1238 + 1239 + pool.sort(function(a,b){ 1240 + var ar= 1241 + a.getBoundingClientRect(); 1242 + 1243 + var br= 1244 + b.getBoundingClientRect(); 1245 + 1246 + return ( 1247 + ar.left-br.left|| 1248 + br.width-ar.width 1249 + ); 1250 + }); 1251 + 1252 + return pool[0]||link; 1253 + } 1254 + 1255 + function applyOverviewPalette(){ 1256 + if(PAGE_KIND!=="overview"){ 1257 + return []; 896 896 } 897 897 898 - var targetTop= 899 - Math.max.apply( 900 - Math, 901 - rows.map(function(row){ 902 - return row.relativeTop; 1260 + var headers= 1261 + smallestThemeHeaders() 1262 + .map(function(el){ 1263 + return { 1264 + el:el, 1265 + theme: 1266 + themeFor( 1267 + el.textContent 1268 + ), 1269 + card: 1270 + findOverviewCard( 1271 + el 1272 + ) 1273 + }; 903 903 }) 904 - ); 1275 + .filter(function(row){ 1276 + return !!row.card; 1277 + }); 905 905 906 - rows.forEach(function(row){ 907 - var delta= 908 - targetTop- 909 - row.relativeTop; 1279 + var unique=[]; 1280 + var seenHeaders=new Set(); 910 910 911 - if(delta<=1)return; 1282 + headers.forEach(function(row){ 1283 + var key= 1284 + row.theme.name+ 1285 + "|"+ 1286 + Math.round( 1287 + row.card 1288 + .getBoundingClientRect() 1289 + .left 1290 + )+ 1291 + "|"+ 1292 + Math.round( 1293 + row.el 1294 + .getBoundingClientRect() 1295 + .top 1296 + ); 912 912 913 - saveOriginal( 914 - row.bar, 915 - originalMarginTop, 916 - "margin-top" 1298 + if(!seenHeaders.has(key)){ 1299 + seenHeaders.add(key); 1300 + unique.push(row); 1301 + } 1302 + }); 1303 + 1304 + unique.forEach(function(row){ 1305 + var headerRect= 1306 + row.el 1307 + .getBoundingClientRect(); 1308 + 1309 + row.el.style.setProperty( 1310 + "background", 1311 + row.theme.bg, 1312 + "important" 917 917 ); 918 918 919 - var currentMargin= 920 - num( 921 - getComputedStyle( 922 - row.bar 923 - ).marginTop 924 - ); 1315 + row.el.style.setProperty( 1316 + "color", 1317 + row.theme.text, 1318 + "important" 1319 + ); 925 925 926 - row.bar.style.setProperty( 927 - "margin-top", 928 - ( 929 - currentMargin+ 930 - delta 931 - )+"px" 1321 + row.el.style.setProperty( 1322 + "text-align", 1323 + "left", 1324 + "important" 932 932 ); 933 933 934 - row.bar.setAttribute( 935 - "data-sn-first-section-aligned", 936 - "4" 1327 + row.el.style.setProperty( 1328 + "word-spacing", 1329 + "normal", 1330 + "important" 937 937 ); 938 938 939 - sectionManaged.add(row.bar); 1333 + var later= 1334 + unique 1335 + .filter(function(other){ 1336 + return ( 1337 + other.card===row.card&& 1338 + other.el 1339 + .getBoundingClientRect() 1340 + .top> 1341 + headerRect.top+2 1342 + ); 1343 + }) 1344 + .sort(function(a,b){ 1345 + return ( 1346 + a.el 1347 + .getBoundingClientRect() 1348 + .top- 1349 + b.el 1350 + .getBoundingClientRect() 1351 + .top 1352 + ); 1353 + }); 1354 + 1355 + var stopTop= 1356 + later.length 1357 + ?later[0].el 1358 + .getBoundingClientRect() 1359 + .top 1360 + :Infinity; 1361 + 1362 + Array.from( 1363 + row.card.querySelectorAll("a") 1364 + ).forEach(function(link){ 1365 + if(!visible(link))return; 1366 + 1367 + var rect= 1368 + link.getBoundingClientRect(); 1369 + 1370 + if( 1371 + rect.top<= 1372 + headerRect.bottom-2|| 1373 + rect.top>= 1374 + stopTop-2 1375 + ){ 1376 + return; 1377 + } 1378 + 1379 + var candidates= 1380 + rowCandidates( 1381 + link, 1382 + row.card 1383 + ); 1384 + 1385 + var target= 1386 + chooseOuterRow( 1387 + candidates, 1388 + link 1389 + ); 1390 + 1391 + candidates.forEach(function(el){ 1392 + el.style.setProperty( 1393 + "border-left", 1394 + "0 solid transparent", 1395 + "important" 1396 + ); 1397 + }); 1398 + 1399 + target.style.setProperty( 1400 + "border-left", 1401 + "3px solid "+ 1402 + row.theme.accent, 1403 + "important" 1404 + ); 1405 + 1406 + target.style.setProperty( 1407 + "box-sizing", 1408 + "border-box", 1409 + "important" 1410 + ); 1411 + }); 940 940 }); 941 941 942 - return { 943 - labels: 944 - rows.map(function(row){ 945 - return row.label; 946 - }), 947 - targetRelativeTop: 948 - Math.round(targetTop) 949 - }; 1414 + return unique; 950 950 } 951 951 952 - function applyGroup(group){ 953 - if(!validHorizontalGroup(group)){ 954 - return null; 1417 + /* ======================================================= 1418 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1419 + ======================================================= */ 1420 + 1421 + function alignOverviewCards(headers){ 1422 + if( 1423 + PAGE_KIND!=="overview"|| 1424 + window.innerWidth<=MOBILE_MAX 1425 + ){ 1426 + return; 955 955 } 956 956 957 957 var cards=[]; 958 958 var seen=new Set(); 959 959 960 - group.entries.forEach(function(entry){961 - if(!seen.has( entry.target)){962 - seen.add( entry.target);963 - cards.push( entry.target);1432 + headers.forEach(function(row){ 1433 + if(!seen.has(row.card)){ 1434 + seen.add(row.card); 1435 + cards.push(row.card); 964 964 } 965 965 }); 966 966 967 - if(cards.length<2)return null; 1439 + if(cards.length<2){ 1440 + return; 1441 + } 968 968 969 - varfirstSection=970 - alignFirstSections(cards);1443 + // Group cards by actual top position. 1444 + var groups=[]; 971 971 972 - // The section alignment can change natural card heights. 973 - // Measure only afterwards. 974 - var maxHeight=0; 975 - 976 976 cards.forEach(function(card){ 977 - maxHeight=Math.max( 978 - maxHeight, 979 - card.getBoundingClientRect().height 980 - ); 1447 + var top= 1448 + card.getBoundingClientRect().top; 1449 + 1450 + var group=null; 1451 + 1452 + for(var i=0;i<groups.length;i++){ 1453 + if( 1454 + Math.abs( 1455 + groups[i].top-top 1456 + )<=ROW_TOLERANCE 1457 + ){ 1458 + group=groups[i]; 1459 + break; 1460 + } 1461 + } 1462 + 1463 + if(!group){ 1464 + group={ 1465 + top:top, 1466 + cards:[] 1467 + }; 1468 + groups.push(group); 1469 + } 1470 + 1471 + group.cards.push(card); 981 981 }); 982 982 983 - maxHeight=Math.ceil(maxHeight); 1474 + groups.forEach(function(group){ 1475 + if(group.cards.length<2){ 1476 + return; 1477 + } 984 984 985 - if(maxHeight<MIN_H)return null; 1479 + var firstHeaders= 1480 + group.cards.map(function(card){ 1481 + var candidates= 1482 + headers 1483 + .filter(function(row){ 1484 + return row.card===card; 1485 + }) 1486 + .sort(function(a,b){ 1487 + return ( 1488 + a.el 1489 + .getBoundingClientRect() 1490 + .top- 1491 + b.el 1492 + .getBoundingClientRect() 1493 + .top 1494 + ); 1495 + }); 986 986 987 - cards.forEach(function(card){ 988 - saveOriginal( 989 - card, 990 - originalMinHeight, 991 - "min-height" 992 - ); 1497 + return candidates.length 1498 + ?candidates[0] 1499 + :null; 1500 + }); 993 993 994 - card.style.setProperty( 995 - "min-height", 996 - maxHeight+"px" 997 - ); 1502 + if( 1503 + !firstHeaders.some(function(row){ 1504 + return !row; 1505 + }) 1506 + ){ 1507 + var targetTop= 1508 + Math.max.apply( 1509 + Math, 1510 + firstHeaders.map(function(row){ 1511 + return ( 1512 + row.el 1513 + .getBoundingClientRect() 1514 + .top- 1515 + row.card 1516 + .getBoundingClientRect() 1517 + .top 1518 + ); 1519 + }) 1520 + ); 998 998 999 - card.setAttribute( 1000 - "data-sn-equal-height-managed", 1001 - "4" 1002 - ); 1522 + firstHeaders.forEach(function(row){ 1523 + var relativeTop= 1524 + row.el 1525 + .getBoundingClientRect() 1526 + .top- 1527 + row.card 1528 + .getBoundingClientRect() 1529 + .top; 1003 1003 1004 - heightManaged.add(card);1005 - });1531 + var delta= 1532 + targetTop-relativeTop; 1006 1006 1007 - return { 1008 - cards:cards.length, 1009 - height:maxHeight, 1010 - firstSection:firstSection 1011 - }; 1534 + if(delta>1){ 1535 + saveStyle( 1536 + row.el, 1537 + originalMargin, 1538 + "margin-top" 1539 + ); 1540 + 1541 + var current= 1542 + num( 1543 + getComputedStyle( 1544 + row.el 1545 + ).marginTop 1546 + ); 1547 + 1548 + row.el.style.setProperty( 1549 + "margin-top", 1550 + ( 1551 + current+delta 1552 + )+"px" 1553 + ); 1554 + 1555 + row.el.setAttribute( 1556 + "data-sn-master-first-row", 1557 + "1" 1558 + ); 1559 + 1560 + managedMargin.add( 1561 + row.el 1562 + ); 1563 + } 1564 + }); 1565 + } 1566 + 1567 + var maxHeight=0; 1568 + 1569 + group.cards.forEach(function(card){ 1570 + maxHeight= 1571 + Math.max( 1572 + maxHeight, 1573 + card 1574 + .getBoundingClientRect() 1575 + .height 1576 + ); 1577 + }); 1578 + 1579 + maxHeight= 1580 + Math.ceil(maxHeight); 1581 + 1582 + group.cards.forEach(function(card){ 1583 + saveStyle( 1584 + card, 1585 + originalHeight, 1586 + "min-height" 1587 + ); 1588 + 1589 + card.style.setProperty( 1590 + "min-height", 1591 + maxHeight+"px" 1592 + ); 1593 + 1594 + card.setAttribute( 1595 + "data-sn-master-equal-height", 1596 + "1" 1597 + ); 1598 + 1599 + managedHeight.add( 1600 + card 1601 + ); 1602 + }); 1603 + }); 1012 1012 } 1013 1013 1014 - function run(){ 1015 - reset(); 1606 + /* ======================================================= 1607 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1608 + ======================================================= */ 1016 1016 1610 + function equaliseDetailGrids(){ 1017 1017 if( 1612 + PAGE_KIND!=="detail"|| 1018 1018 window.innerWidth<=MOBILE_MAX 1019 1019 ){ 1020 1020 return; 1021 1021 } 1022 1022 1023 - var parents= 1618 + var selectors=[ 1619 + ".arsn-grid", 1620 + ".arsn-grid-2", 1621 + ".arsn-grid-3", 1622 + ".dmp-grid", 1623 + ".ido-grid", 1624 + ".pp-grid" 1625 + ]; 1626 + 1627 + selectors.forEach(function(selector){ 1024 1024 Array.from( 1025 - root.querySelectorAll("*") 1026 - ).filter(function(parent){ 1027 - return ( 1028 - visible(parent,MIN_W,MIN_H)&& 1029 - parent.children&& 1030 - parent.children.length>=2&& 1031 - parent.children.length<=MAX_PARENT_CHILDREN 1032 - ); 1033 - }); 1629 + root.querySelectorAll(selector) 1630 + ).forEach(function(grid){ 1631 + var children= 1632 + Array.from( 1633 + grid.children||[] 1634 + ).filter(visible); 1034 1034 1035 - var touched=new Set(); 1636 + if(children.length<2){ 1637 + return; 1638 + } 1036 1036 1037 - parents.forEach(function(parent){ 1038 - var entries=[]; 1640 + var groups=[]; 1039 1039 1040 - Array.from(parent.children).forEach(function(child){ 1041 - if(!visible(child,MIN_W,MIN_H))return; 1642 + children.forEach(function(child){ 1643 + var top= 1644 + child 1645 + .getBoundingClientRect() 1646 + .top; 1042 1042 1043 - var target=pickTarget(child); 1044 - if(!target)return; 1648 + var group=null; 1045 1045 1046 - entries.push({ 1047 - target:target, 1048 - rect:target.getBoundingClientRect() 1650 + for(var i=0;i<groups.length;i++){ 1651 + if( 1652 + Math.abs( 1653 + groups[i].top-top 1654 + )<=ROW_TOLERANCE 1655 + ){ 1656 + group=groups[i]; 1657 + break; 1658 + } 1659 + } 1660 + 1661 + if(!group){ 1662 + group={ 1663 + top:top, 1664 + items:[] 1665 + }; 1666 + groups.push(group); 1667 + } 1668 + 1669 + group.items.push(child); 1049 1049 }); 1050 - }); 1051 1051 1052 - if(entries.length<2)return; 1672 + groups.forEach(function(group){ 1673 + if(group.items.length<2){ 1674 + return; 1675 + } 1053 1053 1054 - groupsByVisualRow(entries).forEach(function(group){ 1055 - if(!validHorizontalGroup(group))return; 1677 + var maxHeight=0; 1056 1056 1057 - var signature= 1058 - group.entries.map(function(entry){ 1059 - return entry.target; 1679 + group.items.forEach(function(item){ 1680 + maxHeight= 1681 + Math.max( 1682 + maxHeight, 1683 + item 1684 + .getBoundingClientRect() 1685 + .height 1686 + ); 1060 1060 }); 1061 1061 1062 - if( 1063 - !signature.some(function(el){ 1064 - return !touched.has(el); 1065 - }) 1066 - ){ 1067 - return; 1068 - } 1689 + maxHeight= 1690 + Math.ceil(maxHeight); 1069 1069 1070 - var applied= 1071 - applyGroup(group); 1692 + group.items.forEach(function(item){ 1693 + saveStyle( 1694 + item, 1695 + originalHeight, 1696 + "min-height" 1697 + ); 1072 1072 1073 - if(applied){ 1074 - signature.forEach(function(el){ 1075 - touched.add(el); 1699 + item.style.setProperty( 1700 + "min-height", 1701 + maxHeight+"px" 1702 + ); 1703 + 1704 + item.setAttribute( 1705 + "data-sn-master-equal-height", 1706 + "1" 1707 + ); 1708 + 1709 + managedHeight.add(item); 1076 1076 }); 1077 - } 1711 + }); 1078 1078 }); 1079 1079 }); 1080 1080 } 1081 1081 1082 - function schedule(){ 1083 - if(raf)cancelAnimationFrame(raf); 1716 + /* ======================================================= 1717 + RUN / RESPONSIVE SCHEDULING 1718 + ======================================================= */ 1084 1084 1085 - raf=requestAnimationFrame(function(){ 1086 - raf=requestAnimationFrame(function(){ 1087 - raf=0; 1088 - run(); 1089 - }); 1090 - }); 1720 + function run(){ 1721 + if(running)return; 1722 + 1723 + running=true; 1724 + 1725 + try{ 1726 + resetRuntime(); 1727 + applyPlaceholderBadge(); 1728 + propagateDetailAccents(); 1729 + 1730 + var headers= 1731 + applyOverviewPalette(); 1732 + 1733 + makeThreeLineAreaLabels(); 1734 + makeFilledRedOrangeCTAsBorderless(); 1735 + 1736 + if( 1737 + window.innerWidth> 1738 + MOBILE_MAX 1739 + ){ 1740 + alignOverviewCards( 1741 + headers 1742 + ); 1743 + 1744 + equaliseDetailGrids(); 1745 + } 1746 + }finally{ 1747 + running=false; 1748 + } 1091 1091 } 1092 1092 1093 - addEventListener("resize",schedule,{passive:true}); 1094 - addEventListener("load",schedule,{once:true}); 1751 + function onResize(){ 1752 + if(resizeTimer){ 1753 + clearTimeout( 1754 + resizeTimer 1755 + ); 1756 + } 1095 1095 1096 - root.addEventListener( 1097 - "click", 1098 - function(){ 1099 - setTimeout(schedule,0); 1100 - }, 1101 - true 1102 - ); 1758 + resizeTimer= 1759 + setTimeout( 1760 + function(){ 1761 + resizeTimer=0; 1762 + run(); 1763 + }, 1764 + RESIZE_DEBOUNCE 1765 + ); 1766 + } 1103 1103 1104 - Array.from(root.querySelectorAll("img")).forEach(function(img){ 1105 - if(!img.complete){ 1106 - img.addEventListener("load",schedule,{once:true}); 1768 + async function waitForReady(){ 1769 + if( 1770 + document.readyState!=="complete" 1771 + ){ 1772 + await new Promise(function(resolve){ 1773 + window.addEventListener( 1774 + "load", 1775 + resolve, 1776 + {once:true} 1777 + ); 1778 + }); 1107 1107 } 1108 - }); 1109 1109 1110 - if(document.fonts&&document.fonts.ready){ 1111 - document.fonts.ready.then(schedule); 1781 + if( 1782 + document.fonts&& 1783 + document.fonts.ready 1784 + ){ 1785 + try{ 1786 + await document.fonts.ready; 1787 + }catch(error){} 1788 + } 1789 + 1790 + var images= 1791 + Array.from( 1792 + root.querySelectorAll("img") 1793 + ); 1794 + 1795 + await Promise.all( 1796 + images.map(function(img){ 1797 + if(img.complete){ 1798 + return Promise.resolve(); 1799 + } 1800 + 1801 + return new Promise(function(resolve){ 1802 + var done=function(){ 1803 + resolve(); 1804 + }; 1805 + 1806 + img.addEventListener( 1807 + "load", 1808 + done, 1809 + {once:true} 1810 + ); 1811 + 1812 + img.addEventListener( 1813 + "error", 1814 + done, 1815 + {once:true} 1816 + ); 1817 + }); 1818 + }) 1819 + ); 1820 + 1821 + run(); 1112 1112 } 1113 1113 1114 - schedule(); 1115 - setTimeout(schedule,200); 1116 - setTimeout(schedule,650); 1117 - setTimeout(schedule,1400); 1824 + window.addEventListener( 1825 + "resize", 1826 + onResize, 1827 + {passive:true} 1828 + ); 1829 + 1830 + waitForReady(); 1118 1118 })(); 1119 1119 </script> 1120 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 1833 + 1834 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END --> 1121 1121 {{/html}} 1122 1122