@@ -7,7 +7,18 @@ defmodule ElixirTools.HomePage do
7
7
8
8
import ElixirTools.PostExtension , only: [ posts: 1 ]
9
9
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
11
22
temple do
12
23
section id: "home" do
13
24
p do
@@ -28,7 +39,7 @@ defmodule ElixirTools.HomePage do
28
39
do: "GitHub Sponsors."
29
40
end
30
41
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"
32
43
33
44
p do
34
45
ul do
@@ -41,7 +52,7 @@ defmodule ElixirTools.HomePage do
41
52
end
42
53
end
43
54
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"
45
56
46
57
p do
47
58
for post <- posts ( all: Mix . env ( ) == :dev ) do
@@ -50,11 +61,30 @@ defmodule ElixirTools.HomePage do
50
61
a href: post . permalink do
51
62
post . title
52
63
end
64
+
53
65
span do: "(#{ Calendar . strftime ( post . date , "%Y-%m-%d" ) } )"
54
66
end
55
67
end
56
68
end
57
69
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
58
88
end
59
89
end
60
90
end
0 commit comments