diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-11-04 21:24:42 +0000 | 
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-04 21:24:42 +0000 | 
| commit | 605d2de336eac8c8f80b916d30989b347d813e94 (patch) | |
| tree | 1e33c92d4b3eedd9f4b3c31e21e11a9f36bcd8b2 /themes | |
| parent | ade1650846605d648da2565994e309414d908ac5 (diff) | |
Lots of new stuff!
Replace theme HTML with *almost* the latest stuff from the
mockups.  (it doesn't include r18467 yet).
Our theme format is now modelled after WordPress / Habari's style
where you have one entry point per type (eg: album.php) which can
load up whatever parts it needs (eg: $theme->display("header"))
Created album and photo helpers which have create() functions
that form the base of our new API, along with tests for them.
Created our own version of the ORM_MPTT since the existing
versions were too buggy and unsupported to depend upon.  Only has
a minimal implementation so far, and the tests are not yet
committed.
Added path(), thumbnail_path() and resize_path() to Item_Model
Extended the scaffolding to allow you to add lots of
photos/albums into your hierarchy.
Deleted modules/mptt -- we're not going to use this anymore.
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/default/images/carousel.png | bin | 0 -> 15631 bytes | |||
| -rw-r--r-- | themes/default/views/footer.html.php | 8 | ||||
| -rw-r--r-- | themes/default/views/photo.html.php | 64 | ||||
| -rw-r--r-- | themes/default/views/sidebar.html.php | 159 | 
4 files changed, 132 insertions, 99 deletions
diff --git a/themes/default/images/carousel.png b/themes/default/images/carousel.png Binary files differnew file mode 100644 index 00000000..e516b1d3 --- /dev/null +++ b/themes/default/images/carousel.png diff --git a/themes/default/views/footer.html.php b/themes/default/views/footer.html.php index ab40a417..9a080a57 100644 --- a/themes/default/views/footer.html.php +++ b/themes/default/views/footer.html.php @@ -1,7 +1,9 @@  <? defined("SYSPATH") or die("No direct script access."); ?> -      <div id="gFooter"> -        Powered by <a href="#">GalleryX</a> | <a href="#">About this Gallery</a> | ... -      </div> +      <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 new file mode 100644 index 00000000..e4d47d61 --- /dev/null +++ b/themes/default/views/photo.html.php @@ -0,0 +1,64 @@ +<? 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> + +        <img id="photo-id-1" alt="photo" src="images/thumbnail.jpg" /> +        <h1>Photo title</h1> +        <p>Photo description: Lorem ipsum dolor sit amet.</p> +      </div> + +      <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 --> + +    </div><!-- END #gContent --> +  </div><!-- END yui-main --> +  <?= $theme->display('sidebar.html') ?> +</div><!-- END YUI #bd --> +<?= $theme->display('footer.html'); ?> diff --git a/themes/default/views/sidebar.html.php b/themes/default/views/sidebar.html.php index f8acc25b..9f4509e3 100644 --- a/themes/default/views/sidebar.html.php +++ b/themes/default/views/sidebar.html.php @@ -1,106 +1,24 @@  <? defined("SYSPATH") or die("No direct script access."); ?>  <div id="gSidebar" class="yui-b"> -  <div id="gAlbumTree"> -    <h2>Album Navigation</h2> - -    <div id="gTreeContainer"><!-- there might be a better way to make this accessible to the JS --> -      <ul> -        <li>Gallery -          <ul> -            <li>Friends & Family -              <ul> -                <li>Christmas 2006</li> -                <li>Family Reunion</li> -                <li>Christmas 2007</li> -              </ul> -            </li> -            <li>Vactions -              <ul> -                <li>Cuba</li> -                <li>Europe</li> -              </ul> -            </li> -          </ul> -        </li> -      </ul> +  <div id="gCarousel" class="gBlock"> +    <div class="gBlockHeader"> +      <h2>Album: <a href="browse.html">Christmas 2007</a></h2> +      <a href="#" class="minimize">[-]</a>      </div> -  </div> - -  <script type="text/javascript"> -    //global variable to allow console inspection of tree: -    var tree; - -    //anonymous function wraps the remainder of the logic: -    (function() { - -    //function to initialize the tree: -    function treeInit() { -    buildRandomTextNodeTree(); -    } - -    //Function  creates the tree and -    //builds between 3 and 7 children of the root node: -    function buildRandomTextNodeTree() { -    //instantiate the tree: -    tree = new YAHOO.widget.TreeView("gTreeContainer"); - -    // Expand and collapse happen prior to the actual expand/collapse, -    // and can be used to cancel the operation -    tree.subscribe("expand", function(node) { -    YAHOO.log(node.index + " was expanded", "info", "example"); -    // return false; // return false to cancel the expand -    }); - -    tree.subscribe("collapse", function(node) { -    YAHOO.log(node.index + " was collapsed", "info", "example"); -    }); - -    // Trees with TextNodes will fire an event for when the label is clicked: -    tree.subscribe("labelClick", function(node) { -    YAHOO.log(node.index + " label was clicked", "info", "example"); -    }); - -    //The tree is not created in the DOM until this method is called: -    tree.draw(); -    } - -    //Add an onDOMReady handler to build the tree when the document is ready -    YAHOO.util.Event.onDOMReady(treeInit); -    })(); -  </script> +    <img src="<?= $theme->url("images/carousel.png") ?>" width="214" class="gBlockContent" /> +  </div> -  <table class="gMetadata"> -    <caption><h2>Album Info</h2></caption> -    <tbody> -      <tr> -        <th>Name:</th> -        <td><strong>Christmas 2007</strong></td> -      </tr> -      <tr> -        <th>Taken:</th> -        <td><span class="date" title="January 21, 2008 8:30pm">January 21, 2008</td> -      </tr> -      <tr> -        <th>Location:</th> -        <td><a href="#" title="see the location on a map">Mountain View</a></td> -      </tr> -      <tr> -        <th>Owner:</th> -        <td><a href="#">username</a></td> -      </tr> -      <tr> -        <th>Uploaded:</th> -        <td><span class="date" title="October 23, 2008 11:37am">October 23, 2008</td> -      </tr> -    </tbody> -  </table> +  <div class="gTagCloud gBlock"> +    <div class="gBlockHeader"> +      <h2>Tags</h2>   +      <a href="#">?</a> +      <a href="#" class="minimize">[-]</a> +    </div> -  <div class="gTagCloud"> -    <h2>Tag cloud</h2> -    <ul> +    <ul class="gBlockContent">        <li><a href="#" class="m size0">animation</a></li>        <li><a href="#" class="m size0">art</a></li>        <li><a href="#" class="m size1">blind</a></li> @@ -137,5 +55,54 @@        <li><a href="#" class="m size1">usability</a></li>        <li><a href="#" class="m size0">writing</a></li>      </ul> + +    <form id="gAddTag" class="gBlockContent"> +      <input type="text" class="text" value="add new tags ..." id="newtags" /> +      <input type="submit" class="submit" value="add" /> +      <label for="newtags" class="understate">(separated by commas)</label> +    </form> +  </div> + +  <div class="gBlock"> +    <div class="gBlockHeader"> +      <h2>Item Info</h2> +      <a href="#" class="minimize">[-]</a> +    </div> +    <table class="gMetadata gBlockContent"> +      <tbody> +        <tr> +          <th>Title:</th> +          <td>Christmas 2007</td> +        </tr> +        <tr> +          <th>Taken:</th> +          <td>January 21, 2008</td> +        </tr> +        <tr> +          <th>Uploaded:</th> +          <td>January 27, 2008</td> +        </tr> +        <tr> +          <th>Owner:</th> +          <td><a href="#">username</a></td> +        </tr> +        <tr> +          <td colspan="2" class="toggle"> +            <a href="#">more \/</a> +          </td> +        </tr> +      </tbody> +    </table>    </div> -</div> + +  <div class="gBlock"> +    <div class="gBlockHeader"> +      <h2>Location</h2> +      <a href="#" class="minimize">[-]</a> +    </div> +    <iframe class="gBlockContent" width="214" height="214" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=mountain+view&sll=37.0625,-95.677068&sspn=50.823846,89.648437&ie=UTF8&z=12&g=mountain+view&ll=37.433704,-122.056046&output=embed&s=AARTsJoyjpSOFMFEv5XZbREeW_hGGS28pQ"></iframe> +    <br /> +    <small class="gBlockContent"><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=mountain+view&sll=37.0625,-95.677068&sspn=50.823846,89.648437&ie=UTF8&z=12&g=mountain+view&ll=37.433704,-122.056046&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small> +  </div> + +</div><!-- END #gSideBar -->  | 
