Skip to content
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
4 changes: 4 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ function App() {
</Modal>
</nav>
<div className="container-xxl py-3 rounded">
<p className="mb-3 text-muted" style={{ fontSize: "0.95rem", lineHeight: "1.5" }}>
<strong>This really is the best mortgage calculator!</strong> Choose a fixed monthly payment or choose a house price. Add household expenses,
repeating overpayments, recast mortgages, even account for inflation. Then download it to a spreadsheet or share the URL.
</p>
<ModeToggle chosenInput={chosenInput} displayState={displayState} valid={valid} flash={flash} userInput={userInput} updateUserInput={updateUserInput} />

<div className="row mx-0">
Expand Down
8 changes: 7 additions & 1 deletion src/EventsForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function EventsForm({ loanMonths, loanRes, loanEvent, setLoanEvent, monthlyPayme
}

return (
<div className="row shadow-sm border rounded py-2 mx-0" key="row0" style={{ backgroundColor: "white" }}>
<div className="row shadow-sm border rounded pb-2 mx-0" key="row0" style={{ backgroundColor: "white" }}>
<ToastContainer position="top-end" className="pt-4">
<Toast show={showEventToast} onClose={() => setShowEventToast(false)} delay={3000} autohide bg="info">
<Toast.Header>
Expand All @@ -120,6 +120,12 @@ function EventsForm({ loanMonths, loanRes, loanEvent, setLoanEvent, monthlyPayme
</Toast>
</ToastContainer>

<div className="col-12 text-center py-1">
<small>
<i>Mortgage events</i>
</small>
</div>

<div className="col-12" key="col0">
<div className="row">
<div className="col-12" key="col1">
Expand Down
63 changes: 39 additions & 24 deletions src/LoanForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ function LoanForm({ displayState, flash, updateUserInput, valid }) {

return (
<div>
<div className="row shadow-sm border rounded mb-3 py-2 mx-0" style={{ backgroundColor: "white" }}>
<div className="row shadow-sm border rounded pb-2 mb-3 mx-0" style={{ backgroundColor: "white" }}>
<div className="col-12 text-center py-1">
<small>
<i>Mortgage Details</i>
</small>
</div>
<div className="col-12">
<label>Down Payment</label>
<div className="input-group mb-1">
Expand Down Expand Up @@ -186,30 +191,40 @@ function LoanForm({ displayState, flash, updateUserInput, valid }) {
</div>
</div>

<div className="row shadow-sm border rounded py-2 mx-0" style={{ backgroundColor: "white" }}>
<div className="col-12 d-flex align-items-end justify-content-end">
<button
type="button"
className="btn btn-link py-0"
onClick={() => {
updateUserInput("propertyTaxUnit", 2);
updateUserInput("hoaUnit", 1);
updateUserInput("pmiUnit", 4);
updateUserInput("utilitiesUnit", 1);
updateUserInput("maintenanceUnit", 1);
updateUserInput("insuranceUnit", 0);
<div className="row shadow-sm border rounded pb-2 mx-0" style={{ backgroundColor: "white" }}>
<div className="col-12 py-1">
<div className="d-flex align-items-center justify-content-between flex-wrap">
<div className="order-2 order-md-1 flex-grow-1 d-md-block d-none"></div>
<div className="order-1 order-md-2 text-center flex-grow-1">
<small>
<i>Household expenses</i>
</small>
</div>
<div className="order-3 order-md-3 text-end">
<button
type="button"
className="btn btn-link py-0"
onClick={() => {
updateUserInput("propertyTaxUnit", 2);
updateUserInput("hoaUnit", 1);
updateUserInput("pmiUnit", 4);
updateUserInput("utilitiesUnit", 1);
updateUserInput("maintenanceUnit", 1);
updateUserInput("insuranceUnit", 0);

updateUserInput("propertyTax", "1.00");
updateUserInput("hoa", "300");
if (displayState["downPayPercent"] < 20) updateUserInput("pmi", "1.5");
else updateUserInput("pmi", "0");
updateUserInput("utilities", "120");
updateUserInput("maintenance", "300");
updateUserInput("insurance", "1000");
}}
>
Populate with estimates
</button>
updateUserInput("propertyTax", "1.00");
updateUserInput("hoa", "300");
if (displayState["downPayPercent"] < 20) updateUserInput("pmi", "1.5");
else updateUserInput("pmi", "0");
updateUserInput("utilities", "120");
updateUserInput("maintenance", "300");
updateUserInput("insurance", "1000");
}}
>
Populate with estimates
</button>
</div>
</div>
</div>
<div className="col-xxl-4 col-sm-6 col-12">
<label>Property Tax</label>
Expand Down
7 changes: 6 additions & 1 deletion src/LoanPlot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ function LoanPlot({ maxMonthly, loanRes, loanMonths, propertyTax, hoa, pmi, util
};

return (
<div className="row shadow-sm border rounded mb-3 py-1 mx-2 px-1" style={{ backgroundColor: "white" }}>
<div className="row shadow-sm border rounded pb-1 mb-3 mx-2 px-1" style={{ backgroundColor: "white" }}>
<div className="col-12 text-center py-1">
<small>
<i>Graph showing payment breakdown over time</i>
</small>
</div>
<div className="col-12 px-0">
<div className="plotHeight">
<Chart type="bar" data={data} options={options} />
Expand Down
6 changes: 5 additions & 1 deletion src/Rent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ function Rent({ loanMonths, inflation, downPayment, equity, homeVal, monthlyPaym
// Render chart with explanatory paragraph
return (
<>
<div className="col-12 text-center py-1">
<small>
<i>Instead of buying a home, what if that money was invested in the stock market?</i>
</small>
</div>
<div className="col-12">
<h5 className="my-2"> Instead of buying a home, what if that money was invested in the stock market?</h5>
<ul>
<li>Invested the down payment of {cashFormat(downPayment)}</li>
<li>
Expand Down