Skip to content

Commit 3403a6c

Browse files
committed
feat(elixir:gsmlg): Optimizeweb page.
1 parent b612517 commit 3403a6c

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/live/blog_live/index.html.heex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<table>
1515
<thead>
1616
<tr>
17-
<th>Slug</th>
1817
<th>Title</th>
1918
<th>Date</th>
2019
<th>Author</th>
@@ -25,13 +24,11 @@
2524
<tbody id="blogs">
2625
<%= for blog <- @blogs do %>
2726
<tr id={"blog-#{blog.id}"}>
28-
<td><%= blog.slug %></td>
29-
<td><%= blog.title %></td>
27+
<td><%= live_redirect "#{blog.title}", to: Routes.blog_show_path(@socket, :show, blog) %></td>
3028
<td><%= blog.date %></td>
3129
<td><%= blog.author %></td>
3230

3331
<td>
34-
<span><%= live_redirect "Show", to: Routes.blog_show_path(@socket, :show, blog) %></span>
3532
<span><%= live_patch "Edit", to: Routes.blog_index_path(@socket, :edit, blog) %></span>
3633
<span><%= link "Delete", to: "#", phx_click: "delete", phx_value_id: blog.id, data: [confirm: "Are you sure?"] %></span>
3734
</td>

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/live/blog_live/show.html.heex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<h1>Show Blog</h1>
22

3+
<span><%= live_patch "Edit", to: Routes.blog_show_path(@socket, :edit, @blog), class: "button" %></span> |
4+
<span><%= live_redirect "Back", to: Routes.blog_index_path(@socket, :index) %></span>
5+
36
<%= if @live_action in [:edit] do %>
47
<%= live_modal GSMLGWeb.BlogLive.FormComponent,
58
id: @blog.id,
@@ -38,6 +41,3 @@
3841
</li>
3942

4043
</ul>
41-
42-
<span><%= live_patch "Edit", to: Routes.blog_show_path(@socket, :edit, @blog), class: "button" %></span> |
43-
<span><%= live_redirect "Back", to: Routes.blog_index_path(@socket, :index) %></span>

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/templates/layout/root.html.heex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<section class="container">
1515
<nav>
1616
<ul>
17+
<li><%= link "Home", to: Routes.page_path(@conn, :index) %></li>
1718
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
1819
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
1920
<% end %>
@@ -22,7 +23,7 @@
2223
</nav>
2324
<a href="https://gsmlg.github.io/" class="phx-logo">
2425
<h1>
25-
Best In the World!
26+
GSMLG Home
2627
</h1>
2728
</a>
2829
</section>

0 commit comments

Comments
 (0)