From 1f34f85192d6341a5118ec1e33569da43f5eea80 Mon Sep 17 00:00:00 2001
From: Dean Lofts <dean@deanlofts.xyz>
Date: Sat, 21 Sep 2024 23:57:37 +1000
Subject: [PATCH 1/2] remove extra note about achievements

---
 app/views/links/user_links.html.erb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/views/links/user_links.html.erb b/app/views/links/user_links.html.erb
index c4f25db..84ebca1 100644
--- a/app/views/links/user_links.html.erb
+++ b/app/views/links/user_links.html.erb
@@ -85,10 +85,6 @@
       <% end %>
     </ul>
   </div>
-<% else %>
-  <div class="max-w-4xl mx-auto mt-12 text-center">
-    <p class="text-gray-500">No achievements to display.</p>
-  </div>
 <% end %>
 
 <% if @user.public_analytics %>

From 0c9d843b34c56bd2ddc1c98f2c0cf3012a14df2c Mon Sep 17 00:00:00 2001
From: Dean Lofts <dean@deanlofts.xyz>
Date: Sun, 22 Sep 2024 00:05:22 +1000
Subject: [PATCH 2/2] fix layout

---
 app/views/links/user_links.html.erb | 75 +++++++++++++++--------------
 1 file changed, 38 insertions(+), 37 deletions(-)

diff --git a/app/views/links/user_links.html.erb b/app/views/links/user_links.html.erb
index 84ebca1..e972799 100644
--- a/app/views/links/user_links.html.erb
+++ b/app/views/links/user_links.html.erb
@@ -13,53 +13,54 @@
   </div>
 </div>
 
-  <div class="mt-4 text-center">
-    <h1 class="text-2xl font-bold text-white"><%= @user.full_name %></h1>
-    <h2 class="text-xl font-bold text-white"><%= @user.username %></h2>
-    <div class="flex flex-wrap justify-center mt-2">
-      <% @user.tags.each do |tag| %>
-        <span class="bg-gray-700 text-white rounded px-2 py-1 m-1"><%= tag %></span>
-      <% end %>
-    </div>
+<div class="mt-4 text-center max-w-2xl mx-auto">
+  <h1 class="text-2xl font-bold text-white"><%= @user.full_name %></h1>
+  <h2 class="text-xl font-bold text-white"><%= @user.username %></h2>
+  <div class="flex flex-wrap justify-center mt-2">
+    <% @user.tags.each do |tag| %>
+      <span class="bg-gray-700 text-white rounded px-2 py-1 m-1"><%= tag %></span>
+    <% end %>
   </div>
+</div>
 
-  <% if @pinned_links.any? %>
-  <div class="mt-4">
-    <div class="flex flex-wrap justify-center">
-      <% @pinned_links.order(:position).each do |link| %> <!-- Add ordering here -->
-        <%= link_to link_path(link), target: "_blank", class: 'bg-gray-800 p-3 m-1 rounded hover:underline' do %>
-          <% if link.icon.present? %>
-            <i class="<%= link.icon %> text-lime-300"></i>
-          <% end %>
+<% if @pinned_links.any? %>
+<div class="mt-4">
+  <div class="flex flex-wrap justify-center max-w-2xl mx-auto">
+    <% @pinned_links.order(:position).each do |link| %>
+      <%= link_to link_path(link), target: "_blank", class: 'bg-gray-800 p-3 m-1 rounded hover:underline' do %>
+        <% if link.icon.present? %>
+          <i class="<%= link.icon %> text-lime-300"></i>
         <% end %>
       <% end %>
-    </div>
+    <% end %>
   </div>
+</div>
 <% end %>
 
-  <div class="pb-4 text-center">
-    <p class="text-lg text-white"><%= auto_link_urls(@user.description || "") %></p>
-  </div>
+<div class="pb-4 text-center max-w-2xl mx-auto">
+  <p class="text-lg text-white"><%= auto_link_urls(@user.description || "") %></p>
 </div>
 
-<div class="links-section max-w-4xl mx-auto mt-8 text-center">
-  <h2 class="text-2xl font-bold pt-2 pb-2 text-white">Links</h2>
-  <ul class="space-y-4">
-    <% @links.where(pinned: false).each do |link| %>
-      <li class="bg-gray-800 p-3 rounded shadow-md max-w-2xl mx-auto">
-        <h2 class="text-xl text-lime-300 font-bold">
-          <%= link_to link_path(link), target: "_blank", class: 'hover:underline' do %>
-            <% if link.icon.present? %>
-              <i class="<%= link.icon %> text-lime-300"></i>
+<% if @links.where(pinned: false).any? %>
+  <div class="links-section max-w-4xl mx-auto mt-8 text-center">
+    <h2 class="text-2xl font-bold pt-2 pb-2 text-white">Links</h2>
+    <ul class="space-y-4">
+      <% @links.where(pinned: false).each do |link| %>
+        <li class="bg-gray-800 p-3 rounded shadow-md max-w-2xl mx-auto">
+          <h2 class="text-xl text-lime-300 font-bold">
+            <%= link_to link_path(link), target: "_blank", class: 'hover:underline' do %>
+              <% if link.icon.present? %>
+                <i class="<%= link.icon %> text-lime-300"></i>
+              <% end %>
+              <%= link.title %>
             <% end %>
-            <%= link.title %>
-          <% end %>
-        </h2>
-        <p class="text-gray-400"><%= link.description %></p>
-      </li>
-    <% end %>
-  </ul>
-</div>
+          </h2>
+          <p class="text-gray-400"><%= link.description %></p>
+        </li>
+      <% end %>
+    </ul>
+  </div>
+<% end %>
 
 <div id="hidden-links-data" style="display: none;" data-hidden-links="<%= @hidden_links.to_json %>"></div>