|
40 | 40 | <xsl:variable name="entry-pos" select="concat($entry-name-trans,$entry-index)"/>
|
41 | 41 | <xsl:variable name="number-examples" select="count(example)"/>
|
42 | 42 |
|
| 43 | + <xsl:if test="$entry-type='widget'"> |
| 44 | + <xsl:call-template name="widget-quick-nav"/> |
| 45 | + </xsl:if> |
| 46 | + |
43 | 47 | <article>
|
44 | 48 | <xsl:attribute name="id">
|
45 | 49 | <xsl:value-of select="$entry-pos"/>
|
|
297 | 301 | <xsl:template name="entry-body-widget">
|
298 | 302 | <xsl:variable name="entry-name" select="@name"/>
|
299 | 303 |
|
300 |
| - <section class="quick-nav"> |
301 |
| - <header> |
302 |
| - <h2>QuickNav</h2> |
303 |
| - </header> |
304 |
| - |
305 |
| - <h3>Options</h3> |
306 |
| - <xsl:for-each select="options/option"> |
307 |
| - <xsl:variable name="name" select="@name"/> |
308 |
| - <div><a href="#option-{$name}"><xsl:value-of select="$name"/></a></div> |
309 |
| - </xsl:for-each> |
310 |
| - |
311 |
| - <h3>Methods</h3> |
312 |
| - <xsl:for-each select="methods/method"> |
313 |
| - <xsl:variable name="name" select="@name"/> |
314 |
| - <div><a href="#method-{$name}"><xsl:value-of select="$name"/></a></div> |
315 |
| - </xsl:for-each> |
316 |
| - |
317 |
| - <h3>Events</h3> |
318 |
| - <xsl:for-each select="events/event"> |
319 |
| - <xsl:variable name="name" select="@name"/> |
320 |
| - <div><a href="#event-{$name}"><xsl:value-of select="$name"/></a></div> |
321 |
| - </xsl:for-each> |
322 |
| - </section> |
323 |
| - |
324 | 304 | <xsl:if test="options">
|
325 | 305 | <section id="options">
|
326 | 306 | <header>
|
|
426 | 406 | </ul>
|
427 | 407 | </xsl:template>
|
428 | 408 |
|
| 409 | +<xsl:template name="widget-quick-nav"> |
| 410 | + <section class="quick-nav"> |
| 411 | + <header> |
| 412 | + <h2>QuickNav</h2> |
| 413 | + </header> |
| 414 | + |
| 415 | + <div class="quick-nav-section"> |
| 416 | + <h3>Options</h3> |
| 417 | + <xsl:for-each select="options/option"> |
| 418 | + <xsl:variable name="name" select="@name"/> |
| 419 | + <div><a href="#option-{$name}"><xsl:value-of select="$name"/></a></div> |
| 420 | + </xsl:for-each> |
| 421 | + </div> |
| 422 | + |
| 423 | + <div class="quick-nav-section"> |
| 424 | + <h3>Methods</h3> |
| 425 | + <xsl:for-each select="methods/method"> |
| 426 | + <xsl:variable name="name" select="@name"/> |
| 427 | + <div><a href="#method-{$name}"><xsl:value-of select="$name"/></a></div> |
| 428 | + </xsl:for-each> |
| 429 | + </div> |
| 430 | + |
| 431 | + <div class="quick-nav-section"> |
| 432 | + <h3>Events</h3> |
| 433 | + <xsl:for-each select="events/event"> |
| 434 | + <xsl:variable name="name" select="@name"/> |
| 435 | + <div><a href="#event-{$name}"><xsl:value-of select="$name"/></a></div> |
| 436 | + </xsl:for-each> |
| 437 | + </div> |
| 438 | + </section> |
| 439 | +</xsl:template> |
| 440 | + |
429 | 441 | <!-- examples -->
|
430 | 442 | <xsl:template match="example">
|
431 | 443 | <xsl:param name="entry-index"/>
|
|
0 commit comments