Error404.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <div class="error-page window-height window-width bg-light column items-center no-wrap">
  3. <div class="error-code bg-primary flex items-center content-center justify-center">
  4. 404
  5. </div>
  6. <div>
  7. <div class="error-card shadow-4 bg-white column items-center justify-center no-wrap">
  8. <q-icon name="error_outline" color="grey-5" />
  9. <p class="caption text-center">Oops. Nothing here...</p>
  10. <p class="text-center group">
  11. <q-btn
  12. v-if="canGoBack"
  13. color="primary"
  14. push
  15. @click="goBack"
  16. icon="keyboard_arrow_left"
  17. >
  18. Go back
  19. </q-btn>
  20. <q-btn
  21. color="primary"
  22. push
  23. @click="$router.replace('/')"
  24. icon-right="home"
  25. >
  26. Go home
  27. </q-btn>
  28. </p>
  29. </div>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. import { QBtn, QIcon } from 'quasar'
  35. export default {
  36. components: {
  37. QBtn,
  38. QIcon
  39. },
  40. data () {
  41. return {
  42. canGoBack: window.history.length > 1
  43. }
  44. },
  45. methods: {
  46. goBack () {
  47. window.history.go(-1)
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="stylus">
  53. .error-page
  54. .error-code
  55. height 50vh
  56. width 100%
  57. padding-top 15vh
  58. @media (orientation: landscape) {
  59. font-size 30vw
  60. }
  61. @media (orientation: portrait) {
  62. font-size 30vh
  63. }
  64. color rgba(255, 255, 255, .2)
  65. overflow hidden
  66. .error-card
  67. border-radius 2px
  68. margin-top -50px
  69. width 80vw
  70. max-width 600px
  71. padding 25px
  72. > i
  73. font-size 5rem
  74. </style>