From 01930c5f2cad031227cf2687ea86c83896a1d8bd Mon Sep 17 00:00:00 2001 From: Nicholas Avenell Date: Fri, 13 Apr 2012 21:30:23 +0100 Subject: [PATCH] Style photos more neatly --- dayze/assets/css/style.css | 51 ++++++++++++++++++++++++++++++++++++-- dayze/today.php | 4 +++ dayze/view.php | 6 ++--- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/dayze/assets/css/style.css b/dayze/assets/css/style.css index 1f62fb7..b353fd9 100644 --- a/dayze/assets/css/style.css +++ b/dayze/assets/css/style.css @@ -127,7 +127,7 @@ border: none; overflow: hidden; - color: #333; + color: white; font-weight: normal; border-radius: .4em; text-shadow: 1px 1px 1px rgba(0,0,0,.2); @@ -135,7 +135,8 @@ border: none; background: rgba(125,96,103, .4); background: -moz-linear-gradient(100% 100% 90deg, rgba(125,96,103, .8), rgba(184,163,168, .8)); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(125,96,103, .8)), to(rgba(184,163,168, .8))); -} + + } .Twitter { @@ -172,6 +173,52 @@ border: none; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(200,50,50, .8)), to(rgba(200,128,128, .8))); } +li.Photo { + border-width: 20px 20px 20px 20px; + -moz-border-image: url(http://liveart.istic.net/images/gold-frame.png) 20 20 20 20 stretch; + -webkit-border-image: url(http://liveart.istic.net/images/gold-frame.png) 20 20 20 20 stretch; + -o-border-image: url(http://liveart.istic.net/images/gold-frame.png) 20 20 20 20 stretch; + border-image: url(http://liveart.istic.net/images/gold-frame.png) 20 20 20 20 stretch; + background: rgba(0,0,0,.6); + margin: 0; + position: relative; + width: 500px; + height: 300px; +} + +li.Photo a.iconlink { + position: absolute; + top: 0; + left: 0; + display: block; + text-align: center; + width: 100%; +} + +li.Photo img.icon { + max-width: 105%; + max-height: 100%; + float: none ; +} + +li.Photo .description, li.Photo .cite { + display: block; + position: absolute; + background: rgba(0,0,0,.6); + color: white; + text-align: right; + bottom: 1.2em; + left: 0; + width: 100%; + overflow: none; + height: 1.2em; + font-size: smaller; +} + +li.Photo .cite { + bottom: 0; +} + .Location { background: rgba(78,179,75, .8); background: -moz-linear-gradient(100% 100% 90deg, rgba(78,179,75, .8), rgba(207,227,207, .8)); diff --git a/dayze/today.php b/dayze/today.php index c7bb4e2..3377e49 100644 --- a/dayze/today.php +++ b/dayze/today.php @@ -191,6 +191,10 @@ continue 2; } break; + + case "flickr": + $class = "Photo"; + break; case "tumblr": $class = "Tumblr"; diff --git a/dayze/view.php b/dayze/view.php index d8fb643..f094270 100644 --- a/dayze/view.php +++ b/dayze/view.php @@ -177,15 +177,15 @@ usort($items, "epochsort"); foreach($items as $row){ - echo "
  • "; + echo "
  • "; if ($row['icon']){ - echo ""; + echo ""; echo ""; echo ""; } - $content = $row['content']; + $content = ''.$row['content'].''; if (isset($row['subitems'])){ $content .= " (+ ".count($row['subitems'])." more)";