Skip to content

Commit

Permalink
Move it1 landing page to root.
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharydenton authored and aptos-bot committed May 12, 2022
1 parent b426b16 commit c4c3335
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class OnboardingController < ApplicationController
before_action :authenticate_user!
before_action :set_oauth_data
layout 'it1'

def email; end

Expand Down
10 changes: 6 additions & 4 deletions ecosystem/platform/server/app/controllers/welcome_controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# frozen_string_literal: true

# Copyright (c) Aptos
# SPDX-License-Identifier: Apache-2.0
# frozen_string_literal: true

class WelcomeController < ApplicationController
layout 'it1'

def index
@hide_header = true
redirect_to overview_index_path if user_signed_in?
redirect_to it1_path if user_signed_in?
end

def it1
store_location_for(:user, it1_path) unless user_signed_in?
redirect_to root_path unless user_signed_in?
end
end
28 changes: 28 additions & 0 deletions ecosystem/platform/server/app/views/layouts/_application.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= favicon_link_tag asset_path('favicon.ico') %>

<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>

<body class="flex flex-col h-screen justify-between">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>

<main class="flex-1">
<%= yield %>
</div>
</main>

<%= render "layouts/footer" %>
</body>
</html>
31 changes: 3 additions & 28 deletions ecosystem/platform/server/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
<!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= favicon_link_tag asset_path('favicon.ico') %>

<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>

<body class="flex flex-col h-screen justify-between">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>

<main class="flex-1">
<%= yield %>
</div>
</main>

<%= render "layouts/footer" %>
</body>
</html>
<%= render 'layouts/application' do %>
<%= yield %>
<% end %>
13 changes: 13 additions & 0 deletions ecosystem/platform/server/app/views/layouts/it1.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%= render 'layouts/application' do %>
<div class="bg-neutral-900 text-white h-full p-6 sm:p-24 2xl:px-48">
<h2 class="text-6xl mb-4">Incentivized Testnet</h2>
<div class="mb-8">
<%= render 'shared/bump_hero' %>
</div>

<div class="flex flex-col lg:flex-row gap-8 sm:gap-24 xl:gap-48 justify-between">
<%= yield %>
<%= render 'shared/it1_schedule' %>
</div>
</div>
<% end %>
76 changes: 39 additions & 37 deletions ecosystem/platform/server/app/views/onboarding/email.html.erb
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
<h2>Welcome, <%= @oauth_username %></h2>
<% if current_user.username %>
<p>Please set and verify your email to continue the signup process</p>
<% else %>
<p>Please set a username and verify your email to continue the signup process</p>
<% end %>

<%= render "layouts/flash" %>

<% if current_user.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
<h2><%= pluralize(current_user.errors.count, "error") %> prohibited this user from being saved:</h2>

<ul>
<% current_user.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>

<%= render "shared/captcha_helper" %>

<%= form_with(model: current_user, url: onboarding_email_path, method: :post, data: {turbo: false}) do |f| %>
<% unless current_user.username %>
<div class="field">
<%= f.label :username %><br/>
<%= f.text_field :username, autofocus: false, autocomplete: "username", value: current_user.username %>
<div>
<h2 class="text-4xl text-[#1dd7a5] font-mono mb-8">Welcome, <%= @oauth_username %>!</h2>
<% if current_user.username %>
<p>Please set and verify your email to continue the signup process</p>
<% else %>
<p>Please set a username and verify your email to continue the signup process</p>
<% end %>

<%= render "layouts/flash" %>

<% if current_user.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
<h2><%= pluralize(current_user.errors.count, "error") %> prohibited this user from being saved:</h2>

<ul>
<% current_user.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>

<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: current_user.email || @oauth_email %>
</div>
<%= render "shared/captcha_helper" %>

<%= recaptcha_tags %>
<%= form_with(model: current_user, url: onboarding_email_path, method: :post, data: {turbo: false}) do |f| %>
<% unless current_user.username %>
<div class="field">
<%= f.label :username %><br/>
<%= f.text_field :username, autofocus: false, autocomplete: "username", value: current_user.username %>
</div>
<% end %>

<div class="actions">
<%= f.submit "Send email" %>
</div>
<% end %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: current_user.email || @oauth_email %>
</div>

<%= recaptcha_tags %>

<div class="actions">
<%= f.submit "Send email" %>
</div>
<% end %>
</div>
15 changes: 15 additions & 0 deletions ecosystem/platform/server/app/views/shared/_it1_schedule.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="w-full lg:w-96">
<%= render 'shared/outline_card' do %>
<h3 class="font-mono uppercase text-xl mb-4">Schedule</h3>
<hr class="border-[#1dd7a5] mb-4">
<p class="mb-4"><em>All dates and times shown are for Pacific Time.</em></p>
<h4 class="font-mono uppercase text-[#1dd7a5] text-lg">May 13</h4>
<p class="mb-4">Registration starts. Node and identity verification begins.</p>
<h4 class="font-mono uppercase text-[#1dd7a5] text-lg">May 20</h4>
<p class="mb-4">Node registration locked. Only 48 hours left to complete identity verification.</p>
<h4 class="font-mono uppercase text-[#1dd7a5] text-lg">May 23</h4>
<p class="mb-4">Selection process concludes. Email notifications are sent.</p>
<h4 class="font-mono uppercase text-[#1dd7a5] text-lg">May 24</h4>
<p>Aptos Incentivized Testnet 1 goes live at noon. Validator score tracking begins.</p>
<% end %>
</div>
80 changes: 35 additions & 45 deletions ecosystem/platform/server/app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,48 +1,38 @@
<div class="bg-black bg-cover bg-center text-white" style="background-image: url(<%= asset_path('hero_v3-min.9c96f35d.jpg') %>)">
<header class="flex px-16 py-8 items-center">
<a href="/">
<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 0 112 112" overflow="visible" xml:space="preserve"><path fill="#FFF" d="M86.6 37.4h-9.9c-1.1 0-2.2-.5-3-1.3l-4-4.5c-1.2-1.3-3.1-1.4-4.5-.3l-.3.3-3.4 3.9c-1.1 1.3-2.8 2-4.5 2H2.9C1.4 41.9.4 46.6 0 51.3h51.2c.9 0 1.8-.4 2.4-1l4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1.1l4 4.5c.8.9 1.9 1.4 3 1.4H112c-.4-4.7-1.4-9.4-2.9-13.8H86.6zM53.8 65l-4-4.5c-1.2-1.3-3.1-1.4-4.5-.3l-.3.3-3.5 3.9c-1.1 1.3-2.7 2-4.4 2H.8c.9 4.8 2.5 9.5 4.6 14h25.5c.9 0 1.7-.4 2.4-1l4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1.1l4 4.5c.8.9 1.9 1.4 3 1.4h56.6c2.1-4.4 3.7-9.1 4.6-14H56.8c-1.2 0-2.3-.5-3-1.4zM73.4 21.4l4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1l4 4.5c.8.9 1.9 1.3 3 1.3h10.8c-18.8-24.8-54.1-29.7-79-11-4.1 3.1-7.8 6.8-11 11H71c1 .2 1.8-.2 2.4-.8zM34.7 94.2c-1.2 0-2.3-.5-3-1.3l-4-4.5c-1.2-1.3-3.2-1.4-4.5-.2l-.2.2-3.5 3.9c-1.1 1.3-2.7 2-4.4 2h-.2C36 116.9 71.7 118 94.4 96.7c.9-.8 1.7-1.7 2.6-2.6H34.7z"/></svg>
</a>
</header>

<div class="p-8 lg:p-16 xl:px-32 mx-auto">
<div class="sm:px-8 mb-16 md:mb-24">
<h1 class="mb-8">
<svg fill="#fff" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 258.21 60.7"><title>Aptos</title><path d="M197.83 20.31h-5.35a2.17 2.17 0 0 1-1.63-.74l-2.17-2.45a1.71 1.71 0 0 0-2.55 0l-1.86 2.1a3.2 3.2 0 0 1-2.4 1.09h-29.28A30.34 30.34 0 0 0 151 27.8h27.64a1.77 1.77 0 0 0 1.28-.55l2.58-2.69a1.71 1.71 0 0 1 1.23-.52h.1a1.74 1.74 0 0 1 1.28.57l2.17 2.45a2.16 2.16 0 0 0 1.63.74h22.55a29.9 29.9 0 0 0-1.59-7.49h-12ZM167.72 43.55A1.79 1.79 0 0 0 169 43l2.57-2.69a1.74 1.74 0 0 1 1.23-.52h.11a1.74 1.74 0 0 1 1.28.57l2.16 2.45a2.19 2.19 0 0 0 1.63.74h30.57a30 30 0 0 0 2.5-7.55H181.7a2.18 2.18 0 0 1-1.62-.73l-2.17-2.45a1.71 1.71 0 0 0-1.28-.58 1.67 1.67 0 0 0-1.27.58l-1.86 2.1a3.22 3.22 0 0 1-2.41 1.08h-19.68a30 30 0 0 0 2.49 7.57ZM189.41 12.12a1.79 1.79 0 0 0 1.29-.55l2.57-2.68a1.7 1.7 0 0 1 1.23-.53h.11a1.67 1.67 0 0 1 1.27.58l2.17 2.45a2.21 2.21 0 0 0 1.63.73h5.81a30.34 30.34 0 0 0-48.52 0ZM177.73 51.05h-7.95a2.15 2.15 0 0 1-1.62-.74L166 47.86a1.72 1.72 0 0 0-2.56 0L161.57 50a3.19 3.19 0 0 1-2.4 1.09h-.12a30.33 30.33 0 0 0 44.37 0ZM47.07 58.74l-6.17-15H13.31l-6.17 15H0L27.06 2l27.15 56.74ZM15.64 38.05h22.85L27 13.86ZM64.07 58.74V2h15.8c12.35 0 18.84 5.65 18.84 16.32 0 10.26-6.89 16.2-18.92 16.2h-9.06v24.22Zm6.66-30.16h7.54c9.54 0 13.73-3.12 13.73-10.26 0-7.38-4.25-10.43-13.71-10.43h-7.56ZM122.89 8.05h-19.57V1.96h45.79v6.09h-19.57v50.69h-6.65V8.05zM220.84 48.39l5.73-3.89.44.92c3.53 6.42 7.38 9 13.23 9 6.5 0 11.07-4.49 11.07-9.95 0-5.13-2.57-8.58-12.83-12.83-11.79-4.89-15.8-9.94-15.8-17.16 0-7.86 6.18-14 16.84-14 7.86 0 13.23 3.36 16.28 8.82l-4.65 3.21-1.36-.33c-2.41-3.76-5.38-5.93-10.43-5.93-6.17 0-9.78 3.45-9.78 8.1 0 4.33 2.32 6.82 12.35 11.39 13.07 5.93 16.28 10.82 16.28 18.68 0 8.58-7.38 15.88-17.89 15.88-8.82 0-14.91-3.37-19.48-11.87"/></svg>
</h1>
<div class="mb-8">
<%= render 'shared/bump_hero' %>
</div>
<h2 class="text-2xl lg:w-[320px]">The safest and most scalable Layer 1 blockchain.</h2>
</div>

<div class="flex flex-col md:flex-row gap-8 lg:gap-16 justify-center">
<%= render 'shared/outline_card' do %>
<h3 class="text-[#1dd7a5] font-mono uppercase text-2xl mb-4">Community</h3>
<hr class="border-[#1dd7a5] mb-4">
<p class="mb-8">platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper.</p>
<%= link_to "Click Here", "#", class: "w-full bg-[#1dd7a5] text-neutral-800 block p-2 text-center font-mono uppercase text-lg rounded font-bold mt-auto" %>
<% end %>
<%= render 'shared/outline_card' do %>
<h3 class="text-[#1dd7a5] font-mono uppercase text-2xl mb-4">Explorer</h3>
<hr class="border-[#1dd7a5] mb-4">
<p class="mb-8">platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper.</p>
<%= link_to "Click Here", "#", class: "w-full bg-[#1dd7a5] text-neutral-800 block p-2 text-center font-mono uppercase text-lg rounded font-bold mt-auto" %>
<% end %>
<%= render 'shared/outline_card' do %>
<h3 class="text-[#1dd7a5] font-mono uppercase text-2xl mb-4">Documentation</h3>
<hr class="border-[#1dd7a5] mb-4">
<p class="mb-8">platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper.</p>
<%= link_to "Click Here", "#", class: "w-full bg-[#1dd7a5] text-neutral-800 block p-2 text-center font-mono uppercase text-lg rounded font-bold mt-auto" %>
<% end %>
<div class="flex flex-col lg:flex-row gap-8 sm:gap-24 xl:gap-48 justify-between">
<div>
<div class="sm:w-[30rem] mb-8 sm:mb-12">
<p class="mb-4">
Ensuring a production-grade Aptos mainnet.
<br>
The Aptos community is coming together to build a secure, reliable, and decentralized network through a series of incentivized testnets.
</p>
<p>
Additional detail of the Aptos Incentivized Testnet 1 available <a href="https://medium.com/aptoslabs/aptos-incentivized-testnet-update-abcfcd94d54c" class="underline">here</a>.
Please review the <a href="#" class="underline">terms and conditions</a>.
</p>
</div>
</div>

<div class="bg-white text-black p-8 md:py-16 p-8 md:px-32">
<div class="flex flex-col sm:flex-row mb-8 gap-8 items-center justify-between">
<h3 class="lg:w-96 text-4xl">Register for Aptos Incentivized Testnet</h3>
<%= link_to "Get Started", it1_path, class: "w-full lg:w-96 bg-[#1dd7a5] text-neutral-800 block p-2 text-center font-mono uppercase text-lg rounded font-bold" %>
</div>
<hr class="border-[#1dd7a5]">
<dialog id="login-dialog" class="rounded-xl border-2 border-[#1dd7a5]">
<form type="dialog" class="text-right">
<button type="submit">x</button>
</form>
<h3 class="text-center uppercase font-mono text-2xl mt-16">Sign up with</h3>
<div class="flex p-16">
<div class="p-16 py-8 border-r border-black">
<%= form_with url: omniauth_authorize_path(User, :github), data: {turbo: false} do |form| %>
<button type="submit">
<svg width="100" height="100" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.938 15.939a8.375 8.375 0 0 1-3.443 2.083v-1.498c0-.788-.27-1.368-.81-1.739a8.9 8.9 0 0 0 .932-.136c.283-.059.582-.143.898-.254.316-.111.6-.243.85-.396.25-.153.492-.351.723-.596.23-.243.424-.52.58-.83.157-.308.28-.68.372-1.113.09-.433.137-.91.137-1.43 0-1.01-.33-1.87-.987-2.579.3-.78.267-1.63-.098-2.548l-.244-.03c-.17-.02-.473.052-.913.215-.44.163-.932.43-1.48.8a8.984 8.984 0 0 0-2.412-.322 8.8 8.8 0 0 0-2.401.323 8.475 8.475 0 0 0-.982-.581 5.141 5.141 0 0 0-.742-.313 2.579 2.579 0 0 0-.826-.112.62.62 0 0 0-.097.02c-.365.924-.398 1.773-.098 2.548-.658.71-.986 1.57-.986 2.579 0 .52.045.997.137 1.43.09.433.214.805.37 1.113.157.31.35.587.582.83.23.245.472.443.722.596.25.153.534.285.85.396.316.11.615.195.898.254.283.058.594.104.933.136-.534.365-.8.945-.8 1.739v1.527a8.364 8.364 0 0 1-3.541-2.113A8.356 8.356 0 0 1 1.6 10 8.351 8.351 0 0 1 4.06 4.062 8.363 8.363 0 0 1 10 1.602a8.358 8.358 0 0 1 5.938 2.46A8.381 8.381 0 0 1 18.398 10a8.358 8.358 0 0 1-2.46 5.939ZM10 0C4.478 0 0 4.478 0 10c0 5.523 4.478 10 10 10 5.523 0 10-4.477 10-10 0-5.522-4.477-10-10-10Z" fill="#000"/></svg>
</button>
<% end %>
</div>
<div class="p-16 py-8">
<%= form_with url: omniauth_authorize_path(User, :discord), data: {turbo: false} do |form| %>
<button type="submit">
<svg width="100" height="100" viewBox="0 0 71 55" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378c.372-.279.744-.569 1.1-.862a.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z" fill="#000"/></g><defs><clipPath id="a"><path fill="#000" d="M0 0h71v55H0z"/></clipPath></defs></svg>
</button>
<% end %>
</div>
</div>
</dialog>
<%= link_to "Sign up for Testnet", "javascript:document.getElementById('login-dialog').showModal()", class: "w-full bg-[#1dd7a5] text-neutral-800 block p-2 text-center font-mono uppercase text-lg rounded font-bold mt-auto" %>
</div>
</div>
Loading

0 comments on commit c4c3335

Please sign in to comment.