-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathAppHeader.vue
150 lines (112 loc) · 2.35 KB
/
AppHeader.vue
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
<template>
<header class="header">
<div class="header__logo">
<a href="index.html" class="logo">
<img src="@/assets/img/logo.svg" alt="Pizza logo" width="90" height="40">
</a>
</div>
<div class="header__cart">
<a href="cart.html">0 ₽</a>
</div>
<div class="header__user">
<a href="#" class="header__login"><span>Войти</span></a>
</div>
</header>
</template>
<style lang="scss" scoped>
@import "@/assets/scss/ds-system/ds";
.header {
position: relative;
z-index: 2;
display: flex;
padding: 0 2.12%;
background-color: $green-500;
box-shadow: $shadow-light;
}
.header__logo {
padding-top: 10px;
padding-bottom: 10px;
}
.header__cart {
margin-right: 10px;
margin-left: auto;
a {
@include b-s16-h19;
display: block;
padding: 21px 15px 21px 58px;
transition: 0.3s;
color: $white;
background-color: $green-500;
background-image: url("@/assets/img/cart.svg");
background-repeat: no-repeat;
background-position: 20px center;
background-size: 29px 27px;
&:hover:not(:active) {
background-color: $green-400;
}
&:active {
background-color: $green-600;
}
&:focus {
opacity: 0.5;
}
}
}
.header__user {
display: flex;
align-items: center;
a {
display: block;
padding: 14px 20px;
transition: 0.3s;
background-color: $green-500;
&:hover:not(:active) {
background-color: $green-400;
}
&:active {
background-color: $green-600;
}
&:focus {
opacity: 0.5;
}
}
img {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 8px;
vertical-align: middle;
border-radius: 50%;
}
span {
@include r-s14-h16;
display: inline-block;
vertical-align: middle;
color: $white;
}
}
.header__logout {
&::before {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 8px;
content: "";
vertical-align: middle;
background: url("@/assets/img/login.svg") no-repeat center;
background-size: auto 50%;
}
}
.header__login {
&::after {
display: inline-block;
width: 32px;
height: 32px;
margin-left: 8px;
content: "";
vertical-align: middle;
background: url("@/assets/img/login.svg") no-repeat center;
background-size: auto 50%;
}
}
</style>