├── .gitignore ├── README.md ├── app.vue ├── assets └── css │ └── main.css ├── components ├── Navbar.vue └── SpotifyCard.vue ├── layouts └── default.vue ├── nuxt.config.ts ├── package.json ├── pages ├── anilist.vue ├── index.vue └── me.vue ├── plugins └── socket.ts ├── pnpm-lock.yaml ├── public ├── favicon.ico └── robots.txt ├── server └── tsconfig.json ├── tailwind.config.js └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | 9 | # Node dependencies 10 | node_modules 11 | 12 | # Logs 13 | logs 14 | *.log 15 | 16 | # Misc 17 | .DS_Store 18 | .fleet 19 | .idea 20 | 21 | # Local env files 22 | .env 23 | .env.* 24 | !.env.example 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nuxt Minimal Starter 2 | 3 | Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. 4 | 5 | ## Setup 6 | 7 | Make sure to install dependencies: 8 | 9 | ```bash 10 | # npm 11 | npm install 12 | 13 | # pnpm 14 | pnpm install 15 | 16 | # yarn 17 | yarn install 18 | 19 | # bun 20 | bun install 21 | ``` 22 | 23 | ## Development Server 24 | 25 | Start the development server on `http://localhost:3000`: 26 | 27 | ```bash 28 | # npm 29 | npm run dev 30 | 31 | # pnpm 32 | pnpm dev 33 | 34 | # yarn 35 | yarn dev 36 | 37 | # bun 38 | bun run dev 39 | ``` 40 | 41 | ## Production 42 | 43 | Build the application for production: 44 | 45 | ```bash 46 | # npm 47 | npm run build 48 | 49 | # pnpm 50 | pnpm build 51 | 52 | # yarn 53 | yarn build 54 | 55 | # bun 56 | bun run build 57 | ``` 58 | 59 | Locally preview production build: 60 | 61 | ```bash 62 | # npm 63 | npm run preview 64 | 65 | # pnpm 66 | pnpm preview 67 | 68 | # yarn 69 | yarn preview 70 | 71 | # bun 72 | bun run preview 73 | ``` 74 | 75 | Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. 76 | -------------------------------------------------------------------------------- /app.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /assets/css/main.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /components/Navbar.vue: -------------------------------------------------------------------------------- 1 | 55 | -------------------------------------------------------------------------------- /components/SpotifyCard.vue: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /nuxt.config.ts: -------------------------------------------------------------------------------- 1 | // https://nuxt.com/docs/api/configuration/nuxt-config 2 | export default defineNuxtConfig({ 3 | devtools: { enabled: true }, 4 | modules: ["@nuxtjs/sanity", "@nuxt/icon"], 5 | css: ["~/assets/css/main.css"], 6 | sanity: { 7 | projectId: "5nqk6zg4", 8 | dataset: "production", 9 | }, 10 | postcss: { 11 | plugins: { 12 | tailwindcss: {}, 13 | autoprefixer: {}, 14 | }, 15 | }, 16 | compatibilityDate: "2025-01-01", 17 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-app", 3 | "private": true, 4 | "type": "module", 5 | "scripts": { 6 | "build": "nuxt build", 7 | "dev": "nuxt dev", 8 | "generate": "nuxt generate", 9 | "preview": "nuxt preview", 10 | "postinstall": "nuxt prepare" 11 | }, 12 | "dependencies": { 13 | "@nuxt/icon": "1.10.3", 14 | "@nuxtjs/sanity": "1.13.3", 15 | "nuxt": "^3.15.0", 16 | "vue": "latest", 17 | "vue-router": "latest" 18 | }, 19 | "packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf", 20 | "devDependencies": { 21 | "@iconify-json/material-symbols": "^1.2.12", 22 | "@iconify-json/mdi": "^1.2.2", 23 | "@iconify-json/simple-icons": "^1.2.17", 24 | "@tailwindcss/typography": "^0.5.15", 25 | "autoprefixer": "^10.4.20", 26 | "daisyui": "^4.12.23", 27 | "postcss": "^8.4.49", 28 | "tailwindcss": "^3.4.17" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pages/anilist.vue: -------------------------------------------------------------------------------- 1 | 67 | 157 | 172 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /pages/me.vue: -------------------------------------------------------------------------------- 1 | 94 | -------------------------------------------------------------------------------- /plugins/socket.ts: -------------------------------------------------------------------------------- 1 | //@ts-nocheck 2 | export default defineNuxtPlugin((nuxtApp) => { 3 | nuxtApp.hook("page:loading:end", () => { 4 | var searchParams = new URLSearchParams(window.location.search); 5 | if (!searchParams.toString()) { 6 | const OPCODES = { 7 | INFO: 0, 8 | HELLO: 1, 9 | INIT: 2, 10 | HEARTBEAT: 3, 11 | }; 12 | const ws = new WebSocket("wss://api.lanyard.rest/socket"); //lanyard websocket 13 | 14 | /* EVENTS */ 15 | ws.onmessage = ({ data }) => { 16 | const JSONdata = JSON.parse(data); 17 | 18 | if (JSONdata.op == OPCODES.HELLO) { 19 | ws.send( 20 | JSON.stringify({ 21 | op: OPCODES.INIT, 22 | d: { 23 | subscribe_to_id: "539843855567028227", 24 | }, 25 | }) 26 | ); 27 | 28 | setInterval(function () { 29 | ws.send( 30 | JSON.stringify({ 31 | op: OPCODES.HEARTBEAT, 32 | }) 33 | ); 34 | }, JSONdata.d.heartbeat_interval); 35 | } else if (JSONdata.op == OPCODES.INFO) { 36 | const updateSpotifyUI = (u) => { 37 | if (u.listening_to_spotify) { 38 | document 39 | .getElementById("spotifycheck") 40 | .classList.replace("hidden", "visible"); 41 | 42 | document.getElementById("albumart").src = u.spotify.album_art_url; 43 | document.getElementById("title").innerText = u.spotify.song; 44 | document.getElementById("artist").innerText = u.spotify.artist; 45 | } 46 | }; 47 | 48 | if (JSONdata.t == "INIT_STATE") { 49 | //first 50 | const u = JSONdata.d; //userdata 51 | document.getElementById( 52 | "avatar" 53 | ).src = `https://cdn.discordapp.com/avatars/539843855567028227/${u.discord_user.avatar}.png?size=4096`; 54 | updateSpotifyUI(u); 55 | } else if (JSONdata.t == "PRESENCE_UPDATE") { 56 | //update 57 | const u = JSONdata.d; 58 | document.getElementById( 59 | "avatar" 60 | ).src = `https://cdn.discordapp.com/avatars/539843855567028227/${u.discord_user.avatar}.png?size=4096`; 61 | updateSpotifyUI(u); 62 | } 63 | } 64 | }; //onmessage 65 | } 66 | }); 67 | }); 68 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/falsisdev/website/220226fe2b20e54bd3320f656fcf5a7a464eaa05/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./components/**/*.{js,vue,ts}", 5 | "./layouts/**/*.vue", 6 | "./pages/**/*.vue", 7 | "./plugins/**/*.{js,ts}", 8 | "./app.vue", 9 | "./error.vue", 10 | ], 11 | theme: { 12 | extend: {}, 13 | }, 14 | plugins: [require("daisyui"), require("@tailwindcss/typography")], 15 | daisyui: { 16 | themes: ["sunset", "dracula", "dim"], 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | --------------------------------------------------------------------------------