aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorPauline <git@ethanlibs.co>2024-01-10 19:58:58 -0500
committerPauline <git@ethanlibs.co>2024-01-10 19:58:58 -0500
commit8be3434d32d7ed9046000377f7f9e59ef2a971b3 (patch)
treea17c19137054e4768e57799cd3932dd92e66a69b /apps
parent75676183d008a07070db8fdd52af3fdf0bbfb8a7 (diff)
downloadNexus-8be3434d32d7ed9046000377f7f9e59ef2a971b3.tar.gz
Nexus-8be3434d32d7ed9046000377f7f9e59ef2a971b3.tar.bz2
Nexus-8be3434d32d7ed9046000377f7f9e59ef2a971b3.zip
super unfinished stuff but i was getting yelled at by wybest
Diffstat (limited to 'apps')
-rw-r--r--apps/docs/package.json3
-rw-r--r--apps/website/config.ts4
-rw-r--r--apps/website/package.json7
-rw-r--r--apps/website/public/.well-known/webfinger23
-rw-r--r--apps/website/public/favicon.svg4
-rw-r--r--apps/website/public/robots.txt6
-rw-r--r--apps/website/src/components/base/Footer.astro2
-rw-r--r--apps/website/src/components/shared/BaseHead.astro15
-rw-r--r--apps/website/src/components/shared/SEO.astro89
-rw-r--r--apps/website/src/pages/legal/ip.astro22
-rw-r--r--apps/website/src/pages/legal/privacy.astro (renamed from apps/website/src/pages/privacy.astro)0
-rw-r--r--apps/website/src/pages/legal/security.astro22
-rw-r--r--apps/website/src/pages/legal/terms.astro (renamed from apps/website/src/pages/tos.astro)0
-rw-r--r--apps/website/src/types/smartypants.d.ts4
-rw-r--r--apps/website/vercel.json3
15 files changed, 197 insertions, 7 deletions
diff --git a/apps/docs/package.json b/apps/docs/package.json
new file mode 100644
index 0000000..da151b4
--- /dev/null
+++ b/apps/docs/package.json
@@ -0,0 +1,3 @@
+{
+ "name": "@polyfrost/docs"
+}
diff --git a/apps/website/config.ts b/apps/website/config.ts
index cb4e515..81f939e 100644
--- a/apps/website/config.ts
+++ b/apps/website/config.ts
@@ -87,11 +87,11 @@ export const configConst = {
links: [
{
text: 'Terms of service',
- url: '/tos',
+ url: '/legal/tos',
},
{
text: 'Privacy policy',
- url: '/privacy',
+ url: '/legal/privacy',
},
],
},
diff --git a/apps/website/package.json b/apps/website/package.json
index 730f5a5..e8c71c7 100644
--- a/apps/website/package.json
+++ b/apps/website/package.json
@@ -17,12 +17,15 @@
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.1.1",
"sass": "^1.69.7",
+ "smartypants": "^0.2.2",
"tailwindcss": "^3.4.1",
- "vitest": "^1.1.3"
+ "vitest": "^1.1.3",
+ "zod": "^3.22.4",
+ "zod-form-data": "^2.0.2"
},
"devDependencies": {
"@polyfrost/config": "workspace:*",
- "@types/node": "~20.10.7",
+ "@types/node": "~20.10.8",
"node-html-parser": "^6.1.12",
"typescript": "^5.3.3"
}
diff --git a/apps/website/public/.well-known/webfinger b/apps/website/public/.well-known/webfinger
new file mode 100644
index 0000000..598fa4b
--- /dev/null
+++ b/apps/website/public/.well-known/webfinger
@@ -0,0 +1,23 @@
+{
+ "subject": 'acct:astro@webtoo.ls',
+ "aliases": [
+ "https://floss.social/@polyfrost",
+ "https://floss.social/users/polyfrost"
+ ],
+ "links": [
+ {
+ "rel": "http://webfinger.net/rel/profile-page",
+ "type": "text/html",
+ "href": "https://floss.social/@polyfrost"
+ },
+ {
+ "rel": "self",
+ "type": "application/activity+json",
+ "href": "https://floss.social/users/polyfrost"
+ },
+ {
+ "rel": "http://ostatus.org/schema/1.0/subscribe",
+ "template": "https://floss.social/authorize_interaction?uri={uri}"
+ }
+ ]
+}
diff --git a/apps/website/public/favicon.svg b/apps/website/public/favicon.svg
new file mode 100644
index 0000000..f949e8d
--- /dev/null
+++ b/apps/website/public/favicon.svg
@@ -0,0 +1,4 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="64" height="64" fill="#121317"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M34.86 32.1283L25.8843 16.5817C25.0516 15.1394 23.689 15.1394 22.8564 16.5817L12.9471 33.7464C10.2562 38.4075 13.6196 44.2332 19.0015 44.2332H27.8719L34.8601 32.129L41.8482 44.2331H46.7491C50.7858 44.2331 53.3082 39.8637 51.2898 36.3681L43.3646 22.6416C42.532 21.2 41.1701 21.2 40.3374 22.6416L34.86 32.1283Z" fill="#2567D8"/>
+</svg>
diff --git a/apps/website/public/robots.txt b/apps/website/public/robots.txt
index f58dbcb..dcf9571 100644
--- a/apps/website/public/robots.txt
+++ b/apps/website/public/robots.txt
@@ -1,4 +1,6 @@
-# Example: Allow all bots to scan and index your site.
-# Full syntax: https://developers.google.com/search/docs/advanced/robots/create-robots-txt
+# I, for one, welcome our new robotic overlords
+
User-agent: *
Allow: /
+
+Sitemap: https://polyfrost.org/sitemap-index.xml
diff --git a/apps/website/src/components/base/Footer.astro b/apps/website/src/components/base/Footer.astro
index 9463edc..7a9071a 100644
--- a/apps/website/src/components/base/Footer.astro
+++ b/apps/website/src/components/base/Footer.astro
@@ -41,7 +41,7 @@ const props = Astro.props;
<div class="flex flex-col items-center md:flex-row md:items-start md:justify-between">
<p class="text-blue-gray text-sm">© {new Date().getFullYear()} Polyfrost. All rights reserved.</p>
- <p class="text-blue-gray text-sm">Not affiliated with Mojang Studios.</p>
+ <p class="text-blue-gray text-sm">Not an official Minecraft product. Not approved by or affiliated with Mojang Studios.</p>
</div>
</div>
</footer>
diff --git a/apps/website/src/components/shared/BaseHead.astro b/apps/website/src/components/shared/BaseHead.astro
new file mode 100644
index 0000000..ddb94e3
--- /dev/null
+++ b/apps/website/src/components/shared/BaseHead.astro
@@ -0,0 +1,15 @@
+---
+import smartypants from 'smartypants';
+import SEO from './SEO.astro';
+
+export type Props = {
+ siteName: string
+ title?: string
+ description: string
+ image: { src: string, alt: string }
+ canonicalURL?: URL | null
+ pageType?: 'website' | 'article'
+};
+
+const twitterHandle = 'polyfrost';
+---
diff --git a/apps/website/src/components/shared/SEO.astro b/apps/website/src/components/shared/SEO.astro
new file mode 100644
index 0000000..6169185
--- /dev/null
+++ b/apps/website/src/components/shared/SEO.astro
@@ -0,0 +1,89 @@
+---
+import smartypants from 'smartypants';
+
+type SEOMetadata = {
+ name?: string
+ title: string
+ description: string
+ image?: { src: string, alt: string }
+ canonicalURL?: URL | null
+ locale?: string
+};
+
+type OpenGraph = Partial<SEOMetadata> & {
+ type?: string
+};
+
+type Twitter = Partial<SEOMetadata> & {
+ handle?: string
+ card?: 'summary' | 'summary_large_image'
+};
+
+export type Props = SEOMetadata & {
+ og?: OpenGraph
+ twitter?: Twitter
+};
+
+const {
+ name,
+ description,
+ image,
+ locale = 'en',
+ canonicalURL = new URL(Astro.url.pathname, Astro.site),
+ og: _og = {},
+ twitter: _twitter = {},
+} = Astro.props;
+
+const title = [Astro.props.title, name].filter(Boolean).join(' | ');
+const og: OpenGraph = { name, title, description, canonicalURL, image, locale, type: 'website', ..._og };
+const twitter: Twitter = { name, title, description, canonicalURL, image, locale, card: 'summary_large_image', ..._twitter };
+const ensureSlash = (url: string | URL) => `${url.toString().replace(/\/$/, '')}/`;
+---
+
+<!-- Global Metadata -->
+<meta charset="utf-8" />
+<meta name="generator" content={Astro.generator} />
+<meta name="viewport" content="width=device-width" />
+<meta name="theme-color" content="#d2e1f9" />
+<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+<link rel="mask-icon" href="/favicon.svg" color="#d2e1f9" />
+<link rel="sitemap" href="/sitemap-index.xml" />
+<link rel="alternate" type="application/rss+xml" href="/rss.xml" title="RSS" />
+
+<title set:html={smartypants(title, 1)} />
+
+<!-- Page Metadata -->
+<meta name="generator" content={Astro.generator} />
+{canonicalURL && <link rel="canonical" href={ensureSlash(canonicalURL)} />}
+<title>{title}</title>
+<meta name="description" content={description} />
+
+<!-- OpenGraph Tags -->
+<meta property="og:title" content={og.title} />
+<meta property="og:type" content={og.type} />
+{og.canonicalURL && <meta property="og:url" content={ensureSlash(og.canonicalURL)} />}
+<meta property="og:locale" content={og.locale} />
+<meta property="og:description" content={og.description} />
+<meta property="og:site_name" content={og.name} />
+{
+ og.image && (
+ <>
+ <meta property="og:image" content={og.image.src} />
+ <meta property="og:image:alt" content={og.image.alt} />
+ </>
+ )
+}
+
+<!-- Twitter Tags -->
+{twitter.card && <meta name="twitter:card" content={twitter.card} />}
+{twitter.handle && <meta name="twitter:site" content={twitter.handle} />}
+<meta name="twitter:title" content={twitter.title} />
+<meta name="twitter:description" content={twitter.description} />
+{
+ twitter.image && (
+ <>
+ <meta name="twitter:image" content={twitter.image.src} />
+ <meta name="twitter:image:alt" content={twitter.image.alt} />
+ </>
+ )
+}
diff --git a/apps/website/src/pages/legal/ip.astro b/apps/website/src/pages/legal/ip.astro
new file mode 100644
index 0000000..13cfda5
--- /dev/null
+++ b/apps/website/src/pages/legal/ip.astro
@@ -0,0 +1,22 @@
+---
+import Header from '@components/base/Header.astro';
+import Paragraph from '@components/base/Paragraph.astro';
+import Section from '@components/base/Section.astro';
+import Layout from '@layouts/Layout.astro';
+
+const policy = `
+Currently, we do not offer any services that require a intellectual property policy!
+This will be updated in the future, if necessary.
+`.trim();
+---
+
+<Layout>
+ <Section hFull class="justify-center items-start pt-32">
+ <div class="flex flex-col justify-start items-start w-full text-navy-peony">
+ <Header>
+ Intellectual Property Policy
+ </Header>
+ <Paragraph class="whitespace-pre-line">{policy}</Paragraph>
+ </div>
+ </Section>
+</Layout>
diff --git a/apps/website/src/pages/privacy.astro b/apps/website/src/pages/legal/privacy.astro
index d3940f2..d3940f2 100644
--- a/apps/website/src/pages/privacy.astro
+++ b/apps/website/src/pages/legal/privacy.astro
diff --git a/apps/website/src/pages/legal/security.astro b/apps/website/src/pages/legal/security.astro
new file mode 100644
index 0000000..a80d3f9
--- /dev/null
+++ b/apps/website/src/pages/legal/security.astro
@@ -0,0 +1,22 @@
+---
+import Header from '@components/base/Header.astro';
+import Paragraph from '@components/base/Paragraph.astro';
+import Section from '@components/base/Section.astro';
+import Layout from '@layouts/Layout.astro';
+
+const tos = `
+Currently, we do not offer any services that require a security notice!
+This will be updated in the future, if necessary.
+`.trim();
+---
+
+<Layout>
+ <Section hFull class="justify-center items-start pt-32">
+ <div class="flex flex-col justify-start items-start w-full text-navy-peony">
+ <Header>
+ Security Notice
+ </Header>
+ <Paragraph class="whitespace-pre-line">{tos}</Paragraph>
+ </div>
+ </Section>
+</Layout>
diff --git a/apps/website/src/pages/tos.astro b/apps/website/src/pages/legal/terms.astro
index 6ed2009..6ed2009 100644
--- a/apps/website/src/pages/tos.astro
+++ b/apps/website/src/pages/legal/terms.astro
diff --git a/apps/website/src/types/smartypants.d.ts b/apps/website/src/types/smartypants.d.ts
new file mode 100644
index 0000000..c61e268
--- /dev/null
+++ b/apps/website/src/types/smartypants.d.ts
@@ -0,0 +1,4 @@
+declare module 'smartypants' {
+ type Behavior = 0 | 1 | 2 | 3 | -1 | 'q' | 'b' | 'B' | 'd' | 'D' | 'i' | 'e' | 'w';
+ export default function smartypants(text: string, behavior: Behavior): string;
+}
diff --git a/apps/website/vercel.json b/apps/website/vercel.json
new file mode 100644
index 0000000..0db3279
--- /dev/null
+++ b/apps/website/vercel.json
@@ -0,0 +1,3 @@
+{
+
+}