Changes for page Funding & Funder Requirements
Last modified by Veronika Kocher on Friday, 04 Sep 2026 14:45
From version 5.10
edited by Veronika Kocher
on Thursday, 03 Sep 2026 10:09
on Thursday, 03 Sep 2026 10:09
Change comment:
There is no comment for this version
To version 5.14
edited by Veronika Kocher
on Thursday, 03 Sep 2026 16:47
on Thursday, 03 Sep 2026 16:47
Change comment:
Update property defaultLocale
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,18 +1,18 @@ 1 - Identifyfunder requirements for data management, Open Science, documentation, preservation and eligible costs.1 +Check funder requirements for data management, Open Science, documentation, preservation and eligible costs early. 2 2 3 3 == Overview == 4 4 5 - Addaconcise explanationof thistopicandwhyitmattersforArt&Researchprojects.5 +Funding conditions influence more than the budget and timeline. They often also affect data management, Open Access, reporting, rights and retention. Always use the current call and the binding funding conditions as your basis. 6 6 7 7 == What you need to know == 8 8 9 -* Key concepts10 -* Relevantrequirements11 -* Important distinctions9 +* Distinguish eligibility requirements, eligible costs and reporting obligations. 10 +* Check internal deadlines and approvals in addition to the external submission deadline. 11 +* Record requirements concerning data, publication, Open Science, communication and preservation in the project plan. 12 12 13 13 == What you need to do == 14 14 15 -1. Identifywhat applies to your project.15 +1. Check what applies to your project. 16 16 2. Document the relevant decisions. 17 17 3. Use appropriate institutional services and support where needed. 18 18 ... ... @@ -26,32 +26,32 @@ 26 26 27 27 == Services & Tools == 28 28 29 - Add links to relevantinstitutional services, infrastructure and tools.29 +Use the institutional services, infrastructure and tools that fit your project and its requirements. Specific links will be added as the relevant services are included in the Navigator. 30 30 31 31 == Info Sheets & Checklists == 32 32 33 - Add links to relatedInfo Sheets, checklists and templates.33 +Relevant Info Sheets, checklists and templates will be added here as they become available. 34 34 35 35 == Tutorials == 36 36 37 37 38 38 {{html}}<span data-arsn-coming-soon="true" style="display:inline-block;margin:6px 0 8px 0;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>{{/html}} 39 - Add linksto step-by-step tutorialsforthis topic.39 +Step-by-step tutorials will be added here as they become available. 40 40 41 41 == Related Topics == 42 42 43 - Addlinksto related pagesin Enable, Work & Manage,and Publish & Share.43 +Further guidance can be found in the adjacent phases Prepare, Work & Manage and Publish & Share. 44 44 45 45 == Who is responsible? == 46 46 47 - {{html}}<!-- ARSN_TOPIC_ROUTING_V1 -->{{/html}}47 + 48 48 {{info title="Service routing"}} 49 -**Primary specialist service(s):** Support Kunst und Forschung (SKF) for research funding landscape, call fit, proposal development, internal routingand funded-projectcoordination.49 +**Primary specialist service(s):** Support Kunst und Forschung (SKF) for the research-funding landscape, call fit, proposal development, internal routes and coordination of funded research projects. 50 50 51 -**Role of Support Kunst und Forschung (SKF):** Lead / central project -and-funding hub for this topic; specialistunits are involved when the call triggers legal, financial, HR, data, IT or other requirements.51 +**Role of Support Kunst und Forschung (SKF):** Lead / central project and funding hub for this topic; specialist services are involved when the call triggers legal, financial, HR, data, IT or other requirements. 52 52 {{/info}} 53 53 54 -If you are unsure which route applies, start with the service named above. For funded or project-based research whereseveral unitsare involved, SKF can coordinate the project route.54 +If you are unsure which route applies, start with the specialist service named above. For funded or project-based research involving several units, SKF can coordinate the project route. 55 55 56 56 {{html}} 57 57 <!-- ARSN_SEARCH_TERMS_START --> ... ... @@ -62,18 +62,19 @@ 62 62 This topic can also be found through related terms, synonyms and common search queries. 63 63 Select a term to search the Art & Research Services Navigator. 64 64 </p> 65 -<p style="margin:0;"><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=art%20and%20research#arsn-search-input" class="arsn-search-term" data-search-term="art and research" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">art and research</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=e nable#arsn-search-input" class="arsn-search-term" data-search-term="enable" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">enable</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=research%20funding#arsn-search-input" class="arsn-search-term" data-search-term="research funding" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">research funding</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funder%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="funder requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funder requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="grant requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=data%20management%20plan#arsn-search-input" class="arsn-search-term" data-search-term="data management plan" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">data management plan</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=open%20science%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="open science requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">open science requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=eligible%20costs#arsn-search-input" class="arsn-search-term" data-search-term="eligible costs" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">eligible costs</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funding#arsn-search-input" class="arsn-search-term" data-search-term="funding" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funding</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant#arsn-search-input" class="arsn-search-term" data-search-term="grant" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant%20application#arsn-search-input" class="arsn-search-term" data-search-term="grant application" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant application</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funder#arsn-search-input" class="arsn-search-term" data-search-term="funder" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funder</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funding%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="funding requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funding requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rderung#arsn-search-input" class="arsn-search-term" data-search-term="förderung" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">förderung</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rdergeber#arsn-search-input" class="arsn-search-term" data-search-term="fördergeber" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">fördergeber</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rderbedingungen#arsn-search-input" class="arsn-search-term" data-search-term="förderbedingungen" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">förderbedingungen</a></p>65 +<p style="margin:0;"><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=art%20and%20research#arsn-search-input" class="arsn-search-term" data-search-term="art and research" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">art and research</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=prepare#arsn-search-input" class="arsn-search-term" data-search-term="prepare" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">prepare</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=research%20funding#arsn-search-input" class="arsn-search-term" data-search-term="research funding" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">research funding</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funder%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="funder requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funder requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="grant requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=data%20management%20plan#arsn-search-input" class="arsn-search-term" data-search-term="data management plan" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">data management plan</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=open%20science%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="open science requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">open science requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=eligible%20costs#arsn-search-input" class="arsn-search-term" data-search-term="eligible costs" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">eligible costs</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funding#arsn-search-input" class="arsn-search-term" data-search-term="funding" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funding</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant#arsn-search-input" class="arsn-search-term" data-search-term="grant" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=grant%20application#arsn-search-input" class="arsn-search-term" data-search-term="grant application" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">grant application</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funder#arsn-search-input" class="arsn-search-term" data-search-term="funder" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funder</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=funding%20requirements#arsn-search-input" class="arsn-search-term" data-search-term="funding requirements" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">funding requirements</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rderung#arsn-search-input" class="arsn-search-term" data-search-term="förderung" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">förderung</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rdergeber#arsn-search-input" class="arsn-search-term" data-search-term="fördergeber" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">fördergeber</a><a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/?q=f%C3%B6rderbedingungen#arsn-search-input" class="arsn-search-term" data-search-term="förderbedingungen" style="display:inline-block;margin:3px 5px 3px 0;padding:3px 8px;border:1px solid #d7d7d7;border-radius:14px;background:#fff;color:#333;text-decoration:none;font-size:12px;">förderbedingungen</a></p> 66 66 </div> 67 67 </details> 68 68 <!-- ARSN_SEARCH_TERMS_END --> 69 69 {{/html}} 70 70 71 -\n\n 72 -\n\n{{html clean="false"}} 73 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START --> 71 +{{html clean="false"}} 72 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START --> 74 74 75 -<style data-sn-horizontal-box-harmonizer="7"> 76 -/* ---------- Typography: never justify headings ---------- */ 74 +<style data-sn-service-navigator-master="1"> 75 +/* ========================================================= 76 + MASTER TYPOGRAPHY 77 + ========================================================= */ 77 77 #xwikicontent h1, 78 78 #xwikicontent h2, 79 79 #xwikicontent h3, ... ... @@ -95,88 +95,105 @@ 95 95 word-spacing:normal!important; 96 96 } 97 97 98 -/* ---------- Native XWiki semantic callouts ---------- */ 99 -#xwikicontent .box.infomessage, 100 -#xwikicontent .infomessage, 101 -#xwikicontent .box.warningmessage, 102 -#xwikicontent .warningmessage, 103 -#xwikicontent .box.successmessage, 104 -#xwikicontent .successmessage, 105 -#xwikicontent .box.errormessage, 106 -#xwikicontent .errormessage, 107 -#xwikicontent [data-sn-callout-harmonized="1"]{ 99 +/* ========================================================= 100 + COMING SOON / IN VORBEREITUNG 101 + ========================================================= */ 102 +.sn-coming-soon-badge{ 103 + display:inline-block; 104 + vertical-align:middle; 105 + margin-left:10px; 106 + padding:4px 8px; 107 + border-radius:14px; 108 + border:1px solid #efd9cc; 109 + background:#fff4ee; 110 + color:#8a4d36; 111 + font-size:11px; 112 + font-weight:700; 113 + letter-spacing:.055em; 114 + line-height:1.2; 115 + white-space:nowrap; 116 +} 117 + 118 +/* ========================================================= 119 + NATIVE / DETAIL CALLOUT GEOMETRY 120 + Preserve existing backgrounds. 121 + ========================================================= */ 122 +#xwikicontent .arsn-info, 123 +#xwikicontent .dmp-info, 124 +#xwikicontent .ido-info, 125 +#xwikicontent .pp-info, 126 +#xwikicontent .infomessage{ 108 108 box-sizing:border-box!important; 109 - border-radius:8px!important; 110 - border-top:1px solid rgba(0,0,0,.08)!important; 111 - border-right:1px solid rgba(0,0,0,.08)!important; 112 - border-bottom:1px solid rgba(0,0,0,.08)!important; 113 - border-left:4px solid var(--sn-callout-accent,#21b6d7)!important; 114 - padding:14px 16px!important; 128 + border-left:4px solid #21b6d7!important; 129 + border-radius:8px; 115 115 text-align:left!important; 116 - text-justify:auto!important; 117 117 word-spacing:normal!important; 118 - box-shadow:none!important; 119 119 } 120 120 121 -#xwikicontent .box.infomessage, 122 -#xwikicontent .infomessage{ 123 - --sn-callout-accent:#21b6d7; 124 - background:#eaf7fb!important; 125 -} 126 - 127 -#xwikicontent .box.warningmessage, 128 -#xwikicontent .warningmessage{ 129 - --sn-callout-accent:#f0aa00; 130 - background:#fff8e7!important; 131 -} 132 - 133 -#xwikicontent .box.successmessage, 134 -#xwikicontent .successmessage{ 135 - --sn-callout-accent:#38b76a; 136 - background:#edf9f1!important; 137 -} 138 - 139 -#xwikicontent .box.errormessage, 134 +#xwikicontent .arsn-warn, 135 +#xwikicontent .dmp-warn, 136 +#xwikicontent .ido-warn, 137 +#xwikicontent .pp-warn, 138 +#xwikicontent .warn, 139 +#xwikicontent .warning, 140 +#xwikicontent .warningmessage, 140 140 #xwikicontent .errormessage{ 141 - --sn-callout-accent:#e94b13; 142 - background:#fff1ec!important; 142 + box-sizing:border-box!important; 143 + border-left:4px solid #e94b13!important; 144 + border-radius:8px; 145 + text-align:left!important; 146 + word-spacing:normal!important; 143 143 } 144 144 145 -#xwikicontent [data-sn-callout-harmonized="1"] > :first-child, 146 -#xwikicontent .infomessage > :first-child, 147 -#xwikicontent .warningmessage > :first-child, 148 -#xwikicontent .successmessage > :first-child, 149 -#xwikicontent .errormessage > :first-child{ 150 - margin-top:0!important; 149 +[data-sn-master-equal-height], 150 +[data-sn-master-first-row]{ 151 + box-sizing:border-box; 151 151 } 152 152 153 -#xwikicontent [data-sn-callout-harmonized="1"] > :last-child, 154 -#xwikicontent .infomessage > :last-child, 155 -#xwikicontent .warningmessage > :last-child, 156 -#xwikicontent .successmessage > :last-child, 157 -#xwikicontent .errormessage > :last-child{ 158 - margin-bottom:0!important; 154 +/* ========================================================= 155 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS 156 + ========================================================= */ 157 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{ 158 + display:grid!important; 159 + grid-template-columns:minmax(0,1fr)!important; 160 + grid-auto-rows:auto!important; 161 + width:100%!important; 162 + max-width:none!important; 163 + box-sizing:border-box!important; 164 + justify-items:start!important; 165 + align-items:start!important; 166 + gap:2px!important; 167 + text-align:left!important; 168 + text-align-last:left!important; 169 + text-justify:auto!important; 170 + word-spacing:normal!important; 171 + white-space:normal!important; 159 159 } 160 - 161 -#xwikicontent [data-sn-equal-height-managed], 162 -#xwikicontent [data-sn-first-section-aligned], 163 -#xwikicontent [data-sn-first-content-aligned]{ 164 - box-sizing:border-box; 173 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number, 174 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title, 175 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{ 176 + display:block!important; 177 + width:100%!important; 178 + margin:0!important; 179 + text-align:left!important; 180 + text-align-last:left!important; 181 + text-justify:auto!important; 182 + word-spacing:normal!important; 183 + white-space:normal!important; 165 165 } 166 166 </style> 167 167 168 -<script data-sn- horizontal-box-harmonizer="7">187 +<script data-sn-service-navigator-master="1"> 169 169 (function(){ 170 170 "use strict"; 171 171 191 + var PAGE_KIND="detail"; 192 + var PLACEHOLDER=true; 193 + var PLACEHOLDER_LABEL="COMING SOON"; 194 + 172 172 var MOBILE_MAX=767; 173 173 var ROW_TOLERANCE=6; 174 - var MIN_W=150; 175 - var MIN_H=36; 176 - var MAX_PARENT_CHILDREN=18; 177 - var SEARCH_DEPTH=5; 178 178 var RESIZE_DEBOUNCE=220; 179 - var MIN_WIDTH_CHANGE=2; 180 180 181 181 var root= 182 182 document.getElementById("xwikicontent")|| ... ... @@ -186,142 +186,114 @@ 186 186 187 187 if(!root)return; 188 188 189 - var heightManaged=new Set(); 190 - var sectionManaged=new Set(); 191 - var contentManaged=new Set(); 207 + var managedHeight=new Set(); 208 + var managedMargin=new Set(); 209 + var originalHeight=new WeakMap(); 210 + var originalMargin=new WeakMap(); 192 192 193 - var originalMinHeight=new WeakMap(); 194 - var originalMarginTop=new WeakMap(); 195 - 196 196 var resizeTimer=0; 197 - var lastWidth=-1; 198 - var hasApplied=false; 199 - var applying=false; 213 + var running=false; 200 200 201 - function num(v){ 202 - var n=parseFloat(v); 203 - return Number.isFinite(n)?n:0; 204 - } 205 - 206 - function visible(el,minW,minH){ 207 - if(!el||el.nodeType!==1)return false; 208 - 209 - var s=getComputedStyle(el); 210 - 211 - if( 212 - s.display==="none"|| 213 - s.visibility==="hidden"|| 214 - Number(s.opacity)===0 215 - ){ 216 - return false; 215 + var THEMES=[ 216 + { 217 + name:"BLUE", 218 + accent:"#21b6d7", 219 + bg:"#eaf7fb", 220 + text:"#315d68", 221 + labels:[ 222 + "HIER STARTEN", 223 + "ENTSCHEIDEN", 224 + "ÜBERPRÜFEN & ANPASSEN", 225 + "START HERE", 226 + "DECIDE", 227 + "REVIEW & ADAPT" 228 + ] 229 + }, 230 + { 231 + name:"RED", 232 + accent:"#e94b13", 233 + bg:"#fff1ec", 234 + text:"#8a4d36", 235 + labels:[ 236 + "PLANEN & ORGANISIEREN", 237 + "ORGANISIEREN & DOKUMENTIEREN", 238 + "PUBLIZIEREN & PRÄSENTIEREN", 239 + "PLAN & ORGANISE", 240 + "PLAN & ORGANIZE", 241 + "ORGANISE & DOCUMENT", 242 + "ORGANIZE & DOCUMENT", 243 + "PUBLISH & PRESENT" 244 + ] 245 + }, 246 + { 247 + name:"YELLOW", 248 + accent:"#f0aa00", 249 + bg:"#fff8e7", 250 + text:"#785b17", 251 + labels:[ 252 + "SCHÜTZEN & KLÄREN", 253 + "STANDARDISIEREN & IDENTIFIZIEREN", 254 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN", 255 + "PROTECT & CLARIFY", 256 + "STANDARDISE & IDENTIFY", 257 + "STANDARDIZE & IDENTIFY", 258 + "OPEN, REUSE & MAKE FINDABLE" 259 + ] 260 + }, 261 + { 262 + name:"GREEN", 263 + accent:"#38b76a", 264 + bg:"#edf9f1", 265 + text:"#3f7451", 266 + labels:[ 267 + "INFRASTRUKTUR EINRICHTEN", 268 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN", 269 + "SPEICHERN & ZUGRIFF STEUERN", 270 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN", 271 + "SET UP INFRASTRUCTURE", 272 + "SET UP INFRASTRUCTURE & COLLABORATION", 273 + "STORE & CONTROL ACCESS", 274 + "REPOSITORY, PRESERVE & HAND OVER" 275 + ] 217 217 } 277 + ]; 218 218 219 - var r=el.getBoundingClientRect(); 220 - 221 - return ( 222 - r.width>=(minW||1)&& 223 - r.height>=(minH||1) 224 - ); 279 + function num(value){ 280 + var n=parseFloat(value); 281 + return Number.isFinite(n)?n:0; 225 225 } 226 226 227 - function normal izeText(text){228 - return String( text||"")284 + function norm(value){ 285 + return String(value||"") 229 229 .replace(/\s+/g," ") 230 230 .trim() 231 231 .toUpperCase(); 232 232 } 233 233 234 - function excluded(el){ 235 - return ( 236 - !el.matches|| 237 - el.matches( 238 - "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]" 239 - ) 240 - ); 241 - } 291 + function visible(el){ 292 + if(!el||el.nodeType!==1)return false; 242 242 243 - /* ---------- Custom coloured callouts ---------- */ 294 + var style=getComputedStyle(el); 295 + var rect=el.getBoundingClientRect(); 244 244 245 - function nativeCallout(el){ 246 - var c= 247 - typeof el.className==="string" 248 - ? el.className.toLowerCase() 249 - : ""; 250 - 251 251 return ( 252 - /(^|\s)(infomessage|warningmessage|successmessage|errormessage)(\s|$)/.test(c) 298 + style.display!=="none"&& 299 + style.visibility!=="hidden"&& 300 + rect.width>20&& 301 + rect.height>4 253 253 ); 254 254 } 255 255 256 - function customCallout(el){ 257 - if(!visible(el,220,42)||excluded(el))return false; 258 - 259 - var r=el.getBoundingClientRect(); 260 - 261 - if(r.height>520)return false; 262 - 263 - var s=getComputedStyle(el); 264 - 265 - var bg= 266 - s.backgroundColor&& 267 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 268 - s.backgroundColor!=="transparent"&& 269 - s.backgroundColor!=="rgb(255, 255, 255)"; 270 - 271 - var left= 272 - num(s.borderLeftWidth); 273 - 274 - return ( 275 - bg&& 276 - left>=2 277 - ); 278 - } 279 - 280 - function harmoniseCustomCallouts(){ 281 - Array.from( 282 - root.querySelectorAll( 283 - "div,aside,section" 284 - ) 285 - ).forEach(function(el){ 286 - if(nativeCallout(el))return; 287 - if(!customCallout(el))return; 288 - 289 - var s=getComputedStyle(el); 290 - 291 - el.setAttribute( 292 - "data-sn-callout-harmonized", 293 - "1" 294 - ); 295 - 296 - if( 297 - s.borderLeftColor 298 - ){ 299 - el.style.setProperty( 300 - "--sn-callout-accent", 301 - s.borderLeftColor 302 - ); 303 - } 304 - }); 305 - } 306 - 307 - /* ---------- Restore only values V7 itself changed ---------- */ 308 - 309 - function saveOriginal(el,map,property){ 305 + function saveStyle(el,map,property){ 310 310 if(map.has(el))return; 311 311 312 312 map.set(el,{ 313 - value: 314 - el.style.getPropertyValue( 315 - property 316 - ), 317 - priority: 318 - el.style.getPropertyPriority( 319 - property 320 - ) 309 + value:el.style.getPropertyValue(property), 310 + priority:el.style.getPropertyPriority(property) 321 321 }); 322 322 } 323 323 324 - function restore Original(el,map,property){314 + function restoreStyle(el,map,property){ 325 325 var original=map.get(el); 326 326 327 327 if(original&&original.value){ ... ... @@ -331,770 +331,1069 @@ 331 331 original.priority||"" 332 332 ); 333 333 }else{ 334 - el.style.removeProperty( 335 - property 336 - ); 324 + el.style.removeProperty(property); 337 337 } 338 338 } 339 339 340 340 function resetRuntime(){ 341 - heightManaged.forEach(function(el){342 - restore Original(329 + managedHeight.forEach(function(el){ 330 + restoreStyle( 343 343 el, 344 - original MinHeight,332 + originalHeight, 345 345 "min-height" 346 346 ); 347 - 348 348 el.removeAttribute( 349 - "data-sn-equal-height -managed"336 + "data-sn-master-equal-height" 350 350 ); 351 351 }); 352 352 353 - sectionManaged.forEach(function(el){354 - restore Original(340 + managedMargin.forEach(function(el){ 341 + restoreStyle( 355 355 el, 356 - originalMargin Top,343 + originalMargin, 357 357 "margin-top" 358 358 ); 359 - 360 360 el.removeAttribute( 361 - "data-sn-first- section-aligned"347 + "data-sn-master-first-row" 362 362 ); 363 363 }); 364 364 365 - contentManaged.forEach(function(el){ 366 - restoreOriginal( 367 - el, 368 - originalMarginTop, 369 - "margin-top" 370 - ); 351 + managedHeight.clear(); 352 + managedMargin.clear(); 353 + } 371 371 372 - el.removeAttribute( 373 - "data-sn-first-content-aligned" 374 - ); 375 - }); 355 + function themeFor(text){ 356 + var value=norm(text); 376 376 377 - heightManaged.clear(); 378 - sectionManaged.clear(); 379 - contentManaged.clear(); 380 - } 358 + for(var i=0;i<THEMES.length;i++){ 359 + for(var j=0;j<THEMES[i].labels.length;j++){ 360 + var label=THEMES[i].labels[j]; 381 381 382 - /* ---------- Card detection ---------- */ 362 + if( 363 + value===label|| 364 + value.indexOf(label+" ")===0|| 365 + value.indexOf(label+" -")===0|| 366 + value.indexOf(label+" ·")===0 367 + ){ 368 + return THEMES[i]; 369 + } 370 + } 371 + } 383 383 384 - function namedLikeBox(el){ 385 - var c= 386 - typeof el.className==="string" 387 - ? el.className 388 - : ""; 373 + return null; 374 + } 389 389 390 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c); 376 + /* ======================================================= 377 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS 378 + ======================================================= */ 379 + 380 + function colourDistance(a,b){ 381 + return Math.sqrt( 382 + Math.pow(a[0]-b[0],2)+ 383 + Math.pow(a[1]-b[1],2)+ 384 + Math.pow(a[2]-b[2],2) 385 + ); 391 391 } 392 392 393 - function boxLike(el){ 394 - if( 395 - !visible(el,MIN_W,MIN_H)|| 396 - excluded(el) 397 - ){ 398 - return false; 399 - } 388 + function makeFilledRedOrangeCTAsBorderless(){ 389 + var RED_ORANGE=[233,75,19]; 400 400 401 - var s=getComputedStyle(el); 402 - var r=el.getBoundingClientRect(); 391 + Array.from( 392 + root.querySelectorAll( 393 + 'a,button,[role="button"],input[type="submit"],input[type="button"]' 394 + ) 395 + ).forEach(function(el){ 396 + if(!visible(el))return; 403 403 404 - var border= 405 - num(s.borderTopWidth)+ 406 - num(s.borderRightWidth)+ 407 - num(s.borderBottomWidth)+ 408 - num(s.borderLeftWidth); 398 + var style=getComputedStyle(el); 399 + var rgb=parseRGB(style.backgroundColor); 409 409 410 - var radius=Math.max( 411 - num(s.borderTopLeftRadius), 412 - num(s.borderTopRightRadius), 413 - num(s.borderBottomLeftRadius), 414 - num(s.borderBottomRightRadius) 415 - ); 401 + if(!rgb)return; 416 416 417 - var bg= 418 - s.backgroundColor&& 419 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&& 420 - s.backgroundColor!=="transparent"; 403 + if( 404 + colourDistance( 405 + rgb, 406 + RED_ORANGE 407 + )>55 408 + ){ 409 + return; 410 + } 421 421 422 - var shadow= 423 - s.boxShadow&& 424 - s.boxShadow!=="none"; 412 + var rect=el.getBoundingClientRect(); 425 425 426 - return ( 427 - namedLikeBox(el)|| 428 - border>=1|| 429 - (bg&&radius>=3)|| 430 - (shadow&&r.width>=180) 431 - ); 432 - } 414 + if( 415 + rect.width<80|| 416 + rect.height<24 417 + ){ 418 + return; 419 + } 433 433 434 - function pickTarget(child){ 435 - if(!visible(child,MIN_W,MIN_H))return null; 421 + el.style.setProperty( 422 + "border", 423 + "none", 424 + "important" 425 + ); 436 436 437 - if(boxLike(child))return child; 427 + el.style.setProperty( 428 + "border-left", 429 + "none", 430 + "important" 431 + ); 438 438 439 - var cr=child.getBoundingClientRect(); 440 - var q=[]; 433 + el.style.setProperty( 434 + "border-top", 435 + "none", 436 + "important" 437 + ); 441 441 442 - Array.from(child.children||[]).forEach(function(el){ 443 - q.push({el:el,depth:1}); 439 + el.style.setProperty( 440 + "border-right", 441 + "none", 442 + "important" 443 + ); 444 + 445 + el.style.setProperty( 446 + "border-bottom", 447 + "none", 448 + "important" 449 + ); 450 + 451 + el.style.setProperty( 452 + "box-shadow", 453 + "none", 454 + "important" 455 + ); 444 444 }); 457 + } 445 445 446 - var best=null; 447 - var bestScore=-Infinity; 459 + /* ======================================================= 460 + FULL-WIDTH THREE-LINE AREA LABELS 461 + ======================================================= */ 448 448 449 - while(q.length){ 450 - var item=q.shift(); 451 - var el=item.el; 463 + function compactText(value){ 464 + return String(value||"") 465 + .replace(/\s+/g," ") 466 + .trim(); 467 + } 452 452 453 - if(!visible(el,MIN_W,MIN_H))continue; 469 + function makeThreeLineAreaLabels(){ 470 + Array.from( 471 + root.querySelectorAll( 472 + ".arsn-area-label" 473 + ) 474 + ).forEach(function(label){ 475 + if( 476 + label.getAttribute( 477 + "data-sn-three-line" 478 + )==="1" 479 + ){ 480 + return; 481 + } 454 454 455 - var r=el.getBoundingClientRect(); 483 + var number= 484 + label.querySelector( 485 + ":scope > .arsn-area-number" 486 + ); 456 456 488 + var action= 489 + label.querySelector( 490 + ":scope > .arsn-area-action" 491 + ); 492 + 457 457 if( 458 - r .width>=cr.width*.68&&459 - boxLike(el)494 + !number|| 495 + !action 460 460 ){ 461 - var widthFit= 462 - 1-Math.min( 463 - 1, 464 - Math.abs(cr.width-r.width)/ 465 - Math.max(1,cr.width) 466 - ); 497 + return; 498 + } 467 467 468 - var topFit= 469 - 1-Math.min( 470 - 1, 471 - Math.abs(cr.top-r.top)/100 472 - ); 500 + var clone= 501 + label.cloneNode(true); 473 473 474 - var score= 475 - widthFit*6+ 476 - topFit*3+ 477 - Math.min(r.height,900)/450+ 478 - Math.min(r.width*r.height,900000)/900000; 503 + var cloneNumber= 504 + clone.querySelector( 505 + ":scope > .arsn-area-number" 506 + ); 479 479 480 - if(score>bestScore){ 481 - best=el; 482 - bestScore=score; 483 - } 508 + var cloneAction= 509 + clone.querySelector( 510 + ":scope > .arsn-area-action" 511 + ); 512 + 513 + if(cloneNumber){ 514 + cloneNumber.remove(); 484 484 } 485 485 486 - if(item.depth<SEARCH_DEPTH){ 487 - Array.from(el.children||[]).forEach(function(next){ 488 - q.push({ 489 - el:next, 490 - depth:item.depth+1 491 - }); 492 - }); 517 + if(cloneAction){ 518 + cloneAction.remove(); 493 493 } 494 - } 495 495 496 - return best; 497 - } 521 + var titleText= 522 + compactText( 523 + clone.textContent 524 + ); 498 498 499 - function groupRows(entries){ 500 - var groups=[]; 526 + if(!titleText){ 527 + return; 528 + } 501 501 502 - entries 503 - .slice() 504 - .sort(function(a,b){ 505 - return ( 506 - a.rect.top-b.rect.top|| 507 - a.rect.left-b.rect.left 530 + var numberNode= 531 + number.cloneNode(true); 532 + 533 + var actionNode= 534 + action.cloneNode(true); 535 + 536 + var titleNode= 537 + document.createElement( 538 + "span" 508 508 ); 509 - }) 510 - .forEach(function(entry){ 511 - var group=null; 512 512 513 - for(var i=0;i<groups.length;i++){ 514 - if( 515 - Math.abs( 516 - groups[i].top- 517 - entry.rect.top 518 - )<=ROW_TOLERANCE 519 - ){ 520 - group=groups[i]; 521 - break; 522 - } 523 - } 541 + titleNode.className= 542 + "sn-area-label-title"; 524 524 525 - if(!group){ 526 - group={ 527 - top:entry.rect.top, 528 - entries:[] 529 - }; 530 - groups.push(group); 531 - } 544 + titleNode.textContent= 545 + titleText; 532 532 533 - group.entries.push(entry); 534 - }); 547 + while(label.firstChild){ 548 + label.removeChild( 549 + label.firstChild 550 + ); 551 + } 535 535 536 - return groups; 553 + label.appendChild( 554 + numberNode 555 + ); 556 + 557 + label.appendChild( 558 + titleNode 559 + ); 560 + 561 + label.appendChild( 562 + actionNode 563 + ); 564 + 565 + label.setAttribute( 566 + "data-sn-three-line", 567 + "1" 568 + ); 569 + 570 + var head= 571 + label.closest( 572 + ".arsn-area-head" 573 + ); 574 + 575 + if(head){ 576 + head.style.setProperty( 577 + "width", 578 + "100%", 579 + "important" 580 + ); 581 + 582 + head.style.setProperty( 583 + "max-width", 584 + "100%", 585 + "important" 586 + ); 587 + 588 + head.style.setProperty( 589 + "box-sizing", 590 + "border-box", 591 + "important" 592 + ); 593 + } 594 + }); 537 537 } 538 538 539 - function validRow(group){ 540 - if(group.entries.length<2)return false; 597 + /* ======================================================= 598 + PLACEHOLDER BADGE 599 + ======================================================= */ 541 541 542 - var lefts= 543 - group.entries 544 - .map(function(e){return e.rect.left;}) 545 - .sort(function(a,b){return a-b;}); 601 + function applyPlaceholderBadge(){ 602 + if(!PLACEHOLDER)return; 546 546 547 547 if( 548 - lefts[lefts.length-1]-549 - lefts[0]<550 - 80605 + document.querySelector( 606 + ".sn-coming-soon-badge" 607 + ) 551 551 ){ 552 - return false;609 + return; 553 553 } 554 554 555 - var widths= 556 - group.entries 557 - .map(function(e){return e.rect.width;}) 558 - .filter(function(w){return w>0;}); 612 + var title= 613 + document.querySelector( 614 + "#document-title" 615 + )|| 616 + document.querySelector( 617 + "h1" 618 + ); 559 559 560 - if( widths.length<2)returnfalse;620 + if(!title)return; 561 561 562 - var minW= 563 - Math.min.apply(Math,widths); 622 + var badge= 623 + document.createElement( 624 + "span" 625 + ); 564 564 565 - var maxW=566 - Math.max.apply(Math,widths);627 + badge.className= 628 + "sn-coming-soon-badge"; 567 567 568 - return ( 569 - maxW/ 570 - Math.max(1,minW)<= 571 - 1.9 630 + badge.textContent= 631 + PLACEHOLDER_LABEL; 632 + 633 + badge.setAttribute( 634 + "aria-label", 635 + PLACEHOLDER_LABEL 572 572 ); 573 - } 574 574 575 - /* ---------- Known ARSN first section bars ---------- */ 576 - 577 - function knownBar(el){ 578 - var text= 579 - normalizeText( 580 - el.textContent 581 - ); 582 - 583 - return ( 584 - text==="HIER STARTEN"|| 585 - text==="ORGANISIEREN & DOKUMENTIEREN"|| 586 - text==="ENTSCHEIDEN"|| 587 - text==="START HERE"|| 588 - text==="GET STARTED"|| 589 - text==="ORGANISE & DOCUMENT"|| 590 - text==="ORGANIZE & DOCUMENT"|| 591 - text==="DECIDE" 638 + title.appendChild( 639 + badge 592 592 ); 593 593 } 594 594 595 - functionfindKnownBar(card){596 - varcardRect=597 - card.getBoundingClientRect();643 + /* ======================================================= 644 + DETAIL PAGE OWN-ACCENT PROPAGATION 645 + ======================================================= */ 598 598 599 - var rows= 600 - Array.from( 601 - card.querySelectorAll( 602 - "div,p,span,strong,h3,h4,h5,h6" 603 - ) 604 - ) 605 - .filter(function(el){ 606 - if(!visible(el,20,6))return false; 607 - if(!knownBar(el))return false; 647 + function parseRGB(value){ 648 + var match=String(value||"").match( 649 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i 650 + ); 608 608 609 - varr=el.getBoundingClientRect();652 + if(!match)return null; 610 610 611 - var rel= 612 - r.top- 613 - cardRect.top; 654 + return [ 655 + Number(match[1]), 656 + Number(match[2]), 657 + Number(match[3]) 658 + ]; 659 + } 614 614 615 - return ( 616 - rel>=35&& 617 - rel<= 618 - cardRect.height*.75 619 - ); 620 - }) 621 - .sort(function(a,b){ 622 - return ( 623 - a.getBoundingClientRect().top- 624 - b.getBoundingClientRect().top 625 - ); 626 - }); 627 - 628 - return rows[0]||null; 661 + function distance(a,b){ 662 + return Math.sqrt( 663 + Math.pow(a[0]-b[0],2)+ 664 + Math.pow(a[1]-b[1],2)+ 665 + Math.pow(a[2]-b[2],2) 666 + ); 629 629 } 630 630 631 - function alignKnownBars(cards){ 632 - var rows= 633 - cards.map(function(card){ 634 - var bar= 635 - findKnownBar(card); 669 + function paletteMatch(cssColor){ 670 + var rgb=parseRGB(cssColor); 636 636 637 - if(!bar)return null;672 + if(!rgb)return null; 638 638 639 - var cr= 640 - card.getBoundingClientRect(); 674 + var palette=[ 675 + {hex:"#21b6d7",rgb:[33,182,215]}, 676 + {hex:"#e94b13",rgb:[233,75,19]}, 677 + {hex:"#f0aa00",rgb:[240,170,0]}, 678 + {hex:"#38b76a",rgb:[56,183,106]} 679 + ]; 641 641 642 - var br=643 - bar.getBoundingClientRect();681 + var best=null; 682 + var bestDistance=Infinity; 644 644 645 - return { 646 - bar:bar, 647 - relativeTop: 648 - br.top- 649 - cr.top 650 - }; 651 - }); 684 + palette.forEach(function(item){ 685 + var d=distance(rgb,item.rgb); 652 652 653 - if( 654 - rows.some(function(row){ 655 - return !row; 656 - }) 657 - ){ 658 - return false; 659 - } 687 + if(d<bestDistance){ 688 + best=item; 689 + bestDistance=d; 690 + } 691 + }); 660 660 661 - var target= 662 - Math.max.apply( 663 - Math, 664 - rows.map(function(row){ 665 - return row.relativeTop; 666 - }) 667 - ); 693 + return bestDistance<=30 694 + ?best 695 + :null; 696 + } 668 668 669 - rows.forEach(function(row){ 670 - var delta= 671 - target- 672 - row.relativeTop; 698 + function propagateDetailAccents(){ 699 + if(PAGE_KIND!=="detail")return; 673 673 674 - if(delta<=1)return; 701 + Array.from( 702 + root.querySelectorAll( 703 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+ 704 + ".arsn-source,.dmp-source,.ido-source,.pp-source" 705 + ) 706 + ).forEach(function(el){ 707 + if(!visible(el))return; 675 675 676 - saveOriginal( 677 - row.bar, 678 - originalMarginTop, 679 - "margin-top" 680 - ); 709 + var style=getComputedStyle(el); 681 681 682 - var current= 683 - num( 684 - getComputedStyle( 685 - row.bar 686 - ).marginTop 687 - ); 711 + if( 712 + num(style.borderTopWidth)>=2 713 + ){ 714 + var match= 715 + paletteMatch( 716 + style.borderTopColor 717 + ); 688 688 689 - row.bar.style.setProperty( 690 - "margin-top", 691 - ( 692 - current+ 693 - delta 694 - )+"px" 695 - ); 719 + if(match){ 720 + el.style.setProperty( 721 + "border-left", 722 + "4px solid "+match.hex, 723 + "important" 724 + ); 725 + } 726 + } 727 + }); 696 696 697 - row.bar.setAttribute( 698 - "data-sn-first-section-aligned", 699 - "7" 700 - ); 729 + // Warning families: explicit safety override. 730 + Array.from( 731 + root.querySelectorAll( 732 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+ 733 + ".warn,.warning,.warningmessage,.errormessage" 734 + ) 735 + ).forEach(function(el){ 736 + if(!visible(el))return; 701 701 702 - sectionManaged.add( 703 - row.bar 738 + el.style.setProperty( 739 + "border-left", 740 + "4px solid #e94b13", 741 + "important" 704 704 ); 705 705 }); 706 706 707 - return true; 745 + // Info families: explicit orientation override. 746 + Array.from( 747 + root.querySelectorAll( 748 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage" 749 + ) 750 + ).forEach(function(el){ 751 + if(!visible(el))return; 752 + 753 + el.style.setProperty( 754 + "border-left", 755 + "4px solid #21b6d7", 756 + "important" 757 + ); 758 + }); 708 708 } 709 709 710 - /* ---------- Generic first content after heading ---------- */ 761 + /* ======================================================= 762 + OVERVIEW SEMANTIC THEME PALETTE 763 + ======================================================= */ 711 711 712 - function heading(card){ 713 - var cr= 714 - card.getBoundingClientRect(); 715 - 716 - var rows= 717 - Array.from( 718 - card.querySelectorAll( 719 - "h1,h2,h3,h4,h5,h6,.box-title,[role=heading]" 720 - ) 765 + function smallestThemeHeaders(){ 766 + return Array.from( 767 + root.querySelectorAll( 768 + "div,span,p,strong,h3,h4,h5,h6" 721 721 ) 722 - .filter(function(el){ 723 - if(!visible(el,20,8))return false; 770 + ).filter(function(el){ 771 + if(!visible(el))return false; 772 + if(!themeFor(el.textContent))return false; 724 724 725 - var r=el.getBoundingClientRect(); 726 - 727 - var rel= 728 - r.top- 729 - cr.top; 730 - 731 - return ( 732 - rel>=0&& 733 - rel<= 734 - Math.min( 735 - 160, 736 - cr.height*.45 737 - ) 774 + return !Array.from( 775 + el.children||[] 776 + ).some(function(child){ 777 + return !!themeFor( 778 + child.textContent 738 738 ); 739 - }) 740 - .sort(function(a,b){ 741 - return ( 742 - a.getBoundingClientRect().top- 743 - b.getBoundingClientRect().top 744 - ); 745 745 }); 746 - 747 - return rows[0]||null; 781 + }); 748 748 } 749 749 750 - function firstContent(card,h){ 751 - if(!h)return null; 784 + function findOverviewCard(header){ 785 + var node=header.parentElement; 786 + var candidates=[]; 752 752 753 - var cr= 754 - card.getBoundingClientRect(); 788 + while(node&&node!==root){ 789 + var rect=node.getBoundingClientRect(); 790 + var style=getComputedStyle(node); 755 755 756 - var hr= 757 - h.getBoundingClientRect(); 792 + var border= 793 + num(style.borderTopWidth)+ 794 + num(style.borderRightWidth)+ 795 + num(style.borderBottomWidth)+ 796 + num(style.borderLeftWidth); 758 758 759 - var rows= 760 - Array.from( 761 - card.querySelectorAll( 762 - "p,div,ul,ol,dl,blockquote" 763 - ) 764 - ) 765 - .filter(function(el){ 766 - if( 767 - el===h|| 768 - h.contains(el)|| 769 - el.contains(h) 770 - ){ 771 - return false; 772 - } 798 + if( 799 + rect.width>=220&& 800 + rect.width<=800&& 801 + rect.height>=120&& 802 + border>=1 803 + ){ 804 + candidates.push(node); 805 + } 773 773 774 - if(!visible(el,30,8))return false; 807 + node=node.parentElement; 808 + } 775 775 776 - var text= 777 - String(el.textContent||"") 778 - .replace(/\s+/g," ") 779 - .trim(); 810 + if(!candidates.length)return null; 780 780 781 - if(text.length<3)return false; 812 + candidates.sort(function(a,b){ 813 + return ( 814 + b.getBoundingClientRect().height- 815 + a.getBoundingClientRect().height 816 + ); 817 + }); 782 782 783 - var r=el.getBoundingClientRect(); 819 + return candidates[0]; 820 + } 784 784 785 - if( 786 - r.top< 787 - hr.bottom-1 788 - ){ 789 - return false; 790 - } 822 + function rowCandidates(link,card){ 823 + var result=[]; 824 + var cardRect= 825 + card.getBoundingClientRect(); 791 791 792 - if( 793 - r.top-cr.top> 794 - Math.min( 795 - 280, 796 - cr.height*.65 797 - ) 798 - ){ 799 - return false; 800 - } 827 + var node=link; 801 801 829 + while(node&&node!==card){ 830 + if(visible(node)){ 831 + var rect= 832 + node.getBoundingClientRect(); 833 + 802 802 if( 803 - r.height> 804 - cr.height*.58 835 + rect.height<=105&& 836 + rect.width>= 837 + cardRect.width*.50&& 838 + rect.width<= 839 + cardRect.width*1.03 805 805 ){ 806 - re turn false;841 + result.push(node); 807 807 } 843 + } 808 808 809 - return true; 810 - }) 811 - .sort(function(a,b){ 812 - var ar= 813 - a.getBoundingClientRect(); 845 + node=node.parentElement; 846 + } 814 814 815 - varbr=816 - b.getBoundingClientRect();848 + return result; 849 + } 817 817 851 + function chooseOuterRow( 852 + candidates, 853 + link 854 + ){ 855 + if(!candidates.length){ 856 + return link; 857 + } 858 + 859 + var bordered= 860 + candidates.filter(function(el){ 818 818 return ( 819 - ar.top-br.top|| 820 - ar.height-br.height 862 + num( 863 + getComputedStyle(el) 864 + .borderLeftWidth 865 + )>=1 821 821 ); 822 822 }); 823 823 824 - return rows[0]||null; 825 - } 869 + var pool= 870 + bordered.length 871 + ?bordered 872 + :candidates; 826 826 827 - function alignGeneric(cards){ 828 - var rows= 829 - cards.map(function(card){ 830 - var h= 831 - heading(card); 874 + pool.sort(function(a,b){ 875 + var ar= 876 + a.getBoundingClientRect(); 832 832 833 - var c= 834 - firstContent( 835 - card, 836 - h 837 - ); 878 + var br= 879 + b.getBoundingClientRect(); 838 838 839 - if(!h||!c)return null; 881 + return ( 882 + ar.left-br.left|| 883 + br.width-ar.width 884 + ); 885 + }); 840 840 841 - varcr=842 - card.getBoundingClientRect();887 + return pool[0]||link; 888 + } 843 843 844 - var rr= 845 - c.getBoundingClientRect(); 846 - 847 - return { 848 - content:c, 849 - relativeTop: 850 - rr.top-cr.top 851 - }; 852 - }); 853 - 854 - if( 855 - rows.some(function(row){ 856 - return !row; 857 - }) 858 - ){ 859 - return false; 890 + function applyOverviewPalette(){ 891 + if(PAGE_KIND!=="overview"){ 892 + return []; 860 860 } 861 861 862 - var target= 863 - Math.max.apply( 864 - Math, 865 - rows.map(function(row){ 866 - return row.relativeTop; 895 + var headers= 896 + smallestThemeHeaders() 897 + .map(function(el){ 898 + return { 899 + el:el, 900 + theme: 901 + themeFor( 902 + el.textContent 903 + ), 904 + card: 905 + findOverviewCard( 906 + el 907 + ) 908 + }; 867 867 }) 868 - ); 910 + .filter(function(row){ 911 + return !!row.card; 912 + }); 869 869 870 - rows.forEach(function(row){ 871 - var delta= 872 - target- 873 - row.relativeTop; 914 + var unique=[]; 915 + var seenHeaders=new Set(); 874 874 875 - if(delta<=1)return; 917 + headers.forEach(function(row){ 918 + var key= 919 + row.theme.name+ 920 + "|"+ 921 + Math.round( 922 + row.card 923 + .getBoundingClientRect() 924 + .left 925 + )+ 926 + "|"+ 927 + Math.round( 928 + row.el 929 + .getBoundingClientRect() 930 + .top 931 + ); 876 876 877 - sa veOriginal(878 - r ow.content,879 - originalMarginTop,880 - "margin-top"881 - );933 + if(!seenHeaders.has(key)){ 934 + seenHeaders.add(key); 935 + unique.push(row); 936 + } 937 + }); 882 882 883 - var current= 884 - num( 885 - getComputedStyle( 886 - row.content 887 - ).marginTop 888 - ); 939 + unique.forEach(function(row){ 940 + var headerRect= 941 + row.el 942 + .getBoundingClientRect(); 889 889 890 - row.content.style.setProperty( 891 - "margin-top", 892 - ( 893 - current+ 894 - delta 895 - )+"px" 944 + row.el.style.setProperty( 945 + "background", 946 + row.theme.bg, 947 + "important" 896 896 ); 897 897 898 - row.content.setAttribute( 899 - "data-sn-first-content-aligned", 900 - "7" 950 + row.el.style.setProperty( 951 + "color", 952 + row.theme.text, 953 + "important" 901 901 ); 902 902 903 - contentManaged.add( 904 - row.content 956 + row.el.style.setProperty( 957 + "text-align", 958 + "left", 959 + "important" 905 905 ); 961 + 962 + row.el.style.setProperty( 963 + "word-spacing", 964 + "normal", 965 + "important" 966 + ); 967 + 968 + var later= 969 + unique 970 + .filter(function(other){ 971 + return ( 972 + other.card===row.card&& 973 + other.el 974 + .getBoundingClientRect() 975 + .top> 976 + headerRect.top+2 977 + ); 978 + }) 979 + .sort(function(a,b){ 980 + return ( 981 + a.el 982 + .getBoundingClientRect() 983 + .top- 984 + b.el 985 + .getBoundingClientRect() 986 + .top 987 + ); 988 + }); 989 + 990 + var stopTop= 991 + later.length 992 + ?later[0].el 993 + .getBoundingClientRect() 994 + .top 995 + :Infinity; 996 + 997 + Array.from( 998 + row.card.querySelectorAll("a") 999 + ).forEach(function(link){ 1000 + if(!visible(link))return; 1001 + 1002 + var rect= 1003 + link.getBoundingClientRect(); 1004 + 1005 + if( 1006 + rect.top<= 1007 + headerRect.bottom-2|| 1008 + rect.top>= 1009 + stopTop-2 1010 + ){ 1011 + return; 1012 + } 1013 + 1014 + var candidates= 1015 + rowCandidates( 1016 + link, 1017 + row.card 1018 + ); 1019 + 1020 + var target= 1021 + chooseOuterRow( 1022 + candidates, 1023 + link 1024 + ); 1025 + 1026 + candidates.forEach(function(el){ 1027 + el.style.setProperty( 1028 + "border-left", 1029 + "0 solid transparent", 1030 + "important" 1031 + ); 1032 + }); 1033 + 1034 + target.style.setProperty( 1035 + "border-left", 1036 + "3px solid "+ 1037 + row.theme.accent, 1038 + "important" 1039 + ); 1040 + 1041 + target.style.setProperty( 1042 + "box-sizing", 1043 + "border-box", 1044 + "important" 1045 + ); 1046 + }); 906 906 }); 907 907 908 - return true;1049 + return unique; 909 909 } 910 910 911 - function applyRow(group){ 912 - if(!validRow(group))return false; 1052 + /* ======================================================= 1053 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW 1054 + ======================================================= */ 913 913 1056 + function alignOverviewCards(headers){ 1057 + if( 1058 + PAGE_KIND!=="overview"|| 1059 + window.innerWidth<=MOBILE_MAX 1060 + ){ 1061 + return; 1062 + } 1063 + 914 914 var cards=[]; 915 915 var seen=new Set(); 916 916 917 - group.entries.forEach(function(entry){918 - if(!seen.has( entry.target)){919 - seen.add( entry.target);920 - cards.push( entry.target);1067 + headers.forEach(function(row){ 1068 + if(!seen.has(row.card)){ 1069 + seen.add(row.card); 1070 + cards.push(row.card); 921 921 } 922 922 }); 923 923 924 - if(cards.length<2)return false; 925 - 926 - if( 927 - !alignKnownBars(cards) 928 - ){ 929 - alignGeneric(cards); 1074 + if(cards.length<2){ 1075 + return; 930 930 } 931 931 932 - var maxHeight=0; 1078 + // Group cards by actual top position. 1079 + var groups=[]; 933 933 934 934 cards.forEach(function(card){ 935 - maxHeight= 936 - Math.max( 937 - maxHeight, 938 - card.getBoundingClientRect().height 939 - ); 1082 + var top= 1083 + card.getBoundingClientRect().top; 1084 + 1085 + var group=null; 1086 + 1087 + for(var i=0;i<groups.length;i++){ 1088 + if( 1089 + Math.abs( 1090 + groups[i].top-top 1091 + )<=ROW_TOLERANCE 1092 + ){ 1093 + group=groups[i]; 1094 + break; 1095 + } 1096 + } 1097 + 1098 + if(!group){ 1099 + group={ 1100 + top:top, 1101 + cards:[] 1102 + }; 1103 + groups.push(group); 1104 + } 1105 + 1106 + group.cards.push(card); 940 940 }); 941 941 942 - maxHeight=943 - Math.ceil(944 - maxHeight945 - );1109 + groups.forEach(function(group){ 1110 + if(group.cards.length<2){ 1111 + return; 1112 + } 946 946 947 - if(maxHeight<MIN_H)return false; 1114 + var firstHeaders= 1115 + group.cards.map(function(card){ 1116 + var candidates= 1117 + headers 1118 + .filter(function(row){ 1119 + return row.card===card; 1120 + }) 1121 + .sort(function(a,b){ 1122 + return ( 1123 + a.el 1124 + .getBoundingClientRect() 1125 + .top- 1126 + b.el 1127 + .getBoundingClientRect() 1128 + .top 1129 + ); 1130 + }); 948 948 949 - cards.forEach(function(card){ 950 - saveOriginal( 951 - card, 952 - originalMinHeight, 953 - "min-height" 954 - ); 1132 + return candidates.length 1133 + ?candidates[0] 1134 + :null; 1135 + }); 955 955 956 - card.style.setProperty( 957 - "min-height", 958 - maxHeight+"px" 959 - ); 1137 + if( 1138 + !firstHeaders.some(function(row){ 1139 + return !row; 1140 + }) 1141 + ){ 1142 + var targetTop= 1143 + Math.max.apply( 1144 + Math, 1145 + firstHeaders.map(function(row){ 1146 + return ( 1147 + row.el 1148 + .getBoundingClientRect() 1149 + .top- 1150 + row.card 1151 + .getBoundingClientRect() 1152 + .top 1153 + ); 1154 + }) 1155 + ); 960 960 961 - card.setAttribute( 962 - "data-sn-equal-height-managed", 963 - "7" 964 - ); 1157 + firstHeaders.forEach(function(row){ 1158 + var relativeTop= 1159 + row.el 1160 + .getBoundingClientRect() 1161 + .top- 1162 + row.card 1163 + .getBoundingClientRect() 1164 + .top; 965 965 966 - heightManaged.add(card);967 - });1166 + var delta= 1167 + targetTop-relativeTop; 968 968 969 - return true; 970 - } 1169 + if(delta>1){ 1170 + saveStyle( 1171 + row.el, 1172 + originalMargin, 1173 + "margin-top" 1174 + ); 971 971 972 - function calculate(force){ 973 - if(applying)return; 1176 + var current= 1177 + num( 1178 + getComputedStyle( 1179 + row.el 1180 + ).marginTop 1181 + ); 974 974 975 - var width= 976 - Math.round( 977 - window.innerWidth 978 - ); 1183 + row.el.style.setProperty( 1184 + "margin-top", 1185 + ( 1186 + current+delta 1187 + )+"px" 1188 + ); 979 979 980 - var meaningful= 981 - lastWidth<0|| 982 - Math.abs( 983 - width- 984 - lastWidth 985 - )>= 986 - MIN_WIDTH_CHANGE; 1190 + row.el.setAttribute( 1191 + "data-sn-master-first-row", 1192 + "1" 1193 + ); 987 987 1195 + managedMargin.add( 1196 + row.el 1197 + ); 1198 + } 1199 + }); 1200 + } 1201 + 1202 + var maxHeight=0; 1203 + 1204 + group.cards.forEach(function(card){ 1205 + maxHeight= 1206 + Math.max( 1207 + maxHeight, 1208 + card 1209 + .getBoundingClientRect() 1210 + .height 1211 + ); 1212 + }); 1213 + 1214 + maxHeight= 1215 + Math.ceil(maxHeight); 1216 + 1217 + group.cards.forEach(function(card){ 1218 + saveStyle( 1219 + card, 1220 + originalHeight, 1221 + "min-height" 1222 + ); 1223 + 1224 + card.style.setProperty( 1225 + "min-height", 1226 + maxHeight+"px" 1227 + ); 1228 + 1229 + card.setAttribute( 1230 + "data-sn-master-equal-height", 1231 + "1" 1232 + ); 1233 + 1234 + managedHeight.add( 1235 + card 1236 + ); 1237 + }); 1238 + }); 1239 + } 1240 + 1241 + /* ======================================================= 1242 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY 1243 + ======================================================= */ 1244 + 1245 + function equaliseDetailGrids(){ 988 988 if( 989 - hasApplied&& 990 - !force&& 991 - !meaningful 1247 + PAGE_KIND!=="detail"|| 1248 + window.innerWidth<=MOBILE_MAX 992 992 ){ 993 993 return; 994 994 } 995 995 996 - applying=true; 1253 + var selectors=[ 1254 + ".arsn-grid", 1255 + ".arsn-grid-2", 1256 + ".arsn-grid-3", 1257 + ".dmp-grid", 1258 + ".ido-grid", 1259 + ".pp-grid" 1260 + ]; 997 997 998 - try{ 999 - harmoniseCustomCallouts(); 1262 + selectors.forEach(function(selector){ 1263 + Array.from( 1264 + root.querySelectorAll(selector) 1265 + ).forEach(function(grid){ 1266 + var children= 1267 + Array.from( 1268 + grid.children||[] 1269 + ).filter(visible); 1000 1000 1001 - if(width<=MOBILE_MAX){ 1002 - if(hasApplied){ 1003 - resetRuntime(); 1271 + if(children.length<2){ 1272 + return; 1004 1004 } 1005 1005 1006 - hasApplied=false; 1007 - lastWidth=width; 1008 - return; 1009 - } 1275 + var groups=[]; 1010 1010 1011 - if(hasApplied){ 1012 - resetRuntime(); 1013 - } 1277 + children.forEach(function(child){ 1278 + var top= 1279 + child 1280 + .getBoundingClientRect() 1281 + .top; 1014 1014 1015 - var parents= 1016 - Array.from( 1017 - root.querySelectorAll("*") 1018 - ) 1019 - .filter(function(parent){ 1020 - return ( 1021 - visible( 1022 - parent, 1023 - MIN_W, 1024 - MIN_H 1025 - )&& 1026 - parent.children&& 1027 - parent.children.length>=2&& 1028 - parent.children.length<= 1029 - MAX_PARENT_CHILDREN 1030 - ); 1031 - }); 1283 + var group=null; 1032 1032 1033 - var touched= 1034 - new Set(); 1285 + for(var i=0;i<groups.length;i++){ 1286 + if( 1287 + Math.abs( 1288 + groups[i].top-top 1289 + )<=ROW_TOLERANCE 1290 + ){ 1291 + group=groups[i]; 1292 + break; 1293 + } 1294 + } 1035 1035 1036 - parents.forEach(function(parent){ 1037 - var entries=[]; 1296 + if(!group){ 1297 + group={ 1298 + top:top, 1299 + items:[] 1300 + }; 1301 + groups.push(group); 1302 + } 1038 1038 1039 - Array.from( 1040 - parent.children 1041 - ).forEach(function(child){ 1042 - if( 1043 - !visible( 1044 - child, 1045 - MIN_W, 1046 - MIN_H 1047 - ) 1048 - ){ 1304 + group.items.push(child); 1305 + }); 1306 + 1307 + groups.forEach(function(group){ 1308 + if(group.items.length<2){ 1049 1049 return; 1050 1050 } 1051 1051 1052 - var target= 1053 - pickTarget(child); 1312 + var maxHeight=0; 1054 1054 1055 - if(!target)return; 1056 - 1057 - entries.push({ 1058 - target:target, 1059 - rect: 1060 - target.getBoundingClientRect() 1314 + group.items.forEach(function(item){ 1315 + maxHeight= 1316 + Math.max( 1317 + maxHeight, 1318 + item 1319 + .getBoundingClientRect() 1320 + .height 1321 + ); 1061 1061 }); 1062 - }); 1063 1063 1064 - groupRows( 1065 - entries 1066 - ).forEach(function(group){ 1067 - if(!validRow(group))return; 1324 + maxHeight= 1325 + Math.ceil(maxHeight); 1068 1068 1069 - var targets= 1070 - group.entries.map(function(entry){ 1071 - return entry.target; 1072 - }); 1327 + group.items.forEach(function(item){ 1328 + saveStyle( 1329 + item, 1330 + originalHeight, 1331 + "min-height" 1332 + ); 1073 1073 1074 - if( 1075 - !targets.some(function(el){ 1076 - return !touched.has(el); 1077 - }) 1078 - ){ 1079 - return; 1080 - } 1334 + item.style.setProperty( 1335 + "min-height", 1336 + maxHeight+"px" 1337 + ); 1081 1081 1082 - if(applyRow(group)){ 1083 - targets.forEach(function(el){ 1084 - touched.add(el); 1085 - }); 1086 - } 1339 + item.setAttribute( 1340 + "data-sn-master-equal-height", 1341 + "1" 1342 + ); 1343 + 1344 + managedHeight.add(item); 1345 + }); 1087 1087 }); 1088 1088 }); 1348 + }); 1349 + } 1089 1089 1090 - lastWidth=width; 1091 - hasApplied=true; 1351 + /* ======================================================= 1352 + RUN / RESPONSIVE SCHEDULING 1353 + ======================================================= */ 1354 + 1355 + function run(){ 1356 + if(running)return; 1357 + 1358 + running=true; 1359 + 1360 + try{ 1361 + resetRuntime(); 1362 + applyPlaceholderBadge(); 1363 + propagateDetailAccents(); 1364 + 1365 + var headers= 1366 + applyOverviewPalette(); 1367 + 1368 + makeThreeLineAreaLabels(); 1369 + makeFilledRedOrangeCTAsBorderless(); 1370 + 1371 + if( 1372 + window.innerWidth> 1373 + MOBILE_MAX 1374 + ){ 1375 + alignOverviewCards( 1376 + headers 1377 + ); 1378 + 1379 + equaliseDetailGrids(); 1380 + } 1092 1092 }finally{ 1093 - applying=false;1382 + running=false; 1094 1094 } 1095 1095 } 1096 1096 1097 - function resize(){1386 + function onResize(){ 1098 1098 if(resizeTimer){ 1099 1099 clearTimeout( 1100 1100 resizeTimer ... ... @@ -1105,19 +1105,40 @@ 1105 1105 setTimeout( 1106 1106 function(){ 1107 1107 resizeTimer=0; 1108 - calculate(false);1397 + run(); 1109 1109 }, 1110 1110 RESIZE_DEBOUNCE 1111 1111 ); 1112 1112 } 1113 1113 1114 - function waitImages(){ 1403 + async function waitForReady(){ 1404 + if( 1405 + document.readyState!=="complete" 1406 + ){ 1407 + await new Promise(function(resolve){ 1408 + window.addEventListener( 1409 + "load", 1410 + resolve, 1411 + {once:true} 1412 + ); 1413 + }); 1414 + } 1415 + 1416 + if( 1417 + document.fonts&& 1418 + document.fonts.ready 1419 + ){ 1420 + try{ 1421 + await document.fonts.ready; 1422 + }catch(error){} 1423 + } 1424 + 1115 1115 var images= 1116 1116 Array.from( 1117 1117 root.querySelectorAll("img") 1118 1118 ); 1119 1119 1120 - returnPromise.all(1430 + await Promise.all( 1121 1121 images.map(function(img){ 1122 1122 if(img.complete){ 1123 1123 return Promise.resolve(); ... ... @@ -1142,46 +1142,20 @@ 1142 1142 }); 1143 1143 }) 1144 1144 ); 1145 - } 1146 1146 1147 - async function initial(){ 1148 - if( 1149 - document.readyState!== 1150 - "complete" 1151 - ){ 1152 - await new Promise(function(resolve){ 1153 - addEventListener( 1154 - "load", 1155 - resolve, 1156 - {once:true} 1157 - ); 1158 - }); 1159 - } 1160 - 1161 - if( 1162 - document.fonts&& 1163 - document.fonts.ready 1164 - ){ 1165 - try{ 1166 - await document.fonts.ready; 1167 - }catch(error){} 1168 - } 1169 - 1170 - await waitImages(); 1171 - 1172 - // Exactly one initial layout calculation. 1173 - calculate(true); 1456 + run(); 1174 1174 } 1175 1175 1176 - addEventListener( 1459 + window.addEventListener( 1177 1177 "resize", 1178 - resize,1461 + onResize, 1179 1179 {passive:true} 1180 1180 ); 1181 1181 1182 - i nitial();1465 + waitForReady(); 1183 1183 })(); 1184 1184 </script> 1185 1185 1186 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END --> 1187 -{{/html}}\n 1469 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END --> 1470 +{{/html}} 1471 +