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…
Entire website in a single HTML file
101–110 of 333 posts
Re: Entire website in a single HTML file
#102Earlier quoted context omitted.
No, not a SPA. There is a concept of a single file app (SFA). You can share an html file, and that is the application. It can have inlined micro js/css frameworks, or hand-rolled everything. An SFA should be human readable though- viewing the page source is useful. I think it’s a concept worth exploring.
But what is the benefit?
No build tools required. Take this file and open it with a web browser. Then modify it, and refresh the browser.
Distribution and Development for applications is about as straightforward and accessible as it gets.
Re: Entire website in a single HTML file
#103How is this news? React SPAs have been around for years, and SPAs existed long before React too.
The example URL is a complete website within a single HTML document with no external dependencies and no further round-trip requests. It is a single-page site (SPS) or perhaps a multi-page file (MPF).
https://john-doe.neocities.org/
You can open that URL, disable networking, and browse the entire site to your heart's content in any browser supporting CSS.
If you open the file in a terminal browser (lynx, w3m, elinks[2], etc.), you'll see the full site presented at once, as a single page, without needing to specifically navigate between them (you can scroll the full site). Though the intra-site navigation itself still works --- it just doesn't reveal or hide sections.
Re: Entire website in a single HTML file
#104Re: Entire website in a single HTML file
#105The trick is kinda meh I feel. Yes you can make a pretty cool app in a single HTML file with some inline JavaScript to boot. Still possible today just ever more out of fashion
No JS here though, just CSS using :target. That's pretty cool if you don't want a JS dependency but want more control over interactivity and presentation.
Re: Entire website in a single HTML file
#106How is this news? React SPAs have been around for years, and SPAs existed long before React too.
No, not a SPA. There is a concept of a single file app (SFA). You can share an html file, and that is the application. It can have inlined micro js/css frameworks, or hand-rolled everything. An SFA should be human readable though- viewing the page source is useful. I think it’s a concept worth exploring.
Re: Entire website in a single HTML file
#107Earlier 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.
There have always been other tools for producing PDF (E.g. TeX) and there are also tons of free converters, print-to-PDF drivers, etc.
Re: Entire website in a single HTML file
#108Earlier quoted context omitted.
Keep in mind that single integrated book formats are highly viable now. It's in the interest of publishers not to offer them, however. A chief example that comes to mind is the Feynman Lectures in Physics series, which are available online but only in a chapter-by-chapter basis in HTML format. (Quite beautifully formatted, FWIW.) If you want to glue those together into a single integrated whole, you'll have to do tha…
It makes sense from a DRM standpoint - PDFs and ePub are easy to crack if you offer it at all, so the only way to fix this is to go web-only and assume nobody will want to dig into turning that into a sharable PDF. Bonus points if you make it a SaaS test platform and get universities to buy into it, forcing every student to purchase the 'book' to receive grades.
Copyright status means that anyone who glues together the set will find themselves pursued for infringement.
In practice, the question's moot as the Feynman Lectures are available via LibGen, ZLib, and similar resources.
Re: Entire website in a single HTML file
#109Earlier quoted context omitted.
Hum... You may be thinking about a page being a file. A site is a collection of those.
A site is a website is the thing behind a domain name. Many were, and are, a single file. Its the rest of ya'll that are overcomplicating things and somehow perverted that to thinking its necessary. How many layers of meta are we right now for this article to be interesting?
Re: Entire website in a single HTML file
#110I'm picturing way to many people viewing this today and thinking "Wow! Websites can be made without React? I will upvote!"
Are we at a point where university Web101 classes just jump straight into SPAs?