Refactoring homepage

Per @jbclements's suggestion, I attempted to make sections in the homepage of racket-lang.org linkable. As a part of this effort, I refactored the home page (I am yak shaving, am I not?). See more details at [WIP] homepage: refactor the home page by sorawee · Pull Request #254 · racket/racket-lang-org · GitHub

If anyone want to help testing the anchor linking and ensuring that the refactoring is correct: the modified site is here. Let me know how it goes. It would be nice to test against many browsers and devices of different screen sizes.

3 Likes

I clicked Community on the tmp site, which got me "sorawee.github.io/tmp/#community." When I typed that in my phone's browser, it loaded the mobile site but did not jump to Community. (It did on my computer, though.)

1 Like

Thanks! This should be fixed.

Many thanks for your initiative! :slight_smile:

I guess we should remove the Mailing lists from the Community section if we already discourage their use. The only reason I can think of for mentioning the mailing lists would be to link to the archives. In that case, https://lists.racket-lang.org/ should be adapted.

How do I get a link, e.g. for the Community section? When I click on "Community", the URL still reads Racket . I guess an anchor should appear in the browser address line?

When I click "Community", the URL address is changed to "https://sorawee.github.io/tmp/#community" for me. Isn't that the case for you?

Ha ha, it is the case when I switch on JavaScript. I just didn't think about needing JavaScript enabled for the URL anchor to appear. It would be nice if it would be possible to make this work without JavaScript, but if it's too difficult, the current state is at least an improvement. :slight_smile:

I mean, the current homepage uses JS for tab switching, so if you don't use JS, you can't switch the tab at all!

The new homepage already improves this by using CSS to implement tabs, so now you can switch tabs even if JS is disabled. But yes, you do need to enable JS to get anchors working, as it involves actions that can't be done purely in CSS.

I already had allowed JavaScript for https://racket-lang.org/ , but not for https://sorawee.github.io .

Note: I am using https://sorawee.github.io/tmp/ for previewing https://github.com/racket/racket-lang-org/pull/254, so the capability to link to a tab is temporarily unavailable.

Delayed reply: when I tried it after seeing the email, it worked. Haven't tried again since then.

Hmm. I have JS enabled, and clicking on tabs changes the content below -- but the URL in the address bar does not update to append an anchor.

For example clicking on Community, the content below changes, but the URL in the address bar does not change from https://sorawee.github.io/tmp/ (does not become e.g. https://sorawee.github.io/tmp/#community).

  • I tried disabling uBlock Origin; no difference.

  • I tried disabling Firefox's own tracker defeating (which anyway was only on at the lowest, usually harmless setting, and hovering over the "shield" reported "no trackers detected"); no difference.

I'm using Firefox 113.0.2 on Ubuntu.

Thanks for testing! This is currently the expected behavior, as I explained in https://racket.discourse.group/t/refactoring-homepage/2121/9.

Oh OK. I guess I misunderstood your sub-thread with @sschwarzer where you said:

So I wanted to let you know that doesn't happen, for me, even with JS enabled.

Anyway thank for making these changes to the web site! If there's anything you'd like me to test now, or later, just let me know.

1 Like

The upcoming PR will focus on HTML5 compliance and responsive web design.

The current homepage supports the PC full screen size and the smallest mobile screen size in the portrait mode, but not anything else (tablet screen size, PC screen with resized window, mobile screen in the landscape mode).

The responsive web design in the PR makes the page readable in all these different settings. The PR will also fix various spacing issues.

Left is my proposal. Right is the current homepage.

4 Likes

This looks like a great improvement overall, thank you!

One minor thing: I think the spacing in the first screenshot is better in the original. That is, there is a bit more space around the logo and that seems beneficial. That said, there should be more space below the logo, as well as above it, if that's possible. That said, if this isn't possible or is difficult somehow, nevermind it. I'm delighted how things are improving.

1 Like

Oak, whiy does your re-design add comments (in orange) for the typed/racket code fragment? — Overall I like your effort and I am grateful that you’re taking on this task. Thanks!!! — Matthias

[

60e8f62eafc978ed0e2c2ceadb6c1d76f7061d5e
JPEG Image · 177 KB

](https://canada1.discourse-cdn.com/free1/uploads/racket/original/2X/6/60e8f62eafc978ed0e2c2ceadb6c1d76f7061d5e.jpeg)

What do you mean by "add"? The comment was there before, but it's very long for the mobile view to fit within the page. So I fixed it by breaking the comment up into two lines, making it fit the page. I also made similar breaks elsewhere.

Examples of the overflow in the mobile view:

If you don't like the break, another possibility is to reduce the font size and/or adjusting the typographic alignment of these codes in the mobile view.

For example, with the centering alignment, the first code wouldn't need to be broken into two lines:

and with a significant font size reduction, we can fit the second code.

Let me know which ones you prefer.

Or are you talking about adding the orange color? I think the code is slightly difficult to read because of the minimal syntax highlighting (with doc linking being the only source of color), so I tried to make it look like what the Racket doc would render, which is more readable IMO.

@robby: yes, I will fix that.

The screen shot in my email showed a (new) orange line of text .. perhaps I should get my eyes checked.

The text was was black in the original image. That indeed made it much less noticeable.