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