Skip to content

Commit

Permalink
Improve alignment of recording card metadata elements
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed May 20, 2024
1 parent ce3941b commit 81c41f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions assets/css/_recording_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ div.asciicast-card {

h3 {
margin: 0 0 6px 0;
font-size: 20px;
font-size: 18px;
display: flex;

.duration {
float: right;
margin: auto 0 auto auto;
padding-left: 1em;
font-size: 14px;
}
}
Expand All @@ -104,6 +106,10 @@ div.asciicast-card {
abbr {
border-bottom: 0;
}

.special-label {
float: right;
}
}
}
}
10 changes: 5 additions & 5 deletions lib/asciinema_web/controllers/recording_html/card.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
<div class="info">
<h3>
<.link href={~p"/a/#{@asciicast}"}><%= title(@asciicast) %></.link>
<.visibility_badge
:if={assigns[:conn] && owned_by_current_user?(@asciicast, @conn)}
visibility={@asciicast.visibility}
/>
<.featured_badge :if={@asciicast.featured} />
<span class="duration"><%= duration(@asciicast) %></span>
</h3>

Expand All @@ -33,6 +28,11 @@
<%= if !assigns[:no_created_at] do %>
<%= time_ago_tag(@asciicast.inserted_at) %>
<% end %>
<.visibility_badge
:if={assigns[:conn] && owned_by_current_user?(@asciicast, @conn)}
visibility={@asciicast.visibility}
/>
<.featured_badge :if={@asciicast.featured} />
</small>
</div>
</div>

0 comments on commit 81c41f7

Please sign in to comment.