因此,我有幾個嘲笑,並且着陸頁的一些差異變體是否有一種方法,可以讓每次登錄頁面都顯示不同的着陸頁變體裝?着陸頁的不同變化
landingpage.html.erb
<%= render "shared/header" %>
<%# Begin background image cycler on landing page %>
<div id="background_cycler" >
<script type="text/javascript">
$('#background_cycler').hide();//hide the background while the images load, ready to fade in later
</script>
<%= image_tag("background-guys-game.png", alt: "") %>
<%= image_tag("background-neutral.png", class: "active", alt: "") %>
<%= image_tag("background-girls.png", alt: "") %>
<%= image_tag("bg-wheel.png", alt: "") %>
<%= image_tag("bg-train.png", alt: "") %>
<%= image_tag("bg-girls2.png", alt: "") %>
<%= image_tag("bg-room.png", alt: "") %>
</div>
<%# End of background image cycler on landing page %>
<div id="landing_page">
<div class="top-section <%= background_image_class %>">
<div class="container">
<h2 class="main_message">
Meet people like you near you
</h2>
<div class="join-screenshot">
<div class="join">
<%= form_for User.new, url: user_registration_path(User.new) do |f| %>
<h3>Join Now</h3>
<div class="fieldset">
<div class="control-group">
<%= f.text_field "email", placeholder: "Your Email", required: true, autocomplete: :off %>
</div>
<div class="control-group">
<%= f.password_field "password", placeholder: "Your Password", required: true, autocomplete: :off %>
</div>
<div class="control-group">
<%= f.text_field "first_name", placeholder: "Your first name", required: true %>
</div>
<div class="control-group">
<%= f.text_field "last_name", placeholder: "Your last name", required: true %>
</div>
<div class="control-group">
<div class="radio-group-row">
<label class="radio-group-title">
Gender:
</label>
<label class="radio inline">
<%= f.radio_button "gender", "M" %>
Male
</label>
<label class="radio inline">
<%= f.radio_button "gender", "F" %>
Female
</label>
</div>
</div>
<div class="control-group submit">
<button type="submit">
SIGN UP
</button>
</div>
<h5><%#= link_to "Sign in with Facebook", "/auth/facebook" %></h5>
</div>
<% end %>
</div>
<div class="screenshot">
<%= image_tag "screenshot-filled.png" %>
</div>
</div>
</div>
</div>
<div class="bottom-section">
<div class="container">
<div class="bullet-points">
<div class="bullet clearfix">
<div class="message pull-right">
<h3>Sign up and fill out your interests</h3>
</div>
<div class="icon pull-left">
<%= image_tag "interests_icon.png" %>
</div>
</div>
<div class="bullet clearfix horz_gray">
<div class="message pull-left">
<h3>
Discover people who share your
<br/>
interests
</h3>
</div>
<div class="icon pull-right">
<%= image_tag "share_interests.png" %>
</div>
</div>
<div class="bullet clearfix">
<div class="message pull-right">
<h3>
Set up a time to go hang out
</h3>
</div>
<div class="icon pull-left">
<%= image_tag "calendar-icon.png" %>
</div>
</div>
<div class="bullet clearfix horz_gray">
<div class="message pull-left">
<h3>
Break the ice online.
<br/>
Hang out offline
</h3>
</div>
<div class="icon pull-right">
<%= image_tag "break-ice-icon.png" %>
</div>
</div>
</div>
<br />
<h2 id="join1">
Meet people like you near you
</h2>
<br />
<div id="join"><h1><%=link_to "Join Now", new_user_registration_path, class: "btn btn-warning" %></h1></div>
<br />
<%= render '/shared/footer' %>
</div>
</div>
</div>
你是否意味着你有不同的着陸頁,並想隨機渲染其中的一個? – nickcen