-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f2d054
commit ca6d4ee
Showing
5 changed files
with
56 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pnpm-lock.yaml | ||
# In order to avoid code samples to have tabs, they don't display well on npm | ||
README.md | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
{ | ||
"name": "@huggingface/space-header", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"type": "module", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsup ./src" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"tsup": "^8.1.0", | ||
"typescript": "^5.4.5" | ||
} | ||
"name": "@huggingface/space-header", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"type": "module", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"scripts": { | ||
"build": "tsup ./src", | ||
"lint": "eslint --quiet --fix --ext .cjs,.ts .", | ||
"lint:check": "eslint --ext .cjs,.ts .", | ||
"format": "prettier --write .", | ||
"format:check": "prettier --check .", | ||
"prepublishOnly": "pnpm run build" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"tsup": "^8.1.0", | ||
"typescript": "^5.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
export const Username = (username: string) => { | ||
const element = document.createElement("a"); | ||
export const Username: (username: string) => HTMLAnchorElement = (username: string) => { | ||
const element = document.createElement("a"); | ||
|
||
element.setAttribute("href", `https://huggingface.co/${username}`); | ||
element.setAttribute("rel", "noopener noreferrer"); | ||
element.setAttribute("target", "_blank"); | ||
element.setAttribute("href", `https://huggingface.co/${username}`); | ||
element.setAttribute("rel", "noopener noreferrer"); | ||
element.setAttribute("target", "_blank"); | ||
|
||
element.style.color = "rgb(107, 114, 128)" | ||
element.style.textDecoration = "none"; | ||
element.style.fontWeight = "400"; | ||
element.style.fontSize = "16px"; | ||
element.style.lineHeight = "24px"; | ||
element.style.flex = "none"; | ||
element.style.fontFamily = "Source Sans Pro, sans-serif" | ||
element.style.color = "rgb(107, 114, 128)"; | ||
element.style.textDecoration = "none"; | ||
element.style.fontWeight = "400"; | ||
element.style.fontSize = "16px"; | ||
element.style.lineHeight = "24px"; | ||
element.style.flex = "none"; | ||
element.style.fontFamily = "Source Sans Pro, sans-serif"; | ||
|
||
element.addEventListener("mouseover", () => { | ||
element.style.color = "#2563eb"; | ||
}); | ||
element.addEventListener("mouseout", () => { | ||
element.style.color = "rgb(107, 114, 128)"; | ||
}); | ||
element.addEventListener("mouseover", () => { | ||
element.style.color = "#2563eb"; | ||
}); | ||
element.addEventListener("mouseout", () => { | ||
element.style.color = "rgb(107, 114, 128)"; | ||
}); | ||
|
||
element.textContent = username; | ||
element.textContent = username; | ||
|
||
return element; | ||
} | ||
return element; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineConfig } from 'tsup' | ||
import { defineConfig } from "tsup"; | ||
|
||
export default defineConfig({ | ||
target: 'es2020', | ||
format: ['cjs', 'esm'], | ||
splitting: false, | ||
sourcemap: true, | ||
clean: true, | ||
dts: true | ||
}) | ||
target: "es2020", | ||
format: ["cjs", "esm"], | ||
splitting: false, | ||
sourcemap: true, | ||
clean: true, | ||
dts: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ packages: | |
- "packages/tasks" | ||
- "packages/gguf" | ||
- "packages/jinja" | ||
- "packages/space-header" |