|
| 1 | +import gleam/list |
1 | 2 | import lustre/attribute |
2 | 3 | import lustre/element.{type Element} |
3 | 4 | import lustre/element/html |
4 | 5 | import website/component |
5 | | -import website/page/about |
6 | | -import website/page/contact |
7 | | -import website/page/stuff |
| 6 | +import website/component/footer |
8 | 7 |
|
9 | | -fn section() { |
| 8 | +fn index() { |
10 | 9 | component.text_page("Hello and welcome to my website!", [ |
11 | 10 | html.text( |
12 | 11 | "My name is Surya, known online as Gears. I'm an amateur software developer, investigating functional programming, compilers and Minecraft datapacks.", |
13 | 12 | ), |
14 | 13 | html.br([]), |
15 | | - html.text("More about me in the "), |
16 | | - html.a([attribute.href("#about"), attribute.class("underline font-bold")], [ |
17 | | - html.text("about"), |
18 | | - ]), |
19 | | - html.text(" section."), |
20 | | - html.br([]), |
21 | | - html.text("You can check out my finished and ongoing projects in "), |
| 14 | + html.text("I am currently part of the core team developing the "), |
22 | 15 | html.a( |
23 | | - [attribute.href("#projects"), attribute.class("underline font-bold")], |
24 | | - [html.text("projects")], |
| 16 | + [ |
| 17 | + attribute.target("_blank"), |
| 18 | + attribute.class("font-bold hover:underline"), |
| 19 | + attribute.href("https://gleam.run"), |
| 20 | + ], |
| 21 | + [html.text("Gleam programming language")], |
25 | 22 | ), |
26 | 23 | html.text("."), |
27 | 24 | html.br([]), |
28 | | - html.text("If you have more questions, you can "), |
| 25 | + html.text("I also have a "), |
| 26 | + html.a( |
| 27 | + [ |
| 28 | + attribute.target("_blank"), |
| 29 | + attribute.class("font-bold hover:underline"), |
| 30 | + attribute.href("https://youtube.com/@Gearsdatapacks"), |
| 31 | + ], |
| 32 | + [html.text("YouTube channel")], |
| 33 | + ), |
| 34 | + html.text( |
| 35 | + ", where I you can watch my old videos on Minecraft datapacks, as well as videos covering changes to Gleam.", |
| 36 | + ), |
| 37 | + html.br([]), |
| 38 | + html.br([]), |
| 39 | + html.text( |
| 40 | + "If you have questions you want to ask, or want to reach out to me, you can send me an email at ", |
| 41 | + ), |
29 | 42 | html.a( |
30 | | - [attribute.href("#contact"), attribute.class("underline font-bold")], |
31 | | - [html.text("contact me")], |
| 43 | + [ |
| 44 | + attribute.class("font-bold text-orange-400"), |
| 45 | + attribute.href("mailto:[email protected]"), |
| 46 | + ], |
| 47 | + |
| 48 | + ), |
| 49 | + html.text( |
| 50 | + ", |
| 51 | + or join my ", |
| 52 | + ), |
| 53 | + html.a( |
| 54 | + [ |
| 55 | + attribute.target("_blank"), |
| 56 | + attribute.class("font-bold hover:underline"), |
| 57 | + attribute.href("https://discord.gg/fmPKDqf9ze"), |
| 58 | + ], |
| 59 | + [html.text("Discord server")], |
32 | 60 | ), |
33 | 61 | html.text("."), |
34 | 62 | ]) |
35 | 63 | } |
36 | 64 |
|
37 | 65 | pub fn view() -> Element(a) { |
38 | | - component.page("Home", [section(), about.view(), contact.view(), stuff.view()]) |
| 66 | + component.page("Home", [index(), my_stuff()]) |
| 67 | +} |
| 68 | + |
| 69 | +pub fn my_stuff() { |
| 70 | + component.text_page("My Stuff", [ |
| 71 | + html.h2([attribute.class("text-2xl font-bold leading-tight")], [ |
| 72 | + element.text("Links"), |
| 73 | + ]), |
| 74 | + html.p([], list.map(footer.socials, social)), |
| 75 | + ]) |
| 76 | +} |
| 77 | + |
| 78 | +fn social(social: footer.Social) -> Element(a) { |
| 79 | + html.a([attribute.href(social.url), attribute.target("_blank")], [ |
| 80 | + html.img([ |
| 81 | + attribute.src("/images/" <> social.icon), |
| 82 | + attribute.alt(social.name), |
| 83 | + attribute.title(social.name), |
| 84 | + attribute.class("w-icon inline m-1"), |
| 85 | + ]), |
| 86 | + element.text(social.description), |
| 87 | + html.br([]), |
| 88 | + ]) |
39 | 89 | } |
0 commit comments