Changes for page Art & Research Services Navigator
Last modified by Veronika Kocher on Friday, 18 Sep 2026 16:47
From version 39.23
edited by Veronika Kocher
on Thursday, 03 Sep 2026 10:09
on Thursday, 03 Sep 2026 10:09
Change comment:
There is no comment for this version
To version 43.2
edited by Veronika Kocher
on Friday, 18 Sep 2026 16:47
on Friday, 18 Sep 2026 16:47
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,19 +1,13 @@ 1 1 Artistic and research projects involve many different tasks, decisions and responsibilities — from developing an initial idea and securing funding to organising materials, collaborating with others, publishing results and preserving them for future use. 2 2 3 -The **Art & Research Services Navigator** helps you find theright guidance, services and resources for each stage of your project.3 +The **Art & Research Services Navigator** helps you find relevant guidance, services and resources for each stage of your project. 4 4 5 -{{info title=" How responsibilitieswork"}}6 - Thenavigatorbrings servicestogether aroundthe projectlifecycleand theresearcher's task. Itis anavigationlayeracrossuniversity services,notaseparateorganisational unit.5 +{{info title="Support for Your Project:"}} 6 + **Support Kunst und Forschung (SKF)** provides guidance for projects and grant applications and collaborates with the appropriate university services as needed. 7 7 8 -**Support Kunst und Forschung (SKF)** supports project and funding activities — especially project development, funding and calls, proposals, and coordination of funded projects — and, where useful, connects them with the University's relevant services. 9 - 10 -Depending on the question, these may include the **University Library / Research Data Management & Repository**, **IT**, **Legal and Data Protection**, **Finance and Personnel**, **Publications and Communication**, **Event Management**, the **International Office** and other services. 11 - 12 -The **institute, department or other host unit** remains the artistic or academic home of the project. The navigator brings these offers together along the project stages so you can start from your need rather than from the organisational chart. 8 + The Navigator guides you through the project phases to the resources and points of contact relevant to your project. 13 13 {{/info}} 14 14 15 - 16 - 17 17 {{html clean="false"}} 18 18 <section data-arsn-search-block-fix="v5" style="margin:20px 0 26px 0;padding:16px 18px;border:1px solid #e3ded6;border-radius:10px;background:#fcfbf8;box-shadow:0 1px 2px rgba(0,0,0,.035);"> 19 19 <h2 style="font-size:20px;margin:0 0 6px 0;color:#35312d;">Search the Art & Research Services Navigator</h2> ... ... @@ -361,7 +361,7 @@ 361 361 (% style="padding:18px 17px 17px 17px;flex:1;" %) 362 362 ((( 363 363 (% style="font-size:19px;font-weight:700;margin-bottom:2px;" %) 364 -[[1. Enable — Plan & Set Up>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/||style="color:#111;text-decoration:none;font-weight:700;"]]358 +[[1. Prepare — Plan & Set Up>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/||style="color:#111;text-decoration:none;font-weight:700;"]] 365 365 366 366 (% style="color:#666;margin-bottom:16px;" %) 367 367 Prepare your project before the main work begins. ... ... @@ -439,9 +439,9 @@ 439 439 ))) 440 440 ))) 441 441 442 -(% style="padding:0 16px 16px 16px;" %) 436 +(% class="arsn-phase-cta-wrap" style="padding:0 16px 16px 16px;" %) 443 443 ((( 444 -[[Explore Enable>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/||class="btn btn-primary btn-block"]] 438 +[[Explore Enable>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/||class="btn btn-primary btn-block arsn-phase-cta"]] 445 445 ))) 446 446 ))) 447 447 ))) ... ... @@ -505,9 +505,9 @@ 505 505 ))) 506 506 ))) 507 507 508 -(% style="padding:0 16px 16px 16px;" %) 502 +(% class="arsn-phase-cta-wrap" style="padding:0 16px 16px 16px;" %) 509 509 ((( 510 -[[Explore Work & Manage>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Work%20%26%20Manage/||class="btn btn-primary btn-block"]] 504 +[[Explore Work & Manage>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Work%20%26%20Manage/||class="btn btn-primary btn-block arsn-phase-cta"]] 511 511 ))) 512 512 ))) 513 513 ))) ... ... @@ -525,7 +525,7 @@ 525 525 (% style="font-size:19px;font-weight:700;margin-bottom:2px;" %) 526 526 [[3. Publish & Share — Make It Visible>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Publish%20%26%20Share/||style="color:#111;text-decoration:none;font-weight:700;"]] 527 527 528 -(% style="color:#666; margin-bottom:16px;" %)522 +(% class="arsn-phase-subtitle" style="color:#666;background:transparent;margin:2px 0 16px 0;padding:0;" %) 529 529 Decide how outputs should be shared, published, made findable and preserved. 530 530 531 531 (% style="font-size:13px;font-weight:700;letter-spacing:.065em;color:#4f4a44;margin:17px 0 8px 0;padding:5px 8px;background:#f3efe8;border-radius:4px;" %) ... ... @@ -581,9 +581,9 @@ 581 581 ))) 582 582 ))) 583 583 584 -(% style="padding:0 16px 16px 16px;" %) 578 +(% class="arsn-phase-cta-wrap" style="padding:0 16px 16px 16px;" %) 585 585 ((( 586 -[[Explore Publish & Share>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Publish%20%26%20Share/||class="btn btn-primary btn-block"]] 580 +[[Explore Publish & Share>>https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Publish%20%26%20Share/||class="btn btn-primary btn-block arsn-phase-cta"]] 587 587 ))) 588 588 ))) 589 589 ))) ... ... @@ -592,6 +592,19 @@ 592 592 593 593 (% style="margin-top:30px;" %) 594 594 ((( 589 +{{html clean="false"}} 590 +<!-- ARSN_TRAINING_WORKSHOPS_V2_START --> 591 +<section class="arsn-training-workshops" data-arsn-training-workshops="v2" style="margin:27px 0 22px 0;"> 592 + <div style="padding:16px 18px;background:#eef8fa;border:1px solid #cfe8ef;border-left:5px solid #21b6d7;border-radius:9px;"> 593 + <div style="font-size:12px;font-weight:700;letter-spacing:.075em;text-transform:uppercase;color:#3f6871;margin-bottom:5px;">TRAINING & WORKSHOPS</div> 594 + <h3 style="font-size:20px;line-height:1.3;margin:0 0 7px;color:#35312d;text-align:left;">Training, workshops & consultation sessions</h3> 595 + <p style="margin:0 0 10px;color:#5e5953;line-height:1.55;">Relevant opportunities for this topic will be shown here automatically from the central calendar.</p> 596 + <span data-arsn-coming-soon="true" style="display:inline-block;padding:4px 9px;border-radius:14px;background:#fff4ee;border:1px solid #efd9cc;color:#8a4d36;font-size:11px;font-weight:700;letter-spacing:.065em;line-height:1.2;">COMING SOON</span> 597 + </div> 598 +</section> 599 +<!-- ARSN_TRAINING_WORKSHOPS_V2_END --> 600 +{{/html}} 601 + 595 595 == Practical resources == 596 596 597 597 Use practical resources when you need a concise overview, a step-by-step procedure or a ready-to-use project aid. ... ... @@ -630,9 +630,9 @@ 630 630 631 631 (% style="margin-top:30px;" %) 632 632 ((( 633 -== Need help findingtheright route? ==640 +== Need help deciding where to start? == 634 634 635 -{{info title=" Start withtheright service"}}642 +{{info title="Where to start"}} 636 636 For **project development, funding, proposals and coordination of funded art and research projects**, **Support Kunst und Forschung** is a good place to start. 637 637 638 638 For more specific questions, the topic pages point directly to the relevant university services. When several areas are involved, use the navigator to see which support is useful at the next step. ... ... @@ -639,12 +639,28 @@ 639 639 {{/info}} 640 640 ))) 641 641 642 -\n\n 643 -\n\n{{html clean="false"}} 644 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 649 +{{html clean="false"}}<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 645 645 646 -<style data-sn-horizontal-box-harmonizer="7"> 647 -/* ---------- Typography: never justify headings ---------- */ 651 +<style data-sn-service-navigator-master="1"> 652 +/* ========================================================= 653 + PHASE CARD SUBTITLES 654 + ========================================================= */ 655 +#xwikicontent .arsn-phase-subtitle{ 656 + display:block!important; 657 + margin:2px 0 16px 0!important; 658 + padding:0!important; 659 + background:transparent!important; 660 + color:#666!important; 661 + font-size:inherit!important; 662 + font-weight:400!important; 663 + letter-spacing:normal!important; 664 + text-align:left!important; 665 + word-spacing:normal!important; 666 +} 667 + 668 +/* ========================================================= 669 + MASTER TYPOGRAPHY 670 + ========================================================= */ 648 648 #xwikicontent h1, 649 649 #xwikicontent h2, 650 650 #xwikicontent h3, ... ... @@ -666,88 +666,105 @@ 666 666 word-spacing:normal!important; 667 667 } 668 668 669 -/* ---------- Native XWiki semantic callouts ---------- */ 670 -#xwikicontent .box.infomessage, 671 -#xwikicontent .infomessage, 672 -#xwikicontent .box.warningmessage, 673 -#xwikicontent .warningmessage, 674 -#xwikicontent .box.successmessage, 675 -#xwikicontent .successmessage, 676 -#xwikicontent .box.errormessage, 677 -#xwikicontent .errormessage, 678 -#xwikicontent [data-sn-callout-harmonized="1"]{ 692 +/* ========================================================= 693 + COMING SOON / IN VORBEREITUNG 694 + ========================================================= */ 695 +.sn-coming-soon-badge{ 696 + display:inline-block; 697 + vertical-align:middle; 698 + margin-left:10px; 699 + padding:4px 8px; 700 + border-radius:14px; 701 + border:1px solid #efd9cc; 702 + background:#fff4ee; 703 + color:#8a4d36; 704 + font-size:11px; 705 + font-weight:700; 706 + letter-spacing:.055em; 707 + line-height:1.2; 708 + white-space:nowrap; 709 +} 710 + 711 +/* ========================================================= 712 + NATIVE / DETAIL CALLOUT GEOMETRY 713 + Preserve existing backgrounds. 714 + ========================================================= */ 715 +#xwikicontent .arsn-info, 716 +#xwikicontent .dmp-info, 717 +#xwikicontent .ido-info, 718 +#xwikicontent .pp-info, 719 +#xwikicontent .infomessage{ 679 679 box-sizing:border-box!important; 680 - border-radius:8px!important; 681 - border-top:1px solid rgba(0,0,0,.08)!important; 682 - border-right:1px solid rgba(0,0,0,.08)!important; 683 - border-bottom:1px solid rgba(0,0,0,.08)!important; 684 - border-left:4px solid var(--sn-callout-accent,#21b6d7)!important; 685 - padding:14px 16px!important; 721 + border-left:4px solid #21b6d7!important; 722 + border-radius:8px; 686 686 text-align:left!important; 687 - text-justify:auto!important; 688 688 word-spacing:normal!important; 689 - box-shadow:none!important; 690 690 } 691 691 692 -#xwikicontent .box.infomessage, 693 -#xwikicontent .infomessage{ 694 - --sn-callout-accent:#21b6d7; 695 - background:#eaf7fb!important; 696 -} 697 - 698 -#xwikicontent .box.warningmessage, 699 -#xwikicontent .warningmessage{ 700 - --sn-callout-accent:#f0aa00; 701 - background:#fff8e7!important; 702 -} 703 - 704 -#xwikicontent .box.successmessage, 705 -#xwikicontent .successmessage{ 706 - --sn-callout-accent:#38b76a; 707 - background:#edf9f1!important; 708 -} 709 - 710 -#xwikicontent .box.errormessage, 727 +#xwikicontent .arsn-warn, 728 +#xwikicontent .dmp-warn, 729 +#xwikicontent .ido-warn, 730 +#xwikicontent .pp-warn, 731 +#xwikicontent .warn, 732 +#xwikicontent .warning, 733 +#xwikicontent .warningmessage, 711 711 #xwikicontent .errormessage{ 712 - --sn-callout-accent:#e94b13; 713 - background:#fff1ec!important; 735 + box-sizing:border-box!important; 736 + border-left:4px solid #e94b13!important; 737 + border-radius:8px; 738 + text-align:left!important; 739 + word-spacing:normal!important; 714 714 } 715 715 716 -#xwikicontent [data-sn-callout-harmonized="1"] > :first-child, 717 -#xwikicontent .infomessage > :first-child, 718 -#xwikicontent .warningmessage > :first-child, 719 -#xwikicontent .successmessage > :first-child, 720 -#xwikicontent .errormessage > :first-child{ 721 - margin-top:0!important; 742 +[data-sn-master-equal-height], 743 +[data-sn-master-first-row]{ 744 + box-sizing:border-box; 722 722 } 723 723 724 -#xwikicontent [data-sn-callout-harmonized="1"] > :last-child, 725 -#xwikicontent .infomessage > :last-child, 726 -#xwikicontent .warningmessage > :last-child, 727 -#xwikicontent .successmessage > :last-child, 728 -#xwikicontent .errormessage > :last-child{ 729 - margin-bottom:0!important; 747 +/* ========================================================= 748 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 749 + ========================================================= */ 750 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 751 + display:grid!important; 752 + grid-template-columns:minmax(0,1fr)!important; 753 + grid-auto-rows:auto!important; 754 + width:100%!important; 755 + max-width:none!important; 756 + box-sizing:border-box!important; 757 + justify-items:start!important; 758 + align-items:start!important; 759 + gap:2px!important; 760 + text-align:left!important; 761 + text-align-last:left!important; 762 + text-justify:auto!important; 763 + word-spacing:normal!important; 764 + white-space:normal!important; 730 730 } 731 - 732 -#xwikicontent [data-sn-equal-height-managed], 733 -#xwikicontent [data-sn-first-section-aligned], 734 -#xwikicontent [data-sn-first-content-aligned]{ 735 - box-sizing:border-box; 766 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 767 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 768 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 769 + display:block!important; 770 + width:100%!important; 771 + margin:0!important; 772 + text-align:left!important; 773 + text-align-last:left!important; 774 + text-justify:auto!important; 775 + word-spacing:normal!important; 776 + white-space:normal!important; 736 736 } 737 737 </style> 738 738 739 -<script data-sn- horizontal-box-harmonizer="7">780 +<script data-sn-service-navigator-master="1"> 740 740 (function(){ 741 741 "use strict"; 742 742 784 + var PAGE_KIND="overview"; 785 + var PLACEHOLDER=false; 786 + var PLACEHOLDER_LABEL="COMING SOON"; 787 + 743 743 var MOBILE_MAX=767; 744 744 var ROW_TOLERANCE=6; 745 - var MIN_W=150; 746 - var MIN_H=36; 747 - var MAX_PARENT_CHILDREN=18; 748 - var SEARCH_DEPTH=5; 749 749 var RESIZE_DEBOUNCE=220; 750 - var MIN_WIDTH_CHANGE=2; 751 751 752 752 var root= 753 753 document.getElementById("xwikicontent")|| ... ... @@ -757,142 +757,114 @@ 757 757 758 758 if(!root)return; 759 759 760 - var heightManaged=new Set(); 761 - var sectionManaged=new Set(); 762 - var contentManaged=new Set(); 800 + var managedHeight=new Set(); 801 + var managedMargin=new Set(); 802 + var originalHeight=new WeakMap(); 803 + var originalMargin=new WeakMap(); 763 763 764 - var originalMinHeight=new WeakMap(); 765 - var originalMarginTop=new WeakMap(); 766 - 767 767 var resizeTimer=0; 768 - var lastWidth=-1; 769 - var hasApplied=false; 770 - var applying=false; 806 + var running=false; 771 771 772 - function num(v){ 773 - var n=parseFloat(v); 774 - return Number.isFinite(n)?n:0; 775 - } 776 - 777 - function visible(el,minW,minH){ 778 - if(!el||el.nodeType!==1)return false; 779 - 780 - var s=getComputedStyle(el); 781 - 782 - if( 783 - s.display==="none"|| 784 - s.visibility==="hidden"|| 785 - Number(s.opacity)===0 786 - ){ 787 - return false; 808 + var THEMES=[ 809 + { 810 + name:"BLUE", 811 + accent:"#21b6d7", 812 + bg:"#eaf7fb", 813 + text:"#315d68", 814 + labels:[ 815 + "HIER STARTEN", 816 + "ENTSCHEIDEN", 817 + "ÜBERPRÜFEN & ANPASSEN", 818 + "START HERE", 819 + "DECIDE", 820 + "REVIEW & ADAPT" 821 + ] 822 + }, 823 + { 824 + name:"RED", 825 + accent:"#e94b13", 826 + bg:"#fff1ec", 827 + text:"#8a4d36", 828 + labels:[ 829 + "PLANEN & ORGANISIEREN", 830 + "ORGANISIEREN & DOKUMENTIEREN", 831 + "PUBLIZIEREN & PRÄSENTIEREN", 832 + "PLAN & ORGANISE", 833 + "PLAN & ORGANIZE", 834 + "ORGANISE & DOCUMENT", 835 + "ORGANIZE & DOCUMENT", 836 + "PUBLISH & PRESENT" 837 + ] 838 + }, 839 + { 840 + name:"YELLOW", 841 + accent:"#f0aa00", 842 + bg:"#fff8e7", 843 + text:"#785b17", 844 + labels:[ 845 + "SCHÜTZEN & KLÄREN", 846 + "STANDARDISIEREN & IDENTIFIZIEREN", 847 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 848 + "PROTECT & CLARIFY", 849 + "STANDARDISE & IDENTIFY", 850 + "STANDARDIZE & IDENTIFY", 851 + "OPEN, REUSE & MAKE FINDABLE" 852 + ] 853 + }, 854 + { 855 + name:"GREEN", 856 + accent:"#38b76a", 857 + bg:"#edf9f1", 858 + text:"#3f7451", 859 + labels:[ 860 + "INFRASTRUKTUR EINRICHTEN", 861 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 862 + "SPEICHERN & ZUGRIFF STEUERN", 863 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 864 + "SET UP INFRASTRUCTURE", 865 + "SET UP INFRASTRUCTURE & COLLABORATION", 866 + "STORE & CONTROL ACCESS", 867 + "REPOSITORY, PRESERVE & HAND OVER" 868 + ] 788 788 } 870 + ]; 789 789 790 - var r=el.getBoundingClientRect(); 791 - 792 - return ( 793 - r.width>=(minW||1)&& 794 - r.height>=(minH||1) 795 - ); 872 + function num(value){ 873 + var n=parseFloat(value); 874 + return Number.isFinite(n)?n:0; 796 796 } 797 797 798 - function normal izeText(text){799 - return String( text||"")877 + function norm(value){ 878 + return String(value||"") 800 800 .replace(/\s+/g," ") 801 801 .trim() 802 802 .toUpperCase(); 803 803 } 804 804 805 - function excluded(el){ 806 - return ( 807 - !el.matches|| 808 - el.matches( 809 - "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]" 810 - ) 811 - ); 812 - } 884 + function visible(el){ 885 + if(!el||el.nodeType!==1)return false; 813 813 814 - /* ---------- Custom coloured callouts ---------- */ 887 + var style=getComputedStyle(el); 888 + var rect=el.getBoundingClientRect(); 815 815 816 - function nativeCallout(el){ 817 - var c= 818 - typeof el.className==="string" 819 - ? el.className.toLowerCase() 820 - : ""; 821 - 822 822 return ( 823 - /(^|\s)(infomessage|warningmessage|successmessage|errormessage)(\s|$)/.test(c) 891 + style.display!=="none"&& 892 + style.visibility!=="hidden"&& 893 + rect.width>20&& 894 + rect.height>4 824 824 ); 825 825 } 826 826 827 - function customCallout(el){ 828 - if(!visible(el,220,42)||excluded(el))return false; 829 - 830 - var r=el.getBoundingClientRect(); 831 - 832 - if(r.height>520)return false; 833 - 834 - var s=getComputedStyle(el); 835 - 836 - var bg= 837 - s.backgroundColor&& 838 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 839 - s.backgroundColor!=="transparent"&& 840 - s.backgroundColor!=="rgb(255, 255, 255)"; 841 - 842 - var left= 843 - num(s.borderLeftWidth); 844 - 845 - return ( 846 - bg&& 847 - left>=2 848 - ); 849 - } 850 - 851 - function harmoniseCustomCallouts(){ 852 - Array.from( 853 - root.querySelectorAll( 854 - "div,aside,section" 855 - ) 856 - ).forEach(function(el){ 857 - if(nativeCallout(el))return; 858 - if(!customCallout(el))return; 859 - 860 - var s=getComputedStyle(el); 861 - 862 - el.setAttribute( 863 - "data-sn-callout-harmonized", 864 - "1" 865 - ); 866 - 867 - if( 868 - s.borderLeftColor 869 - ){ 870 - el.style.setProperty( 871 - "--sn-callout-accent", 872 - s.borderLeftColor 873 - ); 874 - } 875 - }); 876 - } 877 - 878 - /* ---------- Restore only values V7 itself changed ---------- */ 879 - 880 - function saveOriginal(el,map,property){ 898 + function saveStyle(el,map,property){ 881 881 if(map.has(el))return; 882 882 883 883 map.set(el,{ 884 - value: 885 - el.style.getPropertyValue( 886 - property 887 - ), 888 - priority: 889 - el.style.getPropertyPriority( 890 - property 891 - ) 902 + value:el.style.getPropertyValue(property), 903 + priority:el.style.getPropertyPriority(property) 892 892 }); 893 893 } 894 894 895 - function restore Original(el,map,property){907 + function restoreStyle(el,map,property){ 896 896 var original=map.get(el); 897 897 898 898 if(original&&original.value){ ... ... @@ -902,770 +902,1076 @@ 902 902 original.priority||"" 903 903 ); 904 904 }else{ 905 - el.style.removeProperty( 906 - property 907 - ); 917 + el.style.removeProperty(property); 908 908 } 909 909 } 910 910 911 911 function resetRuntime(){ 912 - heightManaged.forEach(function(el){913 - restore Original(922 + managedHeight.forEach(function(el){ 923 + restoreStyle( 914 914 el, 915 - original MinHeight,925 + originalHeight, 916 916 "min-height" 917 917 ); 918 - 919 919 el.removeAttribute( 920 - "data-sn-equal-height -managed"929 + "data-sn-master-equal-height" 921 921 ); 922 922 }); 923 923 924 - sectionManaged.forEach(function(el){925 - restore Original(933 + managedMargin.forEach(function(el){ 934 + restoreStyle( 926 926 el, 927 - originalMargin Top,936 + originalMargin, 928 928 "margin-top" 929 929 ); 930 - 931 931 el.removeAttribute( 932 - "data-sn-first- section-aligned"940 + "data-sn-master-first-row" 933 933 ); 934 934 }); 935 935 936 - contentManaged.forEach(function(el){ 937 - restoreOriginal( 938 - el, 939 - originalMarginTop, 940 - "margin-top" 941 - ); 944 + managedHeight.clear(); 945 + managedMargin.clear(); 946 + } 942 942 943 - el.removeAttribute( 944 - "data-sn-first-content-aligned" 945 - ); 946 - }); 948 + function themeFor(text){ 949 + var value=norm(text); 947 947 948 - heightManaged.clear(); 949 - sectionManaged.clear(); 950 - contentManaged.clear(); 951 - } 951 + for(var i=0;i<THEMES.length;i++){ 952 + for(var j=0;j<THEMES[i].labels.length;j++){ 953 + var label=THEMES[i].labels[j]; 952 952 953 - /* ---------- Card detection ---------- */ 955 + /* Match only actual thematic labels. 956 + Do not colour ordinary prose such as: 957 + "Decide how outputs should be shared..." */ 958 + if(value===label){ 959 + return THEMES[i]; 960 + } 961 + } 962 + } 954 954 955 - function namedLikeBox(el){ 956 - var c= 957 - typeof el.className==="string" 958 - ? el.className 959 - : ""; 964 + return null; 965 + } 960 960 961 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c); 967 + /* ======================================================= 968 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 969 + ======================================================= */ 970 + 971 + function colourDistance(a,b){ 972 + return Math.sqrt( 973 + Math.pow(a[0]-b[0],2)+ 974 + Math.pow(a[1]-b[1],2)+ 975 + Math.pow(a[2]-b[2],2) 976 + ); 962 962 } 963 963 964 - function boxLike(el){ 965 - if( 966 - !visible(el,MIN_W,MIN_H)|| 967 - excluded(el) 968 - ){ 969 - return false; 970 - } 979 + function makeFilledRedOrangeCTAsBorderless(){ 980 + var RED_ORANGE=[233,75,19]; 971 971 972 - var s=getComputedStyle(el); 973 - var r=el.getBoundingClientRect(); 982 + Array.from( 983 + root.querySelectorAll( 984 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 985 + ) 986 + ).forEach(function(el){ 987 + if(!visible(el))return; 974 974 975 - var border= 976 - num(s.borderTopWidth)+ 977 - num(s.borderRightWidth)+ 978 - num(s.borderBottomWidth)+ 979 - num(s.borderLeftWidth); 989 + var style=getComputedStyle(el); 990 + var rgb=parseRGB(style.backgroundColor); 980 980 981 - var radius=Math.max( 982 - num(s.borderTopLeftRadius), 983 - num(s.borderTopRightRadius), 984 - num(s.borderBottomLeftRadius), 985 - num(s.borderBottomRightRadius) 986 - ); 992 + if(!rgb)return; 987 987 988 - var bg= 989 - s.backgroundColor&& 990 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 991 - s.backgroundColor!=="transparent"; 994 + if( 995 + colourDistance( 996 + rgb, 997 + RED_ORANGE 998 + )>55 999 + ){ 1000 + return; 1001 + } 992 992 993 - var shadow= 994 - s.boxShadow&& 995 - s.boxShadow!=="none"; 1003 + var rect=el.getBoundingClientRect(); 996 996 997 - return ( 998 - namedLikeBox(el)|| 999 - border>=1|| 1000 - (bg&&radius>=3)|| 1001 - (shadow&&r.width>=180) 1002 - ); 1003 - } 1005 + if( 1006 + rect.width<80|| 1007 + rect.height<24 1008 + ){ 1009 + return; 1010 + } 1004 1004 1005 - function pickTarget(child){ 1006 - if(!visible(child,MIN_W,MIN_H))return null; 1012 + el.style.setProperty( 1013 + "border", 1014 + "none", 1015 + "important" 1016 + ); 1007 1007 1008 - if(boxLike(child))return child; 1018 + el.style.setProperty( 1019 + "border-left", 1020 + "none", 1021 + "important" 1022 + ); 1009 1009 1010 - var cr=child.getBoundingClientRect(); 1011 - var q=[]; 1024 + el.style.setProperty( 1025 + "border-top", 1026 + "none", 1027 + "important" 1028 + ); 1012 1012 1013 - Array.from(child.children||[]).forEach(function(el){ 1014 - q.push({el:el,depth:1}); 1030 + el.style.setProperty( 1031 + "border-right", 1032 + "none", 1033 + "important" 1034 + ); 1035 + 1036 + el.style.setProperty( 1037 + "border-bottom", 1038 + "none", 1039 + "important" 1040 + ); 1041 + 1042 + el.style.setProperty( 1043 + "box-shadow", 1044 + "none", 1045 + "important" 1046 + ); 1015 1015 }); 1048 + } 1016 1016 1017 - var best=null; 1018 - var bestScore=-Infinity; 1050 + /* ======================================================= 1051 + FULL-WIDTH THREE-LINE AREA LABELS 1052 + ======================================================= */ 1019 1019 1020 - while(q.length){ 1021 - var item=q.shift(); 1022 - var el=item.el; 1054 + function compactText(value){ 1055 + return String(value||"") 1056 + .replace(/\s+/g," ") 1057 + .trim(); 1058 + } 1023 1023 1024 - if(!visible(el,MIN_W,MIN_H))continue; 1060 + function makeThreeLineAreaLabels(){ 1061 + Array.from( 1062 + root.querySelectorAll( 1063 + ".arsn-area-label" 1064 + ) 1065 + ).forEach(function(label){ 1066 + if( 1067 + label.getAttribute( 1068 + "data-sn-three-line" 1069 + )==="1" 1070 + ){ 1071 + return; 1072 + } 1025 1025 1026 - var r=el.getBoundingClientRect(); 1074 + var number= 1075 + label.querySelector( 1076 + ":scope > .arsn-area-number" 1077 + ); 1027 1027 1079 + var action= 1080 + label.querySelector( 1081 + ":scope > .arsn-area-action" 1082 + ); 1083 + 1028 1028 if( 1029 - r .width>=cr.width*.68&&1030 - boxLike(el)1085 + !number|| 1086 + !action 1031 1031 ){ 1032 - var widthFit= 1033 - 1-Math.min( 1034 - 1, 1035 - Math.abs(cr.width-r.width)/ 1036 - Math.max(1,cr.width) 1037 - ); 1088 + return; 1089 + } 1038 1038 1039 - var topFit= 1040 - 1-Math.min( 1041 - 1, 1042 - Math.abs(cr.top-r.top)/100 1043 - ); 1091 + var clone= 1092 + label.cloneNode(true); 1044 1044 1045 - var score= 1046 - widthFit*6+ 1047 - topFit*3+ 1048 - Math.min(r.height,900)/450+ 1049 - Math.min(r.width*r.height,900000)/900000; 1094 + var cloneNumber= 1095 + clone.querySelector( 1096 + ":scope > .arsn-area-number" 1097 + ); 1050 1050 1051 - if(score>bestScore){ 1052 - best=el; 1053 - bestScore=score; 1054 - } 1099 + var cloneAction= 1100 + clone.querySelector( 1101 + ":scope > .arsn-area-action" 1102 + ); 1103 + 1104 + if(cloneNumber){ 1105 + cloneNumber.remove(); 1055 1055 } 1056 1056 1057 - if(item.depth<SEARCH_DEPTH){ 1058 - Array.from(el.children||[]).forEach(function(next){ 1059 - q.push({ 1060 - el:next, 1061 - depth:item.depth+1 1062 - }); 1063 - }); 1108 + if(cloneAction){ 1109 + cloneAction.remove(); 1064 1064 } 1065 - } 1066 1066 1067 - return best; 1068 - } 1112 + var titleText= 1113 + compactText( 1114 + clone.textContent 1115 + ); 1069 1069 1070 - function groupRows(entries){ 1071 - var groups=[]; 1117 + if(!titleText){ 1118 + return; 1119 + } 1072 1072 1073 - entries 1074 - .slice() 1075 - .sort(function(a,b){ 1076 - return ( 1077 - a.rect.top-b.rect.top|| 1078 - a.rect.left-b.rect.left 1121 + var numberNode= 1122 + number.cloneNode(true); 1123 + 1124 + var actionNode= 1125 + action.cloneNode(true); 1126 + 1127 + var titleNode= 1128 + document.createElement( 1129 + "span" 1079 1079 ); 1080 - }) 1081 - .forEach(function(entry){ 1082 - var group=null; 1083 1083 1084 - for(var i=0;i<groups.length;i++){ 1085 - if( 1086 - Math.abs( 1087 - groups[i].top- 1088 - entry.rect.top 1089 - )<=ROW_TOLERANCE 1090 - ){ 1091 - group=groups[i]; 1092 - break; 1093 - } 1094 - } 1132 + titleNode.className= 1133 + "sn-area-label-title"; 1095 1095 1096 - if(!group){ 1097 - group={ 1098 - top:entry.rect.top, 1099 - entries:[] 1100 - }; 1101 - groups.push(group); 1102 - } 1135 + titleNode.textContent= 1136 + titleText; 1103 1103 1104 - group.entries.push(entry); 1105 - }); 1138 + while(label.firstChild){ 1139 + label.removeChild( 1140 + label.firstChild 1141 + ); 1142 + } 1106 1106 1107 - return groups; 1144 + label.appendChild( 1145 + numberNode 1146 + ); 1147 + 1148 + label.appendChild( 1149 + titleNode 1150 + ); 1151 + 1152 + label.appendChild( 1153 + actionNode 1154 + ); 1155 + 1156 + label.setAttribute( 1157 + "data-sn-three-line", 1158 + "1" 1159 + ); 1160 + 1161 + var head= 1162 + label.closest( 1163 + ".arsn-area-head" 1164 + ); 1165 + 1166 + if(head){ 1167 + head.style.setProperty( 1168 + "width", 1169 + "100%", 1170 + "important" 1171 + ); 1172 + 1173 + head.style.setProperty( 1174 + "max-width", 1175 + "100%", 1176 + "important" 1177 + ); 1178 + 1179 + head.style.setProperty( 1180 + "box-sizing", 1181 + "border-box", 1182 + "important" 1183 + ); 1184 + } 1185 + }); 1108 1108 } 1109 1109 1110 - function validRow(group){ 1111 - if(group.entries.length<2)return false; 1188 + /* ======================================================= 1189 + PLACEHOLDER BADGE 1190 + ======================================================= */ 1112 1112 1113 - var lefts= 1114 - group.entries 1115 - .map(function(e){return e.rect.left;}) 1116 - .sort(function(a,b){return a-b;}); 1192 + function applyPlaceholderBadge(){ 1193 + if(!PLACEHOLDER)return; 1117 1117 1118 1118 if( 1119 - lefts[lefts.length-1]-1120 - lefts[0]<1121 - 801196 + document.querySelector( 1197 + ".sn-coming-soon-badge" 1198 + ) 1122 1122 ){ 1123 - return false;1200 + return; 1124 1124 } 1125 1125 1126 - var widths= 1127 - group.entries 1128 - .map(function(e){return e.rect.width;}) 1129 - .filter(function(w){return w>0;}); 1203 + var title= 1204 + document.querySelector( 1205 + "#document-title" 1206 + )|| 1207 + document.querySelector( 1208 + "h1" 1209 + ); 1130 1130 1131 - if( widths.length<2)returnfalse;1211 + if(!title)return; 1132 1132 1133 - var minW= 1134 - Math.min.apply(Math,widths); 1213 + var badge= 1214 + document.createElement( 1215 + "span" 1216 + ); 1135 1135 1136 - var maxW=1137 - Math.max.apply(Math,widths);1218 + badge.className= 1219 + "sn-coming-soon-badge"; 1138 1138 1139 - return ( 1140 - maxW/ 1141 - Math.max(1,minW)<= 1142 - 1.9 1221 + badge.textContent= 1222 + PLACEHOLDER_LABEL; 1223 + 1224 + badge.setAttribute( 1225 + "aria-label", 1226 + PLACEHOLDER_LABEL 1143 1143 ); 1228 + 1229 + title.appendChild( 1230 + badge 1231 + ); 1144 1144 } 1145 1145 1146 - /* ---------- Known ARSN first section bars ---------- */ 1234 + /* ======================================================= 1235 + DETAIL PAGE OWN-ACCENT PROPAGATION 1236 + ======================================================= */ 1147 1147 1148 - function knownBar(el){ 1149 - var text= 1150 - normalizeText( 1151 - el.textContent 1152 - ); 1238 + function parseRGB(value){ 1239 + var match=String(value||"").match( 1240 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 1241 + ); 1153 1153 1154 - return ( 1155 - text==="HIER STARTEN"|| 1156 - text==="ORGANISIEREN & DOKUMENTIEREN"|| 1157 - text==="ENTSCHEIDEN"|| 1158 - text==="START HERE"|| 1159 - text==="GET STARTED"|| 1160 - text==="ORGANISE & DOCUMENT"|| 1161 - text==="ORGANIZE & DOCUMENT"|| 1162 - text==="DECIDE" 1243 + if(!match)return null; 1244 + 1245 + return [ 1246 + Number(match[1]), 1247 + Number(match[2]), 1248 + Number(match[3]) 1249 + ]; 1250 + } 1251 + 1252 + function distance(a,b){ 1253 + return Math.sqrt( 1254 + Math.pow(a[0]-b[0],2)+ 1255 + Math.pow(a[1]-b[1],2)+ 1256 + Math.pow(a[2]-b[2],2) 1163 1163 ); 1164 1164 } 1165 1165 1166 - function findKnownBar(card){ 1167 - var cardRect= 1168 - card.getBoundingClientRect(); 1260 + function paletteMatch(cssColor){ 1261 + var rgb=parseRGB(cssColor); 1169 1169 1170 - var rows= 1171 - Array.from( 1172 - card.querySelectorAll( 1173 - "div,p,span,strong,h3,h4,h5,h6" 1174 - ) 1175 - ) 1176 - .filter(function(el){ 1177 - if(!visible(el,20,6))return false; 1178 - if(!knownBar(el))return false; 1263 + if(!rgb)return null; 1179 1179 1180 - var r=el.getBoundingClientRect(); 1265 + var palette=[ 1266 + {hex:"#21b6d7",rgb:[33,182,215]}, 1267 + {hex:"#e94b13",rgb:[233,75,19]}, 1268 + {hex:"#f0aa00",rgb:[240,170,0]}, 1269 + {hex:"#38b76a",rgb:[56,183,106]} 1270 + ]; 1181 1181 1182 - var rel= 1183 - r.top- 1184 - cardRect.top; 1272 + var best=null; 1273 + var bestDistance=Infinity; 1185 1185 1186 - return ( 1187 - rel>=35&& 1188 - rel<= 1189 - cardRect.height*.75 1190 - ); 1191 - }) 1192 - .sort(function(a,b){ 1193 - return ( 1194 - a.getBoundingClientRect().top- 1195 - b.getBoundingClientRect().top 1196 - ); 1197 - }); 1275 + palette.forEach(function(item){ 1276 + var d=distance(rgb,item.rgb); 1198 1198 1199 - return rows[0]||null; 1278 + if(d<bestDistance){ 1279 + best=item; 1280 + bestDistance=d; 1281 + } 1282 + }); 1283 + 1284 + return bestDistance<=30 1285 + ?best 1286 + :null; 1200 1200 } 1201 1201 1202 - function alignKnownBars(cards){ 1203 - var rows= 1204 - cards.map(function(card){ 1205 - var bar= 1206 - findKnownBar(card); 1289 + function propagateDetailAccents(){ 1290 + if(PAGE_KIND!=="detail")return; 1207 1207 1208 - if(!bar)return null; 1292 + Array.from( 1293 + root.querySelectorAll( 1294 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 1295 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 1296 + ) 1297 + ).forEach(function(el){ 1298 + if(!visible(el))return; 1209 1209 1210 - var cr= 1211 - card.getBoundingClientRect(); 1300 + var style=getComputedStyle(el); 1212 1212 1213 - var br= 1214 - bar.getBoundingClientRect(); 1302 + if( 1303 + num(style.borderTopWidth)>=2 1304 + ){ 1305 + var match= 1306 + paletteMatch( 1307 + style.borderTopColor 1308 + ); 1215 1215 1216 - return { 1217 - bar:bar, 1218 - relativeTop: 1219 - br.top- 1220 - cr.top 1221 - }; 1222 - }); 1310 + if(match){ 1311 + el.style.setProperty( 1312 + "border-left", 1313 + "4px solid "+match.hex, 1314 + "important" 1315 + ); 1316 + } 1317 + } 1318 + }); 1223 1223 1224 - if( 1225 - rows.some(function(row){ 1226 - return !row; 1227 - }) 1228 - ){ 1229 - return false; 1230 - } 1320 + // Warning families: explicit safety override. 1321 + Array.from( 1322 + root.querySelectorAll( 1323 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 1324 + ".warn,.warning,.warningmessage,.errormessage" 1325 + ) 1326 + ).forEach(function(el){ 1327 + if(!visible(el))return; 1231 1231 1232 - var target= 1233 - Math.max.apply( 1234 - Math, 1235 - rows.map(function(row){ 1236 - return row.relativeTop; 1237 - }) 1329 + el.style.setProperty( 1330 + "border-left", 1331 + "4px solid #e94b13", 1332 + "important" 1238 1238 ); 1334 + }); 1239 1239 1240 - rows.forEach(function(row){ 1241 - var delta= 1242 - target- 1243 - row.relativeTop; 1336 + // Info families: explicit orientation override. 1337 + Array.from( 1338 + root.querySelectorAll( 1339 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 1340 + ) 1341 + ).forEach(function(el){ 1342 + if(!visible(el))return; 1244 1244 1245 - if(delta<=1)return; 1246 - 1247 - saveOriginal( 1248 - row.bar, 1249 - originalMarginTop, 1250 - "margin-top" 1344 + el.style.setProperty( 1345 + "border-left", 1346 + "4px solid #21b6d7", 1347 + "important" 1251 1251 ); 1349 + }); 1350 + } 1252 1252 1253 - var current= 1254 - num( 1255 - getComputedStyle( 1256 - row.bar 1257 - ).marginTop 1352 + /* ======================================================= 1353 + OVERVIEW SEMANTIC THEME PALETTE 1354 + ======================================================= */ 1355 + 1356 + function smallestThemeHeaders(){ 1357 + return Array.from( 1358 + root.querySelectorAll( 1359 + "div,span,p,strong,h3,h4,h5,h6" 1360 + ) 1361 + ).filter(function(el){ 1362 + if(!visible(el))return false; 1363 + if(!themeFor(el.textContent))return false; 1364 + 1365 + return !Array.from( 1366 + el.children||[] 1367 + ).some(function(child){ 1368 + return !!themeFor( 1369 + child.textContent 1258 1258 ); 1371 + }); 1372 + }); 1373 + } 1259 1259 1260 - row.bar.style.setProperty( 1261 - "margin-top", 1262 - ( 1263 - current+ 1264 - delta 1265 - )+"px" 1266 - ); 1375 + function findOverviewCard(header){ 1376 + var node=header.parentElement; 1377 + var candidates=[]; 1267 1267 1268 - row.bar.setAttribute( 1269 - "data-sn-first-section-aligned", 1270 - "7" 1271 - ); 1379 + while(node&&node!==root){ 1380 + var rect=node.getBoundingClientRect(); 1381 + var style=getComputedStyle(node); 1272 1272 1273 - sectionManaged.add( 1274 - row.bar 1383 + var border= 1384 + num(style.borderTopWidth)+ 1385 + num(style.borderRightWidth)+ 1386 + num(style.borderBottomWidth)+ 1387 + num(style.borderLeftWidth); 1388 + 1389 + if( 1390 + rect.width>=220&& 1391 + rect.width<=800&& 1392 + rect.height>=120&& 1393 + border>=1 1394 + ){ 1395 + candidates.push(node); 1396 + } 1397 + 1398 + node=node.parentElement; 1399 + } 1400 + 1401 + if(!candidates.length)return null; 1402 + 1403 + candidates.sort(function(a,b){ 1404 + return ( 1405 + b.getBoundingClientRect().height- 1406 + a.getBoundingClientRect().height 1275 1275 ); 1276 1276 }); 1277 1277 1278 - return t rue;1410 + return candidates[0]; 1279 1279 } 1280 1280 1281 - /* ---------- Generic first content after heading ---------- */ 1282 - 1283 - function heading(card){ 1284 - var cr= 1413 + function rowCandidates(link,card){ 1414 + var result=[]; 1415 + var cardRect= 1285 1285 card.getBoundingClientRect(); 1286 1286 1287 - var rows= 1288 - Array.from( 1289 - card.querySelectorAll( 1290 - "h1,h2,h3,h4,h5,h6,.box-title,[role=heading]" 1291 - ) 1292 - ) 1293 - .filter(function(el){ 1294 - if(!visible(el,20,8))return false; 1418 + var node=link; 1295 1295 1296 - var r=el.getBoundingClientRect(); 1420 + while(node&&node!==card){ 1421 + if(visible(node)){ 1422 + var rect= 1423 + node.getBoundingClientRect(); 1297 1297 1298 - var rel= 1299 - r.top- 1300 - cr.top; 1425 + if( 1426 + rect.height<=105&& 1427 + rect.width>= 1428 + cardRect.width*.50&& 1429 + rect.width<= 1430 + cardRect.width*1.03 1431 + ){ 1432 + result.push(node); 1433 + } 1434 + } 1301 1301 1436 + node=node.parentElement; 1437 + } 1438 + 1439 + return result; 1440 + } 1441 + 1442 + function chooseOuterRow( 1443 + candidates, 1444 + link 1445 + ){ 1446 + if(!candidates.length){ 1447 + return link; 1448 + } 1449 + 1450 + var bordered= 1451 + candidates.filter(function(el){ 1302 1302 return ( 1303 - rel>=0&& 1304 - rel<= 1305 - Math.min( 1306 - 160, 1307 - cr.height*.45 1308 - ) 1453 + num( 1454 + getComputedStyle(el) 1455 + .borderLeftWidth 1456 + )>=1 1309 1309 ); 1310 - }) 1311 - .sort(function(a,b){ 1312 - return ( 1313 - a.getBoundingClientRect().top- 1314 - b.getBoundingClientRect().top 1315 - ); 1316 1316 }); 1317 1317 1318 - return rows[0]||null; 1460 + var pool= 1461 + bordered.length 1462 + ?bordered 1463 + :candidates; 1464 + 1465 + pool.sort(function(a,b){ 1466 + var ar= 1467 + a.getBoundingClientRect(); 1468 + 1469 + var br= 1470 + b.getBoundingClientRect(); 1471 + 1472 + return ( 1473 + ar.left-br.left|| 1474 + br.width-ar.width 1475 + ); 1476 + }); 1477 + 1478 + return pool[0]||link; 1319 1319 } 1320 1320 1321 - function firstContent(card,h){ 1322 - if(!h)return null; 1481 + function applyOverviewPalette(){ 1482 + if(PAGE_KIND!=="overview"){ 1483 + return []; 1484 + } 1323 1323 1324 - var cr= 1325 - card.getBoundingClientRect(); 1486 + var headers= 1487 + smallestThemeHeaders() 1488 + .map(function(el){ 1489 + return { 1490 + el:el, 1491 + theme: 1492 + themeFor( 1493 + el.textContent 1494 + ), 1495 + card: 1496 + findOverviewCard( 1497 + el 1498 + ) 1499 + }; 1500 + }) 1501 + .filter(function(row){ 1502 + return !!row.card; 1503 + }); 1326 1326 1327 - var hr=1328 - h.getBoundingClientRect();1505 + var unique=[]; 1506 + var seenHeaders=new Set(); 1329 1329 1330 - var rows= 1331 - Array.from( 1332 - card.querySelectorAll( 1333 - "p,div,ul,ol,dl,blockquote" 1334 - ) 1335 - ) 1336 - .filter(function(el){ 1337 - if( 1338 - el===h|| 1339 - h.contains(el)|| 1340 - el.contains(h) 1341 - ){ 1342 - return false; 1343 - } 1508 + headers.forEach(function(row){ 1509 + var key= 1510 + row.theme.name+ 1511 + "|"+ 1512 + Math.round( 1513 + row.card 1514 + .getBoundingClientRect() 1515 + .left 1516 + )+ 1517 + "|"+ 1518 + Math.round( 1519 + row.el 1520 + .getBoundingClientRect() 1521 + .top 1522 + ); 1344 1344 1345 - if(!visible(el,30,8))return false; 1524 + if(!seenHeaders.has(key)){ 1525 + seenHeaders.add(key); 1526 + unique.push(row); 1527 + } 1528 + }); 1346 1346 1347 - vartext=1348 - String(el.textContent||"")1349 - .replace(/\s+/g," ")1350 - .trim();1530 + unique.forEach(function(row){ 1531 + var headerRect= 1532 + row.el 1533 + .getBoundingClientRect(); 1351 1351 1352 - if(text.length<3)return false; 1535 + row.el.style.setProperty( 1536 + "background", 1537 + row.theme.bg, 1538 + "important" 1539 + ); 1353 1353 1354 - var r=el.getBoundingClientRect(); 1541 + row.el.style.setProperty( 1542 + "color", 1543 + row.theme.text, 1544 + "important" 1545 + ); 1355 1355 1356 - if( 1357 - r.top< 1358 - hr.bottom-1 1359 - ){ 1360 - return false; 1361 - } 1547 + row.el.style.setProperty( 1548 + "text-align", 1549 + "left", 1550 + "important" 1551 + ); 1362 1362 1553 + row.el.style.setProperty( 1554 + "word-spacing", 1555 + "normal", 1556 + "important" 1557 + ); 1558 + 1559 + var later= 1560 + unique 1561 + .filter(function(other){ 1562 + return ( 1563 + other.card===row.card&& 1564 + other.el 1565 + .getBoundingClientRect() 1566 + .top> 1567 + headerRect.top+2 1568 + ); 1569 + }) 1570 + .sort(function(a,b){ 1571 + return ( 1572 + a.el 1573 + .getBoundingClientRect() 1574 + .top- 1575 + b.el 1576 + .getBoundingClientRect() 1577 + .top 1578 + ); 1579 + }); 1580 + 1581 + var stopTop= 1582 + later.length 1583 + ?later[0].el 1584 + .getBoundingClientRect() 1585 + .top 1586 + :Infinity; 1587 + 1588 + Array.from( 1589 + row.card.querySelectorAll("a") 1590 + ).forEach(function(link){ 1363 1363 if( 1364 - r.top-cr.top> 1365 - Math.min( 1366 - 280, 1367 - cr.height*.65 1592 + link.classList && 1593 + link.classList.contains( 1594 + "arsn-phase-cta" 1368 1368 ) 1369 1369 ){ 1370 - return false;1597 + return; 1371 1371 } 1372 1372 1600 + if(!visible(link))return; 1601 + 1602 + var rect= 1603 + link.getBoundingClientRect(); 1604 + 1373 1373 if( 1374 - r.height> 1375 - cr.height*.58 1606 + rect.top<= 1607 + headerRect.bottom-2|| 1608 + rect.top>= 1609 + stopTop-2 1376 1376 ){ 1377 - return false;1611 + return; 1378 1378 } 1379 1379 1380 - r eturntrue;1381 - })1382 - .sort(function(a,b){1383 - varar=1384 - a.getBoundingClientRect();1614 + var candidates= 1615 + rowCandidates( 1616 + link, 1617 + row.card 1618 + ); 1385 1385 1386 - var br= 1387 - b.getBoundingClientRect(); 1620 + var target= 1621 + chooseOuterRow( 1622 + candidates, 1623 + link 1624 + ); 1388 1388 1389 - return ( 1390 - ar.top-br.top|| 1391 - ar.height-br.height 1626 + candidates.forEach(function(el){ 1627 + el.style.setProperty( 1628 + "border-left", 1629 + "0 solid transparent", 1630 + "important" 1631 + ); 1632 + }); 1633 + 1634 + target.style.setProperty( 1635 + "border-left", 1636 + "3px solid "+ 1637 + row.theme.accent, 1638 + "important" 1392 1392 ); 1640 + 1641 + target.style.setProperty( 1642 + "box-sizing", 1643 + "border-box", 1644 + "important" 1645 + ); 1393 1393 }); 1647 + }); 1394 1394 1395 - return rows[0]||null;1649 + return unique; 1396 1396 } 1397 1397 1398 - function alignGeneric(cards){ 1399 - var rows= 1400 - cards.map(function(card){ 1401 - var h= 1402 - heading(card); 1652 + /* ======================================================= 1653 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1654 + ======================================================= */ 1403 1403 1404 - var c= 1405 - firstContent( 1406 - card, 1407 - h 1408 - ); 1409 - 1410 - if(!h||!c)return null; 1411 - 1412 - var cr= 1413 - card.getBoundingClientRect(); 1414 - 1415 - var rr= 1416 - c.getBoundingClientRect(); 1417 - 1418 - return { 1419 - content:c, 1420 - relativeTop: 1421 - rr.top-cr.top 1422 - }; 1423 - }); 1424 - 1656 + function alignOverviewCards(headers){ 1425 1425 if( 1426 - rows.some(function(row){ 1427 - return !row; 1428 - }) 1658 + PAGE_KIND!=="overview"|| 1659 + window.innerWidth<=MOBILE_MAX 1429 1429 ){ 1430 - return false;1661 + return; 1431 1431 } 1432 1432 1433 - var target= 1434 - Math.max.apply( 1435 - Math, 1436 - rows.map(function(row){ 1437 - return row.relativeTop; 1438 - }) 1439 - ); 1664 + var cards=[]; 1665 + var seen=new Set(); 1440 1440 1441 - rows.forEach(function(row){ 1442 - var delta= 1443 - target- 1444 - row.relativeTop; 1667 + headers.forEach(function(row){ 1668 + if(!seen.has(row.card)){ 1669 + seen.add(row.card); 1670 + cards.push(row.card); 1671 + } 1672 + }); 1445 1445 1446 - if(delta<=1)return; 1674 + if(cards.length<2){ 1675 + return; 1676 + } 1447 1447 1448 - saveOriginal( 1449 - row.content, 1450 - originalMarginTop, 1451 - "margin-top" 1452 - ); 1678 + // Group cards by actual top position. 1679 + var groups=[]; 1453 1453 1454 - var current= 1455 - num( 1456 - getComputedStyle( 1457 - row.content 1458 - ).marginTop 1459 - ); 1681 + cards.forEach(function(card){ 1682 + var top= 1683 + card.getBoundingClientRect().top; 1460 1460 1461 - row.content.style.setProperty( 1462 - "margin-top", 1463 - ( 1464 - current+ 1465 - delta 1466 - )+"px" 1467 - ); 1685 + var group=null; 1468 1468 1469 - row.content.setAttribute( 1470 - "data-sn-first-content-aligned", 1471 - "7" 1472 - ); 1687 + for(var i=0;i<groups.length;i++){ 1688 + if( 1689 + Math.abs( 1690 + groups[i].top-top 1691 + )<=ROW_TOLERANCE 1692 + ){ 1693 + group=groups[i]; 1694 + break; 1695 + } 1696 + } 1473 1473 1474 - contentManaged.add( 1475 - row.content 1476 - ); 1698 + if(!group){ 1699 + group={ 1700 + top:top, 1701 + cards:[] 1702 + }; 1703 + groups.push(group); 1704 + } 1705 + 1706 + group.cards.push(card); 1477 1477 }); 1478 1478 1479 - return true; 1480 - } 1709 + groups.forEach(function(group){ 1710 + if(group.cards.length<2){ 1711 + return; 1712 + } 1481 1481 1482 - function applyRow(group){ 1483 - if(!validRow(group))return false; 1714 + var firstHeaders= 1715 + group.cards.map(function(card){ 1716 + var candidates= 1717 + headers 1718 + .filter(function(row){ 1719 + return row.card===card; 1720 + }) 1721 + .sort(function(a,b){ 1722 + return ( 1723 + a.el 1724 + .getBoundingClientRect() 1725 + .top- 1726 + b.el 1727 + .getBoundingClientRect() 1728 + .top 1729 + ); 1730 + }); 1484 1484 1485 - var cards=[]; 1486 - var seen=new Set(); 1732 + return candidates.length 1733 + ?candidates[0] 1734 + :null; 1735 + }); 1487 1487 1488 - group.entries.forEach(function(entry){ 1489 - if(!seen.has(entry.target)){ 1490 - seen.add(entry.target); 1491 - cards.push(entry.target); 1492 - } 1493 - }); 1737 + if( 1738 + !firstHeaders.some(function(row){ 1739 + return !row; 1740 + }) 1741 + ){ 1742 + var targetTop= 1743 + Math.max.apply( 1744 + Math, 1745 + firstHeaders.map(function(row){ 1746 + return ( 1747 + row.el 1748 + .getBoundingClientRect() 1749 + .top- 1750 + row.card 1751 + .getBoundingClientRect() 1752 + .top 1753 + ); 1754 + }) 1755 + ); 1494 1494 1495 - if(cards.length<2)return false; 1757 + firstHeaders.forEach(function(row){ 1758 + var relativeTop= 1759 + row.el 1760 + .getBoundingClientRect() 1761 + .top- 1762 + row.card 1763 + .getBoundingClientRect() 1764 + .top; 1496 1496 1497 - if( 1498 - !alignKnownBars(cards) 1499 - ){ 1500 - alignGeneric(cards); 1501 - } 1766 + var delta= 1767 + targetTop-relativeTop; 1502 1502 1503 - var maxHeight=0; 1769 + if(delta>1){ 1770 + saveStyle( 1771 + row.el, 1772 + originalMargin, 1773 + "margin-top" 1774 + ); 1504 1504 1505 - cards.forEach(function(card){ 1506 - maxHeight= 1507 - Math.max( 1508 - maxHeight, 1509 - card.getBoundingClientRect().height 1510 - ); 1511 - }); 1776 + var current= 1777 + num( 1778 + getComputedStyle( 1779 + row.el 1780 + ).marginTop 1781 + ); 1512 1512 1513 - maxHeight= 1514 - Math.ceil( 1515 - maxHeight 1516 - ); 1783 + row.el.style.setProperty( 1784 + "margin-top", 1785 + ( 1786 + current+delta 1787 + )+"px" 1788 + ); 1517 1517 1518 - if(maxHeight<MIN_H)return false; 1790 + row.el.setAttribute( 1791 + "data-sn-master-first-row", 1792 + "1" 1793 + ); 1519 1519 1520 - cards.forEach(function(card){1521 - saveOriginal(1522 - card,1523 - originalMinHeight,1524 - "min-height"1525 - );1795 + managedMargin.add( 1796 + row.el 1797 + ); 1798 + } 1799 + }); 1800 + } 1526 1526 1527 - card.style.setProperty( 1528 - "min-height", 1529 - maxHeight+"px" 1530 - ); 1802 + var maxHeight=0; 1531 1531 1532 - card.setAttribute( 1533 - "data-sn-equal-height-managed", 1534 - "7" 1535 - ); 1804 + group.cards.forEach(function(card){ 1805 + maxHeight= 1806 + Math.max( 1807 + maxHeight, 1808 + card 1809 + .getBoundingClientRect() 1810 + .height 1811 + ); 1812 + }); 1536 1536 1537 - heightManaged.add(card);1538 - });1814 + maxHeight= 1815 + Math.ceil(maxHeight); 1539 1539 1540 - return true; 1541 - } 1817 + group.cards.forEach(function(card){ 1818 + saveStyle( 1819 + card, 1820 + originalHeight, 1821 + "min-height" 1822 + ); 1542 1542 1543 - function calculate(force){ 1544 - if(applying)return; 1824 + card.style.setProperty( 1825 + "min-height", 1826 + maxHeight+"px" 1827 + ); 1545 1545 1546 - varwidth=1547 - Math.round(1548 - window.innerWidth1549 - ); 1829 + card.setAttribute( 1830 + "data-sn-master-equal-height", 1831 + "1" 1832 + ); 1550 1550 1551 - var meaningful= 1552 - lastWidth<0|| 1553 - Math.abs( 1554 - width- 1555 - lastWidth 1556 - )>= 1557 - MIN_WIDTH_CHANGE; 1834 + managedHeight.add( 1835 + card 1836 + ); 1837 + }); 1838 + }); 1839 + } 1558 1558 1841 + /* ======================================================= 1842 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1843 + ======================================================= */ 1844 + 1845 + function equaliseDetailGrids(){ 1559 1559 if( 1560 - hasApplied&& 1561 - !force&& 1562 - !meaningful 1847 + PAGE_KIND!=="detail"|| 1848 + window.innerWidth<=MOBILE_MAX 1563 1563 ){ 1564 1564 return; 1565 1565 } 1566 1566 1567 - applying=true; 1853 + var selectors=[ 1854 + ".arsn-grid", 1855 + ".arsn-grid-2", 1856 + ".arsn-grid-3", 1857 + ".dmp-grid", 1858 + ".ido-grid", 1859 + ".pp-grid" 1860 + ]; 1568 1568 1569 - try{ 1570 - harmoniseCustomCallouts(); 1862 + selectors.forEach(function(selector){ 1863 + Array.from( 1864 + root.querySelectorAll(selector) 1865 + ).forEach(function(grid){ 1866 + var children= 1867 + Array.from( 1868 + grid.children||[] 1869 + ).filter(visible); 1571 1571 1572 - if(width<=MOBILE_MAX){ 1573 - if(hasApplied){ 1574 - resetRuntime(); 1871 + if(children.length<2){ 1872 + return; 1575 1575 } 1576 1576 1577 - hasApplied=false; 1578 - lastWidth=width; 1579 - return; 1580 - } 1875 + var groups=[]; 1581 1581 1582 - if(hasApplied){ 1583 - resetRuntime(); 1584 - } 1877 + children.forEach(function(child){ 1878 + var top= 1879 + child 1880 + .getBoundingClientRect() 1881 + .top; 1585 1585 1586 - var parents= 1587 - Array.from( 1588 - root.querySelectorAll("*") 1589 - ) 1590 - .filter(function(parent){ 1591 - return ( 1592 - visible( 1593 - parent, 1594 - MIN_W, 1595 - MIN_H 1596 - )&& 1597 - parent.children&& 1598 - parent.children.length>=2&& 1599 - parent.children.length<= 1600 - MAX_PARENT_CHILDREN 1601 - ); 1602 - }); 1883 + var group=null; 1603 1603 1604 - var touched= 1605 - new Set(); 1885 + for(var i=0;i<groups.length;i++){ 1886 + if( 1887 + Math.abs( 1888 + groups[i].top-top 1889 + )<=ROW_TOLERANCE 1890 + ){ 1891 + group=groups[i]; 1892 + break; 1893 + } 1894 + } 1606 1606 1607 - parents.forEach(function(parent){ 1608 - var entries=[]; 1896 + if(!group){ 1897 + group={ 1898 + top:top, 1899 + items:[] 1900 + }; 1901 + groups.push(group); 1902 + } 1609 1609 1610 - Array.from( 1611 - parent.children 1612 - ).forEach(function(child){ 1613 - if( 1614 - !visible( 1615 - child, 1616 - MIN_W, 1617 - MIN_H 1618 - ) 1619 - ){ 1904 + group.items.push(child); 1905 + }); 1906 + 1907 + groups.forEach(function(group){ 1908 + if(group.items.length<2){ 1620 1620 return; 1621 1621 } 1622 1622 1623 - var target= 1624 - pickTarget(child); 1912 + var maxHeight=0; 1625 1625 1626 - if(!target)return; 1627 - 1628 - entries.push({ 1629 - target:target, 1630 - rect: 1631 - target.getBoundingClientRect() 1914 + group.items.forEach(function(item){ 1915 + maxHeight= 1916 + Math.max( 1917 + maxHeight, 1918 + item 1919 + .getBoundingClientRect() 1920 + .height 1921 + ); 1632 1632 }); 1633 - }); 1634 1634 1635 - groupRows( 1636 - entries 1637 - ).forEach(function(group){ 1638 - if(!validRow(group))return; 1924 + maxHeight= 1925 + Math.ceil(maxHeight); 1639 1639 1640 - var targets= 1641 - group.entries.map(function(entry){ 1642 - return entry.target; 1643 - }); 1927 + group.items.forEach(function(item){ 1928 + saveStyle( 1929 + item, 1930 + originalHeight, 1931 + "min-height" 1932 + ); 1644 1644 1645 - if( 1646 - !targets.some(function(el){ 1647 - return !touched.has(el); 1648 - }) 1649 - ){ 1650 - return; 1651 - } 1934 + item.style.setProperty( 1935 + "min-height", 1936 + maxHeight+"px" 1937 + ); 1652 1652 1653 - if(applyRow(group)){ 1654 - targets.forEach(function(el){ 1655 - touched.add(el); 1656 - }); 1657 - } 1939 + item.setAttribute( 1940 + "data-sn-master-equal-height", 1941 + "1" 1942 + ); 1943 + 1944 + managedHeight.add(item); 1945 + }); 1658 1658 }); 1659 1659 }); 1948 + }); 1949 + } 1660 1660 1661 - lastWidth=width; 1662 - hasApplied=true; 1951 + /* ======================================================= 1952 + RUN / RESPONSIVE SCHEDULING 1953 + ======================================================= */ 1954 + 1955 + function run(){ 1956 + if(running)return; 1957 + 1958 + running=true; 1959 + 1960 + try{ 1961 + resetRuntime(); 1962 + applyPlaceholderBadge(); 1963 + propagateDetailAccents(); 1964 + 1965 + var headers= 1966 + applyOverviewPalette(); 1967 + 1968 + makeThreeLineAreaLabels(); 1969 + makeFilledRedOrangeCTAsBorderless(); 1970 + 1971 + if( 1972 + window.innerWidth> 1973 + MOBILE_MAX 1974 + ){ 1975 + alignOverviewCards( 1976 + headers 1977 + ); 1978 + 1979 + equaliseDetailGrids(); 1980 + } 1663 1663 }finally{ 1664 - applying=false;1982 + running=false; 1665 1665 } 1666 1666 } 1667 1667 1668 - function resize(){1986 + function onResize(){ 1669 1669 if(resizeTimer){ 1670 1670 clearTimeout( 1671 1671 resizeTimer ... ... @@ -1676,19 +1676,40 @@ 1676 1676 setTimeout( 1677 1677 function(){ 1678 1678 resizeTimer=0; 1679 - calculate(false);1997 + run(); 1680 1680 }, 1681 1681 RESIZE_DEBOUNCE 1682 1682 ); 1683 1683 } 1684 1684 1685 - function waitImages(){ 2003 + async function waitForReady(){ 2004 + if( 2005 + document.readyState!=="complete" 2006 + ){ 2007 + await new Promise(function(resolve){ 2008 + window.addEventListener( 2009 + "load", 2010 + resolve, 2011 + {once:true} 2012 + ); 2013 + }); 2014 + } 2015 + 2016 + if( 2017 + document.fonts&& 2018 + document.fonts.ready 2019 + ){ 2020 + try{ 2021 + await document.fonts.ready; 2022 + }catch(error){} 2023 + } 2024 + 1686 1686 var images= 1687 1687 Array.from( 1688 1688 root.querySelectorAll("img") 1689 1689 ); 1690 1690 1691 - returnPromise.all(2030 + await Promise.all( 1692 1692 images.map(function(img){ 1693 1693 if(img.complete){ 1694 1694 return Promise.resolve(); ... ... @@ -1713,46 +1713,83 @@ 1713 1713 }); 1714 1714 }) 1715 1715 ); 1716 - } 1717 1717 1718 - async function initial(){ 1719 - if( 1720 - document.readyState!== 1721 - "complete" 1722 - ){ 1723 - await new Promise(function(resolve){ 1724 - addEventListener( 1725 - "load", 1726 - resolve, 1727 - {once:true} 1728 - ); 1729 - }); 1730 - } 1731 - 1732 - if( 1733 - document.fonts&& 1734 - document.fonts.ready 1735 - ){ 1736 - try{ 1737 - await document.fonts.ready; 1738 - }catch(error){} 1739 - } 1740 - 1741 - await waitImages(); 1742 - 1743 - // Exactly one initial layout calculation. 1744 - calculate(true); 2056 + run(); 1745 1745 } 1746 1746 1747 - addEventListener( 2059 + window.addEventListener( 1748 1748 "resize", 1749 - resize,2061 + onResize, 1750 1750 {passive:true} 1751 1751 ); 1752 1752 1753 - i nitial();2065 + waitForReady(); 1754 1754 })(); 1755 1755 </script> 1756 1756 1757 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 1758 -{{/html}}\n 2069 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->{{/html}}{{html clean="false"}}<!-- ARSN_PHASE_CTA_MOBILE_EDGE_FIX_V3_START --> 2070 +<style data-arsn-phase-cta-mobile-edge-fix="3"> 2071 +@media (max-width:767px){ 2072 + 2073 + /* Remove the white side gutters around the three phase CTAs. */ 2074 + #xwikicontent .arsn-phase-cta-wrap{ 2075 + box-sizing:border-box!important; 2076 + width:calc(100% + 2px)!important; 2077 + max-width:none!important; 2078 + margin:14px -1px -1px -1px!important; 2079 + padding:0!important; 2080 + border:0!important; 2081 + border-left:0!important; 2082 + box-shadow:none!important; 2083 + background:transparent!important; 2084 + } 2085 + 2086 + /* Full-width orange CTA; no extra border/shadow. */ 2087 + #xwikicontent a.arsn-phase-cta{ 2088 + display:flex!important; 2089 + align-items:center!important; 2090 + justify-content:center!important; 2091 + gap:8px!important; 2092 + 2093 + box-sizing:border-box!important; 2094 + width:100%!important; 2095 + max-width:none!important; 2096 + min-width:0!important; 2097 + 2098 + margin:0!important; 2099 + padding:12px 14px!important; 2100 + 2101 + border:0!important; 2102 + border-left:0!important; 2103 + border-right:0!important; 2104 + border-top:0!important; 2105 + border-bottom:0!important; 2106 + box-shadow:none!important; 2107 + 2108 + border-radius:8px!important; 2109 + 2110 + text-align:center!important; 2111 + text-align-last:center!important; 2112 + text-justify:auto!important; 2113 + word-spacing:normal!important; 2114 + white-space:normal!important; 2115 + } 2116 + 2117 + /* Keep an XWiki external-link icon on the same line/flex row. */ 2118 + #xwikicontent a.arsn-phase-cta::after{ 2119 + flex:0 0 auto!important; 2120 + margin-left:2px!important; 2121 + } 2122 + 2123 + #xwikicontent a.arsn-phase-cta > .fa, 2124 + #xwikicontent a.arsn-phase-cta > .icon, 2125 + #xwikicontent a.arsn-phase-cta > .external-link-icon, 2126 + #xwikicontent a.arsn-phase-cta > [class*="external"]{ 2127 + position:static!important; 2128 + display:inline-block!important; 2129 + flex:0 0 auto!important; 2130 + margin:0!important; 2131 + } 2132 +} 2133 +</style> 2134 +<!-- ARSN_PHASE_CTA_MOBILE_EDGE_FIX_V3_END -->{{/html}}