Skip to content

Commit

Permalink
Merge pull request #715 from andrea-kyurchiev/feat/make-calendar-show…
Browse files Browse the repository at this point in the history
…-in-user-timezone

feat: makes calendar show in user timezone
  • Loading branch information
CiaraFlanagan authored Mar 12, 2024
2 parents 86c4745 + 79dbb0a commit d73d51f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
// Preloader js
$(window).on('load', function () {
$('.preloader').fadeOut(100);
var calendarContainer = document.getElementById('calendar-container');
if(calendarContainer){
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
const html = `<iframe src="https://calendar.google.com/calendar/embed?src=c_62694f414055ac569e5cb12dafbb0890ca22f3640b177a4b10b53171fbc9bdd4%40group.calendar.google.com&ctz=${timezone}" style=" border:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>`
calendarContainer.innerHTML = html;
}
});

// Accordions
Expand Down
10 changes: 3 additions & 7 deletions content/en/calendar/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ draft: false
<section class="section">
<div class="container">
<div class="row align-items-center">
<p>Welcome to the InnerSource Commons Calendar! Our events and working groups are open to everyone because we know that magic happens when people come together to share their experience and knowledge.
<p>A note about this calendar ... If you're using google, our calendar may display in the GMT timezone. To make sure you see events in your own timezone, please open the calendar on an incognito browser window or use a different search engine.
<div class="col-md-6 order-1 order-md-2 mb-4 mb-md-0">
<iframe src="https://calendar.google.com/calendar/embed?src=c_62694f414055ac569e5cb12dafbb0890ca22f3640b177a4b10b53171fbc9bdd4%40group.calendar.google.com" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe> </p>
</div>
<p>Welcome to the InnerSource Commons Calendar! Our events and working groups are open to everyone because we know that magic happens when people come together to share their experience and knowledge. </p>
<div class="col-md-6 order-1 order-md-2 mb-4 mb-md-0" id="calendar-container">
</div>
</div>
</div>
</div>
</section>


0 comments on commit d73d51f

Please sign in to comment.