fixing inline code style purging, fix some social icon target=_self, fix endpoint static asset serving

This commit is contained in:
Adam Piontek 2021-04-06 11:50:59 -04:00
parent 9d2e0c5379
commit 6647cf0e2e
5 changed files with 18 additions and 17 deletions

View file

@ -94,7 +94,7 @@ module.exports = (env, options) => {
"./js/**/*.js", "./js/**/*.js",
]), ]),
safelist: { safelist: {
greedy: [/phx/, /topbar/, /chroma/], greedy: [/phx/, /topbar/, /chroma/, /inline/],
}, },
}), }),
] ]

View file

@ -24,7 +24,7 @@ defmodule Home73kWeb.Endpoint do
at: "/", at: "/",
from: :home73k, from: :home73k,
gzip: (Mix.env() not in [:dev, :test]), gzip: (Mix.env() not in [:dev, :test]),
only: ~w(css fonts images js favicon.ico robots.txt DF185CEE29A3D443_public_key.asc) only: File.ls!("priv/static")
# Code reloading can be explicitly enabled under the # Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint. # :code_reloader configuration of your endpoint.

View file

@ -21,7 +21,7 @@
<div id="social-icons" class="mt-1"> <div id="social-icons" class="mt-1">
<%= for s <- socials(@conn) do %> <%= for s <- socials(@conn) do %>
<%= link to: s.url, target: "_blank", class: "fs-3 link-light text-decoration-none" do %> <%= link to: s.url, target: s.target, class: "fs-3 link-light text-decoration-none" do %>
<%= icon_div @conn, s.icon, [class: "icon baseline"] %> <%= icon_div @conn, s.icon, [class: "icon baseline"] %>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -12,7 +12,7 @@
<div id="social-icons" class="mt-1"> <div id="social-icons" class="mt-1">
<%= for s <- socials_prof(@conn) do %> <%= for s <- socials_prof(@conn) do %>
<%= link to: s.url, target: "_blank", class: "fs-3 link-light text-decoration-none" do %> <%= link to: s.url, target: s.target, class: "fs-3 link-light text-decoration-none" do %>
<%= icon_div @conn, s.icon, [class: "icon baseline"] %> <%= icon_div @conn, s.icon, [class: "icon baseline"] %>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -5,43 +5,44 @@ defmodule Home73kWeb.HomeView do
[ [
%{ %{
icon: "mdi-typewriter", icon: "mdi-typewriter",
url: "https://73k.us/blog/", url: Routes.blog_path(conn, :index),
prof: false prof: false,
target: "_self"
}, },
%{icon: "mdi-rss", url: "https://w.73k.us/feed/", prof: false}, %{icon: "mdi-rss", url: "https://w.73k.us/feed/", prof: false, target: "_blank"},
%{ %{
icon: "mdi-linkedin", icon: "mdi-linkedin",
url: "https://www.linkedin.com/in/adampiontek/", url: "https://www.linkedin.com/in/adampiontek/",
prof: true prof: true, target: "_blank"
}, },
%{icon: "mdi-github", url: "https://github.com/apiontek", prof: true}, %{icon: "mdi-github", url: "https://github.com/apiontek", prof: true, target: "_blank"},
%{icon: "gitea", url: "https://73k.us/git/adam", prof: true}, %{icon: "gitea", url: "https://73k.us/git/adam", prof: true, target: "_blank"},
%{ %{
icon: "mdi-key-variant", icon: "mdi-key-variant",
url: Routes.static_path(conn, "/DF185CEE29A3D443_public_key.asc"), url: Routes.static_path(conn, "/DF185CEE29A3D443_public_key.asc"),
prof: true prof: true, target: "_blank"
}, },
%{ %{
icon: "mdi-goodreads", icon: "mdi-goodreads",
url: "https://www.goodreads.com/user/show/2450014-adam-piontek", url: "https://www.goodreads.com/user/show/2450014-adam-piontek",
prof: false prof: false, target: "_blank"
}, },
%{icon: "mdi-twitter", url: "https://twitter.com/adampiontek", prof: false}, %{icon: "mdi-twitter", url: "https://twitter.com/adampiontek", prof: false, target: "_blank"},
%{icon: "mdi-facebook", url: "https://facebook.com/damek", prof: false}, %{icon: "mdi-facebook", url: "https://facebook.com/damek", prof: false, target: "_blank"},
%{ %{
icon: "mdi-instagram", icon: "mdi-instagram",
url: "https://www.instagram.com/adampiontek/", url: "https://www.instagram.com/adampiontek/",
prof: false prof: false, target: "_blank"
}, },
%{ %{
icon: "mdi-steam", icon: "mdi-steam",
url: "https://steamcommunity.com/id/apiontek/", url: "https://steamcommunity.com/id/apiontek/",
prof: false prof: false, target: "_blank"
}, },
%{ %{
icon: "mdi-discord", icon: "mdi-discord",
url: "https://discordapp.com/users/328583977629646848", url: "https://discordapp.com/users/328583977629646848",
prof: false prof: false, target: "_blank"
} }
] ]
end end