Logo.vue
1.53 KB
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
<template>
<div class="functional-logo-container" :class="slideClass">
<router-link class="sidebar-logo-link" to="/">
<img v-if="showExpandLogo" :src="expandLogoSrc" class="sidebar-logo-img" alt="logo" />
<h1 v-if="showExpandTitle" class="sidebar-logo-title" :class="{'is-only': !showExpandLogo}">
{{ displaySysName }}
</h1>
</router-link>
</div>
</template>
<script>
import sidebarBrandLogoMixin from '@/mixins/sidebar-brand-logo'
export default {
name: 'SidebarLogo',
mixins: [sidebarBrandLogoMixin]
}
</script>
<style lang="scss" scoped>
.functional-logo-container {
width: 210px;
height: 48px;
box-sizing: border-box;
background: #fff;
overflow: hidden;
flex-shrink: 0;
display: flex;
align-items: center;
.sidebar-logo-link {
display: flex;
align-items: center;
height: 48px;
width: 100%;
padding: 0 16px;
margin: 0;
overflow: hidden;
text-decoration: none;
box-sizing: border-box;
}
.sidebar-logo-img {
height: 28px;
width: auto;
max-width: 110px;
flex-shrink: 0;
object-fit: contain;
display: block;
}
.sidebar-logo-title {
margin: 0 0 0 8px;
padding: 0;
font-size: 16px;
font-weight: 600;
line-height: 1.2;
letter-spacing: 0.5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #1f2937;
&.is-only {
margin-left: 0;
}
}
&.dark {
background: #161618;
.sidebar-logo-title {
color: rgba(255, 255, 255, 0.85);
}
}
}
</style>