Änderungen von Dokument Sandbox

Zuletzt geändert von Holger Engels am 2024/01/26 15:58

Von Version 5.1
bearbeitet von Holger Engels
am 2023/10/24 14:25
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 8.1
bearbeitet von Holger Engels
am 2023/11/08 06:51
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -111,12 +111,6 @@
111 111  Dies ist ein wichtiger Hinweis!
112 112  {{/warning}}
113 113  
114 -== Inhaltsverzeichnis ==
115 -
116 -Dieses Makro erzeugt ein Inhaltsverzeichnis basierend auf den Überschriften in der Seite:
117 -
118 -{{toc/}}
119 -
120 120  === Ausrichten am ===
121 121  
122 122   ~===
... ... @@ -123,32 +123,65 @@
123 123  
124 124  {{formula}}
125 125  \begin{align*}
126 -4x - 10y &= 16 \\
127 -3x + 9y &= -12
120 +f(x) &= x^2\! +3x\! +2 \\
121 +f(x) &= x^2+3x+2 \\
122 +f(x) &= x^2\, +3x\, +2 \\
123 +f(x) &= x^2\: +3x\: +2 \\
124 +f(x) &= x^2\; +3x\; +2 \\
125 +f(x) &= x^2\ +3x\ +2 \\
126 +f(x) &= x^2\quad +3x\quad +2 \\
127 +f(x) &= x^2\qquad +3x\qquad +2
128 128  \end{align*}
129 129  {{/formula}}
130 130  
131 -{{formula}}
132 -\begin{aligned}
133 -a_{ijk} &= \frac {Pr(M_{I} =2 \& M_J=1 \& M_K =1 | I=i , J=j , K=k)}{Pr (M_I =1 \& M_J =1 \& M_K=1 | I=i , J=j)}\\
134 - &= \frac {\mu_{ijk211}}{\mu_{ijk111}}\\
135 -\Rightarrow lala = 5
136 -\end{aligned}
137 -{{/formula}}
138 138  
132 +{{velocity filter="none"}}
133 +{{html clean="false" wiki="true"}}
134 +#set ($query = "where (doc.parent is null or doc.parent='') and doc.fullName != 'Main.WebHome' order by doc.name asc")
139 139  
140 -//kursiv//
141 -**fett**
136 +|=Page Name|=Author|=date
137 +|#foreach ($item in $xwiki.searchDocuments($query))
138 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, "${xcontext.database}:${item}"))
139 + #set ($bentrydoc = $xwiki.getDocument($item))
140 + [[${bentrydoc.fullName}]]|$xwiki.getUserName($bentrydoc.author)|$xwiki.formatDate($bentrydoc.date)
141 +|#end
142 +#end
142 142  
143 -* hallo
144 -* du
145 -* da
144 +{{/html}}
145 +{{/velocity}}
146 146  
147 -1. eins
148 -1. zwei
149 -1. drei
150 150  
151 -== zweite ebene ==
152 -=== dritte ebene ===
148 +{{html clean="false"}}
149 +<script>
150 + customElements.define("star-rating", class extends HTMLElement {
151 + set rating(rate) {
152 + if (!String(rate).includes("%")) rate = Number(rate) / this.stars * 100 + "%";
153 + this.querySelector(":nth-child(2)").setAttribute("width", rate); //2nd rect
154 + }
155 + set value(v) {
156 + this.setAttribute("rating", v);
157 + }
158 + connectedCallback() {
159 + let {bgcolor,stars,nocolor,color,rating} = this.attributes;
160 + let repeat = (count, func) => Array(count).fill().map(func);
161 + this.stars = ~~stars.value || 5;
162 + this.innerHTML = `<svg viewBox="0 0 ${this.stars*100} 100" style=cursor:pointer>` +
163 + `<rect height=100 fill=${nocolor.value} width=100% />` +
164 + `<rect height=100 fill=${color.value} />` +
165 + repeat(this.stars , (i, n) => `<path fill=${bgcolor.value} d="m${ n*100 } 0h102v100h-102v-100m91 42a6 6 90 00-4-10l-22-1a1 1 90 01-1 0l-8-21a6 6 90 00-11 0l-8 21a1 1 90 01-1 1l-22 1a6 6 90 00-4 10l18 14a1 1 90 010 1l-6 22a6 6 90 008 6l19-13a1 1 90 011 0l19 13a6 6 90 006 0a6 6 90 002-6l-6-22a1 1 90 010-1z"/>`) +
166 + repeat(this.stars * 2, (i, n) => `<rect x=${ n*50 } n=${n} opacity=0 width=50 height=100 ` +
167 + ` onclick="this.closest('star-rating').value=${(n+1)/2}; this.closest('star-rating').dispatchEvent(new Event('click'))" ` +
168 + ` onmouseover="this.closest('star-rating').rating=${(n+1)/2}"/>`) +
169 + "</svg>";
170 + this.rating = rating.value;
171 + this.addEventListener('mouseleave', (e) => {
172 + if (e.target.tagName === 'STAR-RATING') {
173 + e.target.rating = e.target.getAttribute("rating")
174 + }
175 + })
176 + }
177 + });
178 +</script>
179 +{{/html}}
153 153  
154 154