Live data from Hacker News

Entire website in a single HTML file

css-tricks.com

201–210 of 333 posts

Re: Entire website in a single HTML file

#201
post #84

HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…

~~With progressive enhancement, you could arrange to display only the current subpage. When Javascript is off, the whole page would render as a long-ish HTML document. Which is indeed no issue at all with the sitemap in a sidebar.~~

Edit: I obviously didn't read the article...

Re: Entire website in a single HTML file

#202
post #91
post #84

HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…

You like to live in hard mode. I like that.

How old are you?

Re: Entire website in a single HTML file

#203

Earlier quoted context omitted.

Feature. The dimensioning problem isn't PDFs. The dimensioning problem is computer displays. Get yourself an e-ink display of 10" or 13" (standard dimensions offered by the patent-monopoly vendor across multiple OEMs), and discover that online reading of PDFs is 1) quite pleasant (so long as the underlying PDF formatting itself is sane) and 2) vastly preferable to either HTML or "fluid" ePub or Mobi file formats. Boo…

>Get yourself an e-ink display of 10" or 13" (standard dimensions offered by the patent-monopoly vendor across multiple OEMs), and discover that online reading of PDFs is 1) quite pleasant (so long as the underlying PDF formatting itself is sane) and 2) vastly preferable to either HTML or "fluid" ePub or Mobi file formats. Notably this is not the standard size for most e-ink devices though, on which pdfs are a pain t…

Oddly enough, my purchase decision was driven specifically by considerations of size, resolution, and suitedness to task.

Again: at 8", e-ink is pretty broadly useful. If you're frequently reading scanned-in journal articles, the 10" or 13" devices shine, though these can be accessed on smaller screens using in-page zoom-and-scroll. (Onyx BOOX has several settings for this in its NeoReader app.)

Note-taking, which was not a use I anticipated using, also happens to be really well-suited.

Yes, you can read on a smaller device if you must. However you're making the same sacrifices for mobility that are present in pocket-sized printed books, and the format is best suited to largely unformatted text (e.g., prose). Diagrams, tables, and other layout translate quite poorly, and this is intrinsic to the display itself.

The one task to which the tablet format seems best suited is precisely e-book reading. So I've ditched the "smartphone" (a pocket snoop) and settled on laptop / desktop (productivity) + tablet (ebooks), and dedicated devices for specific other applications, most especially capture (audio, images, video).

"The Case Against Tablets"

https://joindiaspora.com/posts/880e5c403edb013918e1002590d8e...

Re: Entire website in a single HTML file

#204

Earlier quoted context omitted.

Depends of what a website is for you.

The same it is for everyone since the beginning of WWW: a static page with images. The web is uniquely unsuitable for anything else.

So forget e-commerce? Amazon didn't do too badly and CGI was hot on the heels of HTML so I think "everyone" is a little exaggerated.

Re: Entire website in a single HTML file

#205

Earlier quoted context omitted.

You're describing PDF files, but unfortunately Adobe didn't invest much time or money into making them interactive with a scripting language.

The problem with PDF's has always been the layman can't create them without some expensive Adobe program.

Any modern office suite (MS Office, Libreoffice, Google Apps) has PDF export. Many image editing applications can do it too.

Re: Entire website in a single HTML file

#206

I have no idea whether or not the lightness of websites measured in kB is going to drive a trend. But there is definitely a trend that our collective cost models are downshifting from “ah fuck it’ll be faster by the time this ships” to “well right this minute we’re not zero-effort scaling on the backs of the deep-infrastructure people”. Maybe this perspective is perverse, but I personally find it cool that there’s bo…

Ive never come across that attitude about 6 months later but definitely “works on my $2k machine so ship” which is probably equivalent.

Re: Entire website in a single HTML file

#207

Lovely article and such an interesting way of creating single page apps. I never knew about this usage of the :target selector. I think a major issue with this approach is just practicability - I'd want to write my content in something like markdown and we will anyway need JS to convert the markdown to HTML. I have also been interested in making SPAs, my my way is more traditional. Using javascript for the stitching.…

There are plenty of non-JS converters from Markdown to HTML and static websites are a thing.

It is a static site. Only that I decided to hand roll my own implementation instead of using something like Jekyll.

And as it doesn't have any server for the markdown (they are just CDN files), I have to use JS to do the translation to HTML.

Re: Entire website in a single HTML file

#208
post #8

This is something I've always wanted for virtual textbooks. A single .html file with all the JS, CSS, images as inline data blobs, etc. For most physics, math, CS, etc books, this should be possible. It would make it trivial to download the book for offline use and share it with others. Other than the raster images, the entire content of these types of books would probably fit in a couple MB of text. The use of #anch…

That would be perfect for books, but I rather they take advantage of the medium and make the examples interactive: I rather see how the results change when I change the inputs than have it all in one file.

Re: Entire website in a single HTML file

#210
post #204

Earlier quoted context omitted.

The same it is for everyone since the beginning of WWW: a static page with images. The web is uniquely unsuitable for anything else.

So forget e-commerce? Amazon didn't do too badly and CGI was hot on the heels of HTML so I think "everyone" is a little exaggerated.

> So forget e-commerce?

Says (s)he and immediately follows up with

> Amazon didn't do too badly

Post reply on HN