News for hackers. Stuff that matters.
Re:Implementing single-file web components by woodrowbarlow on Monday March 23, 2020 @11:34AM (#22665053)
it was proposed and implemented, then the standards body did an about-face.

https://hacks.mozilla.org/2015/06/the-state-of-web-component... (ctrl+f "HTML Imports")

"HTML Imports do lend themselves well to a simpler/more declarative workflow. [...] Imports don’t offer enough control to be taken seriously as a dependency management solution. [...] Mozilla had a working implementation behind a flag, but struggled through an incomplete specification."

which to me reads a bit like: "js frameworks won't use it, and the spec didn't get enough love because everybody's only thinking about frameworks rather than vanilla-js."

Re:Implementing single-file web components by tomphoolery on Monday March 23, 2020 @12:23PM (#22665511)
Actually, they are waiting for module Imports to standardize and get some actual real-world usage. Once that happens, they may move onto HTML Imports. But I feel like they could probably get away with just doing `import Template from "./somefile.html"` using module resolvers.
Re:Implementing single-file web components by goatlover on Monday March 23, 2020 @01:32PM (#22666395)
It's disappointing that JS Frameworks are driving the HTML spec.
Re:Implementing single-file web components by spankalee on Monday March 23, 2020 @05:48PM (#22669182)
HTML Imports was not an <include> mechanism though.

It was much more akin to JS imports. HTML files would be side-effectful, then you could use the elements they defined, like <x-foo>.

Re:Implementing single-file web components by chrisfinazzo on Monday March 23, 2020 @01:24PM (#22666287)
Sigh.

A web that was built on documents fragments because the JS and server-side developers think writing raw HTML and CSS is gross.

Email developers would like a word with them.

This isn't going away, and at some point, adding more abstractions is actually harmful.

As I have little else to do at this point - Tl;dr When you work for a public library, but are closed the public, nothing happens - I'm rewriting a small microsite I made for job hunting purposes.

Other than a Service Worker cache, it's markup and styles all the way down, stitched together with Make.

For my blog, I've stuck with Liquid, because Jekyll - which I actually like (ducks) - will be interesting to see if this gets revived and actually lands one day.

Re:Implementing single-file web components by the_other on Monday March 23, 2020 @02:03PM (#22666798)
_This_ front end developer _loves_ writing HTML and CSS, regardless of my previous several years of JS, React, Angular, Backbone etc.
Re:Implementing single-file web components by woodrowbarlow on Monday March 23, 2020 @01:43PM (#22666560)
would you mind sharing the source or stack for your microsite? your setup sounds like something i'd enjoy using.
Re:Implementing single-file web components by chrisfinazzo on Monday March 23, 2020 @02:36PM (#22667154)
Code is here - https://github.com/chrisfinazzo/reverse-job-posting

Started on GH Pages, but moved to Netlify which gives me a bit more fine grained control.

Pardon the dust;

First, I'm not a graphic designer and second this is actually an older deploy that I've "locked" so I can continue tinkering with the master branch behind the scenes. Will be a single page with just anchors to navigate when done.

Everything old is new again. Homepages, kids, ask your parents about them :)

Re:Implementing single-file web components by chrisweekly on Monday March 23, 2020 @03:49PM (#22667991)
I vaguely recall doing things with server-side includes and ".shtml" in the late '90s...
Re:Implementing single-file web components by getpost on Tuesday March 24, 2020 @11:41AM (#22675486)
I still have a website that uses server-side includes fro the navbar and other common page elements.

https://en.wikipedia.org/wiki/Server_Side_Includes