Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    64comments
  2. What Zig felt like, coming from Rust(besok.github.io ↗)
    14comments
  3. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    4comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    349comments
  5. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    160comments
  6. Tin: full-text search for Postgres(planetscale.com ↗)
    3comments
  7. “The Secret Life of Circuits” is here(coredump.cx ↗)
    34comments
  8. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    3comments
  9. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    515comments
  10. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    4comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    91comments
  12. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    119comments
  13. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    160comments
  14. Communication by means of modulated Johnson noise(pnas.org ↗)
    16comments
  15. Cloudflare Quick Tunnels(cloudflare.com ↗)
    299comments
  16. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments
  17. How to Write with an LLM(sockpuppet.org ↗)
    356comments
  18. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    1comments
  19. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    23comments
  20. SDCC – Small Device C Compiler(sourceforge.net ↗)
    21comments
  21. Saving another 100TB of RAM(cloudflare.com ↗)
    87comments
  22. Science Is Open Software(jepedersen.dk ↗)
    46comments
  23. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    42comments
  24. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    111comments
  25. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  26. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    117comments
  28. OpenJev(openjev.com ↗)
    275comments
  29. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    4comments
  30. Goroutine Leak Profiles(go.dev ↗)
    6comments

Show HN: A simple way to make HTML websites

200 pointsby 5y agojohn-doe.neocities.org
60 comments
5y agoHN ↗

This is rather genius. Nice work on the styling too. Love it!

EDIT: you could have a masonry style gallery with CSS only using the CSS columns property.

5y agoHN ↗

EDIT: you could have a masonry style gallery with CSS only using the CSS columns property.

Could you provide example?

5y agoHN ↗

Firefox supports pure css masonry grid behind a flag.

That has less support than Bieber at a black metal festival though.

Here's[1] the columns (or flexbox) way of doing it. Note that images will be a bit strangely ordered (as you would read columns). That's not solvable without JS (AFAIK). That's why W3C/CSSWG is looking at possible solutions[2] that resulted in the Firefox experiment you're referencing.

[1] https://css-tricks.com/piecing-together-approaches-for-a-css...

[2] https://github.com/w3c/csswg-drafts/issues/4650

5y agoHN ↗

This is simple and nice. It seems suitable for landing pages and portfolio pages. Thanks for sharing it.

5y agoHN ↗

Nice.

One issue, though: Highlighting the current page in the menu doesn’t always work. Browsing with an iPhone.

5y agoHN ↗

Navigation isn't highlighted, the bottom border you see is a remnant of the :hover style.

5y agoHN ↗

Not related to actual Non-JavaScript/JavaScript-Free showcase, but may be interesting for js-users.

5y agoHN ↗

In principle, I like it. A lingering question, however: how would this work from a search engine indexing standpoint?

5y agoHN ↗

From my experience, search engines will not index the “hash” variants as separate pages. It will all be considered one page.

5y agoHN ↗

Too bad google doesn't recognize the individual pages.

Not a bug, but a feature.

5y agoHN ↗

There aren't any individual pages. It's one page styled to look like several pages. It is not several pages bundled together. Google are going what you should expect.

5y agoHN ↗

It's worth noting when doing this it registers each anchor in the browser history. If you want to avoid this, checkbox hacking with the :checked selector is an option.

5y agoHN ↗

If you want to avoid this, checkbox hacking with the :checked selector is an option.

Any Screenshots/Tutorial?

5y agoHN ↗

CodePen requires JavaScript to render the code and preview areas in this view.

Thanks, but no.

5y agoHN ↗

Don't do this. Registering the anchor is for back button compatibility; I'm so tired of spas and 'modern' js constantly breaking it.

5y agoHN ↗

I am tired of that too, but you can use the checkbox hack to implement features such as tabbed content for which storing user selections in the browser's history would probably result in unintuitive UX.

5y agoHN ↗

Isn’t that the point of links though? If you use checkboxes you won’t be able to share a specific page with a friend.

5y agoHN ↗

I also suggested an update.. but but but.... Its a normal webpage with normal history behavior... STOP TRYING TO FIX IT! ENOUGH ALREADY! (ha-ha)

5y agoHN ↗

You could ad some JS to play with history pushState and popState to make sure the history works.

5y agoHN ↗

You could ad some JS to play

No. This showcase example especially designed to represent power of non-JS web-design.

5y agoHN ↗

Is this accessible? I wonder if screen readers get it, I'd lean towards the "they don't understand it" side but no proof

5y agoHN ↗

It'll treated as one big long page with helpers to jump to each section. It'd be better if each section had it's own role (probably "contentinfo") and aria-label attribute. It'll probably work better than a lot of other 'modern' approaches even as it is now though.

5y agoHN ↗

Not sure about that. I would believe `display: none` means that screen readers won't read every section.

5y agoHN ↗

Two comments

1. I know HN hates JS, and there are times I do too, but how is celebrating JS-free anything but fundamentalism? A little JS won't hurt performance.

2. Gitlab offers a full IDE that you could use to edit your files. The post talks about the neocities and github editors only, both of which suck compared to the gitlab IDE.

5y agoHN ↗

1. Do you accept that "doesn't require JavaScript" is a net positive, however small? If so, "doesn't use JavaScript" is just a guarantee of that - still a net benefit even if it's not the 'one true way'.

5y agoHN ↗

HN doesn't like bloat and things that are unnecessarily complex. If you add a few lines of JS without obfuscation, then no one's complaining.

5y agoHN ↗

1. Agree. But I made this with absolute beginners in mind. Starting with only HTML and CSS seemed way enough already.

2. See 1. Neocities is probably one of the easiest ways to publish something online for a neophyte, either with their editor or file uploader. (but they have a CLI too!)

5y agoHN ↗

For me I just like seeing hacks to create systems with less code and complexity than web-packing heaps of npm lib's together... I guess put more simply:

The best code, is the code you don't have to write...

5y agoHN ↗

Kinda interesting that the things we used to be doing years and years ago are now being submitted to sites like HN.

Almost exactly the same things were the de facto standards when "tabs" were all the rage way back when.

Kudos though for the modern CSS, although things like var etc wont work in old browsers

5y agoHN ↗

The trouble with caniuse is that it only covers the "mainstream".

It does not cover more exotic things like browser in RiscOS or Amiga or text-only browsers etc. These are often consumers of text-only sites, deliberably or not. Small market share though I admit, but probably larger market share for text-only sites Vs other "normal" sites.

5y agoHN ↗

I think covering the "mainstream" is the point of the site. Don't get me wrong, I really do enjoy fast loading text based websites, but if web devs had to worry about those browsers, then CSS (and web technology in general) could never develop past its infancy. Whether that's a good thing or bad thing is up to you.

5y agoHN ↗

Yeah I have no problem.with caniuse and for most sites it is a great tool, just for text-only you often have a different market to consider :)

5y agoHN ↗

I see what you did there xD

Essentially, instead of hijacking the Browser's history with some Javascript router api, you simple use the inbuilt url fragment to "load" a new page by using CSS to hide/show content based on that #fragment.

What I like about it is that the urls are "honest" -- you're not navigating to a new page (there isn't one, just like there isn't one when you do the same w/ a Jamstack App) -- and the urls show this.

5y agoHN ↗

Cool trick! If you search for random phrases in the pages that aren't the front page, Google has indexed them as well even though they're hidden by default by the CSS. I'd be cautious for SEO reasons as it's non-standard though.

5y agoHN ↗

This site will not scroll on Firefox mobile

5y agoHN ↗

Scrolls fine (using latest Fennec on Android).

5y agoHN ↗

not scrolling for me either. The irony of a simple website breaking

5y agoHN ↗

firefox, android 9

EDIT: nevermind I'm an idiot, the first page fits my screen, theres nothing to scroll.

I'm not sure why I was convinced it was broke. Maybe so used to typical page footers that I assumed there was more?

5y agoHN ↗

It is! And I had the same conclusion when it came to highlight the active section… it's not worth repeating the markup. Maybe something with `:focus-within` could work?

5y agoHN ↗

I wish this didn't break browser search. You can find (but not highlight) content on other "pages" :(

5y agoHN ↗

Which browser? Seems fine here in Firefox.

5y agoHN ↗

Firefox 83. I did a search for "section" and got 4 hits but none of them were visible.

5y agoHN ↗

Can't reproduce this on macOS, Firefox 83. Does adding `visibility: hidden;` help?