From b6b288f0de68f54469ead2ec6fc32a6ef2912746 Mon Sep 17 00:00:00 2001 From: Alex Ren <41168529+qcoral@users.noreply.github.com> Date: Fri, 30 May 2025 15:58:02 -0400 Subject: [PATCH] refactored site, added new content --- app/controllers/guides_controller.rb | 2 + app/helpers/guides_helper.rb | 2 + app/views/guides/_sidebar.html.erb | 17 ++++++++ app/views/guides/game-console.md | 3 ++ app/views/guides/overview.md | 14 +++++++ app/views/guides/show.html.erb | 4 ++ app/views/layouts/guides.html.erb | 45 ++++++++++++++++++++++ app/views/overview/_sidebar.html.erb | 2 +- app/views/overview/overview.md | 17 +++++--- app/views/overview/starter-projects.md | 44 +++++++++++++++++++++ app/views/shared/_topbar.html.erb | 2 +- config/routes.rb | 3 ++ test/controllers/guides_controller_test.rb | 7 ++++ 13 files changed, 154 insertions(+), 8 deletions(-) create mode 100644 app/controllers/guides_controller.rb create mode 100644 app/helpers/guides_helper.rb create mode 100644 app/views/guides/_sidebar.html.erb create mode 100644 app/views/guides/game-console.md create mode 100644 app/views/guides/overview.md create mode 100644 app/views/guides/show.html.erb create mode 100644 app/views/layouts/guides.html.erb create mode 100644 app/views/overview/starter-projects.md create mode 100644 test/controllers/guides_controller_test.rb diff --git a/app/controllers/guides_controller.rb b/app/controllers/guides_controller.rb new file mode 100644 index 0000000..d182580 --- /dev/null +++ b/app/controllers/guides_controller.rb @@ -0,0 +1,2 @@ +class GuidesController < MarkdownController +end diff --git a/app/helpers/guides_helper.rb b/app/helpers/guides_helper.rb new file mode 100644 index 0000000..446f38a --- /dev/null +++ b/app/helpers/guides_helper.rb @@ -0,0 +1,2 @@ +module GuidesHelper +end diff --git a/app/views/guides/_sidebar.html.erb b/app/views/guides/_sidebar.html.erb new file mode 100644 index 0000000..b8aa685 --- /dev/null +++ b/app/views/guides/_sidebar.html.erb @@ -0,0 +1,17 @@ +
+
+
+ <%# link_to "Projects", projects_path, class: "#{current_page?(projects_path) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 rounded transition duration-100 block" %> + <%= link_to "Overview", guides_page_path("overview"), class: "#{current_page?(guides_page_path("overview")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block font-dystopian" %> + <%# <%= link_to "Project Guidelines", guides_page_path("project-guidelines"), class: "#{current_page?(guides_page_path("project-guidelines")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block font-dystopian" %> + <%# <%= link_to "Submitting", guides_page_path("submitting"), class: "#{current_page?(guides_page_path("submitting")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block font-dystopian" %> + +

The guides!

+ <%= link_to "Game Console", guides_page_path("game-console"), class: "#{current_page?(guides_page_path("game-console")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block font-dystopian" %> + <%# <%= link_to "Other communities", guides_page_path("faq"), class: "#{current_page?(guides_page_path("submit")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 rounded transition duration-100 block font-dystopian" %> +
+
+
+ + + diff --git a/app/views/guides/game-console.md b/app/views/guides/game-console.md new file mode 100644 index 0000000..7435300 --- /dev/null +++ b/app/views/guides/game-console.md @@ -0,0 +1,3 @@ +# Game console + +OOOKay this is a little crazy \ No newline at end of file diff --git a/app/views/guides/overview.md b/app/views/guides/overview.md new file mode 100644 index 0000000..d1353a4 --- /dev/null +++ b/app/views/guides/overview.md @@ -0,0 +1,14 @@ +# Guides + +Welcome! This is a tab where Hack Clubbers (just like you!) can write guides on projects that you've previously built. + +The goal is to have a collection of resources that grows as highway goes on. + +The first one is on how to make a Game Console - check it out on the sidebar! + +#### Contributing + +To contribute, make a markdown file in the app/views/guides folder! Put your guide in there. Afterwards, make a PR with your changes! + +**In return, you'll get rewarded 1 free point for adding a guide** + diff --git a/app/views/guides/show.html.erb b/app/views/guides/show.html.erb new file mode 100644 index 0000000..a4537c6 --- /dev/null +++ b/app/views/guides/show.html.erb @@ -0,0 +1,4 @@ +
+ <%= raw @content %> +
+ diff --git a/app/views/layouts/guides.html.erb b/app/views/layouts/guides.html.erb new file mode 100644 index 0000000..f151b05 --- /dev/null +++ b/app/views/layouts/guides.html.erb @@ -0,0 +1,45 @@ + + + + <%= content_for(:title) || "Highway: Custom Projects" %> + + + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= yield :head %> + + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> + + + + + <%# Includes all stylesheet files in app/assets/stylesheets %> + <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %> + <%= javascript_importmap_tags %> + + + + + + + +
+
+
+ <%= render partial: "guides/sidebar" %> +
+
+
+
<%= render "shared/topbar", class: "sticky top-0" %>
+
+ <%= yield %> +
+
+
+
+
+ + diff --git a/app/views/overview/_sidebar.html.erb b/app/views/overview/_sidebar.html.erb index 1365b8e..6ebda4b 100644 --- a/app/views/overview/_sidebar.html.erb +++ b/app/views/overview/_sidebar.html.erb @@ -3,7 +3,7 @@
<%= link_to "Overview", overview_page_path("overview"), class: "#{current_page?(overview_page_path("overview")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block" %> <%= link_to "The Point System", overview_page_path("point-system"), class: "#{current_page?(overview_page_path("point-system")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block" %> - <%= link_to "How to submit", overview_page_path("submit"), class: "#{current_page?(overview_page_path("submit")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block" %> + <%= link_to "Starter Projects", overview_page_path("starter-projects"), class: "#{current_page?(overview_page_path("starter-projects")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] text-[#AFEFCB] p-2 px-6 rounded transition duration-100 block" %> <%= link_to "Undercity", overview_page_path("undercity"), class: "#{current_page?(overview_page_path("undercity")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block" %> <%= link_to "Parent's Guide", overview_page_path("parents"), class: "#{current_page?(overview_page_path("parents")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-6 rounded transition duration-100 block" %> <%= link_to "FAQ", overview_page_path("faq"), class: "#{current_page?(overview_page_path("faq")) ? 'bg-[#564CAD]' : 'hover:bg-[#564CAD]'} bg-[#2E2A54] p-2 px-4 rounded transition duration-100 block" %> diff --git a/app/views/overview/overview.md b/app/views/overview/overview.md index b1b887e..db8687d 100644 --- a/app/views/overview/overview.md +++ b/app/views/overview/overview.md @@ -14,17 +14,22 @@ If you've *never* done hardware before, this is *your* opportunity to get starte --- ### 1. Build hardware projects -Design & build hardware projects. You can either build fully [Custom Projecs](/advanced) (4/6/10 points) or [Starter Projects](/starter-projects) (4 points), or a mix of both! +Design custom projects. [Submit](/advanced/submitting) them. Get approved. Receive a credit card of up to $350 USD. Buy the parts and build it. Repeat -[Starter Projects](/starter-projects) are existing Hack Club programs that teach you how to make one specific thing, i.e the macropad below. Design your own completely custom one, and we'll ship you the parts to build it. +There's four tiers: - +- **Tier 3:** get 4 points, up to $50 USD +- **Tier 2:** get 6 points, up to $150 USD +- **Tier 1:** get 10 points, up to $350 USD -[Custom projects](/advanced) are fully self-directed! You'll be responsible for all the research, and in return, you'll get a debit card of up to $350* USD to spend on your project! *You must journal your progress while working on custom projects* +Each tier has progressively harder guidelines. Check out the [Custom projects](/advanced) tab for all the info you need - including project guidelines! -(check out the top bar to see more about each path!) -**You can make an unlimited amount of projects, so get building!** +Head on over to the [custom projects](/advanced) are fully self-directed! You'll be responsible for all the research, and in return, you'll get a debit card of up to $350* USD to spend on your project! *You must journal your progress while working on custom projects* + +*You can make an unlimited amount of projects, so get building!* + +**If you're a complete beginner, head on over to check out our [starter projects](/getting-started/starter-projects)! They're designed to help you get jumpstarted** --- diff --git a/app/views/overview/starter-projects.md b/app/views/overview/starter-projects.md new file mode 100644 index 0000000..8deb2ae --- /dev/null +++ b/app/views/overview/starter-projects.md @@ -0,0 +1,44 @@ +# Starter projects! + +**Starter projects** are existing Hack Club programs that are designed to help guide you along your hardware journey! + +They're called YSWSes, short for You Ship, We Ships. You ship a design, we'll ship you the parts! + +**All of the parts will come straight from Hack Club HQ**, so you don't need to worry about sourcing or logistics. Just design & learn. + +*Starter projects will automatically count for points once approved. Submission instructions are on their relative websites* + +--- + +## Hackpad - 4 points + +**Hackpad** is a beginner YSWS that teaches you how to make your very first *macropad* from scratch! It'll help you create your own PCB, design your own 3D printed case, and setup the firmware for it from scratch. + +In return, you'll get all the parts to make your macropad! This includes up to 16 switches, diodes, OLED screens, and more! + + + +[hackpad.hackclub.com](https://hackpad.hackclub.com) + + + +*This is the most popular running hardware YSWS, with over 400 submissions to date* + +--- + +## Solder - 1 point +Solder is a beginner YSWS that teaches you how to make your very first PCB from scratch! + +It'll walk you through the process step-by-step of setting up the software, placing down all the components, and getting it ready for fabrication! + + + +[solder.hackclub.com](https://solder.hackclub.com) + +In return, you'll get a $5 grant to uby your PCB and a kit of hardware components to play around with + + + + + + diff --git a/app/views/shared/_topbar.html.erb b/app/views/shared/_topbar.html.erb index 852ae21..a3ab122 100644 --- a/app/views/shared/_topbar.html.erb +++ b/app/views/shared/_topbar.html.erb @@ -25,8 +25,8 @@