reworked logged in homepage
This commit is contained in:
parent
7f5269bb84
commit
19df96cb77
2 changed files with 46 additions and 23 deletions
|
@ -10,10 +10,16 @@ class MainController < ApplicationController
|
||||||
|
|
||||||
# home page
|
# home page
|
||||||
def home
|
def home
|
||||||
@maps = Map.find_all_by_featured(true).shuffle!
|
@current = current_user
|
||||||
@maps = @maps.slice(0,3)
|
|
||||||
|
|
||||||
respond_with(@maps)
|
if !authenticated?
|
||||||
|
@maps = Map.find_all_by_featured(true).shuffle!
|
||||||
|
@maps = @maps.slice(0,3)
|
||||||
|
elsif authenticated?
|
||||||
|
@maps = Map.order("updated_at DESC").limit(3)
|
||||||
|
end
|
||||||
|
|
||||||
|
respond_with(@maps, @current)
|
||||||
end
|
end
|
||||||
|
|
||||||
# /request
|
# /request
|
||||||
|
|
|
@ -15,31 +15,48 @@
|
||||||
|
|
||||||
<div class="home_content">
|
<div class="home_content">
|
||||||
<div class="home_desc">
|
<div class="home_desc">
|
||||||
<div class="welcomeTo">Welcome to Metamaps</div>
|
<div class="welcomeTo">
|
||||||
<img id="homeMapImage" src="/assets/metamap128x128.png" width="128" height="128" />
|
<% if !authenticated? %>
|
||||||
<div class="metamapsIs">
|
Welcome to Metamaps
|
||||||
a home on the web for <span class="swapWord">
|
<% elsif authenticated? %>
|
||||||
<ul class="texts">
|
Welcome back, <%= @current.name.split[0...1][0] %>!
|
||||||
<li>building shared knowledge</li>
|
<% end %>
|
||||||
<li>learning</li>
|
|
||||||
<li>visioning</li>
|
|
||||||
<li>conversing</li>
|
|
||||||
<li>collaborating</li>
|
|
||||||
<li>sensemaking</li>
|
|
||||||
<li>innovating</li>
|
|
||||||
<li>designing</li>
|
|
||||||
<li>playing</li>
|
|
||||||
<li>exploring</li>
|
|
||||||
</ul>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<img id="homeMapImage" src="/assets/metamap128x128.png" width="128" height="128" />
|
||||||
|
|
||||||
|
<% if !authenticated? %>
|
||||||
|
<div class="metamapsIs">
|
||||||
|
a home on the web for <span class="swapWord">
|
||||||
|
<ul class="texts">
|
||||||
|
<li>building shared knowledge</li>
|
||||||
|
<li>learning</li>
|
||||||
|
<li>visioning</li>
|
||||||
|
<li>conversing</li>
|
||||||
|
<li>collaborating</li>
|
||||||
|
<li>sensemaking</li>
|
||||||
|
<li>innovating</li>
|
||||||
|
<li>designing</li>
|
||||||
|
<li>playing</li>
|
||||||
|
<li>exploring</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfloat"></div>
|
<div class="clearfloat"></div>
|
||||||
|
|
||||||
<p class="contact">
|
<p class="contact">
|
||||||
<a href="/request" class="request button">Request Invite</a>
|
<% if !authenticated? %>
|
||||||
<a href="#" class="learnmore button openLightbox" data-open="about">Learn More</a>
|
<a href="/request" class="request button">Request Invite</a>
|
||||||
<div class="featuredMaps">explore featured maps from our community</div>
|
<a href="#" class="learnmore button openLightbox" data-open="about">Learn More</a>
|
||||||
|
<% end %>
|
||||||
|
<div class="featuredMaps">
|
||||||
|
<% if !authenticated? %>
|
||||||
|
explore featured maps from our community
|
||||||
|
<% elsif authenticated? %>
|
||||||
|
explore recently active maps
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="centeredProfile">
|
<div class="centeredProfile">
|
||||||
|
|
Loading…
Reference in a new issue