Add long urls for Artikel
This commit is contained in:
@ -3,6 +3,12 @@ defmodule OutlookWeb.PublicComponents do
|
||||
Provides components for showing and listing artikel and autoren.
|
||||
"""
|
||||
use Phoenix.Component
|
||||
import OutlookWeb.ViewHelpers
|
||||
|
||||
use Phoenix.VerifiedRoutes,
|
||||
endpoint: OutlookWeb.Endpoint,
|
||||
router: OutlookWeb.Router,
|
||||
statics: OutlookWeb.static_paths()
|
||||
import Phoenix.HTML
|
||||
|
||||
alias Phoenix.LiveView.JS
|
||||
@ -25,7 +31,7 @@ defmodule OutlookWeb.PublicComponents do
|
||||
|
||||
def artikel(assigns) do
|
||||
~H"""
|
||||
<.link navigate={"/artikel/#{@artikel.id}"}>
|
||||
<.link navigate={~p"/artikel/#{@artikel}"}>
|
||||
<div class="my-2 px-2 rounded border-2 border-solid border-gray-300 dark:border-stone-800">
|
||||
<h4 class="font-bold text-stone-800 dark:text-stone-300 py-2"><%= @artikel.title %></h4>
|
||||
<div :if={@show_author}><small><%= @artikel.article.author.name %></small></div>
|
||||
|
||||
Reference in New Issue
Block a user