phx update

This commit is contained in:
2023-11-07 08:52:09 +01:00
parent 8ad54eda1c
commit b2439d7251
974 changed files with 4538 additions and 1120 deletions

View File

@ -0,0 +1,19 @@
defmodule HomepageWeb.ErrorHTML do
use HomepageWeb, :html
# If you want to customize your error pages,
# uncomment the embed_templates/1 call below
# and add pages to the error directory:
#
# * lib/homepage_web/controllers/error_html/404.html.heex
# * lib/homepage_web/controllers/error_html/500.html.heex
#
# embed_templates "error_html/*"
# The default is to render a plain text page based on
# the template name. For example, "404.html" becomes
# "Not Found".
def render(template, _assigns) do
Phoenix.Controller.status_message_from_template(template)
end
end

View File

@ -0,0 +1,15 @@
defmodule HomepageWeb.ErrorJSON do
# If you want to customize a particular status code,
# you may add your own clauses, such as:
#
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the status message from
# the template name. For example, "404.json" becomes
# "Not Found".
def render(template, _assigns) do
%{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}}
end
end

View File

@ -1,7 +1,10 @@
defmodule HomepageWeb.PageController do
use HomepageWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
def home(conn, _params) do
# The home page is often custom made,
# so skip the default app layout.
#render(conn, :home, layout: false)
render(conn, :home)
end
end

View File

@ -0,0 +1,34 @@
defmodule HomepageWeb.PageHTML do
use HomepageWeb, :html
import HomepageWeb.HelperComponents
embed_templates "page_html/*"
attr :url, :string, required: true
attr :forge_url, :string, default: nil
slot :inner_block, required: true
slot :title, required: true
def project(assigns) do
~H"""
<div class="project">
<.link target="_blank" class="" href={@url}>
<h3><%= render_slot(@title) %></h3>
</.link>
<div class="desc">
<.markdown><%= render_slot(@inner_block) %></.markdown>
</div>
<div class="links mt-1 text-indigo flex gap-4 justify-start">
<.link target="_blank" href={@url} class="icon-link">
<.icon name="hero-arrow-top-right-on-square" />
Visit website
</.link>
<.link target="_blank" href={@forge_url} :if={@forge_url} class="icon-link">
<.icon name="hero-code-bracket-square" />
See the code
</.link>
</div>
</div>
"""
end
end

View File

@ -0,0 +1,42 @@
<section class="about">
<h2>about</h2>
<.markdown>
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
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>
</section>
<section class="projects">
<h2>projects</h2>
<.project
url="https://chicken.rdiedri.ch"
forge_url="https://forge.rdiedri.ch/rdiedrich/exponential-chicken-egg">
<:title>Exponential Chicken Egg</:title>
The chicken is very busy.
100% implemented in Phoenix Liveview. Press spacebar (or tap) for fun.
</.project>
<.project
url="https://app.rdiedri.ch"
forge_url="https://forge.rdiedri.ch/rdiedrich/physics">
<:title>Physics</:title>
Random falling blocks under the yoke of gravity.
Typescript using the pixi engine. Click or tap a block to give it a boost.
</.project>
<.project
url="https://colorer.vercel.app"
forge_url="https://forge.rdiedri.ch/rdiedrich/colorer">
<:title>Colorer</:title>
Play around with HSLA color.
Reactive app show-casing SolidJS, deployed on vercel.
</.project>
</section>
<p>a</p>

View File

@ -0,0 +1,17 @@
<section class="phoenix">
<h2>Phoenix framework</h2>
<.markdown>
Phoenix is enabling developers to built concurrent distributed
systems without the technological and mental overhead this usually
requires, while also offering modern frontend engineering principles
in component-based design.
On the other side of the equation, end-users can expect highly
interactive applications with built-in live collaboration and
featuring user interfaces that feel snappy to use and are also
pretty to look at.
And all of this at a fraction of the needed ressources on the
engineering side to built as well as on the infrastructure side
to run these systems.
</.markdown>
</section>

View File

@ -1,7 +0,0 @@
defmodule HomepageWeb.ResumeController do
use HomepageWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end