-
Notifications
You must be signed in to change notification settings - Fork 28
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
Merge with ocaml.org styling and layout #113
Conversation
When jQuery and bootstrap.min.js are loaded, the left side menus in Documentation and Blog do not exert appropriate right pressure on the main span9 content. This causes the content to jump (after the js load) to overtop the left menu. This makes the page unusable. After this change, the side menu no longer scrolls with the page (position does not get changed to fixed by JS). It is possible to get some of the previous functionality back by adding a height of >=25px to the span/div first child of the span3 left sidebar element. This still doesn't quite fix the issue as the menu elements then sometimes slightly overlap the content. This patch disables all of the insane JS modification of DOM element classes to set the menu position: fixed. There is probably a way to get the effect we want without using JavaScript. It would be nice to not have to load any JavaScript for a simple static site... Right now JavaScript is required for some of the package index search features and the Documentation dropdown menu for some reason. The package search should have a server-side fallback and the dropdown should be achievable in pure CSS. The gauntlet is laid! It is now your mission, young wanderer, to discover what riddles wait in... THE LAND OF WEB PAGE LAYOUT MAGIC *fade to black*
Wonderful! |
Yes!!! |
A big thanks ! |
Thanks! This is great!! |
Also, factored more demo-specific style into site.css.
To play at home, download and build this branch and clone the ocaml.org repo. Then: ocaml.org$ make opam.ocaml.org_template
... If you want to have the docs and the blog built, too, you'll need to do ocaml.org$ cd opam.ocaml.org && ./link_blog_doc_ext.sh ../../opam-blog/ ../../opam.wiki/ ../../opam2web/ext/ Then: opam2web$ src/_build/opam2web.native -c ../ocaml.org/opam.ocaml.org/ -o www
... At this point, you should be able to view the site using something like: opam2web$ ../ocaml-cohttp/cohttp_server_lwt.native www Or, if you want to browse the files with the opam2web$ webmaster relativize www --root www -o www_out
...
opam2web$ webmaster resolve --has-host --base https:// www_out --root www_out -f -o www_out
... The biggest issue I've noticed so far is a large white top margin once the site goes into narrow-screen mode. I think this is probably related to the subnavbar stuff but I haven't investigated too far. |
I've not been very far:
|
Ha, of course, need |
I managed to have a local website (with broken javascript) by following these "simple" recipe:
|
Notes:
|
I've fixed the uninstall issue with dsheets/webmaster@ce12f8a. |
@dsheets Seems there is a problem while moving the
It it supposed to move more resource (the |
Ah, there is a final step: opam2web$ cp -R ext www/ There is no resource copying, in general, afaik. You have to place the Sorry. |
ok, it works now. I've made a PR against your branch to fix the footer padding. I'm still not very happy with the Same thing for the version numbers, it's way too much verbose. I'm wondering if we could improve the header as well: having both headers is nice but it takes a lot of space on my limited screen. I really like the integration though. I'll try to propose some styling changes later today. |
I'm not sure I agree with you about the The header thing was the simplest that could work... I'd really love to get rid of it but the output of opam2web is not super-flexible so if we use some other kind of menu bar, we'll probably lose the ability to generate a stand-alone site for the near- to mid-future. |
About the
I think what is important is to have the cross-refs right. Most people (including me) just look at the list of packages, and don't really care about the whole shape of the formula (but sometimes you want to be able to copy/paste it, that you can't do on the website at the moment). |
About the header: Maybe that's sufficient to make it non sticky? So if you scroll down, it will simply disappear? |
I think we should move the dependency discussion to another issue on opam2web (and I think I agree with you, though would like to retain the currently layout code). I think we should move the integrated style issue to an ocaml.org issue as most likely the changes that need to be made will be against I believe that there is no style change in this PR that will affect the current site. The only salient change if we keep the same server config is the different top toolbar labels. I propose we merge this PR, redeploy the site to check it still functions and make the deployment changes after we have hashed out the style issues on ocaml/ocaml.org. After this is merged, the project page branch can be immediately merged. |
The top-margin when narrow bug and bad menu style bugs are now tracked by ocaml/ocaml.org#521. The Stacked navs are fat and ugly in ocaml/ocaml.org#522. |
Thanks. Agree to merge the PR as well. |
This patchset contains the necessary modifications to have the
opam2web
tool generate pages which fit into the styling and layout of ocaml.org.The coordination between the two sites has been designed such that the server for opam.ocaml.org will checkout ocaml.org regularly and build the template that it requires to match the design of ocaml.org (ocaml/ocaml.org#512). This generated template will source assets via scheme-relative URLs off of ocaml.org. For this to work without mixed content warnings, ocaml/ocaml.org#399 is required.
These changes will demand a number of updates to the opam.ocaml.org runtime scripts to accommodate this new dependency on the ocaml.org repository.
May the force be with you.