-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
templates/web/fixmystreet-uk-councils/about/waste-calendar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
[% | ||
PROCESS 'waste/header.html', title = 'Add your waste collection days to your online calendar'; | ||
SET ics_link = c.uri_for_action('waste/calendar_ics', [ property.id ]); | ||
%] | ||
|
||
<div class="waste__loading_wrapper"> | ||
|
||
<script nonce="[% csp_nonce %]"> | ||
(function(){ | ||
var userAgent = navigator.userAgent, | ||
os = 'pc'; | ||
if (userAgent.indexOf('Mobi') > -1) os = 'phone'; | ||
else if (userAgent.indexOf('Mac') > -1) os = 'mac'; | ||
document.documentElement.classList.add('os-' + os); | ||
})(); | ||
</script> | ||
|
||
<style> | ||
clipboard-copy:not(:defined) .ics-loaded { display: none; } | ||
clipboard-copy:defined .ics-loading { display: none; } | ||
.mac-only { display: none; } | ||
.os-mac .mac-only { display: initial; } | ||
.os-pc .phone-only, .os-mac .phone-only { display: none; } | ||
.os-phone .computer-only { display: none; } | ||
</style> | ||
|
||
<h1>Add your waste collection days to your online calendar</h1> | ||
|
||
<p>Subscribe using your smartphone or computer, and your online calendar will always show your next collection days.</p> | ||
|
||
<h2>Step 1: copy the link to the calendar</h2> | ||
|
||
<div aria-live="polite" id="ics-announce"></div> | ||
<p>Click the Copy button below to copy the calendar link to your clipboard: | ||
<p><clipboard-copy id="ics-copy" value="[% ics_link %]" class="btn"> | ||
<span class="ics-loading">Loading...</span> | ||
<span class="ics-loaded">Copy</span> | ||
</clipboard-copy> | ||
</p> | ||
|
||
<p class="phone-only">Or press and hold <a href="[% ics_link %]">this link</a> until a menu appears, then tap “Copy Link” or “Copy Link Address”.</p> | ||
<p class="computer-only">Or right-click <span class="mac-only">/ Ctrl-click</span> <a href="[% ics_link %]">this link</a>, then click “Copy Link” or “Copy Link Address”.</p> | ||
|
||
<script nonce="[% csp_nonce %]"> | ||
document.addEventListener('clipboard-copy', function(event) { | ||
const t = event.target; | ||
t.textContent = 'Copied!'; | ||
document.getElementById('ics-announce').setAttribute('aria-label', 'Copied'); | ||
}); | ||
</script> | ||
|
||
<h2>Step 2: subscribe to the calendar</h2> | ||
<p>Follow these instructions and paste in the link you just copied when it asks you for the calendar’s address or URL.</p> | ||
<ul> | ||
<li><a href="https://support.apple.com/en-gb/HT202361">iPhone, iPad, Mac</a></li> | ||
<li><a href="https://support.google.com/calendar/answer/37100?hl=en&co=GENIE.Platform%3DDesktop#:~:text=Use%20a%20link%20to%20add%20a%20public%20calendar">Google Calendar</a></li> | ||
<li><a href="https://support.office.com/en-us/article/import-or-subscribe-to-a-calendar-in-outlook-com-cff1429c-5af6-41ec-a5b4-74f2c278e98c">Outlook</a></li> | ||
</ul> | ||
|
||
</div> | ||
|
||
[% INCLUDE footer.html %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<a class="icon-link is--calendar" href="[% c.uri_for_action('waste/calendar', [ property.id ]) %]">Add to your calendar (.ics file)</a> | ||
<a class="icon-link is--calendar" href="[% c.uri_for_action('waste/calendar', [ property.id ]) %]">Add to your calendar</a> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.