Skip to content

Commit b60113d

Browse files
authored
Merge pull request #57 from jekuer/minor-fixes
Minor fixes
2 parents de3ab2e + 345435b commit b60113d

File tree

11 files changed

+41
-28
lines changed

11 files changed

+41
-28
lines changed

assets/css/atcb.css

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add-to-Calendar Button
44
* ++++++++++++++++++++++
55
*
6-
* Version: 1.8.2
6+
* Version: 1.8.3
77
* Creator: Jens Kuerschner (https://jenskuerschner.de)
88
* Project: https://github.com/jekuer/add-to-calendar-button
99
* License: MIT with “Commons Clause” License Condition v1.0
@@ -34,12 +34,14 @@
3434
font-size: 16px;
3535
font-weight: 600;
3636
line-height: 24px;
37+
margin: 0 4px 2px 4px;
3738
max-width: 300px;
3839
min-width: 150px;
39-
padding: 10px 16px 11px 16px;
40+
padding: 10px 16px;
4041
position: relative;
4142
text-align: center;
4243
touch-action: manipulation;
44+
transform: translateZ(0px);
4345
-webkit-user-select: none;
4446
-moz-user-select: none;
4547
-ms-user-select: none;
@@ -60,12 +62,11 @@
6062

6163
.atcb_button.atcb_active {
6264
background: rgb(255, 255, 255);
63-
border-radius: 6px 6px 3px 3px;
6465
-webkit-box-shadow: 1px 8px 12px 0px rgba(0,0,0,.5);
6566
box-shadow: 1px 8px 12px 0px rgba(0,0,0,.5);
66-
margin: 0 -4px -1px -4px;
67+
margin: 0;
6768
padding: 10px 20px 12px 20px;
68-
transform: perspective(100px) rotateX(12deg) translateZ(0px);
69+
transform: perspective(100px) rotateX(12deg) translateZ(1px);
6970
transition: margin .1s ease-out, padding .1s ease-out, transform .1s ease-out;
7071
z-index: 160;
7172
}
@@ -88,9 +89,9 @@
8889
display: block;
8990
font-family:Arial, Helvetica, sans-serif;
9091
max-width: 100%;
91-
padding: 0 6px;
92+
padding: 0 4px;
9293
position: absolute;
93-
transform: translateZ(-1px);
94+
transform: translateZ(0px);
9495
-webkit-user-select: none;
9596
-moz-user-select: none;
9697
-ms-user-select: none;
@@ -137,9 +138,9 @@
137138
display: flex;
138139
font-size: 16px;
139140
left: 50%;
140-
margin-top: -1px;
141+
margin-top: -1px; /* ugly, but prevents a glitch in some cases */
141142
position: relative;
142-
padding: 12px 18px;
143+
padding: 13px 15px;
143144
text-align: left;
144145
transform: translate(-50%);
145146
touch-action: manipulation;

assets/css/atcb.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/atcb.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/atcb.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add-to-Calendar Button
44
* ++++++++++++++++++++++
55
*/
6-
const atcbVersion = '1.8.2';
6+
const atcbVersion = '1.8.3';
77
/* Creator: Jens Kuerschner (https://jenskuerschner.de)
88
* Project: https://github.com/jekuer/add-to-calendar-button
99
* License: MIT with “Commons Clause” License Condition v1.0
@@ -619,8 +619,8 @@ function atcb_generate_teams(data) {
619619
}
620620
if (data['location'] != null && data['location'] != '') {
621621
locationString = encodeURIComponent(data['location']);
622-
url += '&location=' + locationString; // workaround putting the location into the description, since the native field is not supported yet
623-
locationString += ' // ';
622+
url += '&location=' + locationString;
623+
locationString += ' // '; // preparing the workaround putting the location into the description, since the native field is not supported yet
624624
}
625625
if (data['description_iCal'] != null && data['description_iCal'] != '') { // using description_iCal instead of description, since Teams does not support html tags
626626
url += '&content=' + locationString + encodeURIComponent(data['description_iCal']);
@@ -755,6 +755,10 @@ if (isBrowser()) {
755755
atcb_close();
756756
}
757757
});
758+
// Global listener to any screen changes, where we need to close all buttons in order to prevent any bad renderings (more "expensive" alternative would be to re-render them)
759+
window.addEventListener('resize', () => {
760+
atcb_close(true);
761+
});
758762
}
759763

760764

assets/js/atcb.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)