-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create theme exporter #7
Create theme exporter #7
Conversation
…ta to the server. Save it to a json file. Reformatting and addition of comments for the code of model.ts
…d in the theme editor interface. A new variable.css file is generated from a template.css
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
…o an hexadecimal compatible string was not working due to the presence of white spaces. Inversion between white and black hexadecimal affection was also corrected.
807de26
to
f74e73b
Compare
jupyter_theme_editor/handlers.py
Outdated
env = Environment(loader=PackageLoader( | ||
"jupyter_theme_editor", "templates")) | ||
j2_template = env.get_template("template.css") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do thing a bit better here because the Environment
and finding the template is gonna be always the same. We can pass them in the initialize
to avoid recreating them every time.
See that example:
And how to pass the keyword arguments to initialize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fcollonval Thanks a lot for the review. A tentative changed is proposed in commit c8c9a6e
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
3694bb2
to
3162819
Compare
3162819
to
c186873
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good @HaudinFlorence
You can merge
Version of the theme editor where the parameters changed in the theme editor are exported to a
variable.css
file that can be downloaded.