Error.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div class="wrapper">
  3. <h1 class="title">{{ $route.meta.status_code ? $route.meta.status_code : 404 }}</h1>
  4. <p>{{ $route.meta.error ? $route.meta.error : $gettext('File Not Found') }}</p>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: 'Error'
  10. }
  11. </script>
  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. }
  28. a {
  29. color: #4181b9;
  30. text-decoration: none;
  31. -webkit-transition: all .3s ease;
  32. -moz-transition: all .3s ease;
  33. -ms-transition: all .3s ease;
  34. -o-transition: all .3s ease;
  35. transition: all .3s ease;
  36. &:active, &:hover {
  37. color: #5bb0ed
  38. }
  39. }
  40. .wrapper {
  41. position: absolute;
  42. top: 0;
  43. bottom: 0;
  44. left: 0;
  45. right: 0;
  46. font-size: 1em;
  47. font-weight: 400;
  48. width: 100%;
  49. height: 30%;
  50. line-height: 1;
  51. margin: auto;
  52. text-align: center
  53. }
  54. </style>