summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/default/css/screen.css11
-rw-r--r--themes/default/images/ico-view-comments.pngbin0 -> 263 bytes
-rw-r--r--themes/default/js/jquery.localscroll.js9
-rw-r--r--themes/default/js/jquery.scrollTo.js11
-rw-r--r--themes/default/js/ui.init.js11
-rw-r--r--themes/default/views/page.html.php2
-rw-r--r--themes/default/views/sidebar.html.php1
7 files changed, 43 insertions, 2 deletions
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css
index e922eebb..57bb3af1 100644
--- a/themes/default/css/screen.css
+++ b/themes/default/css/screen.css
@@ -358,6 +358,7 @@ li.gError select {
#gContent {
font-size: 1.2em;
padding-left: 20px;
+ width: 696px;
}
#gSidebar {
@@ -439,6 +440,9 @@ li.gError select {
#gContent #gItem {
}
+#gContent #gItem #gPager {
+}
+
#gContent #gComments {
margin-top: 2em;
}
@@ -510,7 +514,8 @@ li.gError select {
#gViewMenu #gAlbumLink,
#gViewMenu #gHybridLink,
#gViewMenu #gSlideshowLink,
-#gViewMenu #gFullsizeLink {
+#gViewMenu #gFullsizeLink,
+#gViewMenu #gCommentsLink {
background-repeat: no-repeat;
background-position: 10px center;
display: block;
@@ -538,6 +543,10 @@ li.gError select {
background-image: url('../images/ico-view-fullsize.png');
}
+#gViewMenu #gCommentsLink {
+ background-image: url('../images/ico-view-comments.png');
+}
+
/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#gBreadcrumbs {
diff --git a/themes/default/images/ico-view-comments.png b/themes/default/images/ico-view-comments.png
new file mode 100644
index 00000000..33d3b4ba
--- /dev/null
+++ b/themes/default/images/ico-view-comments.png
Binary files differ
diff --git a/themes/default/js/jquery.localscroll.js b/themes/default/js/jquery.localscroll.js
new file mode 100644
index 00000000..d867eaa7
--- /dev/null
+++ b/themes/default/js/jquery.localscroll.js
@@ -0,0 +1,9 @@
+/**
+ * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
+ * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Dual licensed under MIT and GPL.
+ * Date: 6/3/2008
+ * @author Ariel Flesler
+ * @version 1.2.6
+ **/
+;(function($){var g=location.href.replace(/#.*/,''),h=$.localScroll=function(a){$('body').localScroll(a)};h.defaults={duration:1e3,axis:'y',event:'click',stop:1};h.hash=function(a){a=$.extend({},h.defaults,a);a.hash=0;if(location.hash)setTimeout(function(){i(0,location,a)},0)};$.fn.localScroll=function(b){b=$.extend({},h.defaults,b);return(b.persistent||b.lazy)?this.bind(b.event,function(e){var a=$([e.target,e.target.parentNode]).filter(c)[0];a&&i(e,a,b)}):this.find('a,area').filter(c).bind(b.event,function(e){i(e,this,b)}).end().end();function c(){var a=this;return!!a.href&&!!a.hash&&a.href.replace(a.hash,'')==g&&(!b.filter||$(a).is(b.filter))}};function i(e,a,b){var c=a.hash.slice(1),d=document.getElementById(c)||document.getElementsByName(c)[0],f;if(d){e&&e.preventDefault();f=$(b.target||$.scrollTo.window());if(b.lock&&f.is(':animated')||b.onBefore&&b.onBefore.call(a,e,d,f)===!1)return;if(b.stop)f.queue('fx',[]).stop();f.scrollTo(d,b).trigger('notify.serialScroll',[d]);if(b.hash)f.queue(function(){location=a.hash;$(this).dequeue()})}}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/jquery.scrollTo.js b/themes/default/js/jquery.scrollTo.js
new file mode 100644
index 00000000..453382d2
--- /dev/null
+++ b/themes/default/js/jquery.scrollTo.js
@@ -0,0 +1,11 @@
+/**
+ * jQuery.ScrollTo - Easy element scrolling using jQuery.
+ * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Dual licensed under MIT and GPL.
+ * Date: 9/11/2008
+ * @author Ariel Flesler
+ * @version 1.4
+ *
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
+ */
+;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js
index e373005e..245723ce 100644
--- a/themes/default/js/ui.init.js
+++ b/themes/default/js/ui.init.js
@@ -20,7 +20,16 @@ $(document).ready(function() {
// Photo/Item item view only
if ($("#gItem").length) {
- sizedImage();
+ // Ensure that sized image versions
+ // fit inside their container
+ sizedImage();
+
+ // Add scroll effect for links to named anchors
+ $.localScroll({
+ queue: true,
+ duration: 1000,
+ hash: true
+ });
}
// Apply Superfish menus
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index ff508093..fca5daae 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -28,6 +28,8 @@
<script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script>
<script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script>
<script src="<?= $theme->url("js/superfish.js") ?>" type="text/javascript"></script>
+ <script src="<?= $theme->url("js/jquery.scrollTo.js") ?>" type="text/javascript"></script>
+ <script src="<?= $theme->url("js/jquery.localscroll.js") ?>" type="text/javascript"></script>
<script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
<?= $theme->head() ?>
</head>
diff --git a/themes/default/views/sidebar.html.php b/themes/default/views/sidebar.html.php
index 4209bf87..7ef24217 100644
--- a/themes/default/views/sidebar.html.php
+++ b/themes/default/views/sidebar.html.php
@@ -1,6 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul id="gViewMenu" class="sf-menu">
<li><a href="#" id="gFullsizeLink" title="<?= _("View full size image") ?>"><?= _("View full size image") ?></a></li>
+ <li><a href="#comments" id="gCommentsLink" title="<?= _("View this item's comments") ?>"><?= _("View this item's comments") ?></a></li>
<li><a href="#" id="gAlbumLink" title="<?= _("View album") ?>"><?= _("Album view") ?></a></li>
<li><a href="#" id="gHybridLink" title="<?= _("View album in hybrid mode") ?>"><?= _("Hybrid view") ?></a></li>
<li><?= $theme->sidebar_top() ?></li>