1+ <template >
2+ <div class =" forbidden-container" >
3+ <div class =" forbidden-content" >
4+ <img src =" https://i.ibb.co/ccn2vLPb/hotel-logo.png" alt =" Hotel Hub Logo" class =" logo-image" />
5+
6+ <h1 >잘못된 접근입니다</h1 >
7+ <p class =" message" >요청하신 페이지에 접근할 수 있는 권한이 없습니다.</p >
8+ <p class =" sub-message" >입력하신 주소가 정확한지 확인하시거나, 다른 페이지로 이동해 주세요.</p >
9+
10+ <div class =" button-group" >
11+ <button @click =" goBack" class =" btn btn-secondary" >
12+ 이전 페이지로
13+ </button >
14+ <button @click =" goToMain" class =" btn btn-primary" >
15+ 메인으로 돌아가기
16+ </button >
17+ </div >
18+ </div >
19+ </div >
20+ </template >
21+
22+ <script setup>
23+ import { useRouter } from ' vue-router' ;
24+
25+ const router = useRouter ();
26+
27+ const goBack = () => {
28+ // 이전 기록이 없을 경우 메인으로 이동
29+ if (window .history .length > 1 ) {
30+ router .go (- 1 );
31+ } else {
32+ router .push (' /' );
33+ }
34+ };
35+
36+ const goToMain = () => {
37+ router .push (' /' );
38+ };
39+ </script >
40+
41+ <style scoped>
42+ /* Google Fonts Noto Sans KR (프로젝트에 맞게 import 필요) */
43+ @import url (' https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap' );
44+
45+ .forbidden-container {
46+ display : flex ;
47+ justify-content : center ;
48+ align-items : center ;
49+ min-height : 90vh ;
50+ background-color : #f4f7f6 ; /* 부드러운 배경색 */
51+ font-family : ' Noto Sans KR' , sans-serif ;
52+ color : #333 ;
53+ text-align : center ;
54+ padding : 20px ;
55+ }
56+
57+ .forbidden-content {
58+ background-color : #ffffff ;
59+ padding : 40px ;
60+ border-radius : 16px ; /* 더 둥글게 */
61+ box-shadow : 0 8px 30px rgba (0 , 0 , 0 , 0.07 ); /* 부드러운 그림자 */
62+ max-width : 480px ;
63+ width : 100% ;
64+ animation : fadeIn 0.5s ease-in-out ; /* 부드러운 등장 효과 */
65+ }
66+
67+ @keyframes fadeIn {
68+ from {
69+ opacity : 0 ;
70+ transform : translateY (-10px );
71+ }
72+ to {
73+ opacity : 1 ;
74+ transform : translateY (0 );
75+ }
76+ }
77+
78+ .logo-image {
79+ width : 120px ; /* 로고 크기 축소 */
80+ margin-bottom : 24px ;
81+ }
82+
83+ h1 {
84+ font-size : 2rem ;
85+ color : #e74c3c ; /* 톤 다운된 빨간색 */
86+ margin-bottom : 12px ;
87+ font-weight : 700 ;
88+ letter-spacing : -0.5px ;
89+ }
90+
91+ .message {
92+ font-size : 1.1rem ;
93+ line-height : 1.6 ;
94+ color : #555 ;
95+ font-weight : 500 ;
96+ }
97+
98+ .sub-message {
99+ font-size : 0.95rem ;
100+ color : #888 ;
101+ margin-top : 8px ;
102+ margin-bottom : 32px ;
103+ }
104+
105+ .button-group {
106+ margin-top : 32px ;
107+ display : flex ;
108+ gap : 12px ;
109+ justify-content : center ;
110+ }
111+
112+ .btn {
113+ padding : 12px 24px ;
114+ border : none ;
115+ border-radius : 8px ;
116+ font-size : 1rem ;
117+ font-weight : 500 ;
118+ cursor : pointer ;
119+ transition : all 0.25s ease ;
120+ letter-spacing : 0.5px ;
121+ }
122+
123+ .btn :hover {
124+ transform : translateY (-3px );
125+ box-shadow : 0 4px 15px rgba (0 , 0 , 0 , 0.1 );
126+ }
127+
128+ .btn-primary {
129+ background-color : #3498db ; /* 세련된 파란색 */
130+ color : white ;
131+ }
132+
133+ .btn-primary :hover {
134+ background-color : #2980b9 ;
135+ }
136+
137+ .btn-secondary {
138+ background-color : #f0f0f0 ; /* 밝은 회색 */
139+ color : #555 ;
140+ border : 1px solid #e0e0e0 ;
141+ }
142+
143+ .btn-secondary :hover {
144+ background-color : #e9e9e9 ;
145+ border-color : #d0d0d0 ;
146+ }
147+ </style >
0 commit comments