mirror of
https://github.com/System-End/highway.git
synced 2026-04-19 14:17:03 +00:00
refactored site, added new content
This commit is contained in:
parent
ea31d93356
commit
b6b288f0de
13 changed files with 154 additions and 8 deletions
2
app/controllers/guides_controller.rb
Normal file
2
app/controllers/guides_controller.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class GuidesController < MarkdownController
|
||||
end
|
||||
2
app/helpers/guides_helper.rb
Normal file
2
app/helpers/guides_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
module GuidesHelper
|
||||
end
|
||||
17
app/views/guides/_sidebar.html.erb
Normal file
17
app/views/guides/_sidebar.html.erb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="border-t-4 md:border-t-0 md:border-r-4 border-[#2E2A54] text-white h-full flex flex-col gap-4 justify-start mt-8 fixed">
|
||||
<div class="flex flex-col justify-start p-8">
|
||||
<div class="text-center grid grid-cols-1 gap-2 text-xl">
|
||||
<%# 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" %>
|
||||
|
||||
<p class="text-sm font-bold mt-6 text-left align-left">The guides!</p>
|
||||
<%= 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" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
3
app/views/guides/game-console.md
Normal file
3
app/views/guides/game-console.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Game console
|
||||
|
||||
OOOKay this is a little crazy
|
||||
14
app/views/guides/overview.md
Normal file
14
app/views/guides/overview.md
Normal file
|
|
@ -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**
|
||||
|
||||
4
app/views/guides/show.html.erb
Normal file
4
app/views/guides/show.html.erb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<div class="markdown-content font-poppins 2xl:max-w-6xl max-w-5xl md:mx-8 md:ml-16 mx-2">
|
||||
<%= raw @content %>
|
||||
</div>
|
||||
|
||||
45
app/views/layouts/guides.html.erb
Normal file
45
app/views/layouts/guides.html.erb
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= content_for(:title) || "Highway: Custom Projects" %></title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<%= 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) %>
|
||||
|
||||
<link rel="icon" href="/highwaystar.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/icon.png">
|
||||
|
||||
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
||||
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
<script defer data-domain="highway.hackclub.com" src="https://plausible.io/js/script.js"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Knewave&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="">
|
||||
<div class = "grid grid-cols-5">
|
||||
<div class = "col-span-full md:col-span-1 inline md:sticky md:h-screen top-0 mt-8">
|
||||
<%= render partial: "guides/sidebar" %>
|
||||
</div>
|
||||
<div class="max-md:order-first col-span-full md:col-span-4 ">
|
||||
<div class = "flex flex-col h-[100vh]">
|
||||
<div><%= render "shared/topbar", class: "sticky top-0" %></div>
|
||||
<div class = "p-8 md:p-12 mt-14">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="text-center grid grid-cols-1 gap-2 text-xl font-dystopian">
|
||||
<%= 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" %>
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
<img src="https://hackpad.hackclub.com/orpheuspadpic.png" style="max-width: 400px;"></img>
|
||||
- **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**
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
44
app/views/overview/starter-projects.md
Normal file
44
app/views/overview/starter-projects.md
Normal file
|
|
@ -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!
|
||||
|
||||
<img src="https://hackpad.hackclub.com/orpheuspadpic.png" style="max-width: 400px;"></img>
|
||||
|
||||
[hackpad.hackclub.com](https://hackpad.hackclub.com)
|
||||
|
||||
<!-- *hackpad takes on average 8-16 hours to complete.* -->
|
||||
|
||||
*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!
|
||||
|
||||
<img src="https://solder.hackclub.com/hardware/shark.png" style="max-width: 400px;"></img>
|
||||
|
||||
[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
|
||||
|
||||
<!-- *solder takes on average 1-5 hours to complete* -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
<!-- desktop -->
|
||||
<div class="hidden md:flex items-center space-x-6 my-4 ml-8 *:font-dystopian *:uppercase *:hover:underline 2xl:text-2xl text-xl text-center text-[#AFBDEF]">
|
||||
<%= link_to "Getting started", "/getting-started", class: "#{request.path.start_with?('/getting-started') ? 'glow' : ''}" %>
|
||||
<%= link_to "Starter projects", "/starter-projects", class: "text-[#D1AFEF] #{current_page?('/starter-projects') ? 'glow' : ''}" %>
|
||||
<%= link_to "Custom projects", "/advanced", class: "text-[#AFEFCB] #{request.path.start_with?('/advanced') ? 'glow' : ''}" %>
|
||||
<%= link_to "Guides", "/guides", class: "text-[#D1AFEF] #{request.path.start_with?('/guides') ? 'glow' : ''}" %>
|
||||
<%= link_to "Gallery", projects_path, class: "#{current_page?(projects_path) ? 'glow' : ''}" %>
|
||||
<%= link_to "Events", events_path, class: "#{current_page?(events_path) ? 'glow' : ''}" %>
|
||||
<%= link_to "Faq", "/getting-started/faq", class: "#{current_page?('/getting-started/faq') ? 'glow' : ''}" %>
|
||||
|
|
|
|||
|
|
@ -59,5 +59,8 @@ Rails.application.routes.draw do
|
|||
get "/advanced/:page", to: "advanced#show", as: "advanced_page"
|
||||
get "/advanced/", to: redirect("/advanced/overview")
|
||||
|
||||
get "/guides/:page", to: "guides#show", as: "guides_page"
|
||||
get "/guides/", to: redirect("/guides/overview")
|
||||
|
||||
get "/events", to: "events#index"
|
||||
end
|
||||
|
|
|
|||
7
test/controllers/guides_controller_test.rb
Normal file
7
test/controllers/guides_controller_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class GuidesControllerTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue