Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 515696 | Differences between
and this patch

Collapse All | Expand All

(-)a/devbook.xsl (-65 / +95 lines)
Lines 419-484 Link Here
419
  <xsl:template match="/">
419
  <xsl:template match="/">
420
    <html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
420
    <html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
421
    <head>
421
    <head>
422
        <title>Gentoo Development Guide: <xsl:value-of select="/guide/chapter[1]/title"/></title>
422
      <title>Gentoo Development Guide: <xsl:value-of select="/guide/chapter[1]/title"/></title>
423
        <xsl:variable name="relative_path_depth" select="string-length(/guide/@self)-string-length(translate(/guide/@self, '/' , ''))"/>
423
      <xsl:variable name="relative_path_depth" select="string-length(/guide/@self)-string-length(translate(/guide/@self, '/' , ''))"/>
424
        <xsl:variable name="relative_path_depth_recursion">
424
      <xsl:variable name="relative_path_depth_recursion">
425
          <xsl:call-template name="str:repeatString">
425
        <xsl:call-template name="str:repeatString">
426
            <xsl:with-param name="count" select="$relative_path_depth"/>
426
          <xsl:with-param name="count" select="$relative_path_depth"/>
427
            <xsl:with-param name="append">../</xsl:with-param>
427
          <xsl:with-param name="append">../</xsl:with-param>
428
          </xsl:call-template>
428
        </xsl:call-template>
429
        </xsl:variable>	
429
      </xsl:variable>
430
        <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" />
430
      <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" />
431
      <meta charset="utf-8" />
432
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
433
      <meta name="description" content="Gentoo Infrastructure Status provides information on the status of the services the Gentoo Linux distribution offers to its developers and users." />
434
      <link href="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/bootstrap.min.css" rel="stylesheet" media="screen" />
435
      <link href="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/tyrian.min.css" rel="stylesheet" media="screen" />
436
      <link rel="icon" href="http://www.gentoo.org/favicon.ico" type="image/x-icon" />
431
    </head>
437
    </head>
432
    <body>
438
    <body>
433
      <div class="main">
439
      <header>
434
	<h1>Gentoo Development Guide</h1>
440
        <div class="site-title">
435
	<div class="navtop" style="text-align: center;">
441
          <div class="container">
436
	  <table style="border-top: 1px dashed #330066; margin-left: auto; margin-right: auto;
442
            <div class="row">
437
			width: 100%;">
443
              <div class="site-title-buttons">
438
444
                <div class="btn-group btn-group-sm">
439
	    <col width="33%" />
445
                  <a href="http://get.gentoo.org/" type="button" class="btn get-gentoo"><span class="fa fa-download"></span> <strong>Get Gentoo!</strong></a>
440
	    <col width="34%" />
446
                  <div class="btn-group btn-group-sm">
441
	    <col width="33%" />
447
                    <button type="button" class="gentoo-org-sites btn" data-toggle="dropdown">
442
	    <tr>
448
                      <span class="glyphicon glyphicon-globe"></span> gentoo.org sites <span class="caret"></span>
443
	      <td style="text-align: center; border-right: 1px dashed #330066;">&#x2190; <xsl:call-template name="findPrevious"/></td>
449
                    </button>
444
	      <td style="text-align: center;">&#x2191; <xsl:call-template name="findParent"/> &#x2191;</td>
450
                    <ul class="dropdown-menu">
445
	      <td style="text-align: center; border-left: 1px dashed #330066;"><xsl:call-template name="findNext"/> &#x2192;</td>
451
                      <li><a href="http://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
446
	    </tr>
452
                      <li><a href="http://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text fa-fw"></span> Wiki</a></li>
447
	  </table>
453
                      <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
448
	</div>
454
                      <li><a href="http://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
449
455
                      <li><a href="http://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
450
	<div class="document">
456
                      <li class="divider"></li>
451
	  <xsl:apply-templates/>
457
                      <li><a href="http://overlays.gentoo.org/" title="Collaborate on maintaining packages"><span class="fa fa-code-fork fa-fw"></span> Overlays</a></li>
452
	</div>
458
                      <li><a href="http://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
453
459
                      <li><a href="http://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
454
	<div class="navbottom" style="text-align: center;">
460
                      <li><a href="http://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
455
	  <table style="border-top: 1px dashed #330066; margin-left: auto; margin-right: auto;
461
                      <li class="divider"></li>
456
			width: 100%;">
462
                      <li><a href="http://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-tasks fa-fw"></span> Infra Status</a></li>
457
463
                    </ul>
458
	    <col width="33%" />
464
                  </div>
459
	    <col width="34%" />
465
                </div>
460
	    <col width="33%" />
466
              </div>
461
	    <tr>
467
              <div class="logo">
462
	      <td style="text-align: center; border-right: 1px dashed #330066;">&#x2190; <xsl:call-template name="findPrevious"/></td>
468
                <img src="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/site-logo.png" alt="Gentoo Linux Logo"/>
463
	      <td style="text-align: center;">&#x2191; <xsl:call-template name="findParent"/> &#x2191;</td>
469
                <span class="site-label">Gentoo Development Guide</span>
464
	      <td style="text-align: center; border-left: 1px dashed #330066;"><xsl:call-template name="findNext"/> &#x2192;</td>
470
              </div>
465
	    </tr>
471
            </div>
466
	  </table>
472
          </div>
467
	</div>
473
        </div>
468
      </div>
474
        <nav class="tyrian-navbar" role="navigation">
469
475
          <div class="container">
470
      <div class="footer">
476
            <div class="row">
471
	<p>
477
              <div class="navbar-header">
472
	    <a href="http://validator.w3.org/check/referer"><img src="/icons/icon_mini-xhtml.png" alt="Valid XHTML 1.0" /></a>
478
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
473
	    <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="/icons/icon_mini-css.png" alt="Valid CSS" /></a>
479
                  <span class="sr-only">Toggle navigation</span>
474
	    <a href="http://www.gentoo.org/"><img src="/icons/icon_mini-gentoo.png" alt="Powered by Gentoo" /></a>
480
                  <span class="icon-bar"></span>
475
	    <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/icons/icon_mini-creativecommons.png" alt="Creative Commons License" /></a>
481
                  <span class="icon-bar"></span>
476
	    <img src="/icons/icon_mini-xml.png" alt="XML Powered!"/>
482
                  <span class="icon-bar"></span>
477
	  <br />
483
                </button>
478
	  <br />
484
              </div>
479
	  The text of this document is distributed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 License</a>.
485
              <div class="collapse navbar-collapse navbar-main-collapse">
480
	</p>
486
                <ul class="nav navbar-nav">
487
                  <li><xsl:call-template name="findPrevious"/></li>
488
                  <li><xsl:call-template name="findParent"/></li>
489
                  <li><xsl:call-template name="findNext"/></li>
490
                </ul>
491
              </div>
492
            </div>
493
          </div>
494
        </nav>
495
      </header>
496
      <div class="container">
497
        <xsl:apply-templates/>
481
      </div>
498
      </div>
499
      <footer>
500
        <div class="container">
501
          <div class="row">
502
            <div class="col-md-12">
503
              <strong>Copyright 2001-2014 Gentoo Foundation, Inc.</strong><br />
504
              <small>
505
                Gentoo is a trademark of the Gentoo Foundation, Inc.
506
                The text of this document is distributed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0 License</a>.
507
                The <a href="#">Gentoo Name and Logo Usage Guidelines</a> apply.
508
              </small>
509
            </div>
510
          </div>
511
        </div>
512
      </footer>
482
    </body>
513
    </body>
483
    </html>
514
    </html>
484
  </xsl:template>
515
  </xsl:template>
Lines 514-520 Link Here
514
      -->
545
      -->
515
      <xsl:when test="count(/guide/include) &gt; 0">
546
      <xsl:when test="count(/guide/include) &gt; 0">
516
	<xsl:variable name="doc" select="/guide/include[1]/@href"/>
547
	<xsl:variable name="doc" select="/guide/include[1]/@href"/>
517
	<a href="{concat($doc, 'index.html')}"><xsl:value-of select="document(concat(/guide/@self, $doc, 'text.xml'))/guide/chapter[1]/title"/></a>
548
	<a href="{concat($doc, 'index.html')}"><xsl:value-of select="document(concat(/guide/@self, $doc, 'text.xml'))/guide/chapter[1]/title"/> &#x2192;</a>
518
      </xsl:when>
549
      </xsl:when>
519
      <xsl:otherwise>
550
      <xsl:otherwise>
520
	<!-- This document's path -->
551
	<!-- This document's path -->
Lines 547-553 Link Here
547
                <xsl:with-param name="append">../</xsl:with-param>
578
                <xsl:with-param name="append">../</xsl:with-param>
548
	      </xsl:call-template>
579
	      </xsl:call-template>
549
	    </xsl:variable>
580
	    </xsl:variable>
550
	    <a href="{concat($relative_path_depth_recursion, $relative_path, 'index.html')}"><xsl:value-of select="document(concat($parentItem_actual, 'text.xml'))/guide/chapter[1]/title"/></a>
581
	    <a href="{concat($relative_path_depth_recursion, $relative_path, 'index.html')}"><xsl:value-of select="document(concat($parentItem_actual, 'text.xml'))/guide/chapter[1]/title"/> &#x2192;</a>
551
	  </xsl:when>
582
	  </xsl:when>
552
	  <xsl:otherwise>
583
	  <xsl:otherwise>
553
	    <!-- We need to recurse downwards; so we need to strip off a directory element off our absolute path to feed
584
	    <!-- We need to recurse downwards; so we need to strip off a directory element off our absolute path to feed
Lines 594-600 Link Here
594
	       * Fully recurse up the node to get the last extremity
625
	       * Fully recurse up the node to get the last extremity
595
	     * Otherwise list the parent -->
626
	     * Otherwise list the parent -->
596
      <xsl:when test="/guide/@root">
627
      <xsl:when test="/guide/@root">
597
	<a href="#"><xsl:value-of select="/guide/chapter[1]/title"/></a>
628
	<a href="#">&#x2190; <xsl:value-of select="/guide/chapter[1]/title"/></a>
598
      </xsl:when>
629
      </xsl:when>
599
      <xsl:otherwise>
630
      <xsl:otherwise>
600
	<!-- This document's path -->
631
	<!-- This document's path -->
Lines 617-626 Link Here
617
	    </xsl:call-template>
648
	    </xsl:call-template>
618
	    </xsl:variable>
649
	    </xsl:variable>
619
	    <!-- Make a relative <a> link; we need an absolute reference for the XSLT processor though... -->
650
	    <!-- Make a relative <a> link; we need an absolute reference for the XSLT processor though... -->
620
	    <a href="{concat('../', substring-before($myItem_path, 'text.xml'), 'index.html')}"><xsl:value-of select="document(concat($parentItem_path, $myItem_path))/guide/chapter[1]/title"/></a>
651
	    <a href="{concat('../', substring-before($myItem_path, 'text.xml'), 'index.html')}">&#x2190; <xsl:value-of select="document(concat($parentItem_path, $myItem_path))/guide/chapter[1]/title"/></a>
621
	  </xsl:when>
652
	  </xsl:when>
622
	  <xsl:otherwise>
653
	  <xsl:otherwise>
623
	    <a href="../index.html"><xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/></a>
654
	    <a href="../index.html">&#x2190; <xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/></a>
624
	  </xsl:otherwise>
655
	  </xsl:otherwise>
625
	</xsl:choose>
656
	</xsl:choose>
626
      </xsl:otherwise>
657
      </xsl:otherwise>
Lines 630-639 Link Here
630
  <xsl:template name="findParent">
661
  <xsl:template name="findParent">
631
    <xsl:choose>
662
    <xsl:choose>
632
    <xsl:when test="not(/guide/@root)">
663
    <xsl:when test="not(/guide/@root)">
633
      <a href="../index.html"><xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/></a>
664
      <a href="../index.html">&#x2191; <xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/> &#x2191;</a>
634
    </xsl:when>
665
    </xsl:when>
635
    <xsl:otherwise>
666
    <xsl:otherwise>
636
      <a href="#"><xsl:value-of select="/guide/chapter[1]/title"/></a>
667
      <a href="#">&#x2191; <xsl:value-of select="/guide/chapter[1]/title"/> &#x2191;</a>
637
    </xsl:otherwise>
668
    </xsl:otherwise>
638
    </xsl:choose>
669
    </xsl:choose>
639
  </xsl:template>
670
  </xsl:template>
640
- 

Return to bug 515696