diff --git a/lib/sloane_sh/layouts/helpers.ex b/lib/sloane_sh/layouts/helpers.ex index 603177b..80a11a9 100644 --- a/lib/sloane_sh/layouts/helpers.ex +++ b/lib/sloane_sh/layouts/helpers.ex @@ -24,33 +24,40 @@ defmodule SloaneSH.Layouts.Helpers do end def picture(ctx, src, alt \\ "", class \\ "") do - image = Enum.find(ctx.images, fn i -> - output = OutputDirs.image(ctx.config, i.src) - src == OutputDirs.to_permalink(ctx.config, output) - end) + image = + Enum.find(ctx.images, fn i -> + output = OutputDirs.image(ctx.config, i.src) + src == OutputDirs.to_permalink(ctx.config, output) + end) if is_nil(image) do Logger.warning("Could not find #{inspect(src)} to make picture element") ~s|| else - [{_, src} | srcsets] = [ - {"image/jpg", ".jpg"}, - {"image/webp", ".webp"}, - {"image/png", ".png"}, - ] + [{_, src} | srcsets] = + [ + {"image/jpg", ".jpg"}, + {"image/webp", ".webp"}, + {"image/png", ".png"} + ] |> Enum.map(fn {type, ext} -> {type, OutputDirs.replace_ext(src, ext)} end) - - EEx.eval_string(~S""" - - """, src: src, srcsets: srcsets, alt: alt, class: class) + EEx.eval_string( + ~S""" + + """, + src: src, + srcsets: srcsets, + alt: alt, + class: class + ) end end end diff --git a/priv/site/pages/home.md.eex b/priv/site/pages/home.md.eex index f154bdd..3d272f2 100644 --- a/priv/site/pages/home.md.eex +++ b/priv/site/pages/home.md.eex @@ -7,9 +7,11 @@ hey, i'm sloane! i'm a professional software engineer and an amateur musician, p ### around the web -- @sloane on the fediverse -- [@sloanelybutsurely](https://github.com/sloanelybutsurely) on github -- [@sloane_of_arc](https://instagram.com/sloane_of_arc) on instagram +