1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-04 15:50:08 +05:30

add meet page and update image style

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2023-01-30 22:25:21 +05:30
parent 7f4e4f5938
commit 921f5ee883
8 changed files with 105 additions and 11 deletions
+54
View File
@@ -0,0 +1,54 @@
customElements.define(
"cal-com",
class extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
(function (C, A, L) {
let p = function (a, ar) {
a.q.push(ar);
};
let d = C.document;
C.Cal =
C.Cal ||
function () {
let cal = C.Cal;
let ar = arguments;
if (!cal.loaded) {
cal.ns = {};
cal.q = cal.q || [];
d.head.appendChild(d.createElement("script")).src = A;
cal.loaded = true;
}
if (ar[0] === L) {
const api = function () {
p(api, arguments);
};
const namespace = ar[1];
api.q = api.q || [];
typeof namespace === "string"
? (cal.ns[namespace] = api) && p(api, ar)
: p(cal, ar);
return;
}
p(cal, ar);
};
})(window, "https://app.cal.com/embed/embed.js", "init");
Cal("init", { origin: "https://app.cal.com" });
Cal("inline", {
elementOrSelector: "#calcom-widget",
calLink: "avinal",
});
Cal("ui", {
theme: "dark",
styles: {
branding: { brandColor: "#009fb1" },
},
hideEventTypeDetails: false,
});
}
}
);
+4
View File
@@ -41,6 +41,10 @@ customElements.define(
return `<p>${text}</p>`;
};
renderer.image = (href, title, text) => {
return `<img class="max-w-xs grow-0 shrink-0 basis-auto w-full" src=${href} alt="${text}">`;
};
marked.setOptions({
renderer: renderer,
highlight: function (code, lang) {