MCPcopy Create free account
hub / github.com/JacobLinCool/LeetCode-Stats-Card / Username

Function Username

packages/core/src/elements.ts:89–116  ·  view source on GitHub ↗
(username: string, site: string)

Source from the content-addressed store, hash-verified

87}
88
89export function Username(username: string, site: string) {
90 const item = new Item("a", {
91 id: "username",
92 attr: {
93 href:
94 username === "User Not Found"
95 ? "https://github.com/JacobLinCool/LeetCode-Stats-Card"
96 : `https://leetcode.${site === "us" ? "com" : "cn"}/${username}/`,
97 target: "_blank",
98 },
99 style: {
100 transform: "translate(65px, 40px)",
101 },
102 children: [
103 new Item("text", {
104 id: "username-text",
105 content: username,
106 style: {
107 fill: "var(--text-0)",
108 "font-size": "24px",
109 "font-weight": "bold",
110 },
111 }),
112 ],
113 });
114
115 return item;
116}
117
118export function Ranking(ranking: number) {
119 const item = new Item("text", {

Callers 1

elements.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected