<script setup lang="ts">
import { defineRouteRules } from '#imports'

const config = useAppConfig()
const projects = [
  {
    name: 'MalwareWatch',
    description:
      'A website that tracks malware and ransomware attacks in real time.',
    url: 'https://malwarewatch.org',
  },
  {
    name: 'You Are an Idiot! (dot cc)',
    description: 'A recreation of the infamous "You Are an Idiot!" virus.',
    url: 'https://youareanidiot.cc',
  },
  {
    name: 'HURR-DURR (dot cc)',
    description: 'A recreation of the infamous "HURR-DURR" virus.',
    url: 'https://hurr-durr.cc',
  },
  {
    name: 'ClickSword',
    description: 'A clicker game with a sword theme.',
    url: 'https://clicksword.org',
  },
  {
    name: 'Windows XP Keygen / UMSKT',
    description: 'A key generator for Windows XP.',
    url: `${config.shortener}/xpkeygen`,
  },
]

const meta = {
  title: "Enderman's Projects",
  description:
    "A display of my largest projects. Some of them aren't published on YouTube.",
  image: `${config.url}/images/logo.png`,
  url: `${config.url}/projects`,
}

useSeoMeta({
  title: meta.title,
  description: meta.description,
  ogTitle: meta.title,
  ogDescription: meta.description,
  ogImage: meta.image,
  ogUrl: meta.url,
  ogType: 'website',
  twitterTitle: meta.title,
  twitterDescription: meta.description,
  twitterImage: meta.image,
  twitterCard: 'summary',
})

useHead({
  title: 'Projects',
  htmlAttrs: {
    lang: config.locale || 'en',
  },
  link: [
    {
      rel: 'icon',
      type: 'image/x-icon',
      href: '/favicon.ico',
    },
  ],
})

defineRouteRules({
  sitemap: {
    changefreq: 'monthly',
    priority: 0.7,
  },
})
</script>

<template>
  <section class="page">
    <h3>Projects</h3>
    <Construction />
    <p><strong>My current projects are:</strong></p>
    <ul>
      <li v-for="(item, index) in projects" :key="index">
        <a :href="item.url">
          {{ item.name }}
        </a>
      </li>
    </ul>
    <p>
      The list above is not exhaustive and only includes the most recent and
      largest projects I remembered while constructing this page.
    </p>
  </section>
</template>
