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