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

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

114 lines · 3046 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 :style="{ width: imageSize, height: 'auto' }" src="/asset/404.gif" alt="404 Image" class="mx-auto" />
 19      <p class="text-title-lg mt-4 font-bold leading-tight text-white">404</p>
 20      <p class="text-body-lg flex flex-wrap items-center justify-center leading-snug text-gray-400">
 21        Umm.... you shouldn’t be here
 22        <span class="icon-container mx-1">
 23          <img class="icon-img" src="/asset/inahuh.png" alt="Inahuh Icon" />
 24        </span>
 25        If you got here from a link, please click
 26        <span class="icon-container mx-1">
 27          <svg class="w-icon h-icon inline-block align-text-bottom" xmlns="http://www.w3.org/2000/svg"
 28            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
 29            stroke-width="2">
 30            <rect width="20" height="16" x="2" y="4" rx="2"></rect>
 31            <path d="m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path>
 32          </svg>
 33        </span>
 34        to report it.
 35      </p>
 36    </div>
 37  </div>
 38</template>
 39
 40<style scoped>
 41.text-title-lg {
 42  font-size: 1.5rem;
 43  /* Font size for titles */
 44}
 45
 46.text-body-lg {
 47  font-size: 1rem;
 48  /* Font size for body text */
 49}
 50
 51.w-icon {
 52  width: 1em;
 53  /* Make the icon size relative to the text size */
 54}
 55
 56.h-icon {
 57  height: 1.25em;
 58  /* Make the icon size relative to the text size */
 59}
 60
 61.icon-container {
 62  display: inline-flex;
 63  /* Use inline-flex to control spacing within the container */
 64  align-items: center;
 65  /* Vertically center the icon/image */
 66  justify-content: center;
 67  /* Horizontally center the icon/image */
 68}
 69
 70.icon-img {
 71  width: 1em;
 72  /* Make the image size relative to the text size */
 73  height: auto;
 74  /* Maintain aspect ratio */
 75}
 76
 77.mx-1 {
 78  margin-left: 0.25em;
 79  /* Adjust this value for precise spacing */
 80  margin-right: 0.25em;
 81  /* Adjust this value for precise spacing */
 82}
 83
 84@media (max-width: 640px) {
 85  .text-title-lg {
 86    font-size: 1.25rem;
 87    /* Adjusted font size for smaller screens */
 88  }
 89
 90  .text-body-lg {
 91    font-size: 0.875rem;
 92    /* Adjusted font size for smaller screens */
 93  }
 94
 95  .mx-1 {
 96    margin-left: 0.1em;
 97    /* Adjusted margin for smaller screens */
 98    margin-right: 0.1em;
 99    /* Adjusted margin for smaller screens */
100  }
101}
102
103p {
104  overflow-wrap: break-word;
105  word-break: break-word;
106}
107
108div {
109  max-height: 100vh;
110  /* Prevents container from exceeding viewport height */
111  overflow-y: hidden;
112  /* Ensures no vertical scrollbar is visible */
113}
114</style>