Commit graph

16 commits

Author SHA1 Message Date
William Carroll
69b6bda01b Style habit screen to accommodate footer
Add spacing to the bottom to make space for the footer.
2020-11-12 11:19:30 +00:00
William Carroll
2290aac2a8 Tweak styles
Add spacing to help the app breathe.
2020-10-11 16:47:31 +01:00
William Carroll
767fed75c3 Support multiple HabitTypes
I could have and should have broken this change into smaller pieces, but when I
came up for air, I had changed too much, and most of the changes are
intermingled. Oh well... this is an exciting change!

Include habits for:
- Morning
- Evening
- Payday (the 25th)
- First of the Month
- First of the Year

Since the Morning and Evening routines might be a bit noisy, I'm excluding them
from the output using a flag, `include{Morning,Evening}`, which I support in the
UI to toggle their visibility.

I made *much* more progress on this app that I expected to today, and I *think*
-- short of supporting a database and a server -- I'm close to
being *completely* finished.

Wahoo!
2020-10-11 16:40:10 +01:00
William Carroll
abf1875934 Support Msg to clear all completed tasks
Add a simple button to clear all completed tasks.
2020-10-11 15:39:01 +01:00
William Carroll
79cf42abd5 Render time remaining in UI
Show the number of minutes remaining before completing all of the tasks.
2020-10-11 15:17:20 +01:00
William Carroll
5684608fed Move tailwind function into Utils module
Instead of accepting `List (String, Int)`, accept `List Strategy` where
`Strategy` defines whether or not the string of selectors should be applied to
the element.

I'm also renaming it `class` so I can just use `Utils.class`; `tailwind` has
little to do with the function itself.
2020-10-11 14:59:42 +01:00
William Carroll
1c8a8f5d2c Expand Habit type
Include:

- habitType: Daily, Weekly, Yearly... what's the trigger?
- minutesDuration: Estimation of how long it'll take to complete
2020-10-11 14:58:49 +01:00
William Carroll
05d52e403c Tweak styles
- Change header to blue
- Change habit to gray when completed
- Prefer app font for footer instead of monospaced font
2020-10-11 10:24:11 +01:00
William Carroll
0a15ea7366 Create UI module for common components
Create UI.elm to house components like `button`, which is a simple HTML button
with `focus:outline-none` applied as a `class`, which is an accessibility
feature that I don't need for this touch-screen application.

I like this pattern more than my more opinionated patterns for UI modules in Elm
where I'd define all of the arguments as a record type (i.e. kwargs).
2020-10-11 10:15:03 +01:00
William Carroll
106457de4b Prefer handwritten font
Use the Google Fonts API to fetch a handwritten font, which gives the app a
modicum of personality. There are more "best practices" ways to do this, such
as:

- Download the font once, and include it in the bundle
- Extend the Tailwind configure to recognize the font
- Ditch the inline <style> block

But I don't need the performance benefits that the first bullet provides. And
the second two bullets are more relevant for a larger application with more than
one font. So I think in this case, the easiest solution is best.

Also:
- Use `container` and `mx-auto` to constrain content for wide screens
2020-10-11 10:09:15 +01:00
William Carroll
19fbdad1c0 Support viewing different days
Allow users to browse the habits of the other days of the week.
2020-10-10 18:20:24 +01:00
William Carroll
487232d1aa Ensure weekday is updated
This ensures us that our view is consistent within ~1 minute of reality.
2020-10-10 17:34:14 +01:00
William Carroll
7d425de48d Tweak styles
- Increase font size for header
- Prefer a bulleted list
- Reduce horizontal padding
2020-10-10 17:31:34 +01:00
William Carroll
bfbe7dc988 Add a footer
With personal information and information about the project's stack.
2020-10-10 17:31:00 +01:00
William Carroll
df8e45681d Remove Nap from Saturday; prefer Yin Yoga
Since Warm Yin Yoga is at 15:00, it's difficult to attend that *and* nap.
2020-10-10 17:30:22 +01:00
William Carroll
9d331f3077 Begin working on Habit Screens project
Created a small MVP for digitizing my weekly habits. Much more to come.

Lots of things happening:

- Copied the boilerplate to get started
- Added a brief project-level README
- Outlined my ambitions in design.md

See README and design.md for more context on this project.
2020-10-10 17:04:24 +01:00