Skip to content

Commit 5a8e1c5

Browse files
committed
feat: sponsors
1 parent 3e8f0b5 commit 5a8e1c5

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

lib/elixir_tools/pages/home_page.ex

+33-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ defmodule ElixirTools.HomePage do
77

88
import ElixirTools.PostExtension, only: [posts: 1]
99

10-
def template(_assigns) do
10+
def header(assigns) do
11+
temple do
12+
a href: "##{@id}", class: "no-underline" do
13+
h2 id: @id,
14+
class: "#{@class} hover:after:content-['_#']" do
15+
slot @inner_block
16+
end
17+
end
18+
end
19+
end
20+
21+
def template(assigns) do
1122
temple do
1223
section id: "home" do
1324
p do
@@ -28,7 +39,7 @@ defmodule ElixirTools.HomePage do
2839
do: "GitHub Sponsors."
2940
end
3041

31-
h2 class: "text-xl font-medium mt-4 mb-2", do: "Tools"
42+
c &header/1, id: "tools", class: "text-xl font-medium mt-4 mb-2", do: "Tools"
3243

3344
p do
3445
ul do
@@ -41,7 +52,7 @@ defmodule ElixirTools.HomePage do
4152
end
4253
end
4354

44-
h2 class: "text-xl font-medium mt-4 mb-2", do: "News"
55+
c &header/1, id: "news", class: "text-xl font-medium mt-4 mb-2", do: "News"
4556

4657
p do
4758
for post <- posts(all: Mix.env() == :dev) do
@@ -50,11 +61,30 @@ defmodule ElixirTools.HomePage do
5061
a href: post.permalink do
5162
post.title
5263
end
64+
5365
span do: "(#{Calendar.strftime(post.date, "%Y-%m-%d")})"
5466
end
5567
end
5668
end
5769
end
70+
71+
c &header/1, id: "sponsors", class: "text-xl font-medium mt-4 mb-8" do
72+
"Sponsored by"
73+
end
74+
75+
div class: "flex gap-16" do
76+
a href: "https://qdentity.com/", target: "_blank", title: "Qdentity" do
77+
img src: "https://f005.backblazeb2.com/file/elixir-tools/sponsors/qdentity.png",
78+
class: "h-24"
79+
end
80+
81+
a href: "https://www.nfiindustries.com/solutions/integrated-logistics/",
82+
target: "_blank",
83+
title: "NFI Integrated Logistics" do
84+
img src: "https://f005.backblazeb2.com/file/elixir-tools/sponsors/nfi-industries.jpg",
85+
class: "h-24"
86+
end
87+
end
5888
end
5989
end
6090
end

tailwind.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
assets/tailwind.config.js

0 commit comments

Comments
 (0)