diff --git a/_includes/nav.html b/_includes/nav.html index afae576..30a1693 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -14,7 +14,7 @@ diff --git a/_layouts/default.html b/_layouts/default.html index 987bc1a..90d13ce 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -8,8 +8,14 @@ {% seo %} + + + + Join us for office hours + . + {% include nav.html %} {{ content }} diff --git a/_sass/addtocalendar.scss b/_sass/addtocalendar.scss new file mode 100644 index 0000000..73e3a5d --- /dev/null +++ b/_sass/addtocalendar.scss @@ -0,0 +1,109 @@ +/** + * AddToCalendar Blue Style + * http://addtocalendar.com + */ + +/* Base */ + +.addtocalendar var { + display: none; +} + +.addtocalendar { + position: relative; + display: inline-block; + background: transparent!important; +} + +.atcb-link { + outline: none!important; + cursor: pointer; +} + +.atcb-link:focus~ul, +.atcb-link:active~ul, +.atcb-list:hover{ + visibility:visible; +} + +.atcb-list { + visibility: hidden; + position: absolute; + top: 100%; + left: 0; + width: 170px; + z-index: 900; + @extend .border; + border-radius: 4px; + overflow: hidden; +} + +.atcb-list, +.atcb-item +{ + list-style: none; + margin: 0; + padding: 0; + background: #fff; +} + +.atcb-item { + float: none; + text-align: left; +} + +.atcb-item-link +{ + text-decoration: none; + outline: none; + display: block; +} + +.atcb-item.hover, +.atcb-item:hover { + position: relative; + z-index: 900; + cursor: pointer; + text-decoration: none; + outline: none; +} + +.atc-style-blue .atcb-list, +.atc-style-blue .atcb-item +{ + background: #fff; + color: #000; +} + +.atc-style-blue .atcb-item, +.atc-style-blue .atcb-item-link +{ + line-height: 1.3em; + vertical-align: middle; + zoom: 1; +} + +.atc-style-blue .atcb-item-link, +.atc-style-blue .atcb-item-link:hover, +.atc-style-blue .atcb-item-link:active, +.atc-style-blue .atcb-item-link:focus +{ + color: #000; + font-family: $body-font; + font-size: 14px; + text-decoration: none; + outline: none; + padding: 5px 15px; +} + +.atc-style-blue .atcb-item-link:hover, +.atc-style-blue .atcb-item-link:active, +.atc-style-blue .atcb-item-link:focus +{ + color: #fff; +} + +.atc-style-blue .atcb-item.hover, +.atc-style-blue .atcb-item:hover { + background: $text-blue; +} diff --git a/assets/css/index.scss b/assets/css/index.scss index f380348..5194e41 100644 --- a/assets/css/index.scss +++ b/assets/css/index.scss @@ -6,6 +6,7 @@ @import "colors.scss"; @import "markdown.scss"; @import "switcher.scss"; +@import "addtocalendar.scss"; img { max-width: 100%; diff --git a/assets/js/office-hours.js b/assets/js/office-hours.js new file mode 100644 index 0000000..541c341 --- /dev/null +++ b/assets/js/office-hours.js @@ -0,0 +1,43 @@ +// Calculate the next Office Hours + + +// Adjust to Friday at 17:00 UTC / 1pm Eastern +var attrs = {day: "Friday", hour: 17, minute: 0, second: 0, millisecond: 0} + +var start = moment().utc().set(attrs) + +// If it's already passed today, go to next Friday +if(start < moment().utc()) { + start.add({days: 7}) +} + +end = moment(start).add({hour: 1}) + +if(start < moment().add(4, 'hours')) { + document.body.classList.add('office-hours-soon') + document.querySelectorAll('.office-hours-nag').forEach(function(el) { + el.classList.remove('d-none') + }); +} + +// Switch back to local time +start.local(); +end.local(); + +displayTime(document.querySelectorAll('.js-office-hours-start-time'), start); +displayTime(document.querySelectorAll('.js-office-hours-end-time'), end); + +function displayTime(elements, time) { + elements.forEach(function(el) { + var format = el.dataset.format + var value; + + if(format == 'fromNow') { + value = time.fromNow(); + } else { + value = time.format(format); + } + + el.innerHTML = value; + }); +} diff --git a/assets/office-hours.png b/assets/office-hours.png new file mode 100644 index 0000000..8b7a945 Binary files /dev/null and b/assets/office-hours.png differ diff --git a/contribute.html b/contribute.html new file mode 100644 index 0000000..157f4e1 --- /dev/null +++ b/contribute.html @@ -0,0 +1,74 @@ +--- +layout: default +title: Contribute +office_hours_link: https://github.zoom.us/j/221410810 +--- + +
+

Join the Community

+

+ We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. +

+ +
+ + + + + +
+ + +
+
+

Office Hours

+

+ Join us every + + Friday at + 17:00 UTC + + to give feedback, ask questions, get help, or just chat about ideas. +

+ + + + {% octicon calendar class:"mr-2" %} Add to Calendar + + + + + + Probot Office Hours + Join us every Friday to give feedback, ask questions, get help, or just chat about ideas. + {{ page.office_hours_link }} + + + + + {% octicon device-camera-video class:"mr-2" %} Join Now + +
+
+ + + +
+
+
+ +