Appearance
πΌ Complex Encrypted Example with WBC-Routes2 β
WBC-Routes2 isn't just for small payloads or simple Markdown β it can handle full UIs, layouts, interactions, even localized views and SEO metadata, embedded directly in an encrypted string.
π§ͺ What This Example Contains β
This example demonstrates:
- π Multiple Markdown sections
- π₯ Embedded video
- πΌοΈ Inline images
- π§© Vue components (Vuetify, WBDataViewer)
- π Click-to-toggle interactions
- π Multi-language routing
- π§ Metadata injection (SEO, social)
- π All passed as compressed prop
π¦ Build the Route Payload β
Letβs create a large WBC-compatible array:
js
const fullView = [
"<~VContainer|pa-10 grey lighten-5>",
{
comp: "VCard",
options: {
class: "pa-5 mb-3 teal white--text",
html: "π This entire page is rendered from an encrypted route!"
}
},
{
comp: "MD",
options: {
src: `# Welcome
This Markdown was included **inside** an encrypted prop.
It renders exactly like any local file.`
}
},
{
comp: "VBtn",
dive: true,
options: {
class: "primary mb-4",
html: "π― Click me to toggle alert below",
on: {
click: (that) => () => {
that.data.alert.options.hide = !that.data.alert.options.hide;
}
}
}
},
{
name: "alert",
comp: "VAlert",
options: {
html: "π Toggled alert content!",
type: "info",
hide: true
}
},
{
comp: "WBDataViewer",
options: {
value: {
user: "Wissem",
project: "WBC-Routes2",
status: "Live"
}
}
},
"./0.mp4", // Sample video file
"./jp0.jpg", // Sample image
"./jp1.jpg", // Another image
{
comp: "meta",
title: {
en: "Encrypted Showcase",
fr: "DΓ©monstration ChiffrΓ©e"
},
description: "A powerful encrypted dynamic route with Vue, Markdown and metadata",
"og:title": "Encrypted Vue View",
"twitter:card": "summary_large_image",
"twitter:image": "http://wi-bg.com/assets/wbc-ui2-preview.png"
}
];π Encode It β
Use lz-string to create a secure URL parameter:
js
import { compressToEncodedURIComponent } from "lz-string";
const encoded = compressToEncodedURIComponent(JSON.stringify(fullView));
const link = `/wbc/route/`{encoded}`;
console.log("π Shareable Route:", link);π Sample Vue Route β
WBC will render everything as if it were a local file.
js
{
path: "/wbc/route/:item",
name: "WBCDynamicEncrypted",
component: WBC,
props: route => ({
item: JSON.parse(
decompressFromEncodedURIComponent(route.params.item)
)
}),
}π Trigger it via Button β
You can even navigate programmatically from inside a component:
js
this.`router.push({
name: "WBCDynamicEncrypted",
params: {
item: compressToEncodedURIComponent(JSON.stringify(fullView)),
}
});πΈ Screenshot β
The encrypted link would show:
- A VCard
- Markdown block
- A toggleable alert
- A JSON viewer
- A video & images
- Metadata used for SEO and social previews
β Benefits β
- No extra .vue files or build steps
- No custom layout registration needed
- Secure, encoded, and easy to share
- Makes VuePress or Vue-powered dashboards much more dynamic
π Final Note β
Encrypted dynamic props in WBC-Routes2 are not just a trick β theyβre a design strategy. Build modular interfaces that can:
- Render from outside data
- Be previewed live
- Merge content types
- Localize and optimize SEO in one go
Perfect for documentation tools, CMS previews, education platforms, and modern apps.