Giter Site home page Giter Site logo

Comments (15)

adl avatar adl commented on July 16, 2024

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.

damianavila avatar damianavila commented on July 16, 2024

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:

  1. create an empty rise.css in profile_whatever at installation time (remember to not overwrite a previous rise.css). In case of no profile (default) just add it to profile_default.
  2. load rise.css in main.js next to the other css files.
  3. 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.

fpliger avatar fpliger commented on July 16, 2024

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:

  1. add a fixed elements to the presentation (i.e. a nice footer)
    or
  2. 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 avatar damianavila commented on July 16, 2024

@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.

pdonorio avatar pdonorio commented on July 16, 2024

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.

fcremo avatar fcremo commented on July 16, 2024

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.

damianavila avatar damianavila commented on July 16, 2024

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.

jason-s avatar jason-s commented on July 16, 2024

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.

pdonorio avatar pdonorio commented on July 16, 2024

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.

damianavila avatar damianavila commented on July 16, 2024

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.

damianavila avatar damianavila commented on July 16, 2024

As you see there are some PRs opened but I did not have time to deal with them yet.

from rise.

pdonorio avatar pdonorio commented on July 16, 2024

Thanks for the clarification. Is that custom code enough for the keybindings instead?

from rise.

damianavila avatar damianavila commented on July 16, 2024

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.

mbewley avatar mbewley commented on July 16, 2024

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.

damianavila avatar damianavila commented on July 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.