Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Themes for notebook #136

Closed
wants to merge 28 commits into from
Closed

Themes for notebook #136

wants to merge 28 commits into from

Conversation

migeruhito
Copy link
Contributor

You can now add full new themes to Sage. From light css touches to full template system replacement. I have used flask_themes2.

I have tried to keep changes in the sources at minimum, but jinja2 initialization process had to be modified and, as consequence, the rendering of worksheet templates.

Several test themes are included in this branch. There are two locations where themes can be placed. One place is a special new directory sagenb/sagenb/themes, intended for providing official distribution themes and/or system wide available themes. The other place is a directory themes in SAGENB_DOT. Some documentation was added in the help menu. For more information about how to write themes, see flask_themes2 docs.
Warning flask_themes is broken and is incompatible with newer versions of flask.

You must make flask_themes2 available in the local sage's python path in order to test this feature. An appropriate dependency was added in setup.py.

I know that a new UI redesign is coming. Could this extension make this transition smoother?

@kcrisman
Copy link
Member

I like that you were somehow able to get the "new UI" in here as a theme that could be selected between. I certainly don't have time to pore through all these massive changes now :) but please do update with comments here what your status is! Making it easier to work with this as you have done is a really valuable contribution.

@migeruhito
Copy link
Contributor Author

I'll work to incorporate newUI as a theme. A year ago, I incorporated Samuel Ainswoth's pull request for newUI as a fully functional theme in a way compatible with classic themes. The changes were not massive, but subtle. Today, this theme doesn't work any more. I use classic themes with this branch in my classroom sage server, available at https://farto.eis.uva.es:8080

@kcrisman
Copy link
Member

Today, this theme doesn't work any more.

Oh, I didn't realize that. What changed in the meantime? There haven't been very large changes here, as you are no doubt aware...

Anyway, the current pull request you have here includes that newUI, as far as I can tell.

@migeruhito
Copy link
Contributor Author

I mean the newUI theme of my themes branch doesn't work any more. Sorry.

I have been disconnected from here for a year. The themes included in my themes branch are mere examples to test the concept. I use one of them in production, but it is anecdotic. I'd like to get the "new UI" in here to work as a theme and substitute the current newUI theme by it.

@migeruhito
Copy link
Contributor Author

sagenb/newui branch has been converted in the theme newUI. Intensive testing is needed.

@migeruhito
Copy link
Contributor Author

Now a change from a classic theme to a newui theme can be done without restarting the notebook.

@fchapoton
Copy link
Contributor

sagenb is now in maintenance only mode

@fchapoton fchapoton closed this May 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants