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

Add .slideView or .preView class if loaded in console #827

Merged
merged 4 commits into from
Dec 19, 2022

Conversation

fnogatz
Copy link
Contributor

@fnogatz fnogatz commented Nov 22, 2022

The impress console is a really useful tool for presenters. As of now, it is however not possible to change the slide's style only for the slideView (current slide) or only for the preView (next slide). We can't use CSS here as it is not aware of the fact if the page is loaded in an iframe.

The impressConsole.js already dynamically adds the class impress-console to the body of both iframes. This PR additionally adds the slideView and preView class, respectively. As a result, we can for instance hide the progress, progressbar and toolbar only in the preView using the following CSS snippet:

.impress-console.preView .impress-progress,
.impress-console.preView .impress-progressbar,
.impress-console.preView #impress-toolbar {
  display: none;
}

A real-world example that uses the proposed change can be found in the slides' console of my PhD defense (source code).

@henrikingo
Copy link
Member

Thanks again Falco! In fact, this has bothered myself too I think.

Would you like to add your example CSS to css/impress-common.css. That way users will see it - and let's face it, copy it - from there.

@fnogatz
Copy link
Contributor Author

fnogatz commented Dec 14, 2022

Thank you for the feedback, @henrikingo! I added the CSS as suggested in css/impress-common.css, together with some little explanation.

@henrikingo henrikingo merged commit 972dc41 into impress:master Dec 19, 2022
@fnogatz fnogatz deleted the add-console-view-class branch December 20, 2022 19:49
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.

2 participants