add helper links to external info about errors to custom error pages

This commit is contained in:
Adam Piontek 2021-04-07 12:48:37 -04:00
parent a9c12d326f
commit 186f55c311
3 changed files with 20 additions and 3 deletions

View file

@ -6,7 +6,7 @@ import "../css/app.scss";
// Import icons for sprite-loader
// navbar brand icon
import "../node_modules/@mdi/svg/svg/desktop-classic.svg"; // brand
// other:///
// other:
import "../node_modules/@mdi/svg/svg/home.svg";
import "../node_modules/@mdi/svg/svg/information.svg";
import "../node_modules/@mdi/svg/svg/account.svg";
@ -17,6 +17,7 @@ import "../node_modules/@mdi/svg/svg/calendar-clock.svg";
import "../node_modules/@mdi/svg/svg/tag-multiple.svg";
import "../node_modules/@mdi/svg/svg/rss.svg";
import "../node_modules/@mdi/svg/svg/account-hard-hat.svg";
import "../node_modules/@mdi/svg/svg/open-in-new.svg";
// social
import "../node_modules/@mdi/svg/svg/linkedin.svg";
import "../node_modules/@mdi/svg/svg/github.svg";

View file

@ -41,7 +41,15 @@
<img src="<%= Routes.static_path(@conn, "/images/err_view/40x_unicorn-300.png") %>" class="img-fluid mb-3" alt="UNICORN">
<h2 class="fs-2 mb-0">Oh no! Problem!</h2>
<p class="lead"><%= @conn.status %> &bull; <%= Plug.Conn.Status.reason_phrase(@conn.status) %></p>
<p class="lead mb-0"><%= @conn.status %> &bull; <%= Plug.Conn.Status.reason_phrase(@conn.status) %></p>
<div class="mb-3">
<span style="font-size: 10px;">[
<%= link to: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/#{@conn.status}", rel: "noreferrer", target: "_blank", class: "mb-4", style: "font-size: 10px;" do %>
<span>what's it mean? &middot; MDN</span>
<%= icon_div @conn, "mdi-open-in-new", [class: "icon"], [style: "height: 10px; width: 10px;"] %>
<% end %>
]</span>
</div>
<%= link to: Routes.home_path(@conn, :index), class: "border-0 text-light text-center mb-3", title: "Home" do %>
<p class="m-0 p-0">Click home to get back to safety!</p>

View file

@ -41,7 +41,15 @@
<img src="<%= Routes.static_path(@conn, "/images/err_view/50x_unicorn-300.png") %>" class="img-fluid mb-3" alt="UNICORN">
<h2 class="fs-2 mb-0">K̷z̴z̶t̸.̶ ̷E̷r̷r̶o̸r̸!̶</h2>
<p class="lead"><%= @conn.status %> &bull; <%= Plug.Conn.Status.reason_phrase(@conn.status) %></p>
<p class="lead mb-0"><%= @conn.status %> &bull; <%= Plug.Conn.Status.reason_phrase(@conn.status) %></p>
<div class="mb-3">
<span style="font-size: 10px;">[
<%= link to: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/#{@conn.status}", rel: "noreferrer", target: "_blank", class: "mb-4", style: "font-size: 10px;" do %>
<span>what's it mean? &middot; MDN</span>
<%= icon_div @conn, "mdi-open-in-new", [class: "icon"], [style: "height: 10px; width: 10px;"] %>
<% end %>
]</span>
</div>
<%= link to: Routes.home_path(@conn, :index), class: "border-0 text-light text-center mb-3", title: "Home" do %>
<p class="m-0 p-0">Click home to get back to safety!</p>