-
Notifications
You must be signed in to change notification settings - Fork 117
Responsive #46
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
Responsive #46
Conversation
Add responsive flag to automatically switch between desktop & mini versions of viewer.
|
We can probably add these options to the wordpress plugin, too, right? |
|
@eyeseast yep. Goal is to use the responsive flag for now, and then once we've got everything nailed down, shift the behavior to default and ignore the responsive flag. |
|
Cool. What do you think about making responsive the default for the shortcode? Or maybe adding it to the site options, like width and height? |
|
Whoa there -- we shouldn't change the default. That would break all of the old "fluid" embeds. Instead, we should make "responsive: true" part of the default embed code that the workspace generates for you... That can be done whenever. |
|
I'm just talking about the WP Plugin that writes the embed code. I can make it use I'll probably do this in a WP setting, so people can default to responsive or not, like we do for width and height. |
Here's a first draft — (but it fixes a lot of wonkiness and mobile bugs, and kills a bit of complexity, so I think it's worth merging) — of responsive document viewers.
New API options:
{responsive: true}, and{responsiveOffset: 100}.The
responsiveOffsetdefaults to 100, but you can override it. You'd use it to determine how much smaller you'd like your document to be than the vertical viewport size. For example, large fixed headers like the New Yorker might want 150.Kick the tires on the test page that has the container CSS'd with a few different breakpoints: viewer-responsive.html