Skip to content

Commit 0c681a3

Browse files
committed
feature/Add language to snippet show page
1 parent 8d2f995 commit 0c681a3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

app/views/snippets/_snippet.html.erb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
<% if snippet.private? %>
1010
<img class="margin-right--tiny" data-checkbox-target="icon" title="This snippet is only visible to you" src="/icons/lock-closed.svg" width="16">
1111
<% end %>
12-
<% if folder %>
13-
<div class="folder-tag">
14-
<img src="/icons/white/folder.svg" width="12">
15-
<span class="block margin-left--tiny"><%= folder.name %></span>
16-
</div>
17-
<% end%>
12+
<div class="rounded-md bg-gray-200 px-2 py-1 text-gray-500">
13+
<span class="block text-xs"><%= snippet.language.name %></span>
14+
</div>
1815
<% if @display_popover %>
1916
<%= render partial: 'shared/popover_trigger', locals: { popover_path: popover_snippet_path(snippet) } %>
2017
<% end %>

app/views/snippets/_snippet_preview.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<% if snippet.private? %>
99
<img class="margin-right--tiny" title="This snippet is only visible to you" data-checkbox-target="icon" src="/icons/lock-closed.svg" width="16">
1010
<% end %>
11-
<div class="folder-tag">
12-
<span class="block"><%= snippet.language.name %></span>
11+
<div class="rounded-md bg-gray-200 px-2 py-1 text-gray-500">
12+
<span class="block text-xs"><%= snippet.language.name %></span>
1313
</div>
1414
<% if @display_popover %>
1515
<%= render partial: 'shared/popover_trigger', locals: { popover_path: popover_snippet_path(snippet) } %>

0 commit comments

Comments
 (0)