mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 16:38:23 +00:00
* Better emails! * Fix tests? * bit o' cleanup * add rant * pt2 * pt3 * Update tests * oop * man what on earth * ffs!!!!! * Revert "ffs!!!!!" This reverts commit b58bfed0f4c6288e95d0a111aeb3d7d7900ac9e7. * Revert "man what on earth" This reverts commit 8752cc2200eb3b852ea545d10ccbd555ab09d2b4. * Revert "Fix tests?" This reverts commit 810ebde73376ff7da0595e6b927f1b464d62b4a4. * Ignore external Google Fonts link in premailer
75 lines
3.4 KiB
Text
75 lines
3.4 KiB
Text
<h1 class="text-2xl font-bold text-gray-900 tracking-tight mt-2 mb-0">
|
|
Your coding recap
|
|
</h1>
|
|
<p class="text-sm text-gray-600 mt-2 mb-0">
|
|
<%= @period_label %>
|
|
</p>
|
|
<p class="text-base text-gray-700 mt-4 mb-0">
|
|
Hi <%= h(@user.display_name) %>, here is your weekly coding snapshot from Hackatime.
|
|
</p>
|
|
|
|
<div class="mt-6 rounded-xl overflow-hidden bg-white" style="border: 1px solid #dbe4ee;">
|
|
<div class="px-5 py-4 bg-gray-50" style="border-bottom: 1px solid #e2e8f0;">
|
|
<p class="text-xs text-gray-400 m-0">Total coding time</p>
|
|
<p class="text-3xl font-bold text-gray-900 tracking-tight mt-2 mb-0">
|
|
<%= short_time_simple(@total_seconds) %>
|
|
</p>
|
|
</div>
|
|
|
|
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
|
|
<tr>
|
|
<td class="px-4 py-3 align-top" style="width: 33.33%; border-right: 1px solid #e2e8f0;">
|
|
<p class="text-xs text-gray-400 m-0">Daily average</p>
|
|
<p class="text-lg font-semibold text-gray-900 mt-1 mb-0"><%= short_time_simple(@daily_average_seconds) %></p>
|
|
</td>
|
|
<td class="px-4 py-3 align-top" style="width: 33.33%; border-right: 1px solid #e2e8f0;">
|
|
<p class="text-xs text-gray-400 m-0">Active days</p>
|
|
<p class="text-lg font-semibold text-gray-900 mt-1 mb-0"><%= @active_days %>/7</p>
|
|
</td>
|
|
<td class="px-4 py-3 align-top" style="width: 33.33%;">
|
|
<p class="text-xs text-gray-400 m-0">Heartbeats</p>
|
|
<p class="text-lg font-semibold text-gray-900 mt-1 mb-0"><%= @total_heartbeats %></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<% if @total_seconds.zero? %>
|
|
<div class="mt-6 p-4 rounded-lg bg-gray-50" style="border: 1px solid #e2e8f0;">
|
|
<p class="text-sm text-gray-700 m-0">
|
|
No coding activity was recorded this week. Start a new session and your next summary will include your project and language breakdown.
|
|
</p>
|
|
</div>
|
|
<% else %>
|
|
<div class="mt-6 p-4 rounded-lg bg-white" style="border: 1px solid #e2e8f0;">
|
|
<p class="text-sm font-bold text-gray-900 m-0">Top projects</p>
|
|
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; margin-top: 10px;">
|
|
<% @top_projects.each_with_index do |project, index| %>
|
|
<tr>
|
|
<td class="text-sm text-gray-700 py-2.5" style="<%= index.positive? ? 'border-top: 1px solid #e2e8f0;' : '' %>">
|
|
<%= project[:name] %>
|
|
</td>
|
|
<td align="right" class="text-sm font-semibold text-gray-900 py-2.5" style="<%= index.positive? ? 'border-top: 1px solid #e2e8f0;' : '' %>">
|
|
<%= project[:duration_label] %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-4 p-4 rounded-lg bg-white" style="border: 1px solid #e2e8f0;">
|
|
<p class="text-sm font-bold text-gray-900 m-0">Top languages</p>
|
|
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse; margin-top: 10px;">
|
|
<% @top_languages.each_with_index do |language, index| %>
|
|
<tr>
|
|
<td class="text-sm text-gray-700 py-2.5" style="<%= index.positive? ? 'border-top: 1px solid #e2e8f0;' : '' %>">
|
|
<%= language[:name] %>
|
|
</td>
|
|
<td align="right" class="text-sm font-semibold text-gray-900 py-2.5" style="<%= index.positive? ? 'border-top: 1px solid #e2e8f0;' : '' %>">
|
|
<%= language[:duration_label] %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
</div>
|
|
<% end %>
|