Commit Graph

19 Commits

Author SHA1 Message Date
Wojciech Kwolek 716055cf6a CSS (forms) refactoring (#13)
CSS (forms) refactoring

* All forms now use the render_field helper.
* CSS is now compiled using PostCSS.
* Common form styles got extracted to more reusable & flexible classes.

Closes #12.

Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/13
2020-09-27 17:50:12 +00:00
Wojciech Kwolek cc6e0efab8 Implement timezones and start of day. (#11)
add a script to pre-fill the timezone on the registration page

add created_on, copy values from accomplishment.time, normalize accomplishment.time

make the start_of_day and timezone migration work on pre-existing databases

Switched the code to use the Day class everywhere.

* Removed timeutils.py.
* Added from_str method to the Day class.
* Implemented __add__ and __sub__ operators for the Day class.
  You can now get the next day by writing `day + 1` (or any other
  integer.)
* Fixed Day.today: it used to take the "self" argument, despite being
  a static method.
* Made the settings view use pytz.all_timezones instead of
  pytz.common_timezones, to make sure everyone's included.

Made Day class aware of the user's settings.

It now takes the start-of-day hour and the timezone from the user's
profile.

Moreover, equality and comparison operators were implemented, as well as
__repr__.

Implemented is_today and is_future.

implement saving the settings form

Added settings templates + cosmetics

* Refactored render_field to support SelectFields to avoid code
  duplication
* Introduced the /settings route, the logic for which the logic is not
  yet implemented
* Fixed missing > in one of the favicon <link>s in <head>
* Added a Home and Settings link to the navigation area in the header
* Made the card width consistent (login/logout/register used to be less
  wide than the other views)
* Centered the "Are you sure you want to log out?" text

added timezone selector to registration

basic implementation for getting the current day for the user

initial implementation of the new Day class

Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/11
2020-09-26 16:32:37 +00:00
Wojciech Kwolek a899d1c1be extend the graph to the right 2020-09-14 15:20:26 +02:00
Wojciech Kwolek e5163946b8 add a timestamp to graph.svg to avoid caching 2020-09-14 00:37:51 +02:00
Wojciech Kwolek ad2f8d9093 add graph of total exp per day for last 7 days 2020-09-14 00:27:42 +02:00
Wojciech Kwolek 64037e5a7a don't show the add link for today 2020-09-03 12:56:35 +02:00
Wojciech Kwolek 1e7bd63910 allow adding accomplishments to previous days 2020-09-03 12:53:50 +02:00
Wojciech Kwolek 07e6660199 add app icons and the PWA manifest 2020-09-01 00:39:32 +02:00
Wojciech Kwolek 1ec4f14a4a add statistics 2020-08-31 22:42:57 +02:00
Wojciech Kwolek 20849b8ee5 Allow editing accomplishments
Squashed commit of the following:

commit 97029311b87954d28b127c4d036c10ed5c13c632
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 22:29:53 2020 +0200

    allow editing accomplishments

commit 199462a9a62723ebe7183925f2d616d41e21eded
Merge: d094e32 4f1b750
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 21:48:09 2020 +0200

    Merge branch 'master' into feature/edit

commit d094e321c7e9d526646adad411d47fd03dc4d37b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 20:59:53 2020 +0200

    implement deleting accomplishments

commit 5c33caba1baf0ad6a0c62cccba35209c7e28a71c
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 17:33:12 2020 +0200

    add edit buttons to the day view

commit 6cc826c5cbb0a0260f5745a8392c3bc92afb6c71
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 16:38:35 2020 +0200

    add __pycache__ to gitignore

commit 1593e4c6cfa1a45096421292152185579a449e53
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 16:35:40 2020 +0200

    extract a method for getting all day related data for a template
2020-08-31 22:30:08 +02:00
Wojciech Kwolek 9ce5ac4ff9 fix missing title in main/delete.html 2020-08-31 21:14:20 +02:00
Wojciech Kwolek 48bb2ea42f cache busting 2020-08-31 21:10:37 +02:00
Wojciech Kwolek d78e483ad2 allow deleting accomplishment
Squashed commit of the following:

commit 846aa01f3bb2e88cc2141506dbad8fefce1cf75b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 21:02:58 2020 +0200

    remove unimplemented edit link

commit d094e321c7e9d526646adad411d47fd03dc4d37b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 20:59:53 2020 +0200

    implement deleting accomplishments

commit 5c33caba1baf0ad6a0c62cccba35209c7e28a71c
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 17:33:12 2020 +0200

    add edit buttons to the day view

commit 6cc826c5cbb0a0260f5745a8392c3bc92afb6c71
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 16:38:35 2020 +0200

    add __pycache__ to gitignore

commit 1593e4c6cfa1a45096421292152185579a449e53
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Mon Aug 31 16:35:40 2020 +0200

    extract a method for getting all day related data for a template
2020-08-31 21:03:31 +02:00
Wojciech Kwolek 7f440df1cb add titles to pages 2020-08-29 21:18:05 +02:00
Wojciech Kwolek bfed879d18 cosmetic changes 2020-08-29 20:21:59 +02:00
Wojciech Kwolek 8f93561c0a add some copy on the homepage 2020-08-29 20:14:57 +02:00
Wojciech Kwolek 7a860bc3c6 Add Turbolinks 2020-08-29 19:50:48 +02:00
wojciech 7265866fe2 Implement accomplishment logging functionality
Allow browsing historical accomplishments.

Created a timeutils module, which contains all time-related logic, to
allow easier extension later (for when I'll be implementing timezones
and custom day-start hours)

show today's accomplishements on the main page

extract main.handle_accomplishment_submission function

handle adding new accomplishments to the database

add header and add accomplishment UI

extract .card css component

add Accomplishment model

Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/1
2020-08-29 17:41:18 +00:00
Wojciech Kwolek 294e93d1b7 Implement login functionality
Squashed commit of the following:

commit 4e6ba2b6b8c1ee9dfec97af2057c3a150a50d716
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Sat Aug 29 13:59:50 2020 +0200

    Implement registering, log in an out logic. Show errors in the forms.

commit d1c1ab67564416580a242f97af48c59b6cc54e45
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Fri Aug 28 13:39:12 2020 +0200

    add login form

commit 0b643968c7d02b4bd47825d066459bcc9bb8a405
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Fri Aug 28 13:14:32 2020 +0200

    add tailwindcss and sign-up form template

commit 65c49de0f50500e8e69b86d14cdd29e63619854a
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date:   Thu Aug 27 19:38:35 2020 +0200

    add db with migrations, add User model and signup form class
2020-08-29 14:06:20 +02:00