Initial commit
This commit is contained in:
		
							
								
								
									
										49
									
								
								vote-apps/voting-app/templates/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								vote-apps/voting-app/templates/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,49 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <title>{{option_a}} vs {{option_b}}!</title> | ||||
|     <base href="/index.html"> | ||||
|     <meta name = "viewport" content = "width=device-width, initial-scale = 1.0"> | ||||
|     <meta name="keywords" content="docker-compose, docker, stack"> | ||||
|     <meta name="author" content="Tutum dev team"> | ||||
|     <link rel='stylesheet' href="{{ url_for('static',filename='stylesheets/style.css') }}" /> | ||||
|     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> | ||||
|   </head> | ||||
|   <body> | ||||
|     <div id="content-container"> | ||||
|       <div id="content-container-center"> | ||||
|         <h3>{{option_a}} vs {{option_b}}!</h3> | ||||
|         <form id="choice" name='form' method="POST" action="/"> | ||||
|           <button id="a" type="submit" name="vote" class="a" value="a">{{option_a}}</button> | ||||
|           <button id="b" type="submit" name="vote" class="b" value="b">{{option_b}}</button> | ||||
|         </form> | ||||
|         <div id="tip"> | ||||
|           (Tip: you can change your vote) | ||||
|         </div> | ||||
|         <div id="hostname"> | ||||
|           Vote processed by {{hostname}} | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> | ||||
|     <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script> | ||||
|  | ||||
|     {% if vote %} | ||||
|     <script> | ||||
|       var vote = "{{vote}}"; | ||||
|  | ||||
|       if(vote == "a"){ | ||||
|         $(".a").prop('disabled', true); | ||||
|         $(".a").html('{{option_a}} <i class="fa fa-check-circle"></i>'); | ||||
|         $(".b").css('opacity','0.5'); | ||||
|       } | ||||
|       if(vote == "b"){ | ||||
|         $(".b").prop('disabled', true); | ||||
|         $(".b").html('{{option_b}} <i class="fa fa-check-circle"></i>'); | ||||
|         $(".a").css('opacity','0.5'); | ||||
|       } | ||||
|     </script> | ||||
|     {% endif %} | ||||
|   </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user
	 Ben Firshman
					Ben Firshman