From 1aff9f655d125f1f382cf2ae243a6b88fed6dafc Mon Sep 17 00:00:00 2001 From: pancakes Date: Fri, 12 Sep 2025 19:50:00 +1000 Subject: [PATCH] Setup buttons section of home page --- PancakesWeb/Components/Pages/Home.razor | 32 +- PancakesWeb/Components/Pages/Home.razor.css | 12 + PancakesWeb/Components/UI/ImageButton.razor | 18 + .../Components/UI/ImageButton.razor.css | 15 + PancakesWeb/Data/Button.cs | 192 +++++++ PancakesWeb/wwwroot/imgs/buttons/aagaming.png | Bin 0 -> 931 bytes .../wwwroot/imgs/buttons/archlinux.gif | Bin 0 -> 3023 bytes PancakesWeb/wwwroot/imgs/buttons/atapi.gif | Bin 0 -> 1936 bytes PancakesWeb/wwwroot/imgs/buttons/blueb.png | Bin 0 -> 6537 bytes PancakesWeb/wwwroot/imgs/buttons/elke.gif | Bin 0 -> 14808 bytes PancakesWeb/wwwroot/imgs/buttons/houl.png | Bin 0 -> 2276 bytes .../imgs/buttons/iceshrimp_now_dark.webp | Bin 0 -> 762 bytes PancakesWeb/wwwroot/imgs/buttons/ipg.png | Bin 0 -> 1885 bytes .../imgs/buttons/join_the_fediverse.gif | Bin 0 -> 1127 bytes PancakesWeb/wwwroot/imgs/buttons/kopper.png | Bin 0 -> 1109 bytes .../wwwroot/imgs/buttons/lilysthings.png | Bin 0 -> 2988 bytes .../wwwroot/imgs/buttons/linux_now_xenia.gif | Bin 0 -> 1692 bytes .../buttons/made_with_my_own_two_paws.webp | Bin 0 -> 2102 bytes PancakesWeb/wwwroot/imgs/buttons/micro.avif | Bin 0 -> 758 bytes .../wwwroot/imgs/buttons/missing_texture.webp | Bin 0 -> 174 bytes .../wwwroot/imgs/buttons/nelleobserver.gif | Bin 0 -> 4112 bytes .../wwwroot/imgs/buttons/nonbinary.webp | Bin 0 -> 270 bytes PancakesWeb/wwwroot/imgs/buttons/notfire.gif | Bin 0 -> 561 bytes PancakesWeb/wwwroot/imgs/buttons/olivia.png | Bin 0 -> 4506 bytes PancakesWeb/wwwroot/imgs/buttons/pancakes.png | Bin 0 -> 6569 bytes .../imgs/buttons/powered_by_debian.webp | Bin 0 -> 1100 bytes PancakesWeb/wwwroot/imgs/buttons/scp.webp | Bin 0 -> 1114 bytes PancakesWeb/wwwroot/imgs/buttons/sneexy.svg | 1 + .../wwwroot/imgs/buttons/synthdownload.svg | 478 ++++++++++++++++++ .../imgs/buttons/team_fortress_get_it.gif | Bin 0 -> 3998 bytes .../imgs/buttons/ublock_origin_now.webp | Bin 0 -> 1196 bytes .../wwwroot/imgs/buttons/voidrehab.png | Bin 0 -> 3894 bytes PancakesWeb/wwwroot/imgs/buttons/wii.webp | Bin 0 -> 572 bytes PancakesWeb/wwwroot/imgs/buttons/yassie.gif | Bin 0 -> 2031 bytes PancakesWeb/wwwroot/imgs/buttons/zvava.png | Bin 0 -> 1767 bytes PancakesWeb/wwwroot/style.css | 19 + 36 files changed, 766 insertions(+), 1 deletion(-) create mode 100644 PancakesWeb/Components/UI/ImageButton.razor create mode 100644 PancakesWeb/Components/UI/ImageButton.razor.css create mode 100644 PancakesWeb/Data/Button.cs create mode 100644 PancakesWeb/wwwroot/imgs/buttons/aagaming.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/archlinux.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/atapi.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/blueb.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/elke.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/houl.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/iceshrimp_now_dark.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/ipg.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/join_the_fediverse.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/kopper.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/lilysthings.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/linux_now_xenia.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/made_with_my_own_two_paws.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/micro.avif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/missing_texture.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/nelleobserver.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/nonbinary.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/notfire.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/olivia.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/pancakes.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/powered_by_debian.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/scp.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/sneexy.svg create mode 100644 PancakesWeb/wwwroot/imgs/buttons/synthdownload.svg create mode 100644 PancakesWeb/wwwroot/imgs/buttons/team_fortress_get_it.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/ublock_origin_now.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/voidrehab.png create mode 100644 PancakesWeb/wwwroot/imgs/buttons/wii.webp create mode 100644 PancakesWeb/wwwroot/imgs/buttons/yassie.gif create mode 100644 PancakesWeb/wwwroot/imgs/buttons/zvava.png diff --git a/PancakesWeb/Components/Pages/Home.razor b/PancakesWeb/Components/Pages/Home.razor index ff9b1c8..c4731fc 100644 --- a/PancakesWeb/Components/Pages/Home.razor +++ b/PancakesWeb/Components/Pages/Home.razor @@ -60,7 +60,7 @@

Contributions

Projects that I do not maintain but have contributed to

- + + +

Buttons

+

Click my buttons

+ + +
+ Add my button +
<a href="@Buttons.Pancakes.Href" target="_blank">
+    <img src="@Buttons.Pancakes.Href@Assets[$"imgs/buttons/{Buttons.Pancakes.Image}"]" alt"@Buttons.Pancakes.Title">
+</a>
+

The image URL may change in the future. Instead of hotlinking it you should download the image manually.

+
+ + + + \ No newline at end of file diff --git a/PancakesWeb/Components/Pages/Home.razor.css b/PancakesWeb/Components/Pages/Home.razor.css index 368a3d3..550b455 100644 --- a/PancakesWeb/Components/Pages/Home.razor.css +++ b/PancakesWeb/Components/Pages/Home.razor.css @@ -50,6 +50,18 @@ font-weight: bold; } +.buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 0.5rem; + list-style: none; +} + +.button { + display: inline-flex; +} + @media screen and (max-width: 768px) { .accounts { flex-direction: column; diff --git a/PancakesWeb/Components/UI/ImageButton.razor b/PancakesWeb/Components/UI/ImageButton.razor new file mode 100644 index 0000000..94ab1b5 --- /dev/null +++ b/PancakesWeb/Components/UI/ImageButton.razor @@ -0,0 +1,18 @@ +@using PancakesWeb.Data + +@if (Data.Href != null) +{ + @Image +} +else +{ + @Image +} + +@code { + [Parameter, EditorRequired] public required Button Data { get; set; } + + private RenderFragment Image => + @@Data.Title; + +} \ No newline at end of file diff --git a/PancakesWeb/Components/UI/ImageButton.razor.css b/PancakesWeb/Components/UI/ImageButton.razor.css new file mode 100644 index 0000000..fd225ba --- /dev/null +++ b/PancakesWeb/Components/UI/ImageButton.razor.css @@ -0,0 +1,15 @@ +.button-link { + text-decoration: none; +} + +.button-link::after { + display: none; + content: none; +} + +.button-img { + width: 88px; + height: 31px; + object-fit: contain; + image-rendering: crisp-edges; +} \ No newline at end of file diff --git a/PancakesWeb/Data/Button.cs b/PancakesWeb/Data/Button.cs new file mode 100644 index 0000000..fe50183 --- /dev/null +++ b/PancakesWeb/Data/Button.cs @@ -0,0 +1,192 @@ +namespace PancakesWeb.Data; + +public class Button +{ + public required string Image { get; set; } + public required string Title { get; set; } + public string? Href { get; set; } +} + +public static class Buttons +{ + public static readonly Button Pancakes = new Button + { + Image = "pancakes.png", + Title = "pancakes", + Href = "https://pancakes.gay/" + }; + + public static readonly List