Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign site #810

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
> Don't forget to replace example `YOUR-USERNAME` parameter with real value.

## ✨ Basic usage
- Go to https://github-views.deno.dev and enter your Github username or any other text
- Go to https://views.igorkowalczyk.dev and enter your Github username or any other text
- Copy the generated markdown code with the style you like and paste it in your `README.md` file

```markdown
![Github Views](https://github-views.deno.dev/api/badge/YOUR-USERNAME)
![Github Views](https://views.igorkowalczyk.dev/api/badge/YOUR-USERNAME)
```

## 🖼️ Available styles
Expand All @@ -36,8 +36,8 @@

| Style | Example | Usage |
| ----- | ---- | ---- |
| `flat` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true) | `style=flat` |
| `classic` | ![](https://github-views.deno.dev/api/badge/example?style=classic&display=true) | `style=classic` |
| `flat` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true) | `style=flat` |
| `classic` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=classic&display=true) | `style=classic` |

> [!NOTE]
> To apply the style, add to the URL `?style=YOUR-STYLE`, if you use other parameters you can use `&style=YOUR-STYLE`
Expand All @@ -49,17 +49,17 @@

| Color | Example | Usage | Label Color | Label usage |
| ----- | ---- | ---- | ---- | ---- |
| `blue` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=blue) | `color=blue` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=blue) | `labelColor=blue` |
| `cyan` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=cyan) | `color=cyan` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=cyan) | `labelColor=cyan` |
| `green` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=green) | `color=green` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=green) | `labelColor=green` |
| `yellow` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=yellow) | `color=yellow` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=yellow) | `labelColor=yellow` |
| `orange` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=orange) | `color=orange` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=orange) | `labelColor=orange` |
| `red` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=red) | `color=red` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=red) | `labelColor=red` |
| `pink` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=pink) | `color=pink` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=pink) | `labelColor=pink` |
| `purple` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=purple) | `color=purple` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=purple) | `labelColor=purple` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=gray) | `labelColor=gray` |
| `gray` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=gray) | `color=gray` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=gray) | `labelColor=gray` |
| `black` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=black) | `color=black` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=black) | `labelColor=black` |
| `ff69b4` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&color=ff69b4) | `color=ff69b4` | ![](https://github-views.deno.dev/api/badge/example?style=flat&display=true&labelColor=ff69b4) | `labelColor=ff69b4` |
| `blue` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=blue) | `color=blue` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=blue) | `labelColor=blue` |
| `cyan` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=cyan) | `color=cyan` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=cyan) | `labelColor=cyan` |
| `green` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=green) | `color=green` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=green) | `labelColor=green` |
| `yellow` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=yellow) | `color=yellow` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=yellow) | `labelColor=yellow` |
| `orange` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=orange) | `color=orange` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=orange) | `labelColor=orange` |
| `red` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=red) | `color=red` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=red) | `labelColor=red` |
| `pink` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=pink) | `color=pink` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=pink) | `labelColor=pink` |
| `purple` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=purple) | `color=purple` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=purple) | `labelColor=purple` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=gray) | `labelColor=gray` |
| `gray` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=gray) | `color=gray` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=gray) | `labelColor=gray` |
| `black` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=black) | `color=black` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=black) | `labelColor=black` |
| `ff69b4` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&color=ff69b4) | `color=ff69b4` | ![](https://views.igorkowalczyk.dev/api/badge/example?style=flat&display=true&labelColor=ff69b4) | `labelColor=ff69b4` |

> [!NOTE]
> To apply the style, add to the URL `?color=YOUR-COLOR`, if you use other parameters you can use `&color=YOUR-COLOR`
Expand All @@ -71,10 +71,10 @@

You can overwrite default `Views` text with your own label.

![](https://github-views.deno.dev/api/badge/example?label=Your+own+label&display=true&color=blue)
![](https://views.igorkowalczyk.dev/api/badge/example?label=Your+own+label&display=true&color=blue)

```markdown
![Github Views](https://github-views.deno.dev/api/badge/YOUR-USERNAME?label=Your+own+label)
![Github Views](https://views.igorkowalczyk.dev/api/badge/YOUR-USERNAME?label=Your+own+label)
```

> [!NOTE]
Expand All @@ -89,7 +89,7 @@ You can get the number of views in `json` format. It can be useful if you want t

**Request:**
```
https://github-views.deno.dev/api/json/YOUR-USERNAME
https://views.igorkowalczyk.dev/api/json/YOUR-USERNAME
```
> [!NOTE]
> Replace `YOUR-USERNAME` with your real value.
Expand Down
10 changes: 8 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
// https://astro.build/config
import preact from "@astrojs/preact";
import tailwind from "@astrojs/tailwind";
import deno from "@deno/astro-adapter";
import { defineConfig } from "astro/config";
import compress from "astro-compressor";

// https://astro.build/config
export default defineConfig({
output: "server",
site: "https://github-views.deno.dev",
site: "https://views.igorkowalczyk.dev",
redirects: {
"/github": "https://github.com/igorkowalczyk/views",
"/docs": "https://github.com/IgorKowalczyk/github-views?tab=readme-ov-file#-basic-usage",
},
adapter: deno(),
integrations: [tailwind()],
integrations: [tailwind(), preact(), compress()],
});
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@igorkowalczyk/views",
"version": "3.0.0",
"version": "4.0.0",
"description": "👀 Count the views of your github profile with your own custom badge",
"private": true,
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs",
"preview": "deno run --allow-net --allow-read --allow-env --unstable-kv ./dist/server/entry.mjs",
"format": "prettier . --write --ignore-unknown --cache --plugin=prettier-plugin-astro",
"format:check": "prettier . --check --cache",
"lint": "eslint .",
Expand All @@ -31,30 +31,33 @@
"bugs": {
"url": "https://github.com/IgorKowalczyk/github-views/issues"
},
"homepage": "https://github-views.deno.dev/",
"homepage": "https://views.igorkowalczyk.dev/",
"dependencies": {
"@astrojs/preact": "4.0.0",
"@astrojs/tailwind": "5.1.3",
"@deno/astro-adapter": "0.2.0",
"@igorkowalczyk/is-browser": "5.0.4",
"@types/canvas-confetti": "1.6.4",
"astro": "5.0.5",
"astro-compressor": "1.0.0",
"autoprefixer": "10.4.20",
"badgen": "3.2.3",
"canvas-confetti": "1.9.3",
"mini-svg-data-uri": "1.4.4",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"postcss": "8.4.49",
"preact": "10.25.2",
"sharp": "0.33.5",
"tailwindcss": "3.4.16",
"tailwindcss-text-fill": "0.2.0"
"tailwind-merge": "2.5.5",
"tailwindcss": "3.4.16"
},
"devDependencies": {
"@igorkowalczyk/eslint-config": "3.0.0-beta.16",
"@igorkowalczyk/prettier-config": "3.0.0-beta.16",
"@tailwindcss/forms": "0.5.9",
"@typescript-eslint/eslint-plugin": "8.18.0",
"@typescript-eslint/parser": "8.18.0",
"autoprefixer": "10.4.20",
"eslint": "9.16.0",
"eslint-plugin-astro": "1.3.1",
"postcss": "8.4.49",
"prettier": "3.4.2",
"prettier-plugin-astro": "0.14.1",
"prettier-plugin-tailwindcss": "0.6.9"
Expand Down
Loading
Loading