]> git.mxchange.org Git - friendica.git/commitdiff
duepuntozero: show desc on image in albums
authorFabio Comuni <fabrix.xm@gmail.com>
Wed, 16 Feb 2011 11:49:16 +0000 (12:49 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Wed, 16 Feb 2011 11:49:16 +0000 (12:49 +0100)
mod/photos.php
view/photo_album.tpl
view/theme/duepuntozero/style.css

index a44eb5a5f509a6667b274e73cd8923acf236ef14..ebfe714a78dc0ebd0b3e496e6a28a0e955bb265d 100644 (file)
@@ -831,7 +831,7 @@ function photos_content(&$a) {
                        $a->set_pager_itemspage(20);
                }
 
-               $r = q("SELECT `resource-id`, `id`, `filename`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s' 
+               $r = q("SELECT `resource-id`, `id`, `filename`, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s' 
                        $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d",
                        intval($owner_uid),
                        dbesc($album),
@@ -873,7 +873,8 @@ function photos_content(&$a) {
                                        '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
                                        '$phototitle' => t('View Photo'),
                                        '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.jpg',
-                                       '$imgalt' => $rr['filename']
+                                       '$imgalt' => $rr['filename'],
+                                       '$desc'=> $rr['desc']
                                ));
 
                }
index 323a9cdff5f186c4ba84043f7776343b3a9b6015..fab7d7254cc276781739b881ff8743640b005952 100644 (file)
@@ -1,5 +1,8 @@
-
 <div class="photo-album-image-wrapper" id="photo-album-image-wrapper-$id">
-       <a href="$photolink" class="photo-album-photo-link" id="photo-album-photo-link-$id" title="$phototitle"><img src="$imgsrc" alt="$imgalt" title="$phototitle" class="photo-album-photo" id="photo-album-photo-$id" /></a>
+       <a href="$photolink" class="photo-album-photo-link" id="photo-album-photo-link-$id" title="$phototitle">
+               <img src="$imgsrc" alt="$imgalt" title="$phototitle" class="photo-album-photo" id="photo-album-photo-$id" />
+               <p class='caption'>$desc</p>            
+       </a>
+       
 </div>
 <div class="photo-album-image-wrapper-end"></div>
index ac3562d1c06762a8613236dc7619f92c48abfae0..022e0929eadf7007529782d22847164b83a0a728 100644 (file)
@@ -1586,8 +1586,22 @@ a.mail-list-link {
 .photo-album-image-wrapper {
        float: left;
        margin-top: 15px;
-       height: 350px;
-       width: 350px;
+       margin-right: 15px;
+       width: 200px; height: 200px; 
+       overflow: hidden; 
+       position: relative;
+}
+.photo-album-image-wrapper .caption {
+       display: none; 
+       width: 100%;
+       position: absolute; 
+       bottom: 0px; 
+       padding: 0.5em 0.5em 0px 0.5em;
+       background-color: rgba(255, 255, 255, 0.8);
+       margin: 0px;
+}
+.photo-album-image-wrapper a:hover .caption {
+       display:block;
 }
 
 #photo-album-end {
@@ -1595,12 +1609,22 @@ a.mail-list-link {
 }
 
 .photo-top-image-wrapper {
+       position: relative;
        float: left;
        margin-top: 15px;
-       height: 350px;
-       width: 350px;
+       margin-right: 15px;
+       width: 200px; height: 200px; 
+       overflow: hidden; 
+}
+.photo-top-album-name {
+       width: 100%;
+       min-height: 2em;
+       position: absolute; 
+       bottom: 0px; 
+       padding: 0px 3px;
+       padding-top: 0.5em;
+       background-color: rgb(255, 255, 255);
 }
-
 #photo-top-end {
        clear: both;
 }
@@ -1928,3 +1952,5 @@ a.mail-list-link {
 .tool-link {
   cursor: pointer;
 }
+
+