haxtheweb / issues

Issue queue for hax, haxcms, elmsln, lrnwebcomponents, wcfactory, websites and more.
Apache License 2.0
11 stars 2 forks source link

[haxcms] replace-tag injection prototype #522

Closed btopro closed 3 years ago

btopro commented 3 years ago

working on a prototype of haxcms's site builder actually forcing a rewrite at run time via regex. Things to clean up in this though it is working it would appear:

btopro commented 3 years ago

many names changed and cleaned up in implementation. import-only will trigger an import of the tag and then self removal. This is useful for NOT replacing the tag in context but ensuring the definition loads based on passing into the viewport importing-text - what it says as it is visible to the user while importing. This also is the "Click to view" on low power environments import-method - if it should import on view or device capabilities (or automatic, default). View will FORCE a load even on low performance environments while things without this set (like a meme in content) would only load if it's been clicked on for low performance unless the import-method="view" is specifically set.

btopro commented 3 years ago

https://dev.to/btopro/replace-tag-dynamically-load-content-based-on-device-capabilities-5d3i