-
Notifications
You must be signed in to change notification settings - Fork 4
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
Date-aware css #8
Comments
This is hard to solve with Liquid alone. Liquid is very restrictive about letting us construct arbitrary code (A good thing). Implementing this in Liquid would only change when the page rebuilds, so if we don't rebuild the site and an assignment opens or closes we have no way of keeping track. What we can do instead is use Javascript. Javascript lets us do some very complex things to styling and use code that doesn't make me want to claw out my eyes. Use the liquid template to create a Using javascript something like (this code is incomplete, and broken):
Keep in mind this method I've described isn't exactly what we want to do. We probably want to keep items hidden until a little ways before the due date. We probably should add a new attribute to each assignment in its YAML header describing the due date and visibility date and compare to that. Also the JavaScript Date Object thinks in UTC. We probably need to adjust for that and subtract four or five hours from everything we do. |
Potentially partially resolved by #74 in Spring2014. |
Nice work on #74. The js you wrote will definitely work to solve this. In fact we could merge it in if we document how to add those little tags to the sessions like you did. Only component we'd need to add for user-friendliness (and style points) is a way to automatically generate these date tags. That might work if schedule became a concatenation of all posts with category |
This would be pretty hacky, but we could generate the list of assignments in a |
Not sure how to do this just yet. Jekyll is static, but if we can get CSS to know about the date we can make assignments or notes that haven't happened yet height 0. This allows the instructor to control the date they're displayed.
The text was updated successfully, but these errors were encountered: