photomix/app/views/shared/_home_slider.html.erb

38 lines
923 B
Plaintext
Raw Normal View History

2012-07-26 22:26:23 +02:00
<%= content_for :head do %>
2012-07-27 01:08:25 +02:00
<%= stylesheet_link_tag "anythingslider/anythingslider", "anythingslider/theme-metallic", "anythingslider/animate" %>
2012-07-26 22:26:23 +02:00
<%= javascript_include_tag "anythingslider/jquery.anythingslider.min" %>
<script>
$(function () {
$('#home-slider').anythingSlider({
2012-07-27 01:08:25 +02:00
theme:'metallic',
// expand:true,
2012-07-26 22:26:23 +02:00
//resizeContents: false,
2012-07-27 01:08:25 +02:00
autoPlay:false
2012-07-26 22:26:23 +02:00
});
});
</script>
<style type="text/css">
#home-slider {
2012-07-27 01:08:25 +02:00
height: 600px;
2012-07-26 22:26:23 +02:00
}
.slider-wrapper {
width: 100%;
margin: 0 auto;
margin-bottom: 20px;
}
</style>
<% end %>
<div class="span12 slider-wrapper">
<ul id="home-slider">
<% @popular_photos.each do |photo| %>
2012-07-27 01:08:25 +02:00
<li><%= image_tag photo.attachment.largest.url %></li>
2012-07-26 22:26:23 +02:00
<% end %>
</ul>
</div>