-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+1] Updates entire website design #14849
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
[MRG+1] Updates entire website design #14849
Conversation
Wow! Loving it. I like the "minimal change to get it working" approach
|
Very impressive @thomasjpfan !
I think overall this is great, though if we can afford a professional web-designer (cc @amueller) at least to review this and maybe propose some improvements on top this PR it would be ideal. Personally, I can say that the rendering looks good for me, but I really don't know to review it (with respect to cross-browser compatibility, best web-design practices etc). @cmarmo was also working on improving the website and if there is a way to collaborate on it somehow it would be great. A side note, do we want to bundle minified jquery and bootstrap (as opposed to using a CDN)? I get they this allows to use the doc offline, but they are not that small and a prone to be updated frequently. |
For instance, I also wonder if bootstrap is still the best way to go in the frontend world. Though I agree it's a clear improvement over our current website in any case. |
FWIW, pytorch also uses bootstrap but their theme is very customized. |
Not having something like webpack to do auto prefixing is a little rough. I have been developing in firefox/chrome/safari. (edge is moving to chromium) I will get my hands on IE and see what it looks like.
They vendor their bootstrap as well and not use the bootstrap CDN. (It is pretty nice to view docs locally)
Bootstrap is really nice to prototype design in because I was most familiar with it. Now that we have a design, I think it is possible to use something smaller, like purecss. We would only need custom js for the "who uses scikit-learn" carousel and maybe for the navbar folding in mobile. Although, using a familiar/popular css framework like Bootstrap makes it easier for others to contribute/modify. |
@jnothman any further comments? merge? |
One last thing ;).
I think that it is useful to add a max-width: 100% rule on the images of
the body. On small devices, these can cause horizontal scroll. Horizontal
scroll is particularly a problem because the burger menu of the top bar
becomes hidden.
|
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.
Otherwise, good to merge!!
Wow, @thomasjpfan
doc/conf.py
Outdated
@@ -314,8 +309,8 @@ def make_carousel_thumbs(app, exception): | |||
|
|||
def setup(app): | |||
# to hide/show the prompt in code examples: | |||
app.add_javascript('js/copybutton.js') | |||
app.add_javascript('js/extra.js') | |||
# app.add_javascript('js/copybutton.js') |
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.
What's this about? I don't thnk we should have commented-out code lying around
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.
Removed.
doc/templates/documentation.html
Outdated
@@ -0,0 +1,111 @@ | |||
{% extends "layout.html" %} | |||
{% set title = 'Documentation scikit-learn: machine learning in Python' %} |
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.
{% set title = 'Documentation scikit-learn: machine learning in Python' %} | |
{% set title = 'Documentation of scikit-learn: machine learning in Python' %} |
doc/templates/documentation.html
Outdated
<div class="card h-100 sk-documentation-index-card mx-md-2"> | ||
<a href="{{ pathto('tutorial/basic/tutorial') }}" class="stretched-link sk-documentation-index-anchor"></a><h4 class="card-header">Quick Start</h4> | ||
<div class="card-body p-3"> | ||
<p class="card-text">A very short introduction into machine learning problems and how to solve them using scikit-learn. Presents basic concepts and conventions.</p> |
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.
<p class="card-text">A very short introduction into machine learning problems and how to solve them using scikit-learn. Presents basic concepts and conventions.</p> | |
<p class="card-text">A very short introduction to machine learning problems and how to solve them using scikit-learn. Presents basic concepts and conventions.</p> |
doc/templates/documentation.html
Outdated
<div class="card h-100 sk-documentation-index-card mx-md-2"> | ||
<a href="{{ pathto('modules/classes') }}" class="stretched-link sk-documentation-index-anchor"></a><h4 class="card-header">API</h4> | ||
<div class="card-body p-3"> | ||
<p class="card-text">The exact API of all functions and classes, as given by the docstrings. The API documents expected types and allowed features for all functions, and all parameters available for the algorithms.</p> |
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.
<p class="card-text">The exact API of all functions and classes, as given by the docstrings. The API documents expected types and allowed features for all functions, and all parameters available for the algorithms.</p> | |
<p class="card-text">The exact API of all functions and classes, as given by the docstrings. The API describes expected types and allowed features for all functions, and all parameters available for the algorithms.</p> |
"The API documents" was a garden path sentence, since "documents" is ambiguously a noun and verb.
doc/templates/index.html
Outdated
<div class="card h-100"> | ||
<div class="card-body"> | ||
<a href="supervised_learning.html#supervised-learning"><h4 class="sk-card-title card-title">Classification</h4></a> | ||
<p class="card-text">Identifying to which category an object belongs to.</p> |
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.
<p class="card-text">Identifying to which category an object belongs to.</p> | |
<p class="card-text">Identifying which category an object belongs to.</p> |
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.
Yes, these are typos in the original.
I'd like to change these all to imperative mod: "Identify which category..." but perhaps in the next PR.
<a class="btn btn-warning btn-big sk-donate-btn mb-1" onclick="document.getElementById('paypal-form').submit(); ">Help us, <strong>donate!</strong></a> | ||
<a class="btn btn-warning btn-big mb-1" href="about.html#citing-scikit-learn"><strong>Cite us!</strong></a> | ||
<p class="mt-2"> | ||
<a href="about.html#funding">Read more about donations</a> |
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 seems to be a poor link target)
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.
Poor as in...its too small?
}); | ||
|
||
{%- if pagename != 'index' and pagename != 'documentation' %} | ||
/*** Had navbar when scrolling down ***/ |
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.
What is "Had navbar"?
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.
It meant to "Hide"
stylesheet = css/theme.css | ||
|
||
[options] | ||
google_analytics = false |
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.
I'm confused about this. It seems to be in contradiction to conf.py
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 sets the default. I can change it to true by default.
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 was changed to true.
{% endif %} | ||
|
||
<script> | ||
$(document).ready(function() { |
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.
Why is it preferably to include this in the page, rather than by src
?
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 reduces the number of HTTP requests.
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.
The total number of bytes the javascript.html is small (in bytes), so I thought it was worth it to inline the javascript.
LGTM. Merge? @jnothman : you had comments. I'll leave you some time to voice any other comments if you have some. If I don't hear from you, I'll merge. |
Awesome work, @thomasjpfan! |
Sorry I didn't follow the discussion. |
also, the "documentation" page now seems a bit useless, right? |
Also, I would maybe remove the testimonials. They are mostly confusing if anything. Linking to the sklearn consortium or the google scholar citations would be more informative, I think. |
The sidebar changes based on context. Before the sidebar was just useless: https://scikit-learn.org/stable/user_guide.html
It is less useful now. It still gives a little context to each link. |
There has been a discussion on how to structure numpy, scipy and pandas websites here: It might make sense to join the discussion and/or follow suite. |
well but when/how would a user end up there? like if they don't know what of the other links to click? seems like a strange path to take. |
They can end up there from the landing page if they click "Documentation":
It kind of serves as a global index. I am okay with removing it. |
Ah, I hadn't seen that. I'm not opposed to keeping it but it seems less useful now. |
Same feeling. |
One of the ways we are using the documentation page is to outline all the versions in the all versions page (It shows the version number on the top of the page) |
|
||
|
||
@media screen and (min-width: 1540px) { | ||
.sphx-glr-download-link-note { |
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.
Great stuff! I just noticed that the note about the binder link is floated
right, I wish I had the web skills to think of this in the first place and then
execute it as well.
Should we consider backporting this to sphinx-gallery?
|
Sounds like a good idea indeed. |
Here is a hosted version that follows this PR.
This PR:
basic
. There were a bunch of js/css we did not use, this is no longer loaded.Enjoy! :)