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

change theme #42

Closed
badbye opened this issue Nov 21, 2014 · 9 comments
Closed

change theme #42

badbye opened this issue Nov 21, 2014 · 9 comments

Comments

@badbye
Copy link

badbye commented Nov 21, 2014

Hi, damianavila, thanks for your amazing tool.

I want to change default theme of transformation to "linear". I edit the custom.js file, and try to reinstall this library, but returns:

custom.js entry already exists.

what should I do? I also try to delete the files "../nbextension/liveshow"

By the way, I change the theme by this way is not elegant. What about adding some choice box in the cell toolbar?

@damianavila
Copy link
Owner

Hi, damianavila, thanks for your amazing tool.

Thanks!

what should I do?

mmm... don't try to reinstall... just change the following line: https://github.com/damianavila/live_reveal/blob/master/custom.js#L21
and replace zoom with linear... then you have to reload you notebook, BUT delete the browser cache so the change is updated...

By the way, I change the theme by this way is not elegant. What about adding some choice box in the cell toolbar?

I could be an option... thinking about to better you to config all the multiple options available...

@badbye
Copy link
Author

badbye commented Nov 21, 2014

well, I have tried many times, it still doesn't work.

I also tried to delete the entire folder "live_reveal-master" and i can still use the live_show. So simply edit the file custom.js and reload notebook is not enough, i think.

BTW: How to delete the browser cache? I use chrome and "ctrl + shift + delete" can be use to delete browser cache, do you mean that?

@damianavila
Copy link
Owner

Probably it is a cache issue... yes... you can access with that shortcut combination... but try this instead: http://stackoverflow.com/a/21287099 and let me know...

@badbye
Copy link
Author

badbye commented Nov 21, 2014

I solved this problem.

After install the live_slideshow, it create a directory "profile_rise" in the ~/.ipython folder. I need to edit the custom.js in this folder, not the one in the "live_slideshow" folder, which i download and decompress from github.

vi ~/.ipython/profile_rise/static/custom/custom.js

change the "livereveal.parameters('simple', 'zoom')" to "livereveal.parameters('simple', 'linear')".

Then, reload notebook, works.

Wow, it's really troublesome.

@damianavila
Copy link
Owner

Do you download the extension from the github zip? how do you exactly installed the extension?
Glad you solve the issue, btw... just curious about how you get into this problem...

@badbye
Copy link
Author

badbye commented Nov 21, 2014

yes, i download, decompress, and run :
python setup.py install

actually i also tried to reinstall it by runing the codes in the Installxxx.ipynb( i add some more codes in this file to delete the old one and reinstall, show you tomorrow).

@damianavila
Copy link
Owner

ok... thanks

@badbye
Copy link
Author

badbye commented Nov 22, 2014

import os
import IPython.html.nbextensions as nbext

# download rise extension
nbext_name = "live_reveal"
version = "2.x"
url = "https://github.com/damianavila/" + nbext_name + "/archive/" + version + ".zip"
nbext.install_nbextension(url)

# relocate the extension in the nbextension folder
nbext_folder = os.path.join(nbext.get_ipython_dir(), "nbextensions")

install_folder = os.path.join(nbext_folder, nbext_name + "-" + version)
rise_folder =  os.path.join(install_folder, "livereveal")
!rm -r {os.path.join(nbext.get_ipython_dir(), "nbextensions/livereveal")}
!mv {rise_folder} {nbext_folder}

# create a rise profile and add the proper custom.js
!ipython profile create rise
custom_js = os.path.join(nbext_folder, nbext_name + "-" + version, "custom.js")
tgt = os.path.join(nbext.get_ipython_dir(), 'profile_rise', 'static', 'custom')
!mv {custom_js} {tgt}

# clean the mess
!rm -r {install_folder}

This is the codes in your Install_RJSE.ipynb, I just add one line:

!rm -r {os.path.join(nbext.get_ipython_dir(), "nbextensions/livereveal")}

Now I know what's going on. By running:

python setup.py install

It copy the your static(which used to change the theme) to the profile_default folder.

By running the codes in the Install_RJSE.ipynb:
It copy the your static(which used to change the theme) to the profile_rise folder. That's why this file said i need to run

ipython notebook --profile=rise

Go back to the problem. After downloading the file live_reveal-master, I run both codes to install. In order to change the theme, edit the custom.js in the downloading folder doesn't work, cause it was copied to "profile_default/static/custom/". So i need to edit:

vi ~/.ipython/profile_default/static/custom/custom.js

not

vi ~/live_reveal-master/custom.js

Right?

@damianavila
Copy link
Owner

OH... sorry for never answering to your question... somewhat I missed this thread.

Right?

Yes, you could use python setup.py install --develop to link the live reveal master with the default profile for quick development...

Closing here because it seems you solve the issue... reopen it if it is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants