From 92a802a7fb2b689c3cc1f0a7eacd7a9b9e380857 Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Tue, 6 Sep 2016 15:54:10 -0700 Subject: [PATCH] Replace the 'I Wish' feature with a create issue button. --- 404.md | 5 +---- _includes/footer.html | 2 -- _layouts/docwithnav.html | 6 +++++- _sass/_base.sass | 6 ++++++ js/script.js | 21 +-------------------- 5 files changed, 13 insertions(+), 27 deletions(-) diff --git a/404.md b/404.md index 71497ddcbe..bf053c1e3b 100644 --- a/404.md +++ b/404.md @@ -65,7 +65,4 @@ $( document ).ready(function() { }); -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_." +Sorry, this page was not found. :( diff --git a/_includes/footer.html b/_includes/footer.html index 00ee5554fc..3fb22e0613 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -18,8 +18,6 @@ Events Calendar
- I wish this page -
© {{ 'now' | date: "%Y" }} Kubernetes
diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index 70d648ce25..c4405630f3 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -43,7 +43,11 @@ "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')); - {% endif %} + + Create Issue + {% endif %} diff --git a/_sass/_base.sass b/_sass/_base.sass index c327086561..afa136b589 100644 --- a/_sass/_base.sass +++ b/_sass/_base.sass @@ -874,6 +874,12 @@ dd img max-width: 100% + a.button + border-radius: 2px + + a.issue + margin-left: 20px + .fixed footer position: fixed bottom: 0 diff --git a/js/script.js b/js/script.js index f714cdec13..aed501d701 100755 --- a/js/script.js +++ b/js/script.js @@ -92,14 +92,13 @@ function px(n){ var kub = (function () { 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 () { html = $('html'); body = $('body'); header = $('header'); mainNav = $('#mainNav'); - wishField = $('#wishField'); quickstartButton = $('#quickstartButton'); hero = $('#hero'); encyclopedia = $('#encyclopedia'); @@ -112,13 +111,11 @@ var kub = (function () { window.addEventListener('resize', resetTheView); window.addEventListener('scroll', resetTheView); window.addEventListener('keydown', handleKeystrokes); - wishField[0].addEventListener('keydown', handleKeystrokes); document.onunload = function(){ window.removeEventListener('resize', resetTheView); window.removeEventListener('scroll', resetTheView); window.removeEventListener('keydown', handleKeystrokes); - wishField[0].removeEventListener('keydown', handleKeystrokes); }; 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) { switch (e.which) { - case 13: { - if (e.currentTarget === wishField[0]) { - submitWish(wishField[0]); - } - break; - } - case 27: { if (html.hasClass('open-nav')) { toggleMenu();