mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
erb_linting (#637)
* setup lint * lint pass * gh ci/cd lint * okay nvm our code is shit
This commit is contained in:
@@ -164,7 +164,8 @@
|
||||
['Unity', 'unity'], ['Unreal Engine 4', 'unreal-engine-4'], ['Vim', 'vim'], ['Visual Studio', 'visual-studio'], ['VS Code', 'vs-code'],
|
||||
['WebStorm', 'webstorm'], ['Windsurf', 'windsurf'], ['Wing', 'wing'], ['Word', 'word'],
|
||||
['Xcode', 'xcode'], ['Zed', 'zed'], ['Swift Playgrounds', 'swift-playgrounds']
|
||||
].sort_by { |editor| editor[0] } %>
|
||||
].sort_by { |editor| editor[0] }
|
||||
%>
|
||||
<% all_editors.each do |name, slug| %>
|
||||
<a href="<%= doc_path("editors/#{slug}") %>" class="bg-darkless rounded p-2 hover:bg-primary/10 transition-colors text-center block">
|
||||
<img src="/images/editor-icons/<%= slug %>-128.png" alt="<%= name %>" class="w-8 h-8 mx-auto mb-1">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
.prose a:hover {
|
||||
color: var(--color-red) !important;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="mb-8">
|
||||
<h1 class="text-3xl font-bold text-white mb-4">Leaderboard</h1>
|
||||
|
||||
|
||||
<div class="inline-flex rounded-full p-1 mb-4">
|
||||
<%= link_to "Last 24 Hours", leaderboards_path(period_type: 'daily'),
|
||||
class: "px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 #{@period_type == :daily ? 'bg-primary text-white' : 'text-muted bg-darkless hover:text-white'}", style: "background:none; border:none;" %>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</section>
|
||||
<% else %>
|
||||
<section class="bg-orange bg-opacity-10 border border-orange rounded-lg p-6 mb-8">
|
||||
|
||||
|
||||
<div class="flex items-center gap-3 mb-3">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/83/Emergency_Light.gif" alt="Emergency Light" class="w-8 h-8">
|
||||
<h2 class="text-xl font-bold text-dark">No Address Added!</h2>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</section>
|
||||
<% else %>
|
||||
<section class="bg-orange bg-opacity-10 border border-orange rounded-lg p-6 mb-8">
|
||||
|
||||
|
||||
<div class="flex items-center gap-3 mb-3">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/83/Emergency_Light.gif" alt="Emergency Light" class="w-8 h-8">
|
||||
<h2 class="text-xl font-bold text-dark">No Address Added!</h2>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<%= render "shared/user_mention", user: activity.owner %>
|
||||
just hit their first 7 day coding streak!
|
||||
just hit their first 7 day coding streak!
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<%= render "shared/user_mention", user: activity.owner %>
|
||||
was just sent a letter for '<%= activity.parameters[:humanized_mission_type] %>'
|
||||
was just sent a letter for '<%= activity.parameters[:humanized_mission_type] %>'
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<%= render "shared/user_mention", user: activity.owner %>
|
||||
just finished coding on <%= activity.parameters['project'] %>
|
||||
for <%= short_time_simple(activity.parameters['duration_seconds']) %>
|
||||
for <%= short_time_simple(activity.parameters['duration_seconds']) %>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<%= render "shared/user_mention", user: activity.owner %>
|
||||
just signed in for the first time
|
||||
just signed in for the first time
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<% end %>
|
||||
|
||||
<h3 class="text-2xl font-bold text-white mb-2 text-center w-full"><%= title %></h3>
|
||||
|
||||
|
||||
<% if description %>
|
||||
<p class="text-gray-300 mb-6 text-center w-full"><%= description %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -352,4 +352,4 @@
|
||||
window.hackatimeCharts.initializeCharts();
|
||||
}
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<h1 class="font-bold mt-1 mb-1 text-5xl text-center">Track How Much You <span class="text-primary">Code</span></h1>
|
||||
<div class="flex flex-col w-full max-w-[50vw] mx-auto mb-22">
|
||||
<%= link_to slack_auth_path, class: "inline-flex items-center justify-center px-6 py-3 rounded text-white font-bold cursor-pointer border-none w-full my-2 bg-primary" do %>
|
||||
<img src="/images/slack.png" class="h-8 w-8 mr-2 bg-white rounded-full p-1" />
|
||||
<img src="/images/slack.png" class="h-8 w-8 mr-2 bg-white rounded-full p-1">
|
||||
<span class="hidden md:flex">Sign in with Hack Club Slack</span>
|
||||
<% end %>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="relative">
|
||||
<%= email_field_tag :email, nil, placeholder: "Enter your email to get a sign in link", required: true, class: "w-full px-3 py-3 pr-12 border border-gray-600 rounded text-base bg-gray-800 text-white" %>
|
||||
<button type="submit" class="absolute right-2 top-1/2 transform -translate-y-1/2 w-8 h-8 p-1 bg-blue-600 hover:bg-blue-700 rounded cursor-pointer border-none flex items-center justify-center transition-colors">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13.3 20.275q-.3-.3-.3-.7t.3-.7L16.175 16H7q-.825 0-1.412-.587T5 14V5q0-.425.288-.712T6 4t.713.288T7 5v9h9.175l-2.9-2.9q-.3-.3-.288-.7t.288-.7q.3-.3.7-.312t.7.287L19.3 14.3q.15.15.212.325t.063.375t-.063.375t-.212.325l-4.575 4.575q-.3.3-.712.3t-.713-.3"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13.3 20.275q-.3-.3-.3-.7t.3-.7L16.175 16H7q-.825 0-1.412-.587T5 14V5q0-.425.288-.712T6 4t.713.288T7 5v9h9.175l-2.9-2.9q-.3-.3-.288-.7t.288-.7q.3-.3.7-.312t.7.287L19.3 14.3q.15.15.212.325t.063.375t-.063.375t-.212.325l-4.575 4.575q-.3.3-.712.3t-.713-.3" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -109,7 +109,7 @@
|
||||
<p class="text-primary monospace text-[20px]">Don't commit fraud lol ;)</p>
|
||||
<div class="flex flex-col md:flex-row bg-[url('/images/som-bg.png')] mt-4 mb-4 rounded-lg">
|
||||
<div class="w-full md:w-1/2 p-8">
|
||||
<img src="/images/som.png" class="h-2/3 mx-auto md:mx-0 mb-6" />
|
||||
<img src="/images/som.png" class="h-2/3 mx-auto md:mx-0 mb-6">
|
||||
<%= link_to "Start building", "https://summer.hackclub.com/", class: "inline-block bg-[#592F31] font-primary font-bold text-[#f6dbba] px-4 py-2 rounded-[100px] text-[22px] hover:scale-105 transition-transform duration-200", target: "_blank" %>
|
||||
</div>
|
||||
<div class="w-full md:w-1/2 p-8 pl-4 pr-4 grid grid-cols-1 gap-4">
|
||||
@@ -125,10 +125,10 @@
|
||||
</div>
|
||||
<div class="flex flex-col md:flex-row bg-gradient-to-r from-[#EFCCCC] to-[#D35648] mt-4 mb-4 rounded-lg">
|
||||
<div class="w-full md:w-1/3 translate-y-[-20px]">
|
||||
<img src="/images/athena.png" class="w-[400px]" />
|
||||
<img src="/images/athena.png" class="w-[400px]">
|
||||
</div>
|
||||
<div class="w-full md:w-2/3 p-8 pl-4 pr-4">
|
||||
<img src="/images/athena_award.svg" class="h-24 mb-4" />
|
||||
<img src="/images/athena_award.svg" class="h-24 mb-4">
|
||||
<p class="text-[18px] m-4">Earn an <b>industry recognized technical certificate</b> for coding 30 hours and building 3 personal projects. Win prizes as you code, and a chance to travel to NYC for 2025's largest high school hackathon for girls.</p>
|
||||
<%= link_to "Join Athena", "https://athena.hackclub.com/", class: "inline-block bg-white font-primary font-bold text-[#D35648] px-4 py-2 m-4 rounded-[100px] text-[22px] hover:scale-105 transition-transform duration-200", target: "_blank" %>
|
||||
</div>
|
||||
|
||||
@@ -37,26 +37,26 @@
|
||||
<h1 class="text-4xl font-bold mb-6 text-center">
|
||||
What is <span class="text-primary">Hackatime</span>?
|
||||
</h1>
|
||||
|
||||
|
||||
<div class="bg-dark rounded-lg p-8 mb-8">
|
||||
<p class="text-lg mb-6">
|
||||
<strong class="text-primary">Hackatime</strong> is a free, open-source coding time tracker built by <a href="https://hackclub.com" target="_blank" class="text-primary hover:text-red underline">Hack Club</a> for high school students and developers who want to understand their programming habits.
|
||||
</p>
|
||||
|
||||
|
||||
<p class="text-lg mb-6">
|
||||
Unlike other time tracking tools, <strong>Hackatime</strong> is completely free and designed specifically for the Hack Club community. It helps you see exactly how much time you spend coding, which programming languages you use most, and which editors you prefer.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 class="text-2xl font-semibold text-primary mb-4">How Hackatime Works</h2>
|
||||
<p class="text-lg mb-6">
|
||||
<strong>Hackatime</strong> tracks your coding activity automatically by monitoring when you're actively typing in your code editor. It works with over 75 different editors including VS Code, JetBrains IDEs, vim, emacs, and many more.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 class="text-2xl font-semibold text-primary mb-4">Why Hackatime Exists</h2>
|
||||
<p class="text-lg mb-6">
|
||||
<strong>Hackatime</strong> was created because Hack Club believes that the more time you spend making things, the better you get at building cool projects. By tracking your coding time, you can see your progress and stay motivated to keep building.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 class="text-2xl font-semibold text-primary mb-4">Key Features of Hackatime</h2>
|
||||
<ul class="list-disc list-inside text-lg mb-6 space-y-2">
|
||||
<li><strong>Completely free</strong> - No paid plans or hidden costs</li>
|
||||
@@ -66,20 +66,20 @@
|
||||
<li><strong>Community leaderboards</strong> - Compare with other Hack Clubbers</li>
|
||||
<li><strong>Privacy-focused</strong> - Minimal data is collected for time tracking. File contents are never sent to our servers or stored.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 class="text-2xl font-semibold text-primary mb-4">Getting Started with Hackatime</h2>
|
||||
<p class="text-lg mb-6">
|
||||
To start using <strong>Hackatime</strong>, simply sign in with your Hack Club Slack account or email. Once you're logged in, install the editor plugin for your preferred code editor and start coding. <strong>Hackatime</strong> will automatically begin tracking your time.
|
||||
</p>
|
||||
|
||||
|
||||
<div class="text-center mt-8">
|
||||
<%= link_to "Get Started with Hackatime", root_path, class: "inline-block bg-primary text-white font-bold px-8 py-3 rounded-lg hover:bg-red-600 transition-colors duration-200" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-center text-gray-400 text-sm">
|
||||
<p>
|
||||
<strong>Hackatime</strong> is built and maintained by the Hack Club community.
|
||||
<strong>Hackatime</strong> is built and maintained by the Hack Club community.
|
||||
<%= link_to "Learn more about Hack Club", "https://hackclub.com", target: "_blank", class: "text-primary hover:text-red underline" %>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
<div class="text-sm text-gray-300">Total Coding Time</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-800 border border-gray-600 rounded p-4">
|
||||
<div class="bg-gray-800 border border-gray-600 rounded p-4">
|
||||
<div class="text-center">
|
||||
<div class="text-2xl font-bold text-primary mb-1"><%= @user.heartbeats.where("time >= ?", 7.days.ago.to_f).count %></div>
|
||||
<div class="text-sm text-gray-300">Heartbeats in the Last 7 Days</div>
|
||||
@@ -459,7 +459,7 @@
|
||||
|
||||
<%= link_to "#",
|
||||
class: "w-full bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded font-medium transition-colors inline-flex items-center justify-center gap-2",
|
||||
data: {
|
||||
data: {
|
||||
controller: "heartbeat-export",
|
||||
action: "click->heartbeat-export#handleExport"
|
||||
} do %>
|
||||
@@ -491,14 +491,14 @@
|
||||
<%= form_with url: import_my_heartbeats_path, method: :post, multipart: true, local: true, class: "space-y-4" do |form| %>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-300 mb-2">Select JSON File</label>
|
||||
<%= form.file_field :heartbeat_file,
|
||||
<%= form.file_field :heartbeat_file,
|
||||
accept: ".json,application/json",
|
||||
class: "w-full px-3 py-2 bg-gray-700 border border-gray-600 rounded text-white file:mr-4 file:py-2 file:px-4 file:rounded file:border-0 file:text-sm file:font-semibold file:bg-primary file:text-white hover:file:bg-red transition-colors",
|
||||
required: true %>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-3">
|
||||
<%= form.submit "Import Heartbeats",
|
||||
<%= form.submit "Import Heartbeats",
|
||||
class: "bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded font-medium transition-colors inline-flex items-center gap-2",
|
||||
data: { confirm: "Are you sure you want to import heartbeats? This will add new data to your account." } %>
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@ git clone https://github.com/wakatime/vim-wakatime.git</code></pre>
|
||||
<strong>Hackatime works with any editor that supports WakaTime!</strong> This includes PyCharm, IntelliJ, Sublime Text, Atom, Neovim, Unity, Godot, and <a href="https://hackatime.hackclub.com/docs#supported-editors" class="text-cyan hover:text-blue underline">77+ more editors</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<h4 class="font-bold mb-2 text-lg">Popular Editors:</h4>
|
||||
|
||||
Reference in New Issue
Block a user