Comments (15)
Another option is start the notebook with
%%HTML
<link rel="stylesheet" type="text/css" href="custom.css">
or in case it is just a style for the current notebook, an inline style:
%%HTML
<style>
/* style for notebook and presentation */
p { color: green; }
/* style for presentation only */
.reveal p { color: red; }
</style>
from rise.
Thanks for the suggestion @adl, but I feel that ones are still workaround... we need to provide a mechanism for styling customization... a rise.css
could be a solution. We probably need to:
- create an empty
rise.css
inprofile_whatever
at installation time (remember to not overwrite a previousrise.css
). In case of no profile (default) just add it toprofile_default
. - load
rise.css
inmain.js
next to the other css files. - make the enable_custom_css (or whatever name) a config option through the ConfigManager to load
rise.css
by default, but give the option to not load it (which gives you the uncustomized slides again).
from rise.
As an user I'd prefer @damianavila suggestion. That said, @adl is something already ready to use, so why not list it as a valid option?
There's also another evolution somehow related to customization. Let's say an user (like me jeje) wants to:
- add a fixed elements to the presentation (i.e. a nice footer)
or - customize some behaviour/logic (like add new keybindings, etc..).
The solution now is to tweak with RISE main js file (unless I'm missing something, which can easily be the case).
@damianavila proposal could also apply to load a rise.js file for this kind of things..
More specifically to issue 1, a maybe cleaner solution would be to add some empty divs to the ".reveal" element(s) that user can hook to easily customize slide elements like footers, headers, etc.. (I already have some work done to get this... before opening an issue and a related PR I'd like to know others opinion)
from rise.
@damianavila proposal could also apply to load a rise.js file for this kind of things..
I am delighted by the idea to have a rise.js too to hack on the js side... it crossed my mind several times in the past.
More specifically to issue 1, a maybe cleaner solution would be to add some empty divs to the ".reveal" element(s) that user can hook to easily customize slide elements like footers, headers, etc.. (I already have some work done to get this... before opening an issue and a related PR I'd like to know others opinion)
Not sure about that, maybe it is the path... probably I need a prototype to get a better idea/sense... so open your PR when you are ready to do it...
from rise.
I am delighted by the idea to have a rise.js too to hack on the js side
+1 as it would help to create a custom configuration for reveal.js (e.g. keyboards shortcuts)
from rise.
I'm trying out RISE with the bash kernel and the solutions proposed here don't work (unless I'm missing something) because I can't execute python code to use ConfigManager to configure RISE.
I'm not sure but I think it would it be possible to put the configuration in the notebook metadata. That should work with every kernel.
There's still the problem of changing settings between different slides (e.g. to change the transition animation), but it's a start. To solve this problem one workaround could be to include a new "slide type" that contains configuration parameters.
from rise.
I'm trying out RISE with the bash kernel and the solutions proposed here don't work (unless I'm missing something) because I can't execute python code to use ConfigManager to configure RISE.
Yep, that;s reasonable....
I'm not sure but I think it would it be possible to put the configuration in the notebook metadata. That should work with every kernel.
In fact RISE, work with any kernel... it is kernel agnostic... only the installation is pythonic... but it can be installed in several ways and with several language, it is just a matter to write the tool to put the files in the correct places...
Can you start another issue where we can discuss non-pythonci alternatives installations? Thanks!
There's still the problem of changing settings between different slides (e.g. to change the transition animation), but it's a start. To solve this problem one workaround could be to include a new "slide type" that contains configuration parameters.
A config element in the notebook itself is interesting... the question is what kind of ID we should built on top of that... or maybe just left people configure there using text (which is not much better than configure outside the notebook...
Again a new issue to discusses a high level UI in the notebook is welcome!
from rise.
see for example PR #200 (Add companion .css file)
One issue is version control: if you put an .ipynb file into version control, it makes sense to have CSS also put into version control along with it.
I will have to try the %%HTML
hack again, I thought I did already without success, but maybe I missed something.
from rise.
Hello, sorry to bother, but do we have any update here?
I see that there are now some instructions for custom code in the repo homepage. I didn't notice that one year ago, am I right?
from rise.
I see that there are now some instructions for custom code in the repo homepage. I didn't notice that one year ago, am I right?
Still not a simple way to further customize thing on the css... but you can actually customized a lot of the reveal.js options with the instructions provided in the README that you linked.
from rise.
As you see there are some PRs opened but I did not have time to deal with them yet.
from rise.
Thanks for the clarification. Is that custom code enough for the keybindings instead?
from rise.
If you want to customize keybindings you need to do it in the source for now... we have been discussion about a rise.js or custom.js to customize the js behavior but we don't have that functionality yet...
from rise.
Please consider the following use case: You're in front of a lecture room full of students, 5 mins before the start, and find that the resolution of the provided projector is very low. You quickly need to fiddle with the css to adjust font sizes etc. for your presentation, so it works properly (may have been a real scenario ;-) ). Luckily I had CSS in a cell in the notebook which, while considered poor style, is IMHO the best way to bind specific settings to a presentation.
- I like a custom css that gets loaded by the notebook for a particular style you want to reuse (e.g. corporate presentations).
- I like css specific to a given presentation to be embedded directly in that presentation, so it doesn't get lost. Otherwise every time you tweak the custom.css, it will ruin the look of the rest of your presentations.
So one solution that is pretty close to what already exists, would be:
- A custom.css template, that has stubs for typical things users might want to tweak (very useful for getting newbies using it - I've been tinkering and finding out the hard way)
- A special "css" cell type (or just the HTML magic of @adl 's comment), as an official recommendation for custom css for a particular notebook, rather than discouraging it as poor style.
from rise.
CSS customization is provided by #296 and #310, but I will keep this open until we offer some entry point for minor JS customizations.
from rise.
Related Issues (20)
- Weird layout when commands output large amounts of text HOT 6
- The slide does not adjust the height of a cell. Rather, it cuts down the view without enabling the scroll bar. HOT 3
- Vertical scrollbar not exported to HTML HOT 4
- Is it possible to remove left padding from code output cells? HOT 6
- RISE and Jupyterhub 3.x HOT 1
- Conda installation fails HOT 5
- Create a jupyter-slides (name to be discussed ;-) organization to house several Jupyter slideshows projects HOT 7
- Theme text color gets overwritten
- Missing example: header-footer.ipynb HOT 1
- Cannot autolaunch slideshow in Google Cloud Platform (GCP)
- Expand output cells to use available vertical space HOT 5
- Possible duplicate: Is there a way to edit settings for individual cells/slides, rather than for the entire notebook? HOT 2
- Lost custom css style when downloading as reveal.js slides html HOT 1
- Does this module allow interactive blocks? HOT 1
- RISE not showing because install uses notebook version 7 HOT 5
- RISE is obsolete and this should be made clear in the doc - redirect to jupyterlab-rise HOT 1
- RISE & Jupyter Notebook 7 HOT 1
- link to the documntation in read me file is broken
- Scrolling not activated "on the fly" when executing cell with an output making the slide longer.
- Searching for a workaround : is it possible to make scrollbar systematically present even on slides too small for it to have a use ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rise.