From 4cd0393f15a95e00f6172d29633fdc0cea51f548 Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 9 Jun 2010 23:23:40 +0000 Subject: Port of gentoobrowse to project, WIP --- gentoobrowse/.htaccess | 11 ++++ gentoobrowse/base.xslt | 58 ++++++++++++++++++ gentoobrowse/browse.xslt | 111 ++++++++++++++++++++++++++++++++++ gentoobrowse/datasources/postgres.xml | 8 +++ gentoobrowse/favicon.ico | Bin 0 -> 1086 bytes gentoobrowse/home.xslt | 50 +++++++++++++++ gentoobrowse/images/glogo-small.png | Bin 0 -> 17506 bytes gentoobrowse/login.xslt | 7 +++ gentoobrowse/present/index.xml | 4 ++ gentoobrowse/search.xslt | 33 ++++++++++ gentoobrowse/style.css | 84 +++++++++++++++++++++++++ gentoobrowse/views/newebuilds.xml | 16 +++++ 12 files changed, 382 insertions(+) create mode 100644 gentoobrowse/.htaccess create mode 100644 gentoobrowse/base.xslt create mode 100644 gentoobrowse/browse.xslt create mode 100644 gentoobrowse/datasources/postgres.xml create mode 100644 gentoobrowse/favicon.ico create mode 100644 gentoobrowse/home.xslt create mode 100644 gentoobrowse/images/glogo-small.png create mode 100644 gentoobrowse/login.xslt create mode 100644 gentoobrowse/present/index.xml create mode 100644 gentoobrowse/search.xslt create mode 100644 gentoobrowse/style.css create mode 100644 gentoobrowse/views/newebuilds.xml diff --git a/gentoobrowse/.htaccess b/gentoobrowse/.htaccess new file mode 100644 index 0000000..19986cc --- /dev/null +++ b/gentoobrowse/.htaccess @@ -0,0 +1,11 @@ + + sethandler fcgid-script + +RewriteEngine on +RewriteCond %{REQUEST_URI} !\. +RewriteCond %{REQUEST_URI} !^/p2web +RewriteCond %{REQUEST_URI} !^/env +RewriteRule ^(.*) /p2web/\1 [L] + +AddOutputFilterByType XSLT text/xml-xslt + diff --git a/gentoobrowse/base.xslt b/gentoobrowse/base.xslt new file mode 100644 index 0000000..b723c59 --- /dev/null +++ b/gentoobrowse/base.xslt @@ -0,0 +1,58 @@ + + + + + + + + + Gentoo Browse + + + +

Gentoo Browse

+
+ Home | + Browse | + Search | + Login +
+ + + + + +
+

News

+
+ +
+
+ This website is not an official Gentoo website. + The name "Gentoo" and the "g" logo are trademarks of the Gentoo Foundation, Inc. +
+
+ Powered by + Gentoo, + Apache, + PostgreSQL and + XSLT - Driven by dbweb +
+ + +
+ + + +
  • + + + /package// + + / + - +
  • +
    +
    diff --git a/gentoobrowse/browse.xslt b/gentoobrowse/browse.xslt new file mode 100644 index 0000000..c62e886 --- /dev/null +++ b/gentoobrowse/browse.xslt @@ -0,0 +1,111 @@ + + + + + + + + + + +

    Package groups

    + + + + + + +
    CategoryPackages
    +
    + + + + + + /category/ + + + + + + + + + + +

    Packages

    +
      + +
    +
    + + + +
    +
    + + + + v + + + + + + + + + + Use flags: + + + + + + + +

    + + + /category/ + + + / +

    +

    + +

    + + + +
    + +
      + +
    +
    + + + + + + + + + + + + + + + + + +

    Dependencies

    +
      + +
    +
    +
    diff --git a/gentoobrowse/datasources/postgres.xml b/gentoobrowse/datasources/postgres.xml new file mode 100644 index 0000000..221b05d --- /dev/null +++ b/gentoobrowse/datasources/postgres.xml @@ -0,0 +1,8 @@ + + + + Driver=postgresql;Readonly=yes;ServerName=firebrand.random.lan;Username=gentoo;Database=gentoo;Password=gentoo; + Driver=postgresql;Readonly=yes;ServerName=defiant.random.lan;Username=gentoo;Database=gentoo;Password=gentoo; + + Driver=postgresql;Readonly=no;ServerName=postgresql.random.lan;Username=gentoo;Database=gentoo;Password=gentoo; + diff --git a/gentoobrowse/favicon.ico b/gentoobrowse/favicon.ico new file mode 100644 index 0000000..db2c7bd Binary files /dev/null and b/gentoobrowse/favicon.ico differ diff --git a/gentoobrowse/home.xslt b/gentoobrowse/home.xslt new file mode 100644 index 0000000..368d481 --- /dev/null +++ b/gentoobrowse/home.xslt @@ -0,0 +1,50 @@ + + + + + + + + +

    Newest ebuilds

    + + + + + + + + + + + +
    TodayYesterdayThe day before
    +
      + +
    +
    +
      + +
    +
    +
      + +
    +
    +
    + +
  • + + + (updated ) + + + /package// + + + +
  • +
    +
    diff --git a/gentoobrowse/images/glogo-small.png b/gentoobrowse/images/glogo-small.png new file mode 100644 index 0000000..b1df6ab Binary files /dev/null and b/gentoobrowse/images/glogo-small.png differ diff --git a/gentoobrowse/login.xslt b/gentoobrowse/login.xslt new file mode 100644 index 0000000..4ea8536 --- /dev/null +++ b/gentoobrowse/login.xslt @@ -0,0 +1,7 @@ + + + + + diff --git a/gentoobrowse/present/index.xml b/gentoobrowse/present/index.xml new file mode 100644 index 0000000..15dacee --- /dev/null +++ b/gentoobrowse/present/index.xml @@ -0,0 +1,4 @@ + + + + diff --git a/gentoobrowse/search.xslt b/gentoobrowse/search.xslt new file mode 100644 index 0000000..c17a5a8 --- /dev/null +++ b/gentoobrowse/search.xslt @@ -0,0 +1,33 @@ + + + + + +

    Search

    +
    + + + + + + +
    + +
    + + + +

    Search Results

    +
      + +
    +
    + +

    Nothing found

    +
    +
    +
    +
    diff --git a/gentoobrowse/style.css b/gentoobrowse/style.css new file mode 100644 index 0000000..195a109 --- /dev/null +++ b/gentoobrowse/style.css @@ -0,0 +1,84 @@ +html { + background: white url('/images/glogo-small.png') no-repeat 10px 5px; + font-family: cursive; +} +body { + font-size: 11px; +} +h1 { + font-style: italic; + font-weight: bold; + font-size: 45px; + margin: 20px 160px 5px; + border-bottom: 1px solid black; +} +.tabs { + font-size: 15px; + text-align: center; +} +h2 { + padding: 0; + margin: 0; + font-size: 18px; +} +p { +} + +.colLeft { + vertical-align: top; + width: 130px; + padding: 5px; +} +.content { + vertical-align: top; + border-left: 3px dotted black; + padding: 5px; +} + +.newebuilds th { + margin: 0; + width: 33%; +} +.newebuilds ul { + margin: 0; +} + +.versions { + border-collapse: collapse; +width: 95%; +} +.versions td { +border: 1px solid gray; +} +.versions .row1 td { + border-top: 2px solid black; +} +.versions .row2 td { + border-bottom: 2px solid black; +} +.versions .ver { + font-size: large; + padding: 5px 20px; + white-space: nowrap; +} +.versions .use, .versions .archs { +padding: 10px 5px; +} + +table.grps { + border-collapse: collapse; +} +table.grps td { + border: 1px solid black; + padding: 5px 20px; +} +div.trademark, div.poweredby { + text-align: center; + color: gray; + font-size: 9px; + margin: 10px; +} +.warning { + color: red; + font-weight: bold; +} diff --git a/gentoobrowse/views/newebuilds.xml b/gentoobrowse/views/newebuilds.xml new file mode 100644 index 0000000..d27ee70 --- /dev/null +++ b/gentoobrowse/views/newebuilds.xml @@ -0,0 +1,16 @@ + + + + + + SELECT filename, EXTRACT('day' FROM NOW() - f.firstseen) AS age, description, + moddate, p.name AS pkgname, c.name AS catname + FROM ebuilds e, files f, packages p, categories c + WHERE e.ebuildid = f.fileid + AND e.packageid = p.packageid + AND p.categoryid = c.categoryid + AND f.firstseen > DATE_TRUNC('day', NOW()) - INTERVAL '3 days' + ORDER BY c.name, p.name, e.versioninst + + + -- cgit v1.2.3