Changes for page Art & Research Services Navigator
Last modified by Veronika Kocher on Friday, 18 Sep 2026 16:47
From version 39.21
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
To version 39.25
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
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -640,21 +640,132 @@ 640 640 ))) 641 641 642 642 {{html clean="false"}} 643 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 644 -<style data-sn-horizontal-box-harmonizer="1"> 645 -[data-sn-equal-height-managed="1"]{box-sizing:border-box} 646 -@media(max-width:767px){ 647 - [data-sn-equal-height-managed="1"]{min-height:0!important} 643 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 644 + 645 +<style data-sn-service-navigator-master="1"> 646 +/* ========================================================= 647 + MASTER TYPOGRAPHY 648 + ========================================================= */ 649 +#xwikicontent h1, 650 +#xwikicontent h2, 651 +#xwikicontent h3, 652 +#xwikicontent h4, 653 +#xwikicontent h5, 654 +#xwikicontent h6, 655 +#xwikicontent .box-title, 656 +#xwikicontent [role="heading"], 657 +#xwikicontent h1 a, 658 +#xwikicontent h2 a, 659 +#xwikicontent h3 a, 660 +#xwikicontent h4 a, 661 +#xwikicontent h5 a, 662 +#xwikicontent h6 a, 663 +#xwikicontent .box-title a, 664 +#xwikicontent [role="heading"] a{ 665 + text-align:left!important; 666 + text-justify:auto!important; 667 + word-spacing:normal!important; 648 648 } 669 + 670 +/* ========================================================= 671 + COMING SOON / IN VORBEREITUNG 672 + ========================================================= */ 673 +.sn-coming-soon-badge{ 674 + display:inline-block; 675 + vertical-align:middle; 676 + margin-left:10px; 677 + padding:4px 8px; 678 + border-radius:14px; 679 + border:1px solid #efd9cc; 680 + background:#fff4ee; 681 + color:#8a4d36; 682 + font-size:11px; 683 + font-weight:700; 684 + letter-spacing:.055em; 685 + line-height:1.2; 686 + white-space:nowrap; 687 +} 688 + 689 +/* ========================================================= 690 + NATIVE / DETAIL CALLOUT GEOMETRY 691 + Preserve existing backgrounds. 692 + ========================================================= */ 693 +#xwikicontent .arsn-info, 694 +#xwikicontent .dmp-info, 695 +#xwikicontent .ido-info, 696 +#xwikicontent .pp-info, 697 +#xwikicontent .infomessage{ 698 + box-sizing:border-box!important; 699 + border-left:4px solid #21b6d7!important; 700 + border-radius:8px; 701 + text-align:left!important; 702 + word-spacing:normal!important; 703 +} 704 + 705 +#xwikicontent .arsn-warn, 706 +#xwikicontent .dmp-warn, 707 +#xwikicontent .ido-warn, 708 +#xwikicontent .pp-warn, 709 +#xwikicontent .warn, 710 +#xwikicontent .warning, 711 +#xwikicontent .warningmessage, 712 +#xwikicontent .errormessage{ 713 + box-sizing:border-box!important; 714 + border-left:4px solid #e94b13!important; 715 + border-radius:8px; 716 + text-align:left!important; 717 + word-spacing:normal!important; 718 +} 719 + 720 +[data-sn-master-equal-height], 721 +[data-sn-master-first-row]{ 722 + box-sizing:border-box; 723 +} 724 + 725 +/* ========================================================= 726 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 727 + ========================================================= */ 728 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 729 + display:grid!important; 730 + grid-template-columns:minmax(0,1fr)!important; 731 + grid-auto-rows:auto!important; 732 + width:100%!important; 733 + max-width:none!important; 734 + box-sizing:border-box!important; 735 + justify-items:start!important; 736 + align-items:start!important; 737 + gap:2px!important; 738 + text-align:left!important; 739 + text-align-last:left!important; 740 + text-justify:auto!important; 741 + word-spacing:normal!important; 742 + white-space:normal!important; 743 +} 744 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 745 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 746 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 747 + display:block!important; 748 + width:100%!important; 749 + margin:0!important; 750 + text-align:left!important; 751 + text-align-last:left!important; 752 + text-justify:auto!important; 753 + word-spacing:normal!important; 754 + white-space:normal!important; 755 +} 649 649 </style> 650 -<script data-sn-horizontal-box-harmonizer="1"> 757 + 758 +<script data-sn-service-navigator-master="1"> 651 651 (function(){ 652 652 "use strict"; 653 653 762 + var PAGE_KIND="overview"; 763 + var PLACEHOLDER=false; 764 + var PLACEHOLDER_LABEL="COMING SOON"; 765 + 654 654 var MOBILE_MAX=767; 655 - var ROW_TOLERANCE=4; 656 - var MIN_W=150; 657 - var MIN_H=36; 767 + var ROW_TOLERANCE=6; 768 + var RESIZE_DEBOUNCE=220; 658 658 659 659 var root= 660 660 document.getElementById("xwikicontent")|| ... ... @@ -664,212 +664,1268 @@ 664 664 665 665 if(!root)return; 666 666 667 - var managed=new Set(); 668 - var raf=0; 778 + var managedHeight=new Set(); 779 + var managedMargin=new Set(); 780 + var originalHeight=new WeakMap(); 781 + var originalMargin=new WeakMap(); 669 669 670 - function num(v){ 671 - var n=parseFloat(v); 783 + var resizeTimer=0; 784 + var running=false; 785 + 786 + var THEMES=[ 787 + { 788 + name:"BLUE", 789 + accent:"#21b6d7", 790 + bg:"#eaf7fb", 791 + text:"#315d68", 792 + labels:[ 793 + "HIER STARTEN", 794 + "ENTSCHEIDEN", 795 + "ÜBERPRÜFEN & ANPASSEN", 796 + "START HERE", 797 + "DECIDE", 798 + "REVIEW & ADAPT" 799 + ] 800 + }, 801 + { 802 + name:"RED", 803 + accent:"#e94b13", 804 + bg:"#fff1ec", 805 + text:"#8a4d36", 806 + labels:[ 807 + "PLANEN & ORGANISIEREN", 808 + "ORGANISIEREN & DOKUMENTIEREN", 809 + "PUBLIZIEREN & PRÄSENTIEREN", 810 + "PLAN & ORGANISE", 811 + "PLAN & ORGANIZE", 812 + "ORGANISE & DOCUMENT", 813 + "ORGANIZE & DOCUMENT", 814 + "PUBLISH & PRESENT" 815 + ] 816 + }, 817 + { 818 + name:"YELLOW", 819 + accent:"#f0aa00", 820 + bg:"#fff8e7", 821 + text:"#785b17", 822 + labels:[ 823 + "SCHÜTZEN & KLÄREN", 824 + "STANDARDISIEREN & IDENTIFIZIEREN", 825 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 826 + "PROTECT & CLARIFY", 827 + "STANDARDISE & IDENTIFY", 828 + "STANDARDIZE & IDENTIFY", 829 + "OPEN, REUSE & MAKE FINDABLE" 830 + ] 831 + }, 832 + { 833 + name:"GREEN", 834 + accent:"#38b76a", 835 + bg:"#edf9f1", 836 + text:"#3f7451", 837 + labels:[ 838 + "INFRASTRUKTUR EINRICHTEN", 839 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 840 + "SPEICHERN & ZUGRIFF STEUERN", 841 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 842 + "SET UP INFRASTRUCTURE", 843 + "SET UP INFRASTRUCTURE & COLLABORATION", 844 + "STORE & CONTROL ACCESS", 845 + "REPOSITORY, PRESERVE & HAND OVER" 846 + ] 847 + } 848 + ]; 849 + 850 + function num(value){ 851 + var n=parseFloat(value); 672 672 return Number.isFinite(n)?n:0; 673 673 } 674 674 855 + function norm(value){ 856 + return String(value||"") 857 + .replace(/\s+/g," ") 858 + .trim() 859 + .toUpperCase(); 860 + } 861 + 675 675 function visible(el){ 676 676 if(!el||el.nodeType!==1)return false; 677 - var s=getComputedStyle(el); 678 - if(s.display==="none"||s.visibility==="hidden"||Number(s.opacity)===0)return false; 679 - var r=el.getBoundingClientRect(); 680 - return r.width>=MIN_W&&r.height>=MIN_H; 864 + 865 + var style=getComputedStyle(el); 866 + var rect=el.getBoundingClientRect(); 867 + 868 + return ( 869 + style.display!=="none"&& 870 + style.visibility!=="hidden"&& 871 + rect.width>20&& 872 + rect.height>4 873 + ); 681 681 } 682 682 683 - function excluded(el){ 684 - return !el.matches||el.matches( 685 - "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]" 876 + function saveStyle(el,map,property){ 877 + if(map.has(el))return; 878 + 879 + map.set(el,{ 880 + value:el.style.getPropertyValue(property), 881 + priority:el.style.getPropertyPriority(property) 882 + }); 883 + } 884 + 885 + function restoreStyle(el,map,property){ 886 + var original=map.get(el); 887 + 888 + if(original&&original.value){ 889 + el.style.setProperty( 890 + property, 891 + original.value, 892 + original.priority||"" 893 + ); 894 + }else{ 895 + el.style.removeProperty(property); 896 + } 897 + } 898 + 899 + function resetRuntime(){ 900 + managedHeight.forEach(function(el){ 901 + restoreStyle( 902 + el, 903 + originalHeight, 904 + "min-height" 905 + ); 906 + el.removeAttribute( 907 + "data-sn-master-equal-height" 908 + ); 909 + }); 910 + 911 + managedMargin.forEach(function(el){ 912 + restoreStyle( 913 + el, 914 + originalMargin, 915 + "margin-top" 916 + ); 917 + el.removeAttribute( 918 + "data-sn-master-first-row" 919 + ); 920 + }); 921 + 922 + managedHeight.clear(); 923 + managedMargin.clear(); 924 + } 925 + 926 + function themeFor(text){ 927 + var value=norm(text); 928 + 929 + for(var i=0;i<THEMES.length;i++){ 930 + for(var j=0;j<THEMES[i].labels.length;j++){ 931 + var label=THEMES[i].labels[j]; 932 + 933 + if( 934 + value===label|| 935 + value.indexOf(label+" ")===0|| 936 + value.indexOf(label+" -")===0|| 937 + value.indexOf(label+" ·")===0 938 + ){ 939 + return THEMES[i]; 940 + } 941 + } 942 + } 943 + 944 + return null; 945 + } 946 + 947 + /* ======================================================= 948 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 949 + ======================================================= */ 950 + 951 + function colourDistance(a,b){ 952 + return Math.sqrt( 953 + Math.pow(a[0]-b[0],2)+ 954 + Math.pow(a[1]-b[1],2)+ 955 + Math.pow(a[2]-b[2],2) 686 686 ); 687 687 } 688 688 689 - function namedLikeBox(el){ 690 - var c=typeof el.className==="string"?el.className:""; 691 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c); 959 + function makeFilledRedOrangeCTAsBorderless(){ 960 + var RED_ORANGE=[233,75,19]; 961 + 962 + Array.from( 963 + root.querySelectorAll( 964 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 965 + ) 966 + ).forEach(function(el){ 967 + if(!visible(el))return; 968 + 969 + var style=getComputedStyle(el); 970 + var rgb=parseRGB(style.backgroundColor); 971 + 972 + if(!rgb)return; 973 + 974 + if( 975 + colourDistance( 976 + rgb, 977 + RED_ORANGE 978 + )>55 979 + ){ 980 + return; 981 + } 982 + 983 + var rect=el.getBoundingClientRect(); 984 + 985 + if( 986 + rect.width<80|| 987 + rect.height<24 988 + ){ 989 + return; 990 + } 991 + 992 + el.style.setProperty( 993 + "border", 994 + "none", 995 + "important" 996 + ); 997 + 998 + el.style.setProperty( 999 + "border-left", 1000 + "none", 1001 + "important" 1002 + ); 1003 + 1004 + el.style.setProperty( 1005 + "border-top", 1006 + "none", 1007 + "important" 1008 + ); 1009 + 1010 + el.style.setProperty( 1011 + "border-right", 1012 + "none", 1013 + "important" 1014 + ); 1015 + 1016 + el.style.setProperty( 1017 + "border-bottom", 1018 + "none", 1019 + "important" 1020 + ); 1021 + 1022 + el.style.setProperty( 1023 + "box-shadow", 1024 + "none", 1025 + "important" 1026 + ); 1027 + }); 692 692 } 693 693 694 - function boxLike(el){ 695 - if(!visible(el)||excluded(el))return false; 696 - var s=getComputedStyle(el); 697 - var r=el.getBoundingClientRect(); 698 - var border= 699 - num(s.borderTopWidth)+num(s.borderRightWidth)+ 700 - num(s.borderBottomWidth)+num(s.borderLeftWidth); 701 - var radius=Math.max( 702 - num(s.borderTopLeftRadius),num(s.borderTopRightRadius), 703 - num(s.borderBottomLeftRadius),num(s.borderBottomRightRadius) 1030 + /* ======================================================= 1031 + FULL-WIDTH THREE-LINE AREA LABELS 1032 + ======================================================= */ 1033 + 1034 + function compactText(value){ 1035 + return String(value||"") 1036 + .replace(/\s+/g," ") 1037 + .trim(); 1038 + } 1039 + 1040 + function makeThreeLineAreaLabels(){ 1041 + Array.from( 1042 + root.querySelectorAll( 1043 + ".arsn-area-label" 1044 + ) 1045 + ).forEach(function(label){ 1046 + if( 1047 + label.getAttribute( 1048 + "data-sn-three-line" 1049 + )==="1" 1050 + ){ 1051 + return; 1052 + } 1053 + 1054 + var number= 1055 + label.querySelector( 1056 + ":scope > .arsn-area-number" 1057 + ); 1058 + 1059 + var action= 1060 + label.querySelector( 1061 + ":scope > .arsn-area-action" 1062 + ); 1063 + 1064 + if( 1065 + !number|| 1066 + !action 1067 + ){ 1068 + return; 1069 + } 1070 + 1071 + var clone= 1072 + label.cloneNode(true); 1073 + 1074 + var cloneNumber= 1075 + clone.querySelector( 1076 + ":scope > .arsn-area-number" 1077 + ); 1078 + 1079 + var cloneAction= 1080 + clone.querySelector( 1081 + ":scope > .arsn-area-action" 1082 + ); 1083 + 1084 + if(cloneNumber){ 1085 + cloneNumber.remove(); 1086 + } 1087 + 1088 + if(cloneAction){ 1089 + cloneAction.remove(); 1090 + } 1091 + 1092 + var titleText= 1093 + compactText( 1094 + clone.textContent 1095 + ); 1096 + 1097 + if(!titleText){ 1098 + return; 1099 + } 1100 + 1101 + var numberNode= 1102 + number.cloneNode(true); 1103 + 1104 + var actionNode= 1105 + action.cloneNode(true); 1106 + 1107 + var titleNode= 1108 + document.createElement( 1109 + "span" 1110 + ); 1111 + 1112 + titleNode.className= 1113 + "sn-area-label-title"; 1114 + 1115 + titleNode.textContent= 1116 + titleText; 1117 + 1118 + while(label.firstChild){ 1119 + label.removeChild( 1120 + label.firstChild 1121 + ); 1122 + } 1123 + 1124 + label.appendChild( 1125 + numberNode 1126 + ); 1127 + 1128 + label.appendChild( 1129 + titleNode 1130 + ); 1131 + 1132 + label.appendChild( 1133 + actionNode 1134 + ); 1135 + 1136 + label.setAttribute( 1137 + "data-sn-three-line", 1138 + "1" 1139 + ); 1140 + 1141 + var head= 1142 + label.closest( 1143 + ".arsn-area-head" 1144 + ); 1145 + 1146 + if(head){ 1147 + head.style.setProperty( 1148 + "width", 1149 + "100%", 1150 + "important" 1151 + ); 1152 + 1153 + head.style.setProperty( 1154 + "max-width", 1155 + "100%", 1156 + "important" 1157 + ); 1158 + 1159 + head.style.setProperty( 1160 + "box-sizing", 1161 + "border-box", 1162 + "important" 1163 + ); 1164 + } 1165 + }); 1166 + } 1167 + 1168 + /* ======================================================= 1169 + PLACEHOLDER BADGE 1170 + ======================================================= */ 1171 + 1172 + function applyPlaceholderBadge(){ 1173 + if(!PLACEHOLDER)return; 1174 + 1175 + if( 1176 + document.querySelector( 1177 + ".sn-coming-soon-badge" 1178 + ) 1179 + ){ 1180 + return; 1181 + } 1182 + 1183 + var title= 1184 + document.querySelector( 1185 + "#document-title" 1186 + )|| 1187 + document.querySelector( 1188 + "h1" 1189 + ); 1190 + 1191 + if(!title)return; 1192 + 1193 + var badge= 1194 + document.createElement( 1195 + "span" 1196 + ); 1197 + 1198 + badge.className= 1199 + "sn-coming-soon-badge"; 1200 + 1201 + badge.textContent= 1202 + PLACEHOLDER_LABEL; 1203 + 1204 + badge.setAttribute( 1205 + "aria-label", 1206 + PLACEHOLDER_LABEL 704 704 ); 705 - var bg=s.backgroundColor&&s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor!=="transparent"; 706 - var shadow=s.boxShadow&&s.boxShadow!=="none"; 707 - return namedLikeBox(el)||border>=1||(bg&&radius>=3)||(shadow&&r.width>=180); 1208 + 1209 + title.appendChild( 1210 + badge 1211 + ); 708 708 } 709 709 710 - functionpickTarget(child){711 - if(!visible(child))returnnull;712 - if(boxLike(child))returnchild;1214 + /* ======================================================= 1215 + DETAIL PAGE OWN-ACCENT PROPAGATION 1216 + ======================================================= */ 713 713 714 - var cr=child.getBoundingClientRect(); 715 - var q=[]; 716 - Array.from(child.children||[]).forEach(function(el){ 717 - q.push({el:el,depth:1}); 1218 + function parseRGB(value){ 1219 + var match=String(value||"").match( 1220 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 1221 + ); 1222 + 1223 + if(!match)return null; 1224 + 1225 + return [ 1226 + Number(match[1]), 1227 + Number(match[2]), 1228 + Number(match[3]) 1229 + ]; 1230 + } 1231 + 1232 + function distance(a,b){ 1233 + return Math.sqrt( 1234 + Math.pow(a[0]-b[0],2)+ 1235 + Math.pow(a[1]-b[1],2)+ 1236 + Math.pow(a[2]-b[2],2) 1237 + ); 1238 + } 1239 + 1240 + function paletteMatch(cssColor){ 1241 + var rgb=parseRGB(cssColor); 1242 + 1243 + if(!rgb)return null; 1244 + 1245 + var palette=[ 1246 + {hex:"#21b6d7",rgb:[33,182,215]}, 1247 + {hex:"#e94b13",rgb:[233,75,19]}, 1248 + {hex:"#f0aa00",rgb:[240,170,0]}, 1249 + {hex:"#38b76a",rgb:[56,183,106]} 1250 + ]; 1251 + 1252 + var best=null; 1253 + var bestDistance=Infinity; 1254 + 1255 + palette.forEach(function(item){ 1256 + var d=distance(rgb,item.rgb); 1257 + 1258 + if(d<bestDistance){ 1259 + best=item; 1260 + bestDistance=d; 1261 + } 718 718 }); 719 719 720 - var best=null,bestScore=-1; 1264 + return bestDistance<=30 1265 + ?best 1266 + :null; 1267 + } 721 721 722 - while(q.length){ 723 - var item=q.shift(); 724 - var el=item.el; 725 - if(!visible(el))continue; 1269 + function propagateDetailAccents(){ 1270 + if(PAGE_KIND!=="detail")return; 726 726 727 - var r=el.getBoundingClientRect(); 1272 + Array.from( 1273 + root.querySelectorAll( 1274 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 1275 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 1276 + ) 1277 + ).forEach(function(el){ 1278 + if(!visible(el))return; 728 728 729 - if(r.width>=cr.width*.72&&boxLike(el)){ 730 - var widthFit=1-Math.min(1,Math.abs(cr.width-r.width)/Math.max(1,cr.width)); 731 - var topFit=1-Math.min(1,Math.abs(cr.top-r.top)/80); 732 - var score=widthFit*5+topFit*2+Math.min(r.height,600)/600; 733 - if(score>bestScore){ 734 - best=el; 735 - bestScore=score; 1280 + var style=getComputedStyle(el); 1281 + 1282 + if( 1283 + num(style.borderTopWidth)>=2 1284 + ){ 1285 + var match= 1286 + paletteMatch( 1287 + style.borderTopColor 1288 + ); 1289 + 1290 + if(match){ 1291 + el.style.setProperty( 1292 + "border-left", 1293 + "4px solid "+match.hex, 1294 + "important" 1295 + ); 736 736 } 737 737 } 1298 + }); 738 738 739 - if(item.depth<3){ 740 - Array.from(el.children||[]).forEach(function(next){ 741 - q.push({el:next,depth:item.depth+1}); 742 - }); 1300 + // Warning families: explicit safety override. 1301 + Array.from( 1302 + root.querySelectorAll( 1303 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 1304 + ".warn,.warning,.warningmessage,.errormessage" 1305 + ) 1306 + ).forEach(function(el){ 1307 + if(!visible(el))return; 1308 + 1309 + el.style.setProperty( 1310 + "border-left", 1311 + "4px solid #e94b13", 1312 + "important" 1313 + ); 1314 + }); 1315 + 1316 + // Info families: explicit orientation override. 1317 + Array.from( 1318 + root.querySelectorAll( 1319 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 1320 + ) 1321 + ).forEach(function(el){ 1322 + if(!visible(el))return; 1323 + 1324 + el.style.setProperty( 1325 + "border-left", 1326 + "4px solid #21b6d7", 1327 + "important" 1328 + ); 1329 + }); 1330 + } 1331 + 1332 + /* ======================================================= 1333 + OVERVIEW SEMANTIC THEME PALETTE 1334 + ======================================================= */ 1335 + 1336 + function smallestThemeHeaders(){ 1337 + return Array.from( 1338 + root.querySelectorAll( 1339 + "div,span,p,strong,h3,h4,h5,h6" 1340 + ) 1341 + ).filter(function(el){ 1342 + if(!visible(el))return false; 1343 + if(!themeFor(el.textContent))return false; 1344 + 1345 + return !Array.from( 1346 + el.children||[] 1347 + ).some(function(child){ 1348 + return !!themeFor( 1349 + child.textContent 1350 + ); 1351 + }); 1352 + }); 1353 + } 1354 + 1355 + function findOverviewCard(header){ 1356 + var node=header.parentElement; 1357 + var candidates=[]; 1358 + 1359 + while(node&&node!==root){ 1360 + var rect=node.getBoundingClientRect(); 1361 + var style=getComputedStyle(node); 1362 + 1363 + var border= 1364 + num(style.borderTopWidth)+ 1365 + num(style.borderRightWidth)+ 1366 + num(style.borderBottomWidth)+ 1367 + num(style.borderLeftWidth); 1368 + 1369 + if( 1370 + rect.width>=220&& 1371 + rect.width<=800&& 1372 + rect.height>=120&& 1373 + border>=1 1374 + ){ 1375 + candidates.push(node); 743 743 } 1377 + 1378 + node=node.parentElement; 744 744 } 745 745 746 - return best; 1381 + if(!candidates.length)return null; 1382 + 1383 + candidates.sort(function(a,b){ 1384 + return ( 1385 + b.getBoundingClientRect().height- 1386 + a.getBoundingClientRect().height 1387 + ); 1388 + }); 1389 + 1390 + return candidates[0]; 747 747 } 748 748 749 - function reset(){ 750 - managed.forEach(function(el){ 751 - el.style.removeProperty("min-height"); 752 - el.removeAttribute("data-sn-equal-height-managed"); 1393 + function rowCandidates(link,card){ 1394 + var result=[]; 1395 + var cardRect= 1396 + card.getBoundingClientRect(); 1397 + 1398 + var node=link; 1399 + 1400 + while(node&&node!==card){ 1401 + if(visible(node)){ 1402 + var rect= 1403 + node.getBoundingClientRect(); 1404 + 1405 + if( 1406 + rect.height<=105&& 1407 + rect.width>= 1408 + cardRect.width*.50&& 1409 + rect.width<= 1410 + cardRect.width*1.03 1411 + ){ 1412 + result.push(node); 1413 + } 1414 + } 1415 + 1416 + node=node.parentElement; 1417 + } 1418 + 1419 + return result; 1420 + } 1421 + 1422 + function chooseOuterRow( 1423 + candidates, 1424 + link 1425 + ){ 1426 + if(!candidates.length){ 1427 + return link; 1428 + } 1429 + 1430 + var bordered= 1431 + candidates.filter(function(el){ 1432 + return ( 1433 + num( 1434 + getComputedStyle(el) 1435 + .borderLeftWidth 1436 + )>=1 1437 + ); 1438 + }); 1439 + 1440 + var pool= 1441 + bordered.length 1442 + ?bordered 1443 + :candidates; 1444 + 1445 + pool.sort(function(a,b){ 1446 + var ar= 1447 + a.getBoundingClientRect(); 1448 + 1449 + var br= 1450 + b.getBoundingClientRect(); 1451 + 1452 + return ( 1453 + ar.left-br.left|| 1454 + br.width-ar.width 1455 + ); 753 753 }); 754 - managed.clear(); 1457 + 1458 + return pool[0]||link; 755 755 } 756 756 757 - function horizontalLayout(parent){ 758 - if(!visible(parent))return false; 759 - var s=getComputedStyle(parent); 760 - if(s.display==="grid"||s.display==="inline-grid")return true; 761 - if(s.display==="flex"||s.display==="inline-flex"){ 762 - return s.flexDirection==="row"||s.flexDirection==="row-reverse"; 1461 + function applyOverviewPalette(){ 1462 + if(PAGE_KIND!=="overview"){ 1463 + return []; 763 763 } 764 - return false; 1465 + 1466 + var headers= 1467 + smallestThemeHeaders() 1468 + .map(function(el){ 1469 + return { 1470 + el:el, 1471 + theme: 1472 + themeFor( 1473 + el.textContent 1474 + ), 1475 + card: 1476 + findOverviewCard( 1477 + el 1478 + ) 1479 + }; 1480 + }) 1481 + .filter(function(row){ 1482 + return !!row.card; 1483 + }); 1484 + 1485 + var unique=[]; 1486 + var seenHeaders=new Set(); 1487 + 1488 + headers.forEach(function(row){ 1489 + var key= 1490 + row.theme.name+ 1491 + "|"+ 1492 + Math.round( 1493 + row.card 1494 + .getBoundingClientRect() 1495 + .left 1496 + )+ 1497 + "|"+ 1498 + Math.round( 1499 + row.el 1500 + .getBoundingClientRect() 1501 + .top 1502 + ); 1503 + 1504 + if(!seenHeaders.has(key)){ 1505 + seenHeaders.add(key); 1506 + unique.push(row); 1507 + } 1508 + }); 1509 + 1510 + unique.forEach(function(row){ 1511 + var headerRect= 1512 + row.el 1513 + .getBoundingClientRect(); 1514 + 1515 + row.el.style.setProperty( 1516 + "background", 1517 + row.theme.bg, 1518 + "important" 1519 + ); 1520 + 1521 + row.el.style.setProperty( 1522 + "color", 1523 + row.theme.text, 1524 + "important" 1525 + ); 1526 + 1527 + row.el.style.setProperty( 1528 + "text-align", 1529 + "left", 1530 + "important" 1531 + ); 1532 + 1533 + row.el.style.setProperty( 1534 + "word-spacing", 1535 + "normal", 1536 + "important" 1537 + ); 1538 + 1539 + var later= 1540 + unique 1541 + .filter(function(other){ 1542 + return ( 1543 + other.card===row.card&& 1544 + other.el 1545 + .getBoundingClientRect() 1546 + .top> 1547 + headerRect.top+2 1548 + ); 1549 + }) 1550 + .sort(function(a,b){ 1551 + return ( 1552 + a.el 1553 + .getBoundingClientRect() 1554 + .top- 1555 + b.el 1556 + .getBoundingClientRect() 1557 + .top 1558 + ); 1559 + }); 1560 + 1561 + var stopTop= 1562 + later.length 1563 + ?later[0].el 1564 + .getBoundingClientRect() 1565 + .top 1566 + :Infinity; 1567 + 1568 + Array.from( 1569 + row.card.querySelectorAll("a") 1570 + ).forEach(function(link){ 1571 + if(!visible(link))return; 1572 + 1573 + var rect= 1574 + link.getBoundingClientRect(); 1575 + 1576 + if( 1577 + rect.top<= 1578 + headerRect.bottom-2|| 1579 + rect.top>= 1580 + stopTop-2 1581 + ){ 1582 + return; 1583 + } 1584 + 1585 + var candidates= 1586 + rowCandidates( 1587 + link, 1588 + row.card 1589 + ); 1590 + 1591 + var target= 1592 + chooseOuterRow( 1593 + candidates, 1594 + link 1595 + ); 1596 + 1597 + candidates.forEach(function(el){ 1598 + el.style.setProperty( 1599 + "border-left", 1600 + "0 solid transparent", 1601 + "important" 1602 + ); 1603 + }); 1604 + 1605 + target.style.setProperty( 1606 + "border-left", 1607 + "3px solid "+ 1608 + row.theme.accent, 1609 + "important" 1610 + ); 1611 + 1612 + target.style.setProperty( 1613 + "box-sizing", 1614 + "border-box", 1615 + "important" 1616 + ); 1617 + }); 1618 + }); 1619 + 1620 + return unique; 765 765 } 766 766 767 - function rowGroups(entries){ 1623 + /* ======================================================= 1624 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1625 + ======================================================= */ 1626 + 1627 + function alignOverviewCards(headers){ 1628 + if( 1629 + PAGE_KIND!=="overview"|| 1630 + window.innerWidth<=MOBILE_MAX 1631 + ){ 1632 + return; 1633 + } 1634 + 1635 + var cards=[]; 1636 + var seen=new Set(); 1637 + 1638 + headers.forEach(function(row){ 1639 + if(!seen.has(row.card)){ 1640 + seen.add(row.card); 1641 + cards.push(row.card); 1642 + } 1643 + }); 1644 + 1645 + if(cards.length<2){ 1646 + return; 1647 + } 1648 + 1649 + // Group cards by actual top position. 768 768 var groups=[]; 769 - entries.slice().sort(function(a,b){ 770 - return a.rect.top-b.rect.top||a.rect.left-b.rect.left; 771 - }).forEach(function(entry){ 1651 + 1652 + cards.forEach(function(card){ 1653 + var top= 1654 + card.getBoundingClientRect().top; 1655 + 772 772 var group=null; 1657 + 773 773 for(var i=0;i<groups.length;i++){ 774 - if(Math.abs(groups[i].top-entry.rect.top)<=ROW_TOLERANCE){ 1659 + if( 1660 + Math.abs( 1661 + groups[i].top-top 1662 + )<=ROW_TOLERANCE 1663 + ){ 775 775 group=groups[i]; 776 776 break; 777 777 } 778 778 } 1668 + 779 779 if(!group){ 780 - group={top:entry.rect.top,entries:[]}; 1670 + group={ 1671 + top:top, 1672 + cards:[] 1673 + }; 781 781 groups.push(group); 782 782 } 783 - group.entries.push(entry); 1676 + 1677 + group.cards.push(card); 784 784 }); 785 - return groups; 786 - } 787 787 788 - function run(){ 789 - reset(); 1680 + groups.forEach(function(group){ 1681 + if(group.cards.length<2){ 1682 + return; 1683 + } 790 790 791 - if(window.innerWidth<=MOBILE_MAX)return; 1685 + var firstHeaders= 1686 + group.cards.map(function(card){ 1687 + var candidates= 1688 + headers 1689 + .filter(function(row){ 1690 + return row.card===card; 1691 + }) 1692 + .sort(function(a,b){ 1693 + return ( 1694 + a.el 1695 + .getBoundingClientRect() 1696 + .top- 1697 + b.el 1698 + .getBoundingClientRect() 1699 + .top 1700 + ); 1701 + }); 792 792 793 - var parents=Array.from(root.querySelectorAll("*")).filter(function(el){ 794 - return el.children&&el.children.length>=2&&horizontalLayout(el); 795 - }); 1703 + return candidates.length 1704 + ?candidates[0] 1705 + :null; 1706 + }); 796 796 797 - parents.forEach(function(parent){ 798 - var entries=[]; 1708 + if( 1709 + !firstHeaders.some(function(row){ 1710 + return !row; 1711 + }) 1712 + ){ 1713 + var targetTop= 1714 + Math.max.apply( 1715 + Math, 1716 + firstHeaders.map(function(row){ 1717 + return ( 1718 + row.el 1719 + .getBoundingClientRect() 1720 + .top- 1721 + row.card 1722 + .getBoundingClientRect() 1723 + .top 1724 + ); 1725 + }) 1726 + ); 799 799 800 - Array.from(parent.children).forEach(function(child){ 801 - if(!visible(child))return; 802 - var target=pickTarget(child); 803 - if(!target)return; 804 - entries.push({ 805 - target:target, 806 - rect:target.getBoundingClientRect() 1728 + firstHeaders.forEach(function(row){ 1729 + var relativeTop= 1730 + row.el 1731 + .getBoundingClientRect() 1732 + .top- 1733 + row.card 1734 + .getBoundingClientRect() 1735 + .top; 1736 + 1737 + var delta= 1738 + targetTop-relativeTop; 1739 + 1740 + if(delta>1){ 1741 + saveStyle( 1742 + row.el, 1743 + originalMargin, 1744 + "margin-top" 1745 + ); 1746 + 1747 + var current= 1748 + num( 1749 + getComputedStyle( 1750 + row.el 1751 + ).marginTop 1752 + ); 1753 + 1754 + row.el.style.setProperty( 1755 + "margin-top", 1756 + ( 1757 + current+delta 1758 + )+"px" 1759 + ); 1760 + 1761 + row.el.setAttribute( 1762 + "data-sn-master-first-row", 1763 + "1" 1764 + ); 1765 + 1766 + managedMargin.add( 1767 + row.el 1768 + ); 1769 + } 807 807 }); 1771 + } 1772 + 1773 + var maxHeight=0; 1774 + 1775 + group.cards.forEach(function(card){ 1776 + maxHeight= 1777 + Math.max( 1778 + maxHeight, 1779 + card 1780 + .getBoundingClientRect() 1781 + .height 1782 + ); 808 808 }); 809 809 810 - if(entries.length<2)return; 1785 + maxHeight= 1786 + Math.ceil(maxHeight); 811 811 812 - rowGroups(entries).forEach(function(group){ 813 - if(group.entries.length<2)return; 1788 + group.cards.forEach(function(card){ 1789 + saveStyle( 1790 + card, 1791 + originalHeight, 1792 + "min-height" 1793 + ); 814 814 815 - var lefts=group.entries.map(function(e){return e.rect.left;}).sort(function(a,b){return a-b;}); 816 - if(lefts[lefts.length-1]-lefts[0]<80)return; 1795 + card.style.setProperty( 1796 + "min-height", 1797 + maxHeight+"px" 1798 + ); 817 817 818 - var targets=[]; 819 - var seen=new Set(); 1800 + card.setAttribute( 1801 + "data-sn-master-equal-height", 1802 + "1" 1803 + ); 820 820 821 - group.entries.forEach(function(e){ 822 - if(!seen.has(e.target)){ 823 - seen.add(e.target); 824 - targets.push(e.target); 1805 + managedHeight.add( 1806 + card 1807 + ); 1808 + }); 1809 + }); 1810 + } 1811 + 1812 + /* ======================================================= 1813 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1814 + ======================================================= */ 1815 + 1816 + function equaliseDetailGrids(){ 1817 + if( 1818 + PAGE_KIND!=="detail"|| 1819 + window.innerWidth<=MOBILE_MAX 1820 + ){ 1821 + return; 1822 + } 1823 + 1824 + var selectors=[ 1825 + ".arsn-grid", 1826 + ".arsn-grid-2", 1827 + ".arsn-grid-3", 1828 + ".dmp-grid", 1829 + ".ido-grid", 1830 + ".pp-grid" 1831 + ]; 1832 + 1833 + selectors.forEach(function(selector){ 1834 + Array.from( 1835 + root.querySelectorAll(selector) 1836 + ).forEach(function(grid){ 1837 + var children= 1838 + Array.from( 1839 + grid.children||[] 1840 + ).filter(visible); 1841 + 1842 + if(children.length<2){ 1843 + return; 1844 + } 1845 + 1846 + var groups=[]; 1847 + 1848 + children.forEach(function(child){ 1849 + var top= 1850 + child 1851 + .getBoundingClientRect() 1852 + .top; 1853 + 1854 + var group=null; 1855 + 1856 + for(var i=0;i<groups.length;i++){ 1857 + if( 1858 + Math.abs( 1859 + groups[i].top-top 1860 + )<=ROW_TOLERANCE 1861 + ){ 1862 + group=groups[i]; 1863 + break; 1864 + } 825 825 } 826 - }); 827 827 828 - if(targets.length<2)return; 1867 + if(!group){ 1868 + group={ 1869 + top:top, 1870 + items:[] 1871 + }; 1872 + groups.push(group); 1873 + } 829 829 830 - var max=0; 831 - targets.forEach(function(el){ 832 - max=Math.max(max,el.getBoundingClientRect().height); 1875 + group.items.push(child); 833 833 }); 834 834 835 - max=Math.ceil(max); 836 - if(max<MIN_H)return; 1878 + groups.forEach(function(group){ 1879 + if(group.items.length<2){ 1880 + return; 1881 + } 837 837 838 - targets.forEach(function(el){ 839 - el.style.setProperty("min-height",max+"px"); 840 - el.setAttribute("data-sn-equal-height-managed","1"); 841 - managed.add(el); 1883 + var maxHeight=0; 1884 + 1885 + group.items.forEach(function(item){ 1886 + maxHeight= 1887 + Math.max( 1888 + maxHeight, 1889 + item 1890 + .getBoundingClientRect() 1891 + .height 1892 + ); 1893 + }); 1894 + 1895 + maxHeight= 1896 + Math.ceil(maxHeight); 1897 + 1898 + group.items.forEach(function(item){ 1899 + saveStyle( 1900 + item, 1901 + originalHeight, 1902 + "min-height" 1903 + ); 1904 + 1905 + item.style.setProperty( 1906 + "min-height", 1907 + maxHeight+"px" 1908 + ); 1909 + 1910 + item.setAttribute( 1911 + "data-sn-master-equal-height", 1912 + "1" 1913 + ); 1914 + 1915 + managedHeight.add(item); 1916 + }); 842 842 }); 843 843 }); 844 844 }); 845 845 } 846 846 847 - function schedule(){ 848 - if(raf)cancelAnimationFrame(raf); 849 - raf=requestAnimationFrame(function(){ 850 - raf=requestAnimationFrame(function(){ 851 - raf=0; 852 - run(); 853 - }); 854 - }); 1922 + /* ======================================================= 1923 + RUN / RESPONSIVE SCHEDULING 1924 + ======================================================= */ 1925 + 1926 + function run(){ 1927 + if(running)return; 1928 + 1929 + running=true; 1930 + 1931 + try{ 1932 + resetRuntime(); 1933 + applyPlaceholderBadge(); 1934 + propagateDetailAccents(); 1935 + 1936 + var headers= 1937 + applyOverviewPalette(); 1938 + 1939 + makeThreeLineAreaLabels(); 1940 + makeFilledRedOrangeCTAsBorderless(); 1941 + 1942 + if( 1943 + window.innerWidth> 1944 + MOBILE_MAX 1945 + ){ 1946 + alignOverviewCards( 1947 + headers 1948 + ); 1949 + 1950 + equaliseDetailGrids(); 1951 + } 1952 + }finally{ 1953 + running=false; 1954 + } 855 855 } 856 856 857 - addEventListener("resize",schedule,{passive:true}); 858 - addEventListener("load",schedule,{once:true}); 1957 + function onResize(){ 1958 + if(resizeTimer){ 1959 + clearTimeout( 1960 + resizeTimer 1961 + ); 1962 + } 859 859 860 - root.addEventListener("click",function(){ 861 - setTimeout(schedule,0); 862 - },true); 1964 + resizeTimer= 1965 + setTimeout( 1966 + function(){ 1967 + resizeTimer=0; 1968 + run(); 1969 + }, 1970 + RESIZE_DEBOUNCE 1971 + ); 1972 + } 863 863 864 - if(document.fonts&&document.fonts.ready){ 865 - document.fonts.ready.then(schedule); 1974 + async function waitForReady(){ 1975 + if( 1976 + document.readyState!=="complete" 1977 + ){ 1978 + await new Promise(function(resolve){ 1979 + window.addEventListener( 1980 + "load", 1981 + resolve, 1982 + {once:true} 1983 + ); 1984 + }); 1985 + } 1986 + 1987 + if( 1988 + document.fonts&& 1989 + document.fonts.ready 1990 + ){ 1991 + try{ 1992 + await document.fonts.ready; 1993 + }catch(error){} 1994 + } 1995 + 1996 + var images= 1997 + Array.from( 1998 + root.querySelectorAll("img") 1999 + ); 2000 + 2001 + await Promise.all( 2002 + images.map(function(img){ 2003 + if(img.complete){ 2004 + return Promise.resolve(); 2005 + } 2006 + 2007 + return new Promise(function(resolve){ 2008 + var done=function(){ 2009 + resolve(); 2010 + }; 2011 + 2012 + img.addEventListener( 2013 + "load", 2014 + done, 2015 + {once:true} 2016 + ); 2017 + 2018 + img.addEventListener( 2019 + "error", 2020 + done, 2021 + {once:true} 2022 + ); 2023 + }); 2024 + }) 2025 + ); 2026 + 2027 + run(); 866 866 } 867 867 868 - schedule(); 869 - setTimeout(schedule,250); 870 - setTimeout(schedule,900); 2030 + window.addEventListener( 2031 + "resize", 2032 + onResize, 2033 + {passive:true} 2034 + ); 2035 + 2036 + waitForReady(); 871 871 })(); 872 872 </script> 873 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 2039 + 2040 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END --> 874 874 {{/html}} 875 875