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