Replace the 'I Wish' feature with a create issue button.
This commit is contained in:
parent
6b61d2ba0b
commit
92a802a7fb
3
404.md
3
404.md
|
@ -66,6 +66,3 @@ $( document ).ready(function() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
Sorry, this page was not found. :(
|
Sorry, this page was not found. :(
|
||||||
|
|
||||||
You can let us know by filling out the "I wish this page" text field at
|
|
||||||
the bottom of this page. Maybe try: "I wish this page _existed_."
|
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
<a href="https://calendar.google.com/calendar/embed?src=nt2tcnbtbied3l6gi2h29slvc0%40group.calendar.google.com" class="calendar"><span>Events Calendar</span></a>
|
<a href="https://calendar.google.com/calendar/embed?src=nt2tcnbtbied3l6gi2h29slvc0%40group.calendar.google.com" class="calendar"><span>Events Calendar</span></a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>I wish this page</span>
|
|
||||||
<input type="text" id="wishField" name="wishField" placeholder="enter your wish">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="miceType" class="center">© {{ 'now' | date: "%Y" }} Kubernetes</div>
|
<div id="miceType" class="center">© {{ 'now' | date: "%Y" }} Kubernetes</div>
|
||||||
|
|
|
@ -43,7 +43,11 @@
|
||||||
"permalink" : "http://kubernetes.github.io{{page.url}}"
|
"permalink" : "http://kubernetes.github.io{{page.url}}"
|
||||||
};
|
};
|
||||||
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
||||||
</script>{% endif %}
|
</script>
|
||||||
|
<a href="" onclick="window.open('https://github.com/kubernetes/kubernetes.github.io/issues/new?title=Issue%20with%20' +
|
||||||
|
window.location.pathname + '&body=Issue%20with%20' +
|
||||||
|
window.location.pathname)" class="button issue">Create Issue</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -874,6 +874,12 @@ dd
|
||||||
img
|
img
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|
||||||
|
a.button
|
||||||
|
border-radius: 2px
|
||||||
|
|
||||||
|
a.issue
|
||||||
|
margin-left: 20px
|
||||||
|
|
||||||
.fixed footer
|
.fixed footer
|
||||||
position: fixed
|
position: fixed
|
||||||
bottom: 0
|
bottom: 0
|
||||||
|
|
21
js/script.js
21
js/script.js
|
@ -92,14 +92,13 @@ function px(n){
|
||||||
|
|
||||||
var kub = (function () {
|
var kub = (function () {
|
||||||
var HEADER_HEIGHT;
|
var HEADER_HEIGHT;
|
||||||
var html, header, mainNav, quickstartButton, hero, encyclopedia, footer, wishField, headlineWrapper;
|
var html, header, mainNav, quickstartButton, hero, encyclopedia, footer, headlineWrapper;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
html = $('html');
|
html = $('html');
|
||||||
body = $('body');
|
body = $('body');
|
||||||
header = $('header');
|
header = $('header');
|
||||||
mainNav = $('#mainNav');
|
mainNav = $('#mainNav');
|
||||||
wishField = $('#wishField');
|
|
||||||
quickstartButton = $('#quickstartButton');
|
quickstartButton = $('#quickstartButton');
|
||||||
hero = $('#hero');
|
hero = $('#hero');
|
||||||
encyclopedia = $('#encyclopedia');
|
encyclopedia = $('#encyclopedia');
|
||||||
|
@ -112,13 +111,11 @@ var kub = (function () {
|
||||||
window.addEventListener('resize', resetTheView);
|
window.addEventListener('resize', resetTheView);
|
||||||
window.addEventListener('scroll', resetTheView);
|
window.addEventListener('scroll', resetTheView);
|
||||||
window.addEventListener('keydown', handleKeystrokes);
|
window.addEventListener('keydown', handleKeystrokes);
|
||||||
wishField[0].addEventListener('keydown', handleKeystrokes);
|
|
||||||
|
|
||||||
document.onunload = function(){
|
document.onunload = function(){
|
||||||
window.removeEventListener('resize', resetTheView);
|
window.removeEventListener('resize', resetTheView);
|
||||||
window.removeEventListener('scroll', resetTheView);
|
window.removeEventListener('scroll', resetTheView);
|
||||||
window.removeEventListener('keydown', handleKeystrokes);
|
window.removeEventListener('keydown', handleKeystrokes);
|
||||||
wishField[0].removeEventListener('keydown', handleKeystrokes);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
setInterval(setFooterType, 10);
|
setInterval(setFooterType, 10);
|
||||||
|
@ -189,24 +186,8 @@ var kub = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitWish(textfield) {
|
|
||||||
window.location.replace("https://github.com/kubernetes/kubernetes.github.io/issues/new?title=I%20wish%20" +
|
|
||||||
window.location.pathname + "%20" + textfield.value + "&body=I%20wish%20" +
|
|
||||||
window.location.pathname + "%20" + textfield.value);
|
|
||||||
|
|
||||||
textfield.value = '';
|
|
||||||
textfield.blur();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleKeystrokes(e) {
|
function handleKeystrokes(e) {
|
||||||
switch (e.which) {
|
switch (e.which) {
|
||||||
case 13: {
|
|
||||||
if (e.currentTarget === wishField[0]) {
|
|
||||||
submitWish(wishField[0]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case 27: {
|
case 27: {
|
||||||
if (html.hasClass('open-nav')) {
|
if (html.hasClass('open-nav')) {
|
||||||
toggleMenu();
|
toggleMenu();
|
||||||
|
|
Loading…
Reference in New Issue