summaryrefslogtreecommitdiff
path: root/gentoobrowse/xslt/base.xslt
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-02-23 18:56:23 +0000
committerrandomdan <randomdan@localhost>2013-02-23 18:56:23 +0000
commit5361d0fd8681ec67a98a3afda35e948cd8bff31d (patch)
treeeff262b55ac1a5813110103dff39f5e3ba5405de /gentoobrowse/xslt/base.xslt
parentUse media-type for content type of XSL transformed documents (diff)
downloadgentoobrowse-5361d0fd8681ec67a98a3afda35e948cd8bff31d.tar.bz2
gentoobrowse-5361d0fd8681ec67a98a3afda35e948cd8bff31d.tar.xz
gentoobrowse-5361d0fd8681ec67a98a3afda35e948cd8bff31d.zip
New bootstrapped GentooBrowse site
Diffstat (limited to 'gentoobrowse/xslt/base.xslt')
-rw-r--r--gentoobrowse/xslt/base.xslt174
1 files changed, 103 insertions, 71 deletions
diff --git a/gentoobrowse/xslt/base.xslt b/gentoobrowse/xslt/base.xslt
index 19b019e..005e5f4 100644
--- a/gentoobrowse/xslt/base.xslt
+++ b/gentoobrowse/xslt/base.xslt
@@ -1,72 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"
- xmlns:project2="http://project2.randomdan.homeip.net" exclude-result-prefixes="project2" >
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:project2="http://project2.randomdan.homeip.net" exclude-result-prefixes="project2" >
<xsl:output encoding="utf-8" method="html" media-type="text/html" indent="yes" />
+
<xsl:template match="/*">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;&#10;</xsl:text>
- <html>
+ <html lang="en">
<head>
- <link rel="stylesheet" href="/css/screen.css" type="text/css" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Salsa" type="text/css" />
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" />
- <link rel="shortcut icon" href="/images/glogo-small.png" type="image/png" />
+ <meta charset="utf-8" />
+ <link rel="shortcut icon" href="/img/glogo-small.png" type="image/png" />
<link rel="start" href="/" />
<link rel="search" href="/search" />
- <meta http-equiv="content-language" content="en" />
- <script src="/js/js.js" />
+ <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen" />
+ <link href="/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen" />
+ <link href="/css/general.css" rel="stylesheet" media="screen" />
<script src="/js/googletracking.js" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" />
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" />
<xsl:call-template name="head" />
</head>
- <body>
- <header>
- <h1>Gentoo Browse</h1>
- </header>
- <nav>
- <ul>
- <li><a href="/">Home</a></li>
- <li><a href="/categories">Browse</a></li>
- <li><a href="/popular">Popular</a></li>
- <li><a href="JavaScript: void(0);" onclick="toggleForm('#search');" rel="nofollow">Search</a></li>
- <xsl:if test="count(/gentoo/project2:session/loggedInUserID) = 0">
- <li><a href="JavaScript: void(0);" onclick="toggleForm('#login');" rel="nofollow">Login/Sign up</a></li>
- </xsl:if>
- <xsl:if test="count(/gentoo/project2:session/loggedInUserID) &gt; 0">
- <li><a href="/accountHome" rel="nofollow">My Account</a></li>
- </xsl:if>
- </ul>
- <form id="search" class="popup" action="/search" method="get">
- <div class="title">Site search</div>
- <input type="search" name="criteria" placeholder="Search criteria" required="required" autofocus="autofocus">
- <xsl:attribute name="value"><xsl:value-of select="/gentoo/project2:params/criteria" /></xsl:attribute>
- </input>
- <input type="submit" value="Search" class="submit" />
- <input type="submit" value="Cancel" class="submit" onclick="return hideForm('#search');" />
- </form>
- <form id="login" class="popup" action="/dologin" method="post">
- <div class="title">Login</div>
- <input type="text" name="username" placeholder="Username" required="required" autofocus="autofocus" />
- <input type="password" name="password" placeholder="Password" required="required" />
- <input type="submit" value="Login" class="submit" />
- <input type="submit" value="Cancel" class="submit" onclick="return hideForm('#login');" />
- <div style="text-align:right"><a href="/signup">Sign up</a></div>
- </form>
+ <body data-spy="scroll" data-target=".bs-docs-sidebar">
+ <!-- nav -->
+ <nav class="navbar navbar-inverse navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="/">Gentoo Browse</a>
+ <div class="nav-collapse collapse">
+ <ul class="nav">
+ <li><a href="/">Home</a></li>
+ <li><a href="/categories">Browse</a></li>
+ <li><a href="/popular">Popular</a></li>
+ <li><a href="JavaScript: void(0);" onclick="$('#search').modal('show');" rel="nofollow">Search</a></li>
+ <xsl:if test="not(/gentoo/project2:session/loggedInUserID)">
+ <li><a href="JavaScript: void(0);" onclick="$('#login').modal('show');" rel="nofollow">Login/Sign up</a></li>
+ </xsl:if>
+ <xsl:if test="/gentoo/project2:session/loggedInUserID">
+ <li><a href="/accountHome" rel="nofollow">My Account</a></li>
+ </xsl:if>
+ </ul>
+ </div>
+ </div>
+ </div>
</nav>
- <aside id="news">
- <h2>News</h2>
- <ul>
- <li>Gone all HTML5 and jQuery etc etc</li>
- </ul>
- </aside>
- <article id="content">
- <xsl:call-template name="content" />
- </article>
- <footer>
- <p class="disclaimer">This website is not an official Gentoo website. The name "Gentoo" and the "g" logo are trademarks of the Gentoo Foundation, Inc.</p>
- <div class="poweredby">
- Powered by
- <ul>
+
+ <!-- page content -->
+ <header class="jumbotron subhead">
+ <div class="container">
+ <xsl:call-template name="header" />
+ </div>
+ </header>
+ <div class="container">
+ <article class="row">
+ <xsl:call-template name="content" />
+ </article>
+ </div>
+
+ <!-- footer -->
+ <footer class="footer">
+ <div class="container">
+ <p>Gentoo Browse is not an official Gentoo website. The name "Gentoo" and the "g" logo are trademarks of the Gentoo Foundation, Inc.</p>
+ <p>Many thanks to the people behind the tech powering Gentoo Browse.</p>
+ <ul class="footer-links">
+ <li class="muted">&#183;</li>
<xsl:for-each select="/gentoo/power/by">
<li>
<a>
@@ -74,33 +67,72 @@
<xsl:value-of select="name" />
</a>
</li>
+ <li class="muted">&#183;</li>
</xsl:for-each>
</ul>
- Many thanks.
</div>
</footer>
+
+ <!-- popup forms -->
+ <form id="search" class="modal hide fade" action="/search" method="get">
+ <div class="modal-header">
+ <h3>Site search</h3>
+ </div>
+ <div class="modal-body">
+ <input type="search" name="criteria" placeholder="Search criteria" required="required" autofocus="autofocus">
+ <xsl:attribute name="value"><xsl:value-of select="/gentoo/project2:params/criteria" /></xsl:attribute>
+ </input>
+ <p>Searches package names, descritions and bug summaries.</p>
+ </div>
+ <div class="modal-footer">
+ <input type="button" value="Cancel" class="btn" onclick="$('#search').modal('hide'); return false;" />
+ <input type="submit" value="Search" class="btn btn-primary" />
+ </div>
+ </form>
+ <form id="login" class="modal hide fade" action="/dologin" method="post">
+ <div class="modal-header">
+ <h3>Login</h3>
+ </div>
+ <div class="modal-body">
+ <input type="text" name="username" placeholder="Username" required="required" autofocus="autofocus" />
+ <input type="password" name="password" placeholder="Password" required="required" />
+ <p><a href="/signup">Sign up</a></p>
+ </div>
+ <div class="modal-footer">
+ <input type="button" value="Cancel" class="btn" onclick="$('#login').modal('hide'); return false;" />
+ <input type="submit" value="Login" class="btn btn-primary" />
+ </div>
+ </form>
+
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="/js/bootstrap.min.js"></script>
+ <script src="/js/js.js"></script>
</body>
</html>
</xsl:template>
+
<xsl:template name="head">
<title>Gentoo Browse</title>
</xsl:template>
+
+ <xsl:template name="header">
+ </xsl:template>
+
<xsl:template match="package">
- <li>
+ <p>
<a>
- <xsl:attribute name="href">/package/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></xsl:attribute>
- <xsl:attribute name="title"><xsl:value-of select="description" /></xsl:attribute>
- <xsl:value-of select="catname" />/<xsl:value-of select="pkgname" />
- </a> - <xsl:value-of select="description" />
- </li>
- </xsl:template>
- <xsl:template match="package" mode="withuse">
- <li>
+ <xsl:attribute name="href">/category/<xsl:value-of select="catname" /></xsl:attribute>
+ <xsl:attribute name="title"><xsl:value-of select="catname" /></xsl:attribute>
+ <xsl:value-of select="catname" />
+ </a>
+ /
<a>
<xsl:attribute name="href">/package/<xsl:value-of select="catname" />/<xsl:value-of select="pkgname" /></xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="description" /></xsl:attribute>
- <xsl:value-of select="catname" />/<xsl:value-of select="pkgname" />
- </a> - <xsl:value-of select="description" />
+ <xsl:value-of select="pkgname" />
+ </a>
+ :
+ <xsl:value-of select="description" />
<xsl:if test="count(/gentoo/local/use[packageid = current()/packageid]) &gt; 0">
<ul>
<xsl:for-each select="/gentoo/local/use[packageid = current()/packageid]">
@@ -110,6 +142,6 @@
</xsl:for-each>
</ul>
</xsl:if>
- </li>
+ </p>
</xsl:template>
</xsl:stylesheet>