Thread: [Pyxine-checkins] htdocs/pyxine index.tmpl,1.4,1.5 pyxine.inc,1.1,1.2 pyxine.tmpl,1.2,1.3
Status: Pre-Alpha
Brought to you by:
dairiki
From: <da...@us...> - 2003-02-13 04:35:15
|
Update of /cvsroot/pyxine/htdocs/pyxine In directory sc8-pr-cvs1:/tmp/cvs-serv976/pyxine Modified Files: index.tmpl pyxine.inc pyxine.tmpl Log Message: Added README. Index: index.tmpl =================================================================== RCS file: /cvsroot/pyxine/htdocs/pyxine/index.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- index.tmpl 10 Feb 2003 18:55:44 -0000 1.4 +++ index.tmpl 13 Feb 2003 04:35:12 -0000 1.5 @@ -1,48 +1,58 @@ <hr class="hide" /> <?php -function index_head($head) { - static $first = true; - if (!$first) { - ?><span class="hide"> </span><?php +class Index { + function Index($selected) { + $this->_selected = $selected; + $this->_section_sep = ""; } - $first = false; - ?><strong class="h2"><?=htmlspecialchars($head)?><span class="hide">:</span></strong> - <?php -} -function index_entry($text, $url, $title=false) { - ?><a href="<?=htmlspecialchars($url)?>"<?php - if ($text == $GLOBAL['SELECTED']) { - ?> id="selected"<?php + function head($head) { + echo $this->_section_sep; + $this->_section_sep = '<span class="hide"> </span>'; + ?><strong class="h2"><?=htmlspecialchars($head)?><span class="hide">:</span></strong> + <?php + } + + function entry($text, $url, $title=false) { + ?><a href="<?=htmlspecialchars($url)?>"<?php + if ($text == $this->_selected) { + ?> class="selected"<?php + } + if (!$title) { + $title = $text; + } + ?> title="<?=htmlspecialchars($title)?>"><?=htmlspecialchars($text)?></a> + <?php } - if (!$title) - $title = $text; - ?> title="<?=htmlspecialchars($title)?>"><?=htmlspecialchars($text)?></a> - <?php } -index_head('Pages'); -index_entry('Home', - "http://pyxine.sourceforge.net/", - "The Pyxine Home Page"); -index_head('SourceForge'); -index_entry("Project Info", - "http://sourceforge.net/projects/pyxine", - "SourceForge project info for Pyxine"); -index_entry("Downloads", - "http://sourceforge.net/project/showfiles.php?group_id=73236"); -index_entry("CVS", - "http://sourceforge.net/cvs/?group_id=73236", - "CVS Repository"); +$i = new Index($SELECTED); +$i->head('Pages'); +$i->entry('Home', + "http://pyxine.sourceforge.net/", + "The Pyxine Home Page"); +$i->entry('README', + "http://pyxine.sourceforge.net/readme.html", + "The README from the latest Pyxine distribution"); -index_head('Links'); -index_entry("xine", - "http://xinehq.de", - "The xine home page"); -index_entry("freshmeat", - "http://freshmeat.net/projects/pyxine", - "The freshmeat listing for Pyxine"); +$i->head('SourceForge'); +$i->entry("Project Info", + "http://sourceforge.net/projects/pyxine", + "SourceForge project info for Pyxine"); +$i->entry("Downloads", + "http://sourceforge.net/project/showfiles.php?group_id=73236"); +$i->entry("CVS", + "http://sourceforge.net/cvs/?group_id=73236", + "CVS Repository"); + +$i->head('Links'); +$i->entry("xine", + "http://xinehq.de", + "The xine home page"); +$i->entry("freshmeat", + "http://freshmeat.net/projects/pyxine", + "The freshmeat listing for Pyxine"); ?> <hr class="hide" /> Index: pyxine.inc =================================================================== RCS file: /cvsroot/pyxine/htdocs/pyxine/pyxine.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pyxine.inc 8 Feb 2003 05:57:45 -0000 1.1 +++ pyxine.inc 13 Feb 2003 04:35:12 -0000 1.2 @@ -19,4 +19,32 @@ } } +function docutils_output($filename) +{ + $fp = fopen($filename, "r"); + + while ($line = fgets($fp, 2048)) { + if ($line == "<body>\n") + break; + } + + while ($line = fgets($fp, 2048)) { + if ($line == "</body>\n") + break; + + /* + $line = str_replace('<div class="contents topic" id="table-of-contents">', + '<div class="contents topic">', + $line); + + $line = str_replace('<a name="table-of-contents">', + '<a id="table-of-contents">', + $line); + */ + print $line; + } + + fclose ($fp); +} + ?> Index: pyxine.tmpl =================================================================== RCS file: /cvsroot/pyxine/htdocs/pyxine/pyxine.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pyxine.tmpl 8 Feb 2003 19:12:02 -0000 1.2 +++ pyxine.tmpl 13 Feb 2003 04:35:12 -0000 1.3 @@ -1,6 +1,7 @@ <?php echo "<?xml version='1.0' encoding='ISO-8859-1'?>\n"; ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Pyxine - <?=$TITLE?></title> @@ -12,7 +13,7 @@ </head> <body> -<h1>Pyxine - Python bindings for xine</h1> +<h1 class="title">Pyxine - Python bindings for xine</h1> <div id="body"> <div id="index"><?=$INDEX?></div> <div id="main"><?=$BODY?></div> @@ -26,8 +27,8 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" class="logo" /></a> <a href="http://validator.w3.org/check/referer"><img - src="http://www.w3.org/Icons/valid-xhtml11" - alt="Valid XHTML 1.1!" class="logo" /></a> + src="http://www.w3.org/Icons/valid-xhtml10" + alt="Valid XHTML 1.0!" class="logo" /></a> </div> </body> </html> |