diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-11-06 07:20:06 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-06 07:20:06 +0000 |
| commit | 278191dd6d38bd939ccefb7a1c338611ee920b6e (patch) | |
| tree | f0272b1dba82fd5ad3f1b2ee4dd559f0b71838c5 /themes | |
| parent | 6cafc61f96e900790c8a1e3f0cd01b1b679e93b0 (diff) | |
Change the theming module again, per a discussion with Chad and Jakob.
Now we have an overall page layout (page.html.php) which has a $content
variable, and that $content will be one of several possible secondary
views. Currently, it is either photo.html.php or album.html.php.
header, footer, breadcrumb, sidebar, anything common to all pages is
in page.html.php.
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/default/views/album.html.php | 90 | ||||
| -rw-r--r-- | themes/default/views/footer.html.php | 9 | ||||
| -rw-r--r-- | themes/default/views/header.html.php | 54 | ||||
| -rw-r--r-- | themes/default/views/page.html.php | 51 | ||||
| -rw-r--r-- | themes/default/views/photo.html.php | 111 | ||||
| -rw-r--r-- | themes/default/views/sidebar.html.php | 6 |
6 files changed, 133 insertions, 188 deletions
diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index 232e749b..ba995276 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -1,56 +1,44 @@ <? defined("SYSPATH") or die("No direct script access."); ?> -<?= $theme->display('header.html') ?> - -<div id="bd"> - <div id="yui-main"> - <div id="gContent" class="yui-b"> - <div id="gAlbumGrid"> - <div id="gAlbumGridHeader"> - <h1><?= $item->title ?></h1> - <span class="understate"><?= $item->description ?></span> - <a href="#" id="gSlideshowLink" class="buttonlink">Slideshow</a> - </div> - - <? foreach ($children as $i => $child): ?> - <? if ($child->is_album()): ?> - <div class="gAlbumContainer gAlbum <?= text::alternate("first", "", "") ?>"> - <a href="<?= url::site("album/{$child->id}") ?>"> - <img id="photo-id-<?= $child->id ?>" class="photo" - alt="photo" src="<?= $child->thumbnail_url() ?>" - width="<?= $child->thumbnail_width ?>" - height="<?= $child->thumbnail_height ?>" /> - </a> - <h2>Album title</h2> - <ul class="gMetadata"> - <li>Views: 321</li> - <li>By: <a href="#">username</a></li> - </ul> - </div> - <? else: ?> - <div class="gItemContainer <?= text::alternate("first", "", "") ?>"> - <a href="<?= url::site("photo/{$child->id}") ?>"> - <img id="photo-id-<?= $child->id ?>" class="photo" - alt="photo" src="<?= $child->thumbnail_url() ?>" - width="<?= $child->thumbnail_width ?>" - height="<?= $child->thumbnail_height ?>" /> - </a> - <h2><?= $child->title ?></h2> - </div> - <? endif ?> - <? endforeach ?> +<div id="gAlbumGrid" class="gAlbumView"> + <div id="gAlbumGridHeader"> + <h1><?= $item->title ?></h1> + <span class="understate"><?= $item->description ?></span> + <a href="#" id="gSlideshowLink" class="buttonlink">Slideshow</a> + </div> - <div id="gPagination"> - Items 1-10 of 34 - <span class="first_inactive">first</span> - <span class="previous_inactive">previous</span> - <a href="#" class="next">next</a> - <a href="#" class="last">last</a> - </div> - </div> + <? foreach ($children as $i => $child): ?> + <? if ($child->is_album()): ?> + <div class="gAlbumContainer gAlbum <?= text::alternate("first", "", "") ?>"> + <a href="<?= url::site("album/{$child->id}") ?>"> + <img id="photo-id-<?= $child->id ?>" class="photo" + alt="photo" src="<?= $child->thumbnail_url() ?>" + width="<?= $child->thumbnail_width ?>" + height="<?= $child->thumbnail_height ?>" /> + </a> + <h2>Album title</h2> + <ul class="gMetadata"> + <li>Views: 321</li> + <li>By: <a href="#">username</a></li> + </ul> + </div> + <? else: ?> + <div class="gItemContainer <?= text::alternate("first", "", "") ?>"> + <a href="<?= url::site("photo/{$child->id}") ?>"> + <img id="photo-id-<?= $child->id ?>" class="photo" + alt="photo" src="<?= $child->thumbnail_url() ?>" + width="<?= $child->thumbnail_width ?>" + height="<?= $child->thumbnail_height ?>" /> + </a> + <h2><?= $child->title ?></h2> + </div> + <? endif ?> + <? endforeach ?> - </div> + <div id="gPagination"> + Items 1-10 of 34 + <span class="first_inactive">first</span> + <span class="previous_inactive">previous</span> + <a href="#" class="next">next</a> + <a href="#" class="last">last</a> </div> - <?= $theme->display('sidebar.html') ?> </div> - -<?= $theme->display('footer.html') ?> diff --git a/themes/default/views/footer.html.php b/themes/default/views/footer.html.php deleted file mode 100644 index 9a080a57..00000000 --- a/themes/default/views/footer.html.php +++ /dev/null @@ -1,9 +0,0 @@ -<? defined("SYSPATH") or die("No direct script access."); ?> - <div id="ft"> - <div id="gFooter"> - Powered by <a href="#">Gallery3</a> | <a href="#">About this Gallery</a> | ... - </div><!-- END #gFooter --> - </div><!-- END YUI #ft --> - </div> - </body> -</html> diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php deleted file mode 100644 index acecb885..00000000 --- a/themes/default/views/header.html.php +++ /dev/null @@ -1,54 +0,0 @@ -<? defined("SYSPATH") or die("No direct script access."); ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>Browse Photos :: <?= $item->title ?></title> - - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - - <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/reset-fonts-grids/reset-fonts-grids.css" /> - <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/base/base-min.css" /> - <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/styles.css") ?>" media="screen,projection" /> - - <!-- CSS --> - <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/container/assets/container.css" /> - <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> - <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/animation/animation-min.js"></script> - <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/container/container-min.js"></script> - - <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/treeview/assets/skins/sam/treeview.css" /> - <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/treeview/treeview-min.js"></script> - </head> - - <body class="yui-skin-sam"> - <div id="doc2" class="yui-t5 gAlbumView"> - <div id="gHeader"> - <img id="gLogo" alt="<?= _("Logo") ?>" src="<?= $theme->url("images/logo.png") ?>" /> - - <h1><?= $item->title ?></h1> - - <div id="gLoginMenu"> - <a href="#"><?= _("Register") ?></a> | - <a href="#"><?= _("Login") ?> - </div> - - <ul id="gSiteMenu"> - <li><a href="index.html"><?= _("HOME") ?></a></li> - <li><a class="active" href="browse.html"><?= _("BROWSE") ?></a></li> - <li><a href="upload.html"><?= _("UPLOAD") ?></a></li> - <li><a href="upload.html"><?= _("MY GALLERY") ?></a></li> - <li><a href="#"><?= _("ADMIN") ?></a></li> - </ul> - - <ul id="gBreadcrumbs"> - <? foreach ($parents as $parent): ?> - <li><a href="<?= url::site("album/{$parent->id}") ?>"><?= $parent->title ?></a></li> - <? endforeach ?> - <li class="active"><span><?= $item->title ?></span></li> - </ul> - - <form id="gSearchForm"> - <input type="text" class="text" value="<?= _("Search Gallery ...") ?>"/> - <input type="submit" class="submit" value="search" /> - </form> - </div> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 53ea57a5..620f15e8 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -3,12 +3,10 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Browse Photos :: <?= $item->title ?></title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/reset-fonts-grids/reset-fonts-grids.css" /> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/base/base-min.css" /> - <link rel="stylesheet" type="text/css" href="<?= theme::url("css/styles.css") ?>" media="screen,projection" /> + <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/styles.css") ?>" media="screen,projection" /> <!-- CSS --> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/container/assets/container.css" /> @@ -21,17 +19,56 @@ </head> <body class="yui-skin-sam"> - <div id="doc2" class="yui-t5 gAlbumView"> - <?= $header ?> + <div id="doc2" class="yui-t5 gView"> + + <div id="gHeader"> + <img id="gLogo" alt="<?= _("Logo") ?>" src="<?= $theme->url("images/logo.png") ?>" /> + <h1><?= $item->title ?></h1> + <div id="gLoginMenu"> + <a href="#"><?= _("Register") ?></a> | + <a href="#"><?= _("Login") ?></a> + </div> + + <ul id="gSiteMenu"> + <li><a href="index.html"><?= _("HOME") ?></a></li> + <li><a class="active" href="browse.html"><?= _("BROWSE") ?></a></li> + <li><a href="upload.html"><?= _("UPLOAD") ?></a></li> + <li><a href="upload.html"><?= _("MY GALLERY") ?></a></li> + <li><a href="#"><?= _("ADMIN") ?></a></li> + </ul> + + <ul id="gBreadcrumbs"> + <? foreach ($parents as $parent): ?> + <li><a href="<?= url::site("album/{$parent->id}") ?>"><?= $parent->title ?></a></li> + <? endforeach ?> + <li class="active"><span><?= $item->title ?></span></li> + </ul> + + <form id="gSearchForm"> + <input type="text" class="text" value="<?= _("Search Gallery ...") ?>"/> + <input type="submit" class="submit" value="search" /> + </form> + </div> + <div id="bd"> <div id="yui-main"> <div id="gContent" class="yui-b"> <?= $content ?> </div> </div> - <?= $sidebar ?> + + <div id="gSidebar" class="yui-b"> + <? foreach ($theme->blocks() as $block): ?> + <?= $block ?> + <? endforeach ?> + </div> </div> - <?= $footer ?> + + <div id="ft"> + <div id="gFooter"> + Powered by <a href="#">Gallery3</a> | <a href="#">About this Gallery</a> | ... + </div><!-- END #gFooter --> + </div><!-- END YUI #ft --> </div> </body> </html> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 8f7fa791..74e01050 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -1,66 +1,55 @@ <? defined("SYSPATH") or die("No direct script access."); ?> -<?= $theme->display('header.html') ?> -<div id="bd"> - <div id="yui-main"> - <div id="gContent" class="yui-b"> +<div id="gItem"> + <a href="" class="buttonlink">Full size (1024x768)</a> + <a href="" class="buttonlink">Slideshow</a> - <div id="gItem"> - <a href="" class="buttonlink">Full size (1024x768)</a> - <a href="" class="buttonlink">Slideshow</a> + <img id="photo-id-<?= $item->id ?>" alt="photo" src="<?= $item->resize_url() ?>" + width="<?= $item->resize_width ?>" + height="<?= $item->resize_height ?>" /> + <h1><?= $item->title ?></h1> + <p><?= $item->description ?></p> +</div> - <img id="photo-id-<?= $item->id ?>" alt="photo" src="<?= $item->resize_url() ?>" - width="<?= $item->resize_width ?>" - height="<?= $item->resize_height ?>" /> - <h1><?= $item->title ?></h1> - <p><?= $item->description ?></p> - </div> - - <div id="gComments"> - <h2>Comments</h2> +<div id="gComments"> + <h2>Comments</h2> - <ul id="gCommentThread"> - <li id="gComment-1" class="gComment odd"> - <p><a href="#" class="gAuthor">Andy</a> said 2 hours ago <span class="understate">(October 23, 2008 11:30am)</span></p> - <div> - Lorem ipsum dolor sit amet. - </div> - </li> - <li id="gComment-2" class="gComment even"> - <p> - <a href="#" class="gAuthor">Other user</a> said 30 minutes ago <span class="understate">(October 23, 2008 1:00pm)</span> - </p> - <div> - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard - dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It - was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with - desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. - </div> - </li> - </ul> - - <form id="gCommentAdd" class="gExpandedForm"> - <fieldset> - <legend>Add comment</legend> - <div class="row"> - <label for="gCommentAuthor">Your Name</label> - <input type="text" id="gCommentAuthor" class="text" /> - </div> - <div> - <label for="gCommentEmail">Your Email (not displayed)</label> - <input type="text" id="gCommentEmail" class="text" /> - </div> - <div class="row"> - <label for="gCommentText">Comment</label> - <textarea id="gCommentText"></textarea> - </div> - <input type="submit" class="button" value="Add" /> - </fieldset> - </form> - </div><!-- END #gComments --> + <ul id="gCommentThread"> + <li id="gComment-1" class="gComment odd"> + <p><a href="#" class="gAuthor">Andy</a> said 2 hours ago <span class="understate">(October 23, 2008 11:30am)</span></p> + <div> + Lorem ipsum dolor sit amet. + </div> + </li> + <li id="gComment-2" class="gComment even"> + <p> + <a href="#" class="gAuthor">Other user</a> said 30 minutes ago <span class="understate">(October 23, 2008 1:00pm)</span> + </p> + <div> + Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard + dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It + was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with + desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. + </div> + </li> + </ul> - </div><!-- END #gContent --> - </div><!-- END yui-main --> - <?= $theme->display('sidebar.html') ?> -</div><!-- END YUI #bd --> -<?= $theme->display('footer.html'); ?> + <form id="gCommentAdd" class="gExpandedForm"> + <fieldset> + <legend>Add comment</legend> + <div class="row"> + <label for="gCommentAuthor">Your Name</label> + <input type="text" id="gCommentAuthor" class="text" /> + </div> + <div> + <label for="gCommentEmail">Your Email (not displayed)</label> + <input type="text" id="gCommentEmail" class="text" /> + </div> + <div class="row"> + <label for="gCommentText">Comment</label> + <textarea id="gCommentText"></textarea> + </div> + <input type="submit" class="button" value="Add" /> + </fieldset> + </form> +</div><!-- END #gComments --> diff --git a/themes/default/views/sidebar.html.php b/themes/default/views/sidebar.html.php deleted file mode 100644 index 991c919f..00000000 --- a/themes/default/views/sidebar.html.php +++ /dev/null @@ -1,6 +0,0 @@ -<? defined("SYSPATH") or die("No direct script access."); ?> -<div id="gSidebar" class="yui-b"> - <? foreach ($theme->blocks() as $block): ?> - <?= $block ?> - <? endforeach ?> -</div><!-- END #gSideBar --> |
