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