Add extensions page (#648)

This commit is contained in:
Max Wofford 2025-11-21 18:23:42 -05:00 committed by GitHub
parent 80f71a5a3d
commit 0e54365059
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 4 deletions

View file

@ -0,0 +1,4 @@
class ExtensionsController < ApplicationController
def index
end
end

View file

@ -0,0 +1,2 @@
module ExtensionsHelper
end

View file

@ -0,0 +1,19 @@
<div>
<h1 class="font-bold text-4xl">Extensions</h1>
<em class="m-4">These are third-party extensions that can be used with Hackatime. Everything in the list is community made and not guaranteed to work!</em>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div class="border rounded-lg p-4 bg-[#2c2f33]">
<h2 class="font-bold text-2xl mb-2">Hackatime Desktop</h2>
<p>Desktop app for Hackatime. Runs on Mac, Windows, and Linux.</p>
<%= link_to "Source", "https://github.com/hackclub/hackatime-desktop", class: "text-primary hover:underline", allow_host: true %> |
<%= link_to "Install", "https://github.com/hackclub/hackatime-desktop/releases", class: "text-primary hover:underline", allow_host: true %>
</div>
<div class="border rounded-lg p-4 bg-[#2c2f33]">
<h2 class="font-bold text-2xl mb-2">Cattatime</h2>
<p>A Tamagotchi system for Hackatime. Code, fill your cup, and get your pet rewards. Windows only.</p>
<%= link_to "Source", "https://github.com/joysudo/catatime/tree/master", class: "text-primary hover:underline", allow_host: true %> |
<%= link_to "Install", "https://github.com/joysudo/catatime/releases/", class: "text-primary hover:underline", allow_host: true %>
</div>
</div>
</div>

View file

@ -42,6 +42,11 @@
Docs
<% end %>
</div>
<div>
<%= link_to extensions_path, class: "block px-2 py-1 rounded-lg transition #{current_page?(extensions_path) ? 'bg-primary/50 text-primary' : 'hover:bg-[#23272a]'}", data: { action: "click->nav#clickLink" } do %>
Extensions
<% end %>
</div>
<div>
<%= link_to "/what-is-hackatime", class: "block px-2 py-1 rounded-lg transition #{current_page?('/what-is-hackatime') ? 'bg-primary/50 text-primary' : 'hover:bg-[#23272a]'}", data: { action: "click->nav#clickLink" } do %>
What is Hackatime?
@ -59,11 +64,11 @@
Docs
<% end %>
</div>
<% superadmin_tool(nil, "div") do %>
<%= link_to my_mailing_address_path, class: "block px-2 py-1 rounded-lg transition #{current_page?(my_mailing_address_path) ? 'bg-primary/50 text-primary' : 'hover:bg-[#23272a]'}", data: { action: "click->nav#clickLink" } do %>
Mailing Address
<div>
<%= link_to extensions_path, class: "block px-2 py-1 rounded-lg transition #{current_page?(extensions_path) ? 'bg-primary/50 text-primary' : 'hover:bg-[#23272a]'}", data: { action: "click->nav#clickLink" } do %>
Extensions
<% end %>
<% end %>
</div>
<div>
<%= link_to my_mailroom_path, class: "block px-2 py-1 rounded-lg transition #{current_page?(my_mailroom_path) ? 'bg-primary/50 text-primary' : 'hover:bg-[#23272a]'}", data: { action: "click->nav#clickLink" } do %>
Mailroom

View file

@ -15,6 +15,8 @@ Rails.application.routes.draw do
root "static_pages#index"
resources :extensions, only: [ :index ]
constraints AdminLevelConstraint.new(:superadmin) do
mount GoodJob::Engine => "good_job"
mount AhoyCaptain::Engine => "/ahoy_captain"