fix some outstanding issues
This commit is contained in:
@ -3,29 +3,29 @@ defmodule HomepageWeb.HelperComponents do
|
|||||||
|
|
||||||
slot :label, required: true
|
slot :label, required: true
|
||||||
slot :entry, default: []
|
slot :entry, default: []
|
||||||
|
|
||||||
def dropdown(assigns) do
|
def dropdown(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="dropdown dropdown-end">
|
<div class="dropdown dropdown-end">
|
||||||
<label tabindex="0" class="btn btn-ghost m-1">
|
<label tabindex="0" class="btn btn-ghost m-1">
|
||||||
<%= render_slot(@label) %>
|
<%= render_slot(@label) %>
|
||||||
</label>
|
</label>
|
||||||
<ul tabindex="0"
|
<ul tabindex="0" class="dropdown-content bg-white menu p-2 shadow rounded-box">
|
||||||
class="dropdown-content menu p-2 shadow rounded-box">
|
|
||||||
<li :for={ent <- @entry}>
|
<li :for={ent <- @entry}>
|
||||||
<%= render_slot(ent) %>
|
<%= render_slot(ent) %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
slot :inner_block, required: true
|
slot :inner_block, required: true
|
||||||
|
|
||||||
def markdown(assigns) do
|
def markdown(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<%= render_slot(@inner_block)
|
<%= render_slot(@inner_block)
|
||||||
|> slot_markdown_as_html()
|
|> slot_markdown_as_html()
|
||||||
|> raw()
|
|> raw() %>
|
||||||
%>
|
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -33,12 +33,12 @@ defmodule HomepageWeb.HelperComponents do
|
|||||||
[slot] = dynamic_slot.(false)
|
[slot] = dynamic_slot.(false)
|
||||||
slot |> slot_markdown_as_html()
|
slot |> slot_markdown_as_html()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp slot_markdown_as_html(rendered_slot) do
|
defp slot_markdown_as_html(rendered_slot) do
|
||||||
%{static: [markdown]} = rendered_slot
|
%{static: [markdown]} = rendered_slot
|
||||||
|
|
||||||
trim_leading_space(markdown)
|
trim_leading_space(markdown)
|
||||||
|> String.replace(~S("\""), ~S("""), global: true)
|
|> String.replace(~S("\""), ~S("""), global: true)
|
||||||
|> Earmark.as_html!(compact_output: true)
|
|> Earmark.as_html!(compact_output: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -60,4 +60,4 @@ defmodule HomepageWeb.HelperComponents do
|
|||||||
""
|
""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,26 +1,24 @@
|
|||||||
<header class="px-4 sm:px-6 lg:px-8">
|
<header class="px-4 sm:px-6 lg:px-8">
|
||||||
<.dropdown>
|
<div class="navbar">
|
||||||
<:label>@rdiedrich</:label>
|
<.dropdown>
|
||||||
<:entry>
|
<:label>@rdiedrich</:label>
|
||||||
<.link
|
<:entry>
|
||||||
title="send an e-mail"
|
<.link title="send an e-mail" href="mailto:hallo@rdiedri.ch">
|
||||||
href="mailto:hallo@rdiedri.ch">
|
<.icon name="hero-envelope" /> hallo@rdiedri.ch
|
||||||
<.icon name="hero-envelope" />
|
</.link>
|
||||||
hallo@rdiedri.ch
|
</:entry>
|
||||||
</.link>
|
|
||||||
</:entry>
|
|
||||||
|
|
||||||
<:entry>
|
<:entry>
|
||||||
<.link
|
<.link
|
||||||
title="chat with me on matrix"
|
title="chat with me on matrix"
|
||||||
href="https://matrix.to/#/@rdiedrich:matrix.org"
|
href="https://matrix.to/#/@rdiedrich:matrix.org"
|
||||||
target="_blank">
|
target="_blank"
|
||||||
<.icon name="hero-chat-bubble-bottom-center-text" />
|
>
|
||||||
@rdiedrich:matrix.org
|
<.icon name="hero-chat-bubble-bottom-center-text" /> @rdiedrich:matrix.org
|
||||||
</.link>
|
</.link>
|
||||||
</:entry>
|
</:entry>
|
||||||
|
</.dropdown>
|
||||||
</.dropdown>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main class="px-4 py-20 sm:px-6 lg:px-8">
|
<main class="px-4 py-20 sm:px-6 lg:px-8">
|
||||||
<div class="mx-auto max-w-2xl space-y-16">
|
<div class="mx-auto max-w-2xl space-y-16">
|
||||||
@ -28,5 +26,4 @@
|
|||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer></footer>
|
||||||
</footer>
|
|
||||||
|
@ -1,42 +1,33 @@
|
|||||||
<section class="about">
|
<section class="about">
|
||||||
<h2>about</h2>
|
<h2>about</h2>
|
||||||
<.markdown>
|
<.markdown>
|
||||||
Hi, my name is **Rüdiger Diedrich** and this is my homepage.
|
Hi, my name is **Rüdiger Diedrich** and this is my homepage.
|
||||||
|
|
||||||
For the last couple of years I am a big proponent of the Elixir and
|
Check out some of the projects I've been working on.
|
||||||
Erlang/OTP ecosystem: be it projects like Phoenix framework which
|
|
||||||
bends the rules of traditional client-server-based web development
|
|
||||||
or Livebook - built on top of Phoenix - which for me is simply the
|
|
||||||
next generation of interactive notebooks and completely changed
|
|
||||||
the way I go about prototyping and data analysis.
|
|
||||||
|
|
||||||
Check out some of the projects I've been working on.
|
|
||||||
</.markdown>
|
</.markdown>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="projects">
|
<section class="projects">
|
||||||
<h2>projects</h2>
|
<h2>projects</h2>
|
||||||
<.project
|
<.project
|
||||||
url="https://chicken.rdiedri.ch"
|
url="https://chicken.rdiedri.ch"
|
||||||
forge_url="https://forge.rdiedri.ch/rdiedrich/exponential-chicken-egg">
|
forge_url="https://forge.rdiedri.ch/rdiedrich/exponential-chicken-egg"
|
||||||
|
>
|
||||||
<:title>Exponential Chicken Egg</:title>
|
<:title>Exponential Chicken Egg</:title>
|
||||||
The chicken is very busy.
|
The chicken is very busy. \
|
||||||
100% implemented in Phoenix Liveview. Press spacebar (or tap) for fun.
|
100% implemented in Phoenix Liveview. Press spacebar (or tap) for fun.
|
||||||
</.project>
|
</.project>
|
||||||
<.project
|
<.project url="https://app.rdiedri.ch" forge_url="https://forge.rdiedri.ch/rdiedrich/physics">
|
||||||
url="https://app.rdiedri.ch"
|
|
||||||
forge_url="https://forge.rdiedri.ch/rdiedrich/physics">
|
|
||||||
<:title>Physics</:title>
|
<:title>Physics</:title>
|
||||||
Random falling blocks under the yoke of gravity.
|
Random falling blocks under the yoke of gravity. \
|
||||||
Typescript using the pixi engine. Click or tap a block to give it a boost.
|
Typescript using the pixi engine. Click or tap a block to give it a boost.
|
||||||
</.project>
|
</.project>
|
||||||
<.project
|
<.project
|
||||||
url="https://colorer.vercel.app"
|
url="https://colorer.vercel.app"
|
||||||
forge_url="https://forge.rdiedri.ch/rdiedrich/colorer">
|
forge_url="https://forge.rdiedri.ch/rdiedrich/colorer"
|
||||||
|
>
|
||||||
<:title>Colorer</:title>
|
<:title>Colorer</:title>
|
||||||
Play around with HSLA color.
|
Play around with HSLA color. \
|
||||||
Reactive app show-casing SolidJS, deployed on vercel.
|
Reactive app show-casing SolidJS, deployed on vercel.
|
||||||
</.project>
|
</.project>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<p>a</p>
|
|
Reference in New Issue
Block a user