Sure! I admit I have a very naive sense of speed and size on these internet tubes.
My thinking was that the feature would be a half way point between knowing nothing about the sutta being cited and clicking away from the forum to go read it. All with the purpose of increasing individual’s understanding as well as improve the discussions that happen. And possibly making more people feel confident in participating. But those are really just theories.
Sure. I always had the idea that the suttaplex could be supplied as an API with a front end web component to render it, then it can be dropped into any website. Basically you need:
litelement (7kb gzipped)
the API data
the suttaplex templates (all up, about 17kb gzipped; I’m not sure how much of that is actually needed)
The templates and Litelement would be a once only cost, they are reused; the API data is per embed.
Wrap it up as <sc-suttaplex-embed> and you’re good to go.
You’d probably get it in 50kb? Maybe less if you really tried. The main thing you should not import are the fonts, which are over 1 MB. Okay for a website, not for an embed.
By way of comparison, a single tweet can use 25 network calls or more and take megabytes of bandwidth. Basically, on the modern web, if you’re not serving advertising and tracking, you’re a mile ahead.
I’m not really sure how it should be done exactly, but I do believe it would be quite simple to adapt our suttaplex to use on third-party websites. And I also suspect that if you try to build a different component or API, it’s going to be a lot of work, and any advantage over simply reusing what we have built will be trivial at best.
You’d probably be able to do it as a simplified version of the suttaplex; it’s modular, so you could probably omit, say, the parallels or the other language translations without too big of a deal.