Merge pull request #1172 from jeffmendoza/issue-button
Replace the 'I Wish' feature with a create issue button.
This commit is contained in:
		
						commit
						a541ae6d5d
					
				
							
								
								
									
										5
									
								
								404.md
								
								
								
								
							
							
						
						
									
										5
									
								
								404.md
								
								
								
								
							| 
						 | 
				
			
			@ -65,7 +65,4 @@ $( document ).ready(function() {
 | 
			
		|||
});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
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. :(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div>
 | 
			
		||||
				<span>I wish this page</span>
 | 
			
		||||
				<input type="text" id="wishField" name="wishField" placeholder="enter your wish">
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
		<div id="miceType" class="center">© {{ 'now' | date: "%Y" }} Kubernetes</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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'));
 | 
			
		||||
        </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>
 | 
			
		||||
</section>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								js/script.js
								
								
								
								
							
							
						
						
									
										21
									
								
								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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue