mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-12-27 09:53:08 +08:00
Make images in explore cards clickable
This commit is contained in:
parent
93d11ba068
commit
91a9f62fb9
1 changed files with 3 additions and 2 deletions
|
@ -5,9 +5,10 @@ defmodule LivebookWeb.NotebookCardComponent do
|
|||
def render(assigns) do
|
||||
~L"""
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center justify-center p-6 border-2 border-gray-100 rounded-t-2xl h-[150px]">
|
||||
<%= live_redirect to: Routes.explore_path(@socket, :notebook, @notebook_info.slug),
|
||||
class: "flex items-center justify-center p-6 border-2 border-gray-100 rounded-t-2xl h-[150px]" do %>
|
||||
<img src="<%= @notebook_info.image_url %>" class="max-h-full max-w-[75%]" />
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="px-6 py-4 bg-gray-100 rounded-b-2xl flex-grow">
|
||||
<%= live_redirect @notebook_info.title,
|
||||
to: Routes.explore_path(@socket, :notebook, @notebook_info.slug),
|
||||
|
|
Loading…
Reference in a new issue