Show favicons in the web UI
This commit is contained in:
parent
e684737fcd
commit
7c13ea8ee4
|
@ -1,4 +1,9 @@
|
|||
<h1><%= @feed.title %></h1>
|
||||
<h1 class="feed-title">
|
||||
<%= if @feed.favicon do %>
|
||||
<img src="<%= @feed.favicon %>" alt="<%= @feed.title %> favicon" class="favicon">
|
||||
<% end %>
|
||||
<%= @feed.title %>
|
||||
</h1>
|
||||
|
||||
<%= form_tag Routes.feed_path(@conn, :refresh, @feed.id), method: :post, class: "d-inline" do %>
|
||||
<%= submit "Refresh Feed", class: "btn btn-primary" %>
|
||||
|
|
|
@ -29,7 +29,12 @@
|
|||
<a href="<%= Routes.feed_path(@conn, :show, feed.id) %>"><%= feed.feed_url %></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<%= feed.site_url %>"><%= feed.title %></a>
|
||||
<a href="<%= feed.site_url %>" class="feed-title">
|
||||
<%= if feed.favicon do %>
|
||||
<img src="<%= feed.favicon %>" alt="<%= feed.title %> favicon" class="favicon">
|
||||
<% end %>
|
||||
<%= feed.title %>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
@ -58,8 +58,13 @@
|
|||
</summary>
|
||||
<ul class="nav flex-column">
|
||||
<%= for feed <- group.feeds do %>
|
||||
<li class="nav-item">
|
||||
<a href="<%= Routes.feed_path(@conn, :show, feed.id) %>" class="nav-link"><%= feed.title %></a>
|
||||
<li class="nav-item feed-nav-item">
|
||||
<a href="<%= Routes.feed_path(@conn, :show, feed.id) %>" class="nav-link">
|
||||
<%= if feed.favicon do %>
|
||||
<img src="<%= feed.favicon %>" alt="<%= feed.title %> favicon" class="favicon">
|
||||
<% end %>
|
||||
<%= feed.title %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -132,3 +132,14 @@ label.sidebar-toggle > .oi {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
.favicon {
|
||||
height: 1em;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.feed-nav-item .favicon,
|
||||
.feed-nav-item .nav-link {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue