/app/views/home/index_new.html.erb

https://github.com/neosoft123/bencho · Ruby HTML · 111 lines · 100 code · 1 blank · 10 comment · 6 complexity · 53abd169ab5a1a1c5d240104d87027eb MD5 · raw file

  1. <% content_for :head do -%>
  2. <script type="text/javascript" charset="utf-8">
  3. $(document).ready(function(){
  4. <% unless @show_login %>
  5. $("#homeformlogin").hide();
  6. <% else %>
  7. $("#homesignupform").hide();
  8. <% end %>
  9. $(".homeformtoggle").click(function () {
  10. $(".homeformfields").slideToggle();
  11. });
  12. });
  13. </script>
  14. <% end -%>
  15. <div id="page" class="clearfix">
  16. <% if @user.errors.length > 0 %>
  17. <!-- div id="error-wrapper">
  18. <div id="error-top">
  19. <p class="loginerror">
  20. <% @user.errors.each do |error|
  21. error[0] = error[0].titleize %>
  22. <%= error.join(' ') %><br/>
  23. <% end %>
  24. </p>
  25. </div>
  26. </div-->
  27. <% end %>
  28. <div id="homeformwrapper">
  29. <div id="homeform">
  30. <h3 class="homesignup homeformtoggle">
  31. Sign up for free
  32. </h3>
  33. <div id="homesignupform" class="homeformfields">
  34. <% if @user.errors.length > 0 %>
  35. <p class="loginerror">
  36. <% @user.errors.each do |error|
  37. error[0] = error[0].titleize %>
  38. <%= error.join(' ') %><br/>
  39. <% break %>
  40. <% end %>
  41. </p>
  42. <% end %>
  43. <% form_for :user, :url => register_path, :method => :post do |f| %>
  44. <p>
  45. <label>Username</label> <%= f.text_field :login %>
  46. </p>
  47. <p>
  48. <label>Password</label> <%= f.password_field :password %>
  49. </p>
  50. <p>
  51. <label>Mobile Number</label> <%= text_field_tag :phone_number, @user.mobile_number %>
  52. </p>
  53. <p class="checkbox clearfix">
  54. <%= check_box_tag :user_terms_of_service, 1, params[:terms_of_service], :checked => 'checked', :class => 'checkbox', :name => 'user[terms_of_service]' %> <label for="user_terms_of_service">Accept <a target="blank" href="/tos">Terms of Service</a></label>
  55. </p>
  56. <p>
  57. <%= f.submit 'Sign-up Now', :class=>"homesignupbutton" %>
  58. </p><% end %>
  59. </div>
  60. <h3 class="homelogin homeformtoggle">
  61. <a href="#">Already a member?</a>
  62. </h3>
  63. <% if @show_login %>
  64. <p class="loginerror">
  65. Could not log you in, please try again.
  66. </p>
  67. <% end %>
  68. <div id="homeformlogin" class="homeformfields">
  69. <% form_for @user, :url => session_path, :method => :post do |f| -%>
  70. <p>
  71. <%= f.label :login, 'Login:' %> <%= f.text_field :login %>
  72. </p>
  73. <p>
  74. <%= f.label :password, 'Password:' %> <%= f.password_field :password %>
  75. </p>
  76. <p class="checkbox">
  77. <input type="checkbox" name="remember_me" value="" id="remember_me">
  78. <label>
  79. Remember me
  80. </label>
  81. </p>
  82. <p>
  83. <%= submit_tag 'Login Now', :class=>"homeloginbutton" %>
  84. </p>
  85. </div><% end %>
  86. </div>
  87. </div>
  88. <h1 id="homepitch">
  89. 7.am - Sync. Chat. Locate. Connect with your most valuable social network - the friends and family on your mobile phonebook
  90. </h1>
  91. </div>
  92. <div id="homepoints">
  93. <ul class="tabs">
  94. <li class="sync">
  95. <p>
  96. 7.am seamlessly backs up and synchronises your mobile phone contacts and lets you manage and edit them online
  97. </p>
  98. </li>
  99. <li class="connect">
  100. <p>
  101. Share your photos, videos and location with your social network and view their updates on your mobile phone.
  102. </p>
  103. </li>
  104. <li class="locate">
  105. <p>
  106. Find people in your neighbourhood that share your interests and passions and chat online with them for free.
  107. </p>
  108. </li>
  109. </ul>
  110. </div>