-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue-router.html
258 lines (240 loc) · 6.4 KB
/
vue-router.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue Router Example</title>
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue-router.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<style>
/* Transitions */
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
* {
margin: 0;
padding: 0;
}
.container {
display: flex; /* or inline-flex */
font-family: 'Indie Flower', cursive;
}
.header{
background-image: url("bg.jpg");
width: 100%;
height: 250px;
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
.board{
background-color: rgba(255,255,255,0.8);
width: 86%;
height: 205px;
margin: 175px auto;
border-radius: 15px;
box-shadow: 0 8px 10px rgb(0 0 0 / 0.25);
}
.image{
display: flex;
justify-content: center;
align-items: flex-start;
}
.profile-picture {
margin-top: -50px;
width: 100px;
height: 100px;
border-radius: 50%;
box-shadow: 0 8px 10px rgb(0 0 0 / 0.25);
}
h2{
text-align: center;
margin-top: 10px;
font-size: 26px;
}
.row {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 10px;
}
.column {
width: 30%;
padding: 0px;
text-align: center;
}
.column h2{
color: #c3c3c3;
}
.column p{
font-size: 26px;
}
.sticky-footer {
position: fixed;
bottom: 0;
left: 0;
height: 30px;
width: 100%;
display: flex;
justify-content: space-around;
background-color: #ffffff; /* Choose your desired background color */
padding: 20px 0px; /* Adjust as needed */
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow effect */
}
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
.card{
background-color: rgba(255,255,255,0.8);
width: 86%;
height: 280px;
margin: 175px auto;
border-radius: 15px;
box-shadow: 0 8px 10px rgb(0 0 0 / 0.25);
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.card .visual {
flex: 1 0 auto;
}
.card .content {
flex: 2 0 auto;
}
.element-picture{
width: 80px;
height: 190px;
box-shadow: 0 8px 10px rgb(0 0 0 / 0.25);
}
.content p{
padding: 20px;
}
a, a:visited{
color: black;
}
.glass{
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter: blur( 6px );
-webkit-backdrop-filter: blur( 6px );
border-radius: 10px;
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
#search{
margin: 0px auto;
width: 100%;
font-size: xx-large;
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
</style>
</head>
<body>
<div id="app">
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
<footer class="sticky-footer">
<router-link to="/"><i class="material-icons md-24 ">home</i></router-link>
<router-link to="/shered"><i class="material-icons md-24 ">share</i></router-link>
<i class="material-icons md-24"></i>
<router-link to="/wished"><i class="material-icons md-24">favorite</i></router-link>
<router-link to="/search"><i class="material-icons md-24">search</i></router-link>
</footer>
</div>
<script>
const Home = {
template: `
<div class="container">
<section class="header">
<div class="board">
<div class="image"><img src="https://lh3.googleusercontent.com/a/AAcHTtcOA7lfOUNzX65N7o_-ow-4fboLsPQTjMlR5QwTJk-7COL9=s96-c" alt="Profile Picture" class="profile-picture"></div>
<h2>Borislav Aleksiev</h2>
<div class="row">
<div class="column">
<h2>shared</h2>
<p>23</p>
</div>
<div class="column">
<h2>wished</h2>
<p>78</p>
</div>
<div class="column">
<h2>friends</h2>
<p>15</p>
</div>
</div>
</div>
</section>
</div>
`
};
const Wished = {
template: `
<div class="container">
<section class="header">
<div class="card">
<div class="content">
<h2>Wished</h2>
<p>The new Dress</p>
</div>
<div class="visual"><img src="dress.jpg" alt="Profile Picture" class="element-picture"></div>
</div>
</section>
</div>
`
};
const Shered = {
template: `
<div class="container">
<section class="header">
<div class="card">
<div class="content">
<h2>Shered</h2>
<p>The new Dress</p>
</div>
<div class="visual"><img src="dress.jpg" alt="Profile Picture" class="element-picture"></div>
</div>
</section>
</div>
`
};
const Search = {
template: `
<div class="container">
<section class="header">
<div class="board">
<h2>Search</h2>
<input type="text" name="Search" id="search">
</div>
</section>
</div>
`
};
// Configure routes
const routes = [
{ path: '/', component: Home },
{ path: '/shered', component: Shered },
{ path: '/wished', component: Wished },
{ path: '/search', component: Search }
];
// Create router instance
const router = new VueRouter({
routes
});
// Create Vue app
new Vue({
router
}).$mount('#app');
</script>
</body>
</html>