gpt4 book ai didi

jquery - 着陆页的不同变体

转载 作者:太空宇宙 更新时间:2023-11-04 14:13:10 25 4
gpt4 key购买 nike

所以我有一些模拟,以及着陆页的一些差异变体,有没有一种方法可以让我在每次加载时都显示不同的着陆页变体?

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>

最佳答案

super 简单的版本,如果你不需要做任何花哨的事情。

# PagesController
def landing
number = rand(1) + 1
render "landing_#{number}"
end

浏览量

# app/views/page/landing_1.html.erb
# app/views/page/landing_2.html.erb

如果您不想在 Rails 中进行跟踪工作,可以在 Google Analytic 中完成。

关于jquery - 着陆页的不同变体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20578351/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com