mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
fix up styling of tips on profile
This commit is contained in:
parent
6b6fcba12e
commit
9fee42f99d
2 changed files with 38 additions and 39 deletions
|
@ -34,45 +34,8 @@
|
||||||
<div class="news-item comment" id="event_<%= event.id %>">
|
<div class="news-item comment" id="event_<%= event.id %>">
|
||||||
<%== erb :'_news_profile_comment', layout: false, locals: {profile_comment: event.profile_comment, event: event} %>
|
<%== erb :'_news_profile_comment', layout: false, locals: {profile_comment: event.profile_comment, event: event} %>
|
||||||
<% elsif event.tip_id %>
|
<% elsif event.tip_id %>
|
||||||
<% actioning_site = event.actioning_site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id, :plan_type).first %>
|
<div class="news-item comment" id="event_<%= event.id %>">
|
||||||
<% event_site = event.site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id, :plan_type).first %>
|
<%== erb :'_news_tip', layout: false, locals: {tip: event.tip, event: event} %>
|
||||||
<% tip = event.tip %>
|
|
||||||
<div class="news-item tip">
|
|
||||||
<div class="title">
|
|
||||||
<div class="icon">
|
|
||||||
<% if actioning_site %>
|
|
||||||
<a href="/site/<%= actioning_site.username %>" title="<%= actioning_site.username %>" class="avatar" style="background-image: url(<%= actioning_site.screenshot_url 'index.html', '50x50' %>);"></a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text">
|
|
||||||
<div class="headline">
|
|
||||||
<% if actioning_site %>
|
|
||||||
<% if current_site && current_site.id == actioning_site.id %>
|
|
||||||
<a href="/site/<%= current_site.username %>" class="you">You</a>
|
|
||||||
<% else %>
|
|
||||||
<a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><i class="fa fa-user"><% if actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
An anonymous donor
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
sent a <strong><%= tip.amount_string %></strong> tip to
|
|
||||||
<% if current_site && event_site.id == current_site.id %>
|
|
||||||
<a href="/site/<%= current_site.username %>" class="you">you</a>!
|
|
||||||
<% else %>
|
|
||||||
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><i class="fa fa-user"><% if event_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a>!
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="comment"><%= tip.message %></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="date">
|
|
||||||
<a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% elsif event.follow_id %>
|
<% elsif event.follow_id %>
|
||||||
<% actioning_site = event.actioning_site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id, :plan_type).first %>
|
<% actioning_site = event.actioning_site_dataset.select(:id, :username, :title, :domain, :stripe_customer_id, :plan_type).first %>
|
||||||
<% next if actioning_site.nil? %>
|
<% next if actioning_site.nil? %>
|
||||||
|
|
36
views/_news_tip.erb
Normal file
36
views/_news_tip.erb
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<% actioning_site = event.tip.actioning_site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %>
|
||||||
|
<% event_site = event.site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %>
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
|
||||||
|
<div class="icon">
|
||||||
|
<% if actioning_site %>
|
||||||
|
<a href="/site/<%= actioning_site.username %>" title="<%= actioning_site.username %>" class="avatar" style="background-image: url(<%= actioning_site.screenshot_url 'index.html', '50x50' %>);"></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text">
|
||||||
|
<% if actioning_site %>
|
||||||
|
<% if current_site && current_site.id == actioning_site.id %>
|
||||||
|
<a href="/site/<%= current_site.username %>" class="you">You</a>
|
||||||
|
<% else %>
|
||||||
|
<a href="/site/<%= actioning_site.username %>" class="user" title="<%= actioning_site.title %>"><i class="fa fa-user"><% if actioning_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= actioning_site.username %></a>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
An anonymous donor
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
sent a <strong style="color: #229954 !important;"><%= tip.amount_string %></strong> tip to
|
||||||
|
<% if current_site && event_site.id == current_site.id %>
|
||||||
|
<a href="/site/<%= current_site.username %>" class="you">you</a>
|
||||||
|
<% else %>
|
||||||
|
<a href="/site/<%= event_site.username %>" class="user" title="<%= event_site.title %>"><i class="fa fa-user"><% if event_site.supporter? %><i class="fa fa-heart"></i><% end %></i><%= event_site.username %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="date">
|
||||||
|
<a href="/site/<%= event_site.username %>?event_id=<%= event.id %>"><%= event.created_at.ago %></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content"><%== sanitize_comment tip.message %></div>
|
Loading…
Add table
Reference in a new issue