diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index caebb06..dc73eb4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -52,13 +52,40 @@ jobs: # ----------------------------------------------- +# Screenshot of website + + screenshot: + runs-on: ubuntu + needs: [codacy-security-scan] + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm ci + + - name: Run screenshot script + run: npm run screenshot + + - name: Commit and push if it changed + run: | + git config --global user.name 'Automated' + git config --global user.email 'actions@users.noreply.github.com' + git add -A + git diff --quiet && git diff --staged --quiet || (git commit -m 'Update: screenshot' && git push) + # Building the website build: runs-on: self-hosted - needs: [codacy-security-scan] + needs: [codacy-security-scan, screenshot] steps: - uses: actions/checkout@v3 # Install Dependenices diff --git a/.vscode/launch.json b/.vscode/launch.json index d642209..9240064 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,7 @@ { "version": "0.2.0", "configurations": [ + { "command": "./node_modules/.bin/astro dev", "name": "Development server", diff --git a/astro.config.mjs b/astro.config.mjs index 525e011..d10cbf2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,6 @@ -import { defineConfig } from "astro/config"; -import mdx from "@astrojs/mdx"; +import { defineConfig } from 'astro/config'; +import mdx from '@astrojs/mdx'; + // https://astro.build/config export default defineConfig({ @@ -8,5 +9,6 @@ export default defineConfig({ port: 7053 }, cacheDir: "./src/*", - integrations: [mdx()] + integrations: [mdx()], + experimental: {} }); \ No newline at end of file diff --git a/package.json b/package.json index 0b8fc66..3be29b4 100644 --- a/package.json +++ b/package.json @@ -3,27 +3,24 @@ "type": "module", "version": "0.0.1", "scripts": { - "dev": "astro dev", + "dev": "astro dev ", "start": "astro dev", "build": "astro build", - "test:e2e": "playwright test", - "playwright": "playwright", - "fmt": "prettier ", - "astro": "astro" + "astro": "astro", + "screenshot": "node screenshot.js", + "clear": "" }, "dependencies": { - "@astrojs/mdx": "^1.1.0", + "@astrojs/mdx": "^0.19.7", "@astrojs/rss": "^3.0.0", - "astro": "^3.0.13", - "sass": "^1.67.0", - "typescript": "^5.2.2" + "astro-seo": "^0.8.0", + "puppeteer": "^21.4.1", + "sass": "^1.67.0" }, "devDependencies": { "@astrojs/check": "^0.2.0", "@types/node": "^20.8.3", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-prettier": "^5.0.0", - "stylelint": "^15.10.3", - "stylelint-config-standard-scss": "^11.0.0" + "astro": "^3.4.0", + "typescript": "^5.2.2" } } diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index d9c6e2b..0000000 --- a/playwright.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { defineConfig } from '@playwright/test'; - -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// require('dotenv').config(); - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - webServer: { - command: 'bun start', - url: 'http://localhost:4321/', - timeout: 120 * 1000, - reuseExistingServer: !process.env.CI, - }, - use: { - baseURL: 'http://localhost:4321/', - }, -}); diff --git a/public/Favicon.webp b/public/Favicon.webp new file mode 100644 index 0000000..bfc4d19 Binary files /dev/null and b/public/Favicon.webp differ diff --git a/public/favicon.png b/public/favicon.png deleted file mode 100644 index b9fbecc..0000000 Binary files a/public/favicon.png and /dev/null differ diff --git a/public/packs/TeaClient - FPS BOOST.zip b/public/packs/TeaClient - FPS BOOST.zip new file mode 100644 index 0000000..b12245c Binary files /dev/null and b/public/packs/TeaClient - FPS BOOST.zip differ diff --git a/public/packs/TeaClient - PVP PACK RED EDITION.zip b/public/packs/TeaClient - PVP PACK RED EDITION.zip new file mode 100644 index 0000000..c6afcde Binary files /dev/null and b/public/packs/TeaClient - PVP PACK RED EDITION.zip differ diff --git a/public/packs/TeaClient - PVP PACK YELLOW EDIT.zip b/public/packs/TeaClient - PVP PACK YELLOW EDIT.zip new file mode 100644 index 0000000..7e35618 Binary files /dev/null and b/public/packs/TeaClient - PVP PACK YELLOW EDIT.zip differ diff --git a/public/packs/TeaClient - PVP PACK.zip b/public/packs/TeaClient - PVP PACK.zip new file mode 100644 index 0000000..77e2098 Binary files /dev/null and b/public/packs/TeaClient - PVP PACK.zip differ diff --git a/public/screenshot.webp b/public/screenshot.webp new file mode 100644 index 0000000..0a38dc0 Binary files /dev/null and b/public/screenshot.webp differ diff --git a/screenshot.js b/screenshot.js new file mode 100644 index 0000000..347cecb --- /dev/null +++ b/screenshot.js @@ -0,0 +1,15 @@ +import puppeteer from 'puppeteer'; + +(async () => { + const browser = await puppeteer.launch({ + headless: 'new', + ignoreHTTPSErrors: true + }); + const page = await browser.newPage(); + await page.setViewport({width: 1920, height: 1080}); // Set viewport size + await page.goto('http://localhost:7053'); + await + await page.screenshot({ path: './public/screenshot.webp', type: 'webp' }); + await browser.close(); + console.log('done'); +})(); diff --git a/src/components/shared/DownloadBox.astro b/src/components/shared/DownloadBox.astro new file mode 100644 index 0000000..ee9d62c --- /dev/null +++ b/src/components/shared/DownloadBox.astro @@ -0,0 +1,14 @@ +--- +// DownloadBox.astro +const { buttonText, src, screenshot } = Astro.props; +--- + +
+
+ Screenshot of the file +
+ + + +
+ diff --git a/src/components/shared/head.astro b/src/components/shared/head.astro index f7ff84e..f87a2f7 100644 --- a/src/components/shared/head.astro +++ b/src/components/shared/head.astro @@ -1,12 +1,36 @@ +--- +import { SEO } from "astro-seo"; +--- + + - + Tea Client - - - +extend={{ + // extending the default link tags + link: [{ rel: "icon", href: "/Favicon.webp" }], + // extending the default meta tags + meta: [ + { + name: "twitter:image", + content: "/screenshot.webp", + }, + { name: "twitter:card", content: "screenshot.webp" }, + { name: "twitter:title", content: "TeaClient Website" }, + { name: "twitter:description", content: "The website to an opensourced client" }, + ], + }} + /> + + + diff --git a/src/components/shared/header.astro b/src/components/shared/header.astro index eaf489e..5efc362 100644 --- a/src/components/shared/header.astro +++ b/src/components/shared/header.astro @@ -1,5 +1,5 @@ --- -import {Image} from "astro:assets" +import { Image } from "astro:assets"; ---
@@ -17,20 +17,21 @@ import {Image} from "astro:assets"
  • DOWNLOADS
  • STORE
  • - SOCIALS ▾ - +
    + The background +
  • -
    - The background -
    \ No newline at end of file diff --git a/src/layouts/linktree.astro b/src/layouts/linktree.astro new file mode 100644 index 0000000..8a410c7 --- /dev/null +++ b/src/layouts/linktree.astro @@ -0,0 +1,16 @@ +--- +// Components +import Head from '../components/shared/head.astro' +import Header from '../components/shared/header.astro' +import Footer from '../components/shared/footer.astro' + +// Styles +import '../styles/link-tree.scss' +--- + + +
    + + + +