Commit 030d513d authored by surma Lodur's avatar surma Lodur

style fixes

parent 143a66d4
......@@ -12,3 +12,23 @@
*= require bootstrap
*= require_tree .
*/
.quest-button, .reward-button{
white-space: normal !important;
}
.reward-button{
min-height: 91px;
}
.hacker-flair, .btn{
/* margin-left: 5px; */
}
.hacker-flair:first, .btn:first{
margin-left: 0px !important;
}
.btn-danger a{
color: #FFF;
}
......@@ -10,7 +10,7 @@ module ApplicationHelper
if current_hacker.blank?
link_to 'Einloggen', new_hacker_session_path
else
current_hacker.nickname
link_to current_hacker.nickname, current_hacker
end
end
end
......@@ -9,7 +9,7 @@
<%= entry.chronicle_text %>
</span>
<% if entry.cancel.blank? %>
<span class="btn btn-danger col-md-2">
<span class="btn btn-danger btn-xs col-md-1">
<%= link_to 'Storno', cancel_earning_path(entry), :method => :post %>
</span>
<% end %>
......
<div class="list-group-item list-group-item-warning row">
<span class="col-md-1"></span>
<span class="col-md-1">
<span class="col-md-1 col-md-offset-1">
+<%= entry.points %>
</span>
<span class="col-md-2">
......@@ -10,7 +9,7 @@
<%= entry.chronicle_text %>
</span>
<% if entry.cancel.blank? %>
<span class="btn btn-danger col-md-2">
<span class="btn btn-danger btn-xs col-md-1">
<%= link_to 'Storno', cancel_redemption_path(entry), :method => :post %>
</span>
<% end %>
......
<a href="<%= hacker_path(hacker) %>">
<div class="well hacker-flair col-md-2">
<div class="row">
<div class="col-xs-6">
<%= image_tag gravatar_url_for(hacker.email, 80) %>
</div>
<div class="col-xs-6">
<%= hacker.nickname %>
<br/>
<span class="badge points recent_earned_points" title="Kürzlich verdiente Punkte">
<%= hacker.recent_earned_points %>
</span>
<br/>
<span class="badge points all_earned_points" title="Alle Punkte">
<%= hacker.all_earned_points %>
</span>
</div>
</div>
</div>
</a>
<% quests.in_groups_of(10) do |grouped_quests| %>
<div class="row">
<% grouped_quests.each do |quest| %>
<% if quest.present? %>
<div class="well col-md-2">
<h4>
<%= quest.title %>
</h4>
<!-- TODO: should be replaced with paperclip gem -->
<span class="glyphicon <%= quest.image_url %>"> </span>
<%= quest.points %>
</div>
<% end %>
<% end %>
<%= render({
:partial => 'hackers/quests/show',
:collection => grouped_quests.compact,
:as => :quest
}) %>
</div>
<% end %>
<% rewards.in_groups_of(10) do |grouped_rewards| %>
<div class="row">
<% grouped_rewards.each do |reward| %>
<% if reward.present? %>
<div class="well col-md-2">
<h4>
<%= reward.title %>
</h4>
<!-- TODO: should be replaced with paperclip gem -->
<span class="glyphicon <%= reward.image_url %>"> </span>
<%= reward.points %>
</div>
<% end %>
<% end %>
<%= render({
:partial => 'hackers/rewards/show',
:collection => grouped_rewards.compact,
:as => :reward
}) %>
</div>
<% end %>
<div class="list-group-item list-group-item-danger row">
<span class="col-md-1"></span>
<span class="col-md-1">
<span class="col-md-1 col-md-offset-1">
<%= entry.points %>
</span>
<span class="col-md-3">
......
......@@ -4,29 +4,15 @@
<li><a href="#">nickname</a></li>
</ul>
<% @hackers.in_groups_of(5) do |hackers| %>
<div class="row">
<% hackers.each do |hacker| %>
<% if hacker.present? %>
<a href="<%= hacker_path(hacker) %>">
<div class="well hacker-flair col-md-2">
<%= image_tag gravatar_url_for(hacker.email) %>
<%= hacker.nickname %>
<br/>
<span class="badge points recent_earned_points" title="Kürzlich verdiente Punkte">
<%= hacker.recent_earned_points %>
</span>
<br/>
<span class="badge points all_earned_points" title="Alle Punkte">
<%= hacker.all_earned_points %>
</span>
</div>
</a>
<% else %>
<!-- CSS platzhalter -->
<% end %>
<% end %>
</div>
<% end %>
<div class="container-fluid">
<% @hackers.in_groups_of(5) do |hackers| %>
<div class="row">
<%= render({
:partial => 'hacker',
:collection => hackers.compact,
:as => :hacker
}) %>
</div>
<% end %>
</div>
<div class="btn btn-default btn-lg col-md-2 quest-button">
<div class="row">
<div class="col-xs-2">
<!-- TODO: should be replaced with paperclip gem -->
<span class="glyphicon <%= quest.image_url %>"> </span>
</div>
<div class="col-xs-7">
<%= quest.title %>
</div>
<div class="col-xs-2">
<%= quest.points %>
</div>
</div>
</div>
<div class="btn btn-default col-md-3 reward-button">
<div class="row">
<div class="col-xs-2">
<!-- TODO: should be replaced with paperclip gem -->
<span class="glyphicon <%= reward.image_url %>"> </span>
</div>
<div class="col-xs-7">
<%= reward.title %>
</div>
<div class="col-xs-2">
<%= reward.points %>
</div>
</div>
</div>
<div class="page-header">
<%= image_tag(gravatar_url_for(@hacker.email)) %> <%= @hacker.nickname %>
<h1><%= image_tag(gravatar_url_for(@hacker.email)) %> <%= @hacker.nickname %></h1>
</div>
<div class="row">
......@@ -32,10 +32,16 @@
</div>
<h2>Punkte erarbeitet</h2>
<%= render :partial => 'quests', :locals => {:quests => @quests} %>
<div class="container-fluid">
<%= render :partial => 'quests', :locals => {:quests => @quests} %>
</div>
<h2>Punkte einlösen</h2>
<%= render :partial => 'rewards', :locals => {:rewards => @rewards} %>
<div class="container-fluid">
<%= render :partial => 'rewards', :locals => {:rewards => @rewards} %>
</div>
<h2>Verlauf</h2>
<%= render :partial => 'chronicle', :locals => {:chronicle => @chronicle} %>
<div class="container-fluid">
<%= render :partial => 'chronicle', :locals => {:chronicle => @chronicle} %>
</div>
<!DOCTYPE html>
<html>
<head>
<title>SpacePoints</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<nav class="navbar navbar-inverse" role="navigation">
<a class="navbar-brand" href="/">SpacePoints</a>
</nav>
<div class="container">
<%= yield %>
</div>
<head>
<title>SpacePoints</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<a class="navbar-brand" href="/">SpacePoints</a>
</div>
</nav>
<div class="container">
<%= yield %>
</div>
<%= login_or_username %> | <%= link_to 'Historie', chronicle_path %>
</body>
<p>&nbsp;</p>
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container">
<ul class="nav navbar-nav">
<li><%= login_or_username %> </li>
<li class="divider"></li>
<li><%= link_to 'Historie', chronicle_path %></li>
</ul>
</div>
</div>
</nav>
</body>
</html>
FactoryGirl.define do
factory :redemption do
points { [1,10,50,150].shuffle.first}
association :hacker, :factory => :hacker
association :user, :factory => :hacker
association :reward, :factory => :reward
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment