mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Added supporter heart to supporter usernames in surf bar
This commit is contained in:
parent
9ca5caab9d
commit
0b013b55de
2 changed files with 12 additions and 2 deletions
2
app.rb
2
app.rb
|
@ -460,7 +460,7 @@ get '/surf/?' do
|
|||
end
|
||||
|
||||
get '/surf/:username' do |username|
|
||||
@site = Site.select(:id, :username, :title, :domain, :views).where(username: username).first
|
||||
@site = Site.select(:id, :username, :title, :domain, :views, :stripe_customer_id).where(username: username).first
|
||||
@title = @site.title
|
||||
not_found if @site.nil?
|
||||
erb :'surf', layout: false
|
||||
|
|
|
@ -122,6 +122,16 @@
|
|||
#top-bar .invisible a {
|
||||
color: #3B3B3B;
|
||||
}
|
||||
#top-bar .fa-heart {
|
||||
font-size: 0.7em;
|
||||
color: #e93250;
|
||||
vertical-align: .45em;
|
||||
margin-left: -.15em;
|
||||
}
|
||||
#top-bar .fa-user {
|
||||
display: inline;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -162,7 +172,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<ul class="site-actions">
|
||||
<li><a href="/site/<%= @site.username %>"><i class="fa fa-user"></i> <strong><%= @site.username %></strong></a></li>
|
||||
<li><a href="/site/<%= @site.username %>"><i class="fa fa-user"><% if @site.supporter? && !@site.ended_supporter? %><i class="fa fa-heart"></i><% end %></i> <strong><%= @site.username %></strong></a></li>
|
||||
|
||||
<% if current_site && current_site != @site %>
|
||||
<li>
|
||||
|
|
Loading…
Add table
Reference in a new issue