Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style cards on dashboard. #55

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/views/components/_income_switch.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%= form_with url: income_switch_url, local: true do |form| %>
<label class="relative inline-flex items-center cursor-pointer">
<%= form.check_box :enabled, class: "sr-only peer", onchange: "this.form.requestSubmit()" %>
<div class="w-11 h-6 bg-gray-800 peer-focus:outline-none rounded-full peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-800"></div>
<span class="ms-3 text-sm font-medium text-gray-900">Switch income type</span>
<div class="w-11 h-6 bg-gray-800 peer-focus:outline-none rounded-full peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-purple"></div>
</label>
<% end %>
18 changes: 13 additions & 5 deletions app/views/dashboard/_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<div class="min-h-full">
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<div class="mb-2">
<strong>Budget Calculator</strong>
</div>

<div class="grid grid-cols-3">
<h3>Final Budget</h3>
<div>Switch Income Type</div>
<div>Savings Rate %</div>
<div>Investing Rate %</div>
</div>
Expand Down Expand Up @@ -62,8 +66,10 @@
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<%= turbo_frame_tag "income_header_frame" do %>
<h1>Income</h1>
<%= link_to "New Income", new_income_path, data: { turbo_frame: :incomes }, class: "btn btn-primary" %>
<strong>Incomes</strong>
<div class="mt-4">
<%= link_to "New Income", new_income_path, data: { turbo_frame: :incomes }, class: "btn btn-primary" %>
</div>
<% end %>

<div class="pt-4">
Expand All @@ -80,8 +86,10 @@
<div class="primary-card">
<div class="mx-auto py-6 sm:px-6 lg:px-8">
<%= turbo_frame_tag "fixed_expense_header_frame" do %>
<h3>Fixed Expenses</h3>
<%= link_to "New Fixed Expense", new_fixed_expense_path, data: { turbo_frame: :fixed_expenses }, class: "btn btn-primary" %>
<strong>Fixed Expenses</strong>
<div class="mt-4">
<%= link_to "New Fixed Expense", new_fixed_expense_path, data: { turbo_frame: :fixed_expenses }, class: "btn btn-primary" %>
</div>
<% end %>

<%= render "fixed_expenses/index" %>
Expand Down