Posted by cnruby
Thu, 22 Jun 2006 19:34:00 GMT
cd /opt/downloads
wget http://www.huddletogether.com/projects/lightbox2/lightbox2.02.zip
mkdir lightbox2.02
cd lightbox2.02
unzip ../lightbox2.02.zip
1. vi themes/phokus/layouts/default.rhtml
<%= javascript_include_tag "typo" %>
<%= javascript_include_tag "lightbox" %>
<%= stylesheet_link_tag "/stylesheets/lightbox.css" %>
2. get blog1/public/stylesheets/lightbox.css
cp css/lightbox.css /opt/daoxi/typo/public/stylesheets/.
cp js/lightbox.js /opt/daoxi/typo/public/javascripts/.
3. use www.Flickr.com:
<typo:lightbox img="134906659" thumbsize="small" displaysize="medium"/>
or
use HTML:
<div class="lightboxplugin">
<a rel="lightbox" href="/blog3/files/news20060512-0201_google_trends.png">
<img width="240" height="160" src="/blog3/files/news20060512-0201_google_trends.png" />
</a>
</div>
<a target="_blank" href="/blog1/files/rails20060509-0303_plugin_calendar_helper.png">
<img alt="" src="/blog1/files/rails20060509-0303_plugin_calendar_helper.png" /></a>
vi themes/phokus/stylesheets/phokus.css
img {
border: none;
max-width: 501px;
}
img {
border: none;
max-width: 900px;
}
修改lightbox.js,目的显示一组图的关闭图:
var fileBottomNavCloseImage = "/blog1/images/closelabel.gif";
http://www.huddletogether.com/projects/lightbox/
http://www.oobaloo.co.uk/articles/category/ruby-on-rails
________________________________________________________________
您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。
Posted in Typo+Mephisto | Tags AJAX, LightBox