From 8ad54eda1ca0a52ded889e267c47c4681e362692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Diedrich?= Date: Wed, 6 Jul 2022 15:41:23 +0200 Subject: [PATCH] use icons --- assets/css/app.css | 49 ++++++++++--------- .../templates/resume/index.html.heex | 7 +++ lib/homepage_web/views/resume_view.ex | 7 ++- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 3115f9c..9aae13c 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -4,6 +4,32 @@ /* This file is for your main application CSS */ +/* + Layout +*/ + +body { + @apply font-sans; +} + +#root { + margin: 0 auto; + + display: grid; + grid-template-columns: 1fr min(1440px,100%) 1fr; +} + +#root > * { + grid-column: 2; +} + +.color-box { + @apply block w-8 h-8 m-1; +} + +i.icon svg { @apply inline; } +h2 > i.icon svg { @apply w-6 h-6 stroke-2; } + /* Alerts and form errors used by phx.new */ .alert { @apply rounded; @@ -111,26 +137,3 @@ 0% { opacity: 1; } 100% { opacity: 0; } } - -/* - Layout -*/ - -body { - @apply font-sans; -} - -#root { - margin: 0 auto; - - display: grid; - grid-template-columns: 1fr min(1440px,100%) 1fr; -} - -#root > * { - grid-column: 2; -} - -.color-box { - @apply block w-8 h-8 m-1; -} diff --git a/lib/homepage_web/templates/resume/index.html.heex b/lib/homepage_web/templates/resume/index.html.heex index 155dedc..2f3e378 100644 --- a/lib/homepage_web/templates/resume/index.html.heex +++ b/lib/homepage_web/templates/resume/index.html.heex @@ -1,3 +1,10 @@ +
+ + + + +
+
diff --git a/lib/homepage_web/views/resume_view.ex b/lib/homepage_web/views/resume_view.ex index 69a89cd..53c1f3e 100644 --- a/lib/homepage_web/views/resume_view.ex +++ b/lib/homepage_web/views/resume_view.ex @@ -1,10 +1,12 @@ defmodule HomepageWeb.ResumeView do use HomepageWeb, :view + alias HomepageWeb.Icons + def para(assigns) do ~H"""
-

<%= @heading %>

+

<%= @heading %>

<%= if assigns[:subheading] do %>

<%= @subheading %>

<% end %> @@ -18,7 +20,8 @@ defmodule HomepageWeb.ResumeView do def article(assigns) do ~H"""
-

<%= @heading %>

+

+ <%= @heading %>

<%= render_slot(@inner_block) %>
"""