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

Recipe timings #39

Open
wants to merge 11 commits into
base: gh-pages
Choose a base branch
from
Open

Recipe timings #39

wants to merge 11 commits into from

Conversation

rathgar
Copy link
Contributor

@rathgar rathgar commented Apr 30, 2020

This is a complete rewrite of the previous attempt. This time using pure javascript to process ISO8601 durations. It's not perfect but means this feature will work in gh_pages environments as well as normal deployments.

Recipes will use ISO8601 formats as per previous PR but they will be able to use lowercase which should aid readability:

preptime: PT1h20m
cooktime: PT18m

The PT bit is needed as mentioned before to separate M (months) from M (minutes) although we could drop the initial P if that helps.

This does support translations and I've included english by default. There is currently no way (that I am aware of) that the app makes a language selection available to the js environment so it can't switch yet but the capability is there when it does.

Here's an exaggerated example:

image

and a more typical one:

image

also now works with components:

image

and related schema microformats
Wholly via javascript with no dependencies. This allows for it to be fully compatible with gh_pages
Wholly via javascript with no dependencies. This allows for it to be fully compatible with gh_pages
Allow users to use lowercase in the definitions. This can lead to better readability:

preptime:  1h20m
allows for multiple timings per page like when using components
foosel added a commit to foosel/food.foosel.net that referenced this pull request Oct 25, 2020
As implemented in clarklab/chowdown#39, extended to include total and
active time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant