1+ @if ($userinfo -> role == ' user' and env (' ENABLE_REPORT_ICON' ) == true )
2+ <style >
3+ .report-pill-container {
4+ position : fixed ;
5+ bottom : 60px ;
6+ left : 30px ;
7+ z-index : 5 ;
8+ }
9+
10+ .report-icon {
11+ font-size : 36px ;
12+ z-index : 5 ;
13+ position : absolute ;
14+ top : 7px ;
15+ left : 7px ;
16+ display : flex ;
17+ justify-content : center ;
18+ align-items : center ;
19+ }
20+
21+ .report-expanding-pill {
22+ background-color : #58595b ;
23+ position : absolute ;
24+ width : 0px ;
25+ height : 30px ;
26+ border-radius : 50px ;
27+ overflow : hidden ;
28+ padding-right : 30px ;
29+ /* box-shadow: 0px 0px 15px #777; */
30+ display : flex ;
31+ justify-content : flex-end ;
32+ align-items : center ;
33+ transition : all 0.3s cubic-bezier (0.645 , 0.045 , 0.355 , 1 );
34+ }
35+
36+ .report-text {
37+ opacity : 0 ;
38+ font-size : 14px ;
39+ transition : opacity 0.3s ease-out ;
40+ font-family : Arial , Helvetica , sans-serif ;
41+ color : white ;
42+ text-decoration : none ;
43+ }
44+
45+ .report-text :hover {
46+ text-decoration : underline ;
47+ color : white ;
48+ }
49+
50+
51+ .report-show {
52+ transition : all 0.3s cubic-bezier (0.645 , 0.045 , 0.355 , 1 );
53+ width : 130px ;
54+ }
55+
56+ .report-show-text {
57+ transition : opacity 3s ease-out ;
58+ opacity : 1 ;
59+ }
60+
61+ .report-hide {
62+ opacity : 0 ;
63+ transition : opacity 0.3s ease-out ;
64+ }
65+ </style >
66+ <div class =" report-pill-container" >
67+ <div class =" report-icon-container" >
68+ <div class =" report-icon" ><svg xmlns =" http://www.w3.org/2000/svg" width =" 16" height =" 16" fill =" white" class =" bi bi-info-circle" viewBox =" 0 0 16 16" >
69+ <path d =" M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" />
70+ <path d =" m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" />
71+ </svg ></div >
72+ </div >
73+ <div class =" report-expanding-pill" >
74+ <a href =" {{ url (' report?' . $userinfo -> id )} }" target =" _blank" class =" report-text" >Report abuse</a >
75+ </div >
76+ </div >
77+
78+ <script >
79+ let icon = document .querySelector (' .report-icon-container' )
80+ let expandingPill = document .querySelector (' .report-expanding-pill' )
81+ let text = document .querySelector (' .report-text' )
82+
83+ icon .addEventListener (' click' , function () {
84+ expandingPill .classList .toggle (' report-show' );
85+ text .classList .toggle (' report-show-text' );
86+ notification .classList .add (' report-hide' )
87+ });
88+ </script >
89+ @endif
0 commit comments