Skip to content

Commit

Permalink
Major: Screenshots, Link-tree and more.
Browse files Browse the repository at this point in the history
Added: linktree.
Fixed: Microsoft identify.json
Added: Puppteer for screenshot for out website for meta data.
Added: Screenshot in deploy.yml.
Removed: playwright config file.
Removed: Svelte.
Removed: Dropdown for Socials.
Changed: Favicon to a webp.
Added: Terms of Service.
And More.

New Contributes: AsmodeusBrooding
  • Loading branch information
Eveeifyeve committed Oct 30, 2023
1 parent 79e3b5f commit e061050
Show file tree
Hide file tree
Showing 32 changed files with 513 additions and 91 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '[email protected]'
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
Expand Down
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "0.2.0",
"configurations": [

{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
Expand Down
8 changes: 5 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -8,5 +9,6 @@ export default defineConfig({
port: 7053
},
cacheDir: "./src/*",
integrations: [mdx()]
integrations: [mdx()],
experimental: {}
});
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
22 changes: 0 additions & 22 deletions playwright.config.ts

This file was deleted.

Binary file added public/Favicon.webp
Binary file not shown.
Binary file removed public/favicon.png
Binary file not shown.
Binary file added public/packs/TeaClient - FPS BOOST.zip
Binary file not shown.
Binary file added public/packs/TeaClient - PVP PACK RED EDITION.zip
Binary file not shown.
Binary file added public/packs/TeaClient - PVP PACK YELLOW EDIT.zip
Binary file not shown.
Binary file added public/packs/TeaClient - PVP PACK.zip
Binary file not shown.
Binary file added public/screenshot.webp
Binary file not shown.
15 changes: 15 additions & 0 deletions screenshot.js
Original file line number Diff line number Diff line change
@@ -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');
})();
14 changes: 14 additions & 0 deletions src/components/shared/DownloadBox.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
// DownloadBox.astro
const { buttonText, src, screenshot } = Astro.props;
---

<div class="download-box">
<section class="screenshots">
<img src={screenshot} width="128" height="128" alt="Screenshot of the file" />
</section>
<a href={src} download>
<button class="download-button">{buttonText}</button>
</a>
</div>

34 changes: 29 additions & 5 deletions src/components/shared/head.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
---
import { SEO } from "astro-seo";
---


<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<SEO
title="Tea Client"
description = "A Opensourced Minecraft Client"
twitter={{
creator: "@TeaClientMC"
}}

<title>Tea Client</title>
<meta name="description" content="A Opennsourced Minecraft Client">
<link rel="icon" type="image/x-icon" href="/favicon.png">
<link rel="apple-touch-icon" href="/favicon.png">
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" },
],
}}
/>
<meta property="og:image" content="/screenshot.webp" />
<link rel="icon" type="image/x-icon" href="/Favicon.webp">
<link rel="apple-touch-icon" href="/Favicon.webp">
<meta charset="UTF-8">


Expand Down
15 changes: 8 additions & 7 deletions src/components/shared/header.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Image} from "astro:assets"
import { Image } from "astro:assets";
---

<header>
Expand All @@ -17,20 +17,21 @@ import {Image} from "astro:assets"
<li><a href="/download/">DOWNLOADS</a></li>
<li><a href="https://store.teaclient.net">STORE</a></li>
<li>
<a href="/">SOCIALS &#9662;</a>
<ul class="dropdown">
<a href="/link-tree">SOCIALS</a>
<!-- Arrow: &#9662; -->
<!-- <ul class="dropdown">
<li><a href="https://twitter.com/TeaClientMine" class="Twitter">Twitter</a></li>
<li><a href="https://www.twitch.tv/teaclientminecraft" class="Twitch">Twitch</a></li>
<li><a href="https://discord.gg/teaclient" class="Discord">Discord</a></li>
<li><a href="https://www.youtube.com/@teaclientmc" class="Youtube">YouTube</a></li>
</ul>
</ul> -->
</li>

<li><a href="/docs">DOCUMENTS</a></li>
</ul>
</div>
</nav>
<div class="page-background">
<img src="/background.webp" alt="The background"/>
</div>
</header>
<div class="page-background">
<img src="/background.webp" alt="The background"/>
</div>
16 changes: 16 additions & 0 deletions src/layouts/linktree.astro
Original file line number Diff line number Diff line change
@@ -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'
---

<Head/>
<Header/>
<!-- Content -->
<slot />
<!--Footer -->
<Footer/>
File renamed without changes.
9 changes: 0 additions & 9 deletions src/pages/SECURITY.mdx

This file was deleted.

8 changes: 6 additions & 2 deletions src/pages/download/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
import Layout from '../../layouts/default.astro'
import Layout from "../../layouts/default.astro"
import DownloadBox from '../../components/shared/DownloadBox.astro';
---

<Layout>

<div class="container">
<DownloadBox buttonText="Download Pvp PackRed" src="/packs/TeaClient - PVP PACK RED EDITION.zip" screenshot="/icon.webp" />
<DownloadBox buttonText="Download all packs" />
</div>
</Layout>
10 changes: 10 additions & 0 deletions src/pages/link-tree.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
import Layout from '../layouts/linktree.astro'
---


<Layout>
<div class="link-box">

</div>
</Layout>
7 changes: 4 additions & 3 deletions src/pages/news/index.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
import Layout from "../../layouts/default.astro"
import "../../styles/news.scss"
---

<Layout>
<style type="text/sass">
</style>




<div>
</Layout>
7 changes: 7 additions & 0 deletions src/pages/privacy.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
import Layout from "../layouts/default.astro"
---

<Layout>

</Layout>
32 changes: 32 additions & 0 deletions src/pages/terms.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
import Layout from "../layouts/default.astro"
import "../styles/terms.scss"
---

<Layout>
<div class="tos-container">
<h1 class="tos-title">Terms of Service</h1>
<p>Last Updated: October 30 2023</p>
<br>
<br>
<br>
<p>Please read these terms of service (“terms”, “terms of service”) carefully before using TeaClient (the “service”) operated by TeaClientMC. (“us”, ‘we”, “our”).</p>
<br>
<br>
<h1 class="tos-title">Condition of Use</h1>
<p>We will provide their services to you, which are subject to the conditions stated below in this document. Every time you visit this website, use its services or make a purchase, you accept the following conditions. This is why we urge you to read them carefully.</p>
<br>
<br>
<h1 class="tos-title">Our Content</h1>
<p>Content published on this website and services (digital downloads, images, texts, graphics, logos) is the property of TeaClient, Inc. and/or its content creators and protected by international copyright laws. The entire compilation of the content found on this website and TeaClient is the exclusive property of TeaClientMC.</p>
<!-- Add the rest of your terms of service here -->
<br>
<br>
<h1 class="tos-title">Govening Law</h1>
<br>
<br>
<h1 class="tos-title">Social Media</h1>
<p></p>

</div>
</Layout>
Loading

0 comments on commit e061050

Please sign in to comment.