diff --git a/.vscode/settings.json b/.vscode/settings.json index 71ae50ad..b6b85f89 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,8 @@ { - "deno.enable": false -} + "markdown.validate.referenceLinks.enabled": "ignore", + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "deno.enable": true +} \ No newline at end of file diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 00000000..094bdc8c Binary files /dev/null and b/public/logo.png differ diff --git a/src/components/Button.astro b/src/components/Button.astro index b2202ea2..d5bfaf46 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -7,6 +7,9 @@ export interface Props { const { href, body } = Astro.props; --- - + {body} + + + diff --git a/src/components/Card.astro b/src/components/Card.astro deleted file mode 100644 index 3f10ef2d..00000000 --- a/src/components/Card.astro +++ /dev/null @@ -1,64 +0,0 @@ ---- -export interface Props { - title: string; - body: string; - href: string; -} - -const { href, title, body } = Astro.props; ---- - - - diff --git a/src/components/Description.astro b/src/components/Description.astro index 0019a14f..8ed07c62 100644 --- a/src/components/Description.astro +++ b/src/components/Description.astro @@ -7,6 +7,6 @@ export interface Props { const { text, id } = Astro.props; --- -

+

{text}

diff --git a/src/components/Header.astro b/src/components/Header.astro index 326c26ee..b2be1ef2 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -7,6 +7,6 @@ export interface Props { const { text, id } = Astro.props; --- -

+

{text}

diff --git a/src/components/Input.astro b/src/components/Input.astro index 4a0cc6f0..1d3e381c 100644 --- a/src/components/Input.astro +++ b/src/components/Input.astro @@ -2,4 +2,4 @@ const props = Astro.props; --- - + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index f51dada9..ddcb3e28 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -38,9 +38,15 @@ import "../styles/main.css";
-
-
-
+
+
+
+
diff --git a/src/pages/404.astro b/src/pages/404.astro index 0b24f35c..2bf574d4 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -9,6 +9,8 @@ import Layout from "../layouts/Layout.astro";
-
diff --git a/src/pages/api/badge/[username].ts b/src/pages/api/badge/[username].ts index b9f8d475..411c4290 100644 --- a/src/pages/api/badge/[username].ts +++ b/src/pages/api/badge/[username].ts @@ -11,7 +11,7 @@ interface QueryParams { display?: string; } -export const get = async function get({ params, request }: { params: { username: string }; request: Request }): Promise { +export const GET = async function GET({ params, request }: { params: { username: string }; request: Request }): Promise { try { const query = new URL(request.url).searchParams; const { label, labelColor, color, style, format, display }: QueryParams = Object.fromEntries(query); diff --git a/src/pages/api/json/[username].ts b/src/pages/api/json/[username].ts index 75fd24ad..4feef625 100644 --- a/src/pages/api/json/[username].ts +++ b/src/pages/api/json/[username].ts @@ -6,7 +6,7 @@ type Response = { body: string; }; -export const get = async function get({ params }: { params: { username: string } }): Promise { +export const GET = async function GET({ params }: { params: { username: string } }): Promise { try { const { username } = params; if (!username) { diff --git a/src/pages/index.astro b/src/pages/index.astro index af8a47c7..42e9ffe5 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -9,9 +9,9 @@ let url = "/api/badge/example";
-
+
-
+
-
- +
+
@@ -133,12 +133,12 @@ let url = "/api/badge/example"; examples.classList.remove("hidden"); rendered.classList.add("hidden"); description.classList.add("hidden"); - header.innerText = "Examples"; + header.innerText = "Examples 🔥"; } else { examples.classList.add("hidden"); rendered.classList.remove("hidden"); description.classList.remove("hidden"); - header.innerText = "Your badges"; + header.innerText = "Your badges 🎉"; } document.querySelectorAll(".pre").forEach((pre) => { const settings = pre.innerText.split("?"); @@ -146,6 +146,7 @@ let url = "/api/badge/example"; pre.innerText = `${base}?${settings[1]}`; }); document.querySelectorAll("img").forEach((img) => { + if (img.classList.contains("noreplace")) return; const settings = img.src.split("?")[1]; img.src = string + "?" + settings; }); diff --git a/src/styles/fonts.css b/src/styles/fonts.css index 68300b9e..d29a7290 100644 --- a/src/styles/fonts.css +++ b/src/styles/fonts.css @@ -1 +1 @@ -@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;900&display=swap"); diff --git a/src/styles/styles.css b/src/styles/styles.css index 4fae19a6..e98b7c18 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -1,12 +1,12 @@ tr, td, th { - @apply max-w-md overflow-x-auto overflow-y-hidden border-[2px] border-white/10 p-2; + @apply max-w-md overflow-x-auto overflow-y-hidden border-[1px] border-neutral-800 p-2; } pre { word-wrap: normal; - @apply select-all overflow-x-auto overflow-y-hidden break-normal rounded-sm bg-white/10 px-2 py-1; + @apply select-all overflow-x-auto overflow-y-hidden break-normal rounded-sm bg-neutral-800 px-2 py-1; } ::selection { @@ -15,26 +15,30 @@ pre { * { @apply box-border; - scrollbar-color: #08152b transparent; + scrollbar-color: #262626 transparent; scrollbar-width: thin; } ::-webkit-scrollbar { - @apply h-[10px] w-[10px]; + @apply w-[10px]; } ::-webkit-scrollbar-track { - @apply rounded-xl bg-[#040d21]; + @apply rounded-xl bg-neutral-800; } ::-webkit-scrollbar-thumb { - @apply rounded-xl bg-[#1f2532]; + @apply rounded-xl bg-neutral-700; } ::-webkit-scrollbar-thumb:hover { - @apply bg-[#292f3d]; + @apply bg-neutral-600; } ::-webkit-scrollbar-thumb:active { - @apply bg-[#343b4a]; + @apply bg-neutral-500; +} + +::selection { + @apply text-white; } diff --git a/tailwind.config.js b/tailwind.config.js index 01e2f21d..2347167b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,15 +9,12 @@ module.exports = { fontFamily: { inter: ["Inter", ...fontFamily.sans], }, - fontWeight: { - semibold: 700, - }, colors: { - background: "#040d21", - "background-secondary": "#08152b", + background: "#101110", + "background-secondary": "#161617", }, boxShadow: { - main: "0 0 500px 100px rgba(0, 134, 245, 0.05)", + main: "0 0 500px 100px rgb(16, 17, 16)", }, }, }, @@ -31,8 +28,6 @@ module.exports = { }), /* eslint-disable global-require */ require("@igorkowalczyk/is-browser"), - require("@tailwindcss/forms"), - require("tailwindcss-text-fill"), /* eslint-enable global-require */ ], }; diff --git a/tsconfig.json b/tsconfig.json index 48f8dc46..c80b87c9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "astro/tsconfigs/strict", "compilerOptions": { + "verbatimModuleSyntax": true, "baseUrl": ".", "paths": { "@/*": ["src/*"]
Style