Skip to content

Commit 94a4a03

Browse files
committed
feature/Add more button to snippet preview
1 parent b0c6e54 commit 94a4a03

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/views/snippets/_snippet_preview.html.erb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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="rounded-md bg-gray-200 px-2 py-1 text-gray-500">
11+
<div class="rounded-md bg-gray-100 px-2 py-1 text-gray-500">
1212
<span class="block text-xs"><%= snippet.language.name %></span>
1313
</div>
1414
<% if @display_popover %>
@@ -29,7 +29,12 @@
2929
<%= render partial: 'shared/comment_button', locals: { snippet: snippet } %>
3030
</div>
3131
</div>
32-
33-
<%= render partial: 'shared/codemirror', locals: { code: snippet.preview, mode: snippet.language.slug, read_only: true, classes: 'snippet--content' } %>
32+
33+
<div class="relative">
34+
<div class="transition text-gray-500 hover:underline absolute border rounded-md bottom-2 right-2 z-3 bg-white text-sm px-2 py-1">
35+
<span>More...</span>
36+
</div>
37+
<%= render partial: 'shared/codemirror', locals: { code: snippet.preview, mode: snippet.language.slug, read_only: true, classes: 'snippet--content' } %>
38+
</div>
3439
</div>
3540
<% end %>

0 commit comments

Comments
 (0)