File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 14
14
--cal-cell-today-disabled : # b0a8b9 ;
15
15
--cal-primary : # 443752 ;
16
16
--cal-cover : # 000000ad ;
17
+ --cal-info-padding : 10px ;
17
18
18
19
font-size : 14px ;
19
20
}
122
123
width : 300px ;
123
124
background-color : white;
124
125
border : 1px solid black;
125
- padding : 10 px ;
126
+ padding : var ( --cal-info-padding ) ;
126
127
z-index : 999 ;
127
128
word-wrap : break-word;
128
129
white-space : normal;
140
141
text-align : unset;
141
142
}
142
143
144
+ # calendar # calendar-info # calendar-join-button {
145
+ display : block;
146
+ margin-top : 10px ;
147
+ padding : 5px ;
148
+ text-align : center;
149
+
150
+ /* width: 100% will spill over the right padding, so use ✨calc magic✨ */
151
+ width : calc (100% - var (--cal-info-padding ));
152
+
153
+ background-color : var (--cal-primary );
154
+ color : white;
155
+ }
156
+
157
+ # calendar # calendar-info # calendar-join-button .hidden {
158
+ display : none;
159
+ }
160
+
143
161
# calendar # calendar-info # calendar-info-where , # calendar # calendar-info # calendar-info-when {
144
162
display : inline-block;
145
163
margin-top : 5px ;
Original file line number Diff line number Diff line change @@ -249,6 +249,16 @@ function displayInfoPanel(target, event) {
249
249
while ( desc . firstChild . nodeName . toLowerCase ( ) == "br" ) {
250
250
desc . removeChild ( desc . firstChild ) ;
251
251
}
252
+
253
+ // Only show the "Join Meeting" box if there's a meeting to join, and set
254
+ // the correct href
255
+ const meetingButton = document . getElementById ( 'calendar-join-button' ) ;
256
+ if ( event . meeting_link ) {
257
+ meetingButton . href = event . meeting_link ;
258
+ meetingButton . classList . remove ( "hidden" ) ;
259
+ } else {
260
+ meetingButton . classList . add ( "hidden" ) ;
261
+ }
252
262
}
253
263
254
264
/**
Original file line number Diff line number Diff line change 50
50
<b id =" calendar-info-when" ></b >
51
51
<br >
52
52
<b id =" calendar-info-where" ></b >
53
+ <a href =" #" id =" calendar-join-button" class =" hidden" >Join Google Meet</a >
53
54
<div id =" calendar-info-description" ></div >
54
55
</div >
55
56
</div >
You can’t perform that action at this time.
0 commit comments