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

Allow customization of frontpage text #716

Merged
merged 7 commits into from
Oct 15, 2017

Conversation

dbdean
Copy link
Contributor

@dbdean dbdean commented Sep 5, 2017

Following on from my earlier pull request (#683), I've added top-level 'title', 'subtitle', 'text' and 'show_input' fields to the frontpage.json file, with the original sections under a top-level 'sections' tag.

Current-style frontpage.json files with only the list of sections will still work as they did before, but may be considered deprecated with this PR. I have updated the test cases to have a new schema that validates the new frontpage.json style, and the tests pass.

This has allowed me to fully customize the text in the front page for my organisation without having to maintain a separate fork, although I may need to do so when I want to change the styling (one thing at a time!).

I have remove the --no-frontpage-input option that I introduced in #683, as it is no longer needed, and I am assuming it was just me using it. If needed, it could be kept with a deprecation warning.

I'm happy to modify this pull request as needed to get it into the main repository.

Thanks!

@dbdean
Copy link
Contributor Author

dbdean commented Sep 21, 2017

Any news on this PR? I'd be happy to help if any adjustments might be required to get it into master.

@parente
Copy link
Member

parente commented Sep 21, 2017

Sorry. I have not taken the time to look at any of the nbviewer PRs. I'll try to get to them in the near future if someone else doesn't get here first.

@dbdean
Copy link
Contributor Author

dbdean commented Oct 12, 2017

Any news? I'd love to help get this into the repo. If there are any blockers, please let me know if I can do anything to help remove them.

Copy link
Member

@parente parente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question otherwise it seems reasonable to me.

@@ -1,10 +1,15 @@
{% extends "layout.html" %}

{% block body %}
{% if not no_frontpage_input %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The origin no_frontpage_input flag also hid the jumbotron header. Does the page look OK with that element still in the DOM when there's no title, subtitle, or text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check on that, and get back to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a new commit to hide the jumbotron if nothing is contained within it.

As a result, the jumbotron is completely hidden if none of
title, subtitle, text are set and show_input is False
@dbdean
Copy link
Contributor Author

dbdean commented Oct 15, 2017

Looking back, I intended that the title field would be required, so hiding the jumbotron wasn't an issue. However, given that you could hide it before, I've added another commit here to make it no longer required, and to hide the jumbotron itself if nothing is being shown in it.

Thanks for your help getting this done!

@parente parente merged commit de279e3 into jupyter:master Oct 15, 2017
@parente
Copy link
Member

parente commented Oct 15, 2017

Looks good now. Thanks for the feature @dbdean.

@dbdean dbdean deleted the custom_frontpage_text branch October 18, 2017 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants