Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Landing Page Redesign #84

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: move navbar content to separate file
Annastacia-dev committed Apr 15, 2024
commit fe0e5ae5723c60b49c34e3932669f33e2f44248c
8 changes: 4 additions & 4 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer aria-labelledby="footer-heading">
<div class="flex pt-32">
<div class="flex sm:flex-row flex-col pt-32 gap-4">
<div class="basis-2/6">
<%= link_to root_path, class: "justify-end pr-20" do %>
<%= image_tag('arc_dark_gray_logo.png', alt: "Community Logo", class: 'w-20 md:w-48') %>
@@ -28,7 +28,7 @@
<% end %>
</ul>
</div>
<div class="place-self-center">
<div class="sm:place-self-center">
<ul>
<li><%= link_to 'Sponsor', 'mailto:[email protected]' %></li>

@@ -51,8 +51,8 @@
</div>

<div class="basis-1/6 text-sm">
<ul>
<li><b>Connect</b></li>
<p><b>Connect</b></p>
<ul class="flex sm:flex-col flex-row mt-4">
<li>
<%= link_to 'https://twitter.com/ruby_african' do %>
<div class="inline-flex text-sm">
150 changes: 150 additions & 0 deletions app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<header class="sticky top-0 z-50">
<div class="relative bg-white border-b border-red-400">
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-2 sm:px-6
md:justify-start md:space-x-10 lg:px-8">
<div class="dropdown">
<label tabindex="0" class="btn btn-ghost md:hidden">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"/>
</svg>
</label>
<ul tabindex="0" class="menu menu-compact dropdown-content mt-3 p-2 shadow
bg-base-100 rounded-box w-52 md:hidden">
<li><%= link_to 'Home', root_path %></li>
<li><%= link_to 'About ARC', landing_about_path %></li>

<% if FeatureFlag.find_by(name: 'events').try(:enabled) %>
<li><a href="#">Events</a></li>
<% end %>

<% if FeatureFlag.find_by(name: 'conferences').try(:enabled) %>
<li><a href="#">Conferences</a></li>
<% end %>

<li><%= link_to 'Chapters', chapters_path %></li>

<% if FeatureFlag.find_by(name: 'projects').try(:enabled) %>
<li><a href="#">Projects</a></li>
<% end %>

<li><%= link_to 'Learning Materials', landing_learn_path %></li>

<% if user_signed_in? %>
<li><%= button_to "Sign out", destroy_user_session_path, method: :delete %></li>
<% else %>
<li><%= link_to 'Sign up', new_user_registration_path %></li>
<li><%= link_to 'Sign in', new_user_session_path %></li>
<% end %>
</ul>
</div>
<div class="flex justify-start lg:w-0 lg:flex-1">
<%= link_to root_path do %>
<span class="sr-only">African Ruby Community</span>
<%= image_tag('arc_logo_coloured.png', alt: "Community Logo",class: "h-8 w-auto sm:h-7") %>
<% end %>
</div>
<nav class="hidden space-x-10 md:flex">
<%= link_to 'Home', root_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>
<%= link_to 'About', landing_about_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>

<% if FeatureFlag.find_by(name: 'events').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">Events</a>
<% end %>

<% if FeatureFlag.find_by(name: 'conferences').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">
Conferences
</a>
<% end %>

<%= link_to 'Chapters', chapters_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>

<% if FeatureFlag.find_by(name: 'projects').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">
Projects
</a>
<% end %>

<%= link_to 'Learning Materials', landing_learn_path,
class: 'text-sm font-small text-gray-500 hover:text-red-600' %>
</nav>
<% if user_signed_in? %>

<div class="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
<% if current_user.organization_admin? %>
<div class="dropdown dropdown-end">
<button class="text-sm font-small text-gray-500 hover:text-red-600">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-settings">
<circle cx="12" cy="12" r="3">
</circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0
1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0
1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0
0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0
.33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0
0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83
0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2
0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0
1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0
1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
</button>
<ul tabindex="0" class="menu dropdown-content p-2 shadow bg-base-100 rounded-box
w-52 mt-4">
<li>
<div class="grid grid-cols-1 divide-y">
<b>Settings</b>
<div/>
</div>
</li>
<li>
<%= link_to 'Countries', countries_path %>
</li>
<li>
<%= link_to 'Chapters', chapters_path %>
</li>
</ul>
</div>
<% end %>

<div class="dropdown dropdown-end ml-8">
<button class="text-sm font-small text-gray-500 hover:text-red-600">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="feather feather-user">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
</button>
<ul tabindex="0" class="menu dropdown-content p-2 shadow bg-base-100 rounded-box w-52 mt-4">
<li>
<%= link_to 'Update profile', edit_user_registration_path %>
</li>
</ul>
</div>

<%= button_to "Sign out", destroy_user_session_path, method: :delete, class: "whitespace-nowrap text-sm font-small text-gray-500
hover:text-red-700 ml-8" %>
</div>
<% else %>
<div class="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
<%= link_to new_user_registration_path do %>
<button class="btn btn-sm btn-primary normal-case text-white">Sign up</button>
<% end %>

<%= link_to new_user_session_path,
class: "whitespace-nowrap text-sm font-small text-gray-500
hover:text-red-700 ml-8" do %>
Sign in
<% end %>
</div>
<% end %>
</div>
</div>
</header>
150 changes: 1 addition & 149 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -15,156 +15,8 @@
<body>
<div class="mx-8">
<div class="bg-white">
<header class="sticky top-0 z-50">
<div class="relative bg-white border-b border-red-400">
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-2 sm:px-6
md:justify-start md:space-x-10 lg:px-8">
<div class="dropdown">
<label tabindex="0" class="btn btn-ghost md:hidden">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"/>
</svg>
</label>
<ul tabindex="0" class="menu menu-compact dropdown-content mt-3 p-2 shadow
bg-base-100 rounded-box w-52 md:hidden">
<li><%= link_to 'Home', root_path %></li>
<li><%= link_to 'About ARC', landing_about_path %></li>

<% if FeatureFlag.find_by(name: 'events').try(:enabled) %>
<li><a href="#">Events</a></li>
<% end %>

<% if FeatureFlag.find_by(name: 'conferences').try(:enabled) %>
<li><a href="#">Conferences</a></li>
<% end %>

<li><%= link_to 'Chapters', chapters_path %></li>

<% if FeatureFlag.find_by(name: 'projects').try(:enabled) %>
<li><a href="#">Projects</a></li>
<% end %>

<li><%= link_to 'Learning Materials', landing_learn_path %></li>

<% if user_signed_in? %>
<li><%= button_to "Sign out", destroy_user_session_path, method: :delete %></li>
<% else %>
<li><%= link_to 'Sign up', new_user_registration_path %></li>
<li><%= link_to 'Sign in', new_user_session_path %></li>
<% end %>
</ul>
</div>
<div class="flex justify-start lg:w-0 lg:flex-1">
<%= link_to root_path do %>
<span class="sr-only">African Ruby Community</span>
<%= image_tag('arc_logo_coloured.png', alt: "Community Logo",class: "h-8 w-auto sm:h-7") %>
<% end %>
</div>
<nav class="hidden space-x-10 md:flex">
<%= link_to 'Home', root_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>
<%= link_to 'About', landing_about_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>

<% if FeatureFlag.find_by(name: 'events').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">Events</a>
<% end %>

<% if FeatureFlag.find_by(name: 'conferences').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">
Conferences
</a>
<% end %>

<%= link_to 'Chapters', chapters_path,
class: "text-sm font-small text-gray-500 hover:text-red-600" %>

<% if FeatureFlag.find_by(name: 'projects').try(:enabled) %>
<a href="#" class="text-sm font-small text-gray-500 hover:text-red-600">
Projects
</a>
<% end %>

<%= link_to 'Learning Materials', landing_learn_path,
class: 'text-sm font-small text-gray-500 hover:text-red-600' %>
</nav>
<% if user_signed_in? %>

<div class="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
<% if current_user.organization_admin? %>
<div class="dropdown dropdown-end">
<button class="text-sm font-small text-gray-500 hover:text-red-600">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-settings">
<circle cx="12" cy="12" r="3">
</circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0
1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0
1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0
0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0
.33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0
0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83
0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2
0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0
1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0
1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
</button>
<ul tabindex="0" class="menu dropdown-content p-2 shadow bg-base-100 rounded-box
w-52 mt-4">
<li>
<div class="grid grid-cols-1 divide-y">
<b>Settings</b>
<div/>
</div>
</li>
<li>
<%= link_to 'Countries', countries_path %>
</li>
<li>
<%= link_to 'Chapters', chapters_path %>
</li>
</ul>
</div>
<% end %>

<div class="dropdown dropdown-end ml-8">
<button class="text-sm font-small text-gray-500 hover:text-red-600">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="feather feather-user">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
</button>
<ul tabindex="0" class="menu dropdown-content p-2 shadow bg-base-100 rounded-box w-52 mt-4">
<li>
<%= link_to 'Update profile', edit_user_registration_path %>
</li>
</ul>
</div>

<%= button_to "Sign out", destroy_user_session_path, method: :delete, class: "whitespace-nowrap text-sm font-small text-gray-500
hover:text-red-700 ml-8" %>
</div>
<% else %>
<div class="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
<%= link_to new_user_registration_path do %>
<button class="btn btn-sm btn-primary normal-case text-white">Sign up</button>
<% end %>

<%= link_to new_user_session_path,
class: "whitespace-nowrap text-sm font-small text-gray-500
hover:text-red-700 ml-8" do %>
Sign in
<% end %>
</div>
<% end %>
</div>
</div>
</header>
<%= render 'layouts/navbar' %>

<main style="min-height: 45vh">
<%= yield %>