docs/.vitepress/theme/components/NotFound.vue

ecdae24e8db79cf318eb01d69e092ad8e4c64627
wotaku/docs/.vitepress/theme/components/NotFound.vue history · blame · raw

126 lines · 3167 bytes

  1<!--
  2  All Rights Reserved
  3
  4  Copyright (c) 2025 taskylizard
  5
  6  All rights reserved. This code and its associated files may not be copied, modified, distributed, sublicensed, or used in any form, in whole or in part, without prior written permission from the copyright holder.
  7-->
  8<script setup lang="ts">
  9import { ref } from 'vue'
 10
 11// Set a fixed image size
 12const imageSize = ref('550px') // Fixed size for the image
 13</script>
 14
 15<template>
 16  <div class="flex min-h-[calc(100vh-4rem)] items-center justify-center p-4">
 17    <div class="text-center">
 18      <img
 19        :style="{ width: imageSize, height: 'auto' }"
 20        src="/asset/404.gif"
 21        alt="404 Image"
 22        class="mx-auto"
 23      />
 24      <p class="text-title-lg mt-4 font-bold leading-tight text-white">404</p>
 25      <p class="text-body-lg flex flex-wrap items-center justify-center leading-snug text-gray-400">
 26        Umm.... you shouldn’t be here
 27        <span class="icon-container mx-1">
 28          <img class="icon-img" src="/asset/inahuh.png" alt="Inahuh Icon" />
 29        </span>
 30        If you got here from a link, please click
 31        <span class="icon-container mx-1">
 32          <svg
 33            class="w-icon h-icon inline-block align-text-bottom"
 34            xmlns="http://www.w3.org/2000/svg"
 35            viewBox="0 0 24 24"
 36            fill="none"
 37            stroke="currentColor"
 38            stroke-linecap="round"
 39            stroke-linejoin="round"
 40            stroke-width="2"
 41          >
 42            <rect width="20" height="16" x="2" y="4" rx="2"></rect>
 43            <path d="m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path>
 44          </svg>
 45        </span>
 46        to report it.
 47      </p>
 48    </div>
 49  </div>
 50</template>
 51
 52<style scoped>
 53.text-title-lg {
 54  font-size: 1.5rem;
 55  /* Font size for titles */
 56}
 57
 58.text-body-lg {
 59  font-size: 1rem;
 60  /* Font size for body text */
 61}
 62
 63.w-icon {
 64  width: 1em;
 65  /* Make the icon size relative to the text size */
 66}
 67
 68.h-icon {
 69  height: 1.25em;
 70  /* Make the icon size relative to the text size */
 71}
 72
 73.icon-container {
 74  display: inline-flex;
 75  /* Use inline-flex to control spacing within the container */
 76  align-items: center;
 77  /* Vertically center the icon/image */
 78  justify-content: center;
 79  /* Horizontally center the icon/image */
 80}
 81
 82.icon-img {
 83  width: 1em;
 84  /* Make the image size relative to the text size */
 85  height: auto;
 86  /* Maintain aspect ratio */
 87}
 88
 89.mx-1 {
 90  margin-left: 0.25em;
 91  /* Adjust this value for precise spacing */
 92  margin-right: 0.25em;
 93  /* Adjust this value for precise spacing */
 94}
 95
 96@media (max-width: 640px) {
 97  .text-title-lg {
 98    font-size: 1.25rem;
 99    /* Adjusted font size for smaller screens */
100  }
101
102  .text-body-lg {
103    font-size: 0.875rem;
104    /* Adjusted font size for smaller screens */
105  }
106
107  .mx-1 {
108    margin-left: 0.1em;
109    /* Adjusted margin for smaller screens */
110    margin-right: 0.1em;
111    /* Adjusted margin for smaller screens */
112  }
113}
114
115p {
116  overflow-wrap: break-word;
117  word-break: break-word;
118}
119
120div {
121  max-height: 100vh;
122  /* Prevents container from exceeding viewport height */
123  overflow-y: hidden;
124  /* Ensures no vertical scrollbar is visible */
125}
126</style>