1
0

Error.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <script setup lang="ts">
  2. import {useGettext} from 'vue3-gettext'
  3. const {$gettext} = useGettext()
  4. </script>
  5. <template>
  6. <div class="wrapper">
  7. <h1 class="title">{{ $route.meta.status_code || 404 }}</h1>
  8. <p>{{ $route.meta.error?.() ?? $gettext('File Not Found') }}</p>
  9. <a-button type="primary" v-translate @click="$router.push('/')">Back Home</a-button>
  10. </div>
  11. </template>
  12. <style lang="less" scoped>
  13. body, div, h1, html {
  14. padding: 0;
  15. margin: 0
  16. }
  17. body, html {
  18. color: #444;
  19. position: relative;
  20. font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, CustomFont, "Microsoft YaHei UI", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  21. background: #fcfcfc;
  22. height: 100%
  23. }
  24. h1 {
  25. font-size: 8em;
  26. font-weight: 100;
  27. margin: 10px 0;
  28. }
  29. a {
  30. color: #4181b9;
  31. text-decoration: none;
  32. -webkit-transition: all .3s ease;
  33. -moz-transition: all .3s ease;
  34. -ms-transition: all .3s ease;
  35. -o-transition: all .3s ease;
  36. transition: all .3s ease;
  37. &:active, &:hover {
  38. color: #5bb0ed
  39. }
  40. }
  41. .wrapper {
  42. position: absolute;
  43. top: 0;
  44. bottom: 0;
  45. left: 0;
  46. right: 0;
  47. font-size: 1em;
  48. font-weight: 400;
  49. width: 100%;
  50. height: 30%;
  51. line-height: 1;
  52. margin: auto;
  53. text-align: center
  54. }
  55. </style>