1
+ ///
2
+ // Copyright (c) 2022 Pycord Development
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ ///
22
+
23
+ @use ' ../pyc-core' ;
24
+
25
+ @mixin render () {
26
+ $img-size : 100px ;
27
+
28
+ .pyc-user-card {
29
+ width : 100% ;
30
+ padding : 1rem ;
31
+ background : pyc-core .token-get (' primary' );
32
+ border-radius : pyc-core .token-get (' radius-medium' );
33
+ display : flex ;
34
+ flex-direction : column ;
35
+ @include pyc-core .elevate (3 );
36
+
37
+ .pyc-user-card__wrap {
38
+ display : grid ;
39
+ grid-template-columns : $img-size 1fr ;
40
+ grid-gap : 0.7rem ;
41
+
42
+ .pyc-user-card__img {
43
+ width : $img-size ;
44
+ height : $img-size ;
45
+ position : relative ;
46
+ display : grid ;
47
+ place-items : center ;
48
+ overflow : hidden ;
49
+ border-radius : 50% ;
50
+ border : 2px solid pyc-core .token-get (' accent' );
51
+ background-color : pyc-core .token-get (' accent' ); // Prevents gap between image and border
52
+ user-select : none ;
53
+ @include pyc-core .prefix (transition , all 0.1s ease );
54
+
55
+ & :hover {
56
+ border-color : pyc-core .token-get (' accent-light' );
57
+ background-color : pyc-core .token-get (' accent-light' );
58
+ }
59
+
60
+ img {
61
+ z-index : 1 ;
62
+ }
63
+ }
64
+
65
+ .pyc-user-card__info {
66
+ .pyc-user-card__name {
67
+ font-size : pyc-core .to-rem (20px );
68
+ }
69
+
70
+ .pyc-user-card__role {
71
+ font-size : pyc-core .to-rem (14px );
72
+ }
73
+
74
+ .pyc-user-card__quote {
75
+ margin : 0.5rem 0 ;
76
+ font-size : pyc-core .to-rem (12px );
77
+ white-space : pre-line ;
78
+
79
+ & ::before {
80
+ content : open-quote ;
81
+ }
82
+
83
+ & ::after {
84
+ content : close-quote ;
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ .pyc-user-card__links {
91
+ margin-top : auto ;
92
+
93
+ .pyc-user-card__links__wrap {
94
+ width : 100% ;
95
+ display : inline-block ;
96
+ margin-top : 0.7rem ;
97
+ float : bottom ;
98
+
99
+ > * + * {
100
+ margin-left : 0.5rem ;
101
+ }
102
+
103
+ .pyc-button {
104
+ max-width : calc (calc (100% - 0.5rem ) / 2 );
105
+ }
106
+
107
+ .pyc-user-card__link {
108
+ @include pyc-core .prefix (transition , all 0.1s linear );
109
+
110
+ & :hover {
111
+ color : pyc-core .token-get (' accent-light' );
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
0 commit comments