-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from IBEC-BOX/header/erg
Header/erg
- Loading branch information
Showing
7 changed files
with
139 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<template> | ||
<v-main> | ||
<section class="page__error"> | ||
<v-container class="d-flex justify-center flex-column h-100 align-center"> | ||
<span | ||
class="page__error-background-number" | ||
v-bind="errorAttrs" | ||
> | ||
{{ error?.statusCode }} | ||
</span> | ||
<div class="page__error__content text-center"> | ||
<h1 | ||
v-if="error?.statusCode === 404" | ||
v-bind="titleAttrs" | ||
class="mb-4 text-36 font-weight-bold" | ||
> | ||
{{ title }} | ||
</h1> | ||
<h1 | ||
v-else | ||
class="mb-4" | ||
> | ||
{{ otherTitle }} | ||
</h1> | ||
<p | ||
class="mb-8 text-body-1 text-sm-h6 text-md-h5" | ||
v-bind="subtitleAttrs" | ||
> | ||
{{ subtitle }} | ||
</p> | ||
|
||
<v-btn | ||
color="primary" | ||
rounded="xl" | ||
class="text-body-1 font-weight-regular" | ||
size="x-large" | ||
elevation="0" | ||
v-bind="buttonAttrs" | ||
@click="handleError" | ||
> | ||
{{ textButton }} | ||
</v-btn> | ||
</div> | ||
|
||
</v-container> | ||
</section> | ||
</v-main> | ||
</template> | ||
|
||
<script setup> | ||
import { useAttrs, ref } from "vue"; | ||
import { useMainStore } from "../../../store/mainStore"; | ||
import { clearError } from "#app"; | ||
const mainStore = useMainStore(); | ||
//Attributes | ||
const attrs = useAttrs(); | ||
const titleAttrs = ref({ | ||
...mainStore.getObjectPropertiesWithPrefix(attrs, "title"), | ||
}) | ||
const errorAttrs = ref({ | ||
...mainStore.getObjectPropertiesWithPrefix(attrs, "error") | ||
}) | ||
const subtitleAttrs = ref({ | ||
...mainStore.getObjectPropertiesWithPrefix(attrs, "subtitle") | ||
}) | ||
const buttonAttrs = ref({ | ||
...mainStore.getObjectPropertiesWithPrefix(attrs, "button") | ||
}) | ||
const props = defineProps({ | ||
error: { type: Object, default: () => {} }, | ||
title: { type: String, default: () => '' }, | ||
subtitle: { type: String, default: () => '' }, | ||
otherTitle: { type: String, default: () => '' }, | ||
textButton: { type: String, default: () => '' }, | ||
}) | ||
const handleError = () => clearError({ redirect: '/' }) | ||
</script> | ||
|
||
<style lang="scss"> | ||
.page__error { | ||
position: relative; | ||
height: 50vh; | ||
margin: 64px 0 160px 0; | ||
&-background-number { | ||
position: absolute; | ||
font-size: 500px; | ||
z-index: 1; | ||
@media(max-width: 960px) { | ||
font-size: 332px; | ||
} | ||
@media(max-width: 600px) { | ||
font-size: 168px; | ||
margin-bottom: 135px; | ||
} | ||
} | ||
&__content { | ||
position: relative; | ||
z-index: 2; | ||
max-width: 573px; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters