good progress
This commit is contained in:
		
							
								
								
									
										172
									
								
								demweb/templates/player.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										172
									
								
								demweb/templates/player.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,172 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
|   <head> | ||||
|   <meta charset="utf-8" /> | ||||
|   <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||||
|   <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||||
|  | ||||
|   <title> | ||||
|     {{ player.guid }} - {{ player.name }} | ||||
|   </title> | ||||
|  | ||||
|   <link rel="stylesheet" | ||||
|     href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" | ||||
|     integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" | ||||
|     crossorigin="anonymous" | ||||
|   /> | ||||
|  | ||||
|   <link rel="stylesheet" | ||||
|     href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/theme.bootstrap_4.min.css" | ||||
|     integrity="sha512-2C6AmJKgt4B+bQc08/TwUeFKkq8CsBNlTaNcNgUmsDJSU1Fg+R6azDbho+ZzuxEkJnCjLZQMozSq3y97ZmgwjA==" | ||||
|     crossorigin="anonymous" | ||||
|     referrerpolicy="no-referrer" | ||||
|   /> | ||||
| </head> | ||||
|  | ||||
| <body> | ||||
| <main class="container"> | ||||
|  | ||||
| <div class="row"> | ||||
|   <div class="col"> | ||||
|     <table class="table table-sm table-borderless"> | ||||
|     <tbody> | ||||
|       <tr> | ||||
|         <th scope="row">guid</th> | ||||
|         <td> | ||||
|           <a href="https://steamcommunity.com/profiles/{{ player.guid }}" target="_blank"> | ||||
|             {{ player.guid }} | ||||
|           </a> | ||||
|         </td> | ||||
|       <tr> | ||||
|         <th scope="row">name</th> | ||||
|         <td>{{ player.name }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">first_seen</th> | ||||
|         <td>{{ player.first_seen }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">last_seen</th> | ||||
|         <td>{{ player.last_seen }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">playtime</th> | ||||
|         <td>{{ player.playtime | to_duration }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">chats</th> | ||||
|         <td>{{ player.chats }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">deaths</th> | ||||
|         <td>{{ player.deaths }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">kills</th> | ||||
|         <td>{{ player.kills }}</td> | ||||
|       <tr> | ||||
|         <th scope="row">voicetime</th> | ||||
|         <td>{{ player.voicetime | to_duration }}</td> | ||||
|     </tbody> | ||||
|     </table> | ||||
|   </div> | ||||
|  | ||||
|   <div class="col"> | ||||
|     <table class="table table-striped tablesorter" id="playerNamesTable"> | ||||
|     <thead> | ||||
|         <tr> | ||||
|         <th scope="col">Name</th> | ||||
|         <th scope="col" class="sorter-duration">Time</th> | ||||
|         </tr> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|     {%- for name in player.names %} | ||||
|         <tr> | ||||
|         <th scope="row">{{ name.name }}</th> | ||||
|         <td>{{ (name.time * 0.015) | to_duration }}</td> | ||||
|         </tr> | ||||
|     {%- endfor %} | ||||
|     </tbody> | ||||
|     </table> | ||||
|   </div> | ||||
|  | ||||
|   <div class="col"> | ||||
|     <table class="table table-striped" id="playerSpraysTable"> | ||||
|     <thead> | ||||
|         <tr> | ||||
|         <th scope="col">Spray</th> | ||||
|         </tr> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|     {%- for spray in player.sprays %} | ||||
|         <tr> | ||||
|         <th scope="row">{{ spray.spray }}</th> | ||||
|         </tr> | ||||
|     {%- endfor %} | ||||
|     </tbody> | ||||
|     </table> | ||||
|   </div> | ||||
| </div> | ||||
|  | ||||
| <div class="row"> | ||||
|   <h3>Sessions</h3> | ||||
|   <table class="table table-striped tablesorter" id="playerSessionsTable"> | ||||
|   <thead> | ||||
|       <tr> | ||||
|       <th scope="col">#</th> | ||||
|       <th scope="col" class="sorter-isoDate">Time</th> | ||||
|       <th scope="col" class="sorter-duration">Length</th> | ||||
|       <th scope="col">Map</th> | ||||
|       <th scope="col" class="sorter-duration">Playtime</th> | ||||
|       <th scope="col">Chats</th> | ||||
|       <th scope="col" class="sorter-duration">Voicetime</th> | ||||
|       </tr> | ||||
|   </thead> | ||||
|   <tbody> | ||||
|   {%- for session in player_sessions %} | ||||
|       <tr> | ||||
|       <th scope="row"> | ||||
|         <a href="{{ url_for('views.session', session_id=session.session.id) }}#{{ player.guid }}"> | ||||
|           {{ session.session.id }} | ||||
|         </a> | ||||
|       </th> | ||||
|       <td>{{ session.session.time.isoformat(' ') }}</td> | ||||
|       <td>{{ session.session.length | to_duration }}</td> | ||||
|       <td>{{ session.session.mapname }}</td> | ||||
|       <td>{{ session.playtime | to_duration }}</td> | ||||
|       <td>{{ session.chats }}</td> | ||||
|       <td>{{ session.voicetime | to_duration }}</td> | ||||
|       </tr> | ||||
|   {%- endfor %} | ||||
|   </tbody> | ||||
|   </table> | ||||
| </div> | ||||
| </main> | ||||
|  | ||||
| <script | ||||
|   src="https://code.jquery.com/jquery-3.6.0.min.js" | ||||
|   integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" | ||||
|   crossorigin="anonymous" | ||||
| ></script> | ||||
|  | ||||
| <script | ||||
|   src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js" | ||||
|   integrity="sha512-qzgd5cYSZcosqpzpn7zF2ZId8f/8CHmFKZ8j7mU4OUXTNRd5g+ZHBPsgKEwoqxCtdQvExE5LprwwPAgoicguNg==" | ||||
|   crossorigin="anonymous" | ||||
|   referrerpolicy="no-referrer" | ||||
| ></script> | ||||
|  | ||||
| <script | ||||
|   src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/parsers/parser-duration.min.js" | ||||
|   integrity="sha512-X7QJLLEO6yg8gSlmgRAP7Ec2qDD+ndnFcd8yagZkkN5b/7bCMbhRQdyJ4SjENUEr+4eBzgwvaFH5yR/bLJZJQA==" | ||||
|   crossorigin="anonymous" | ||||
|   referrerpolicy="no-referrer" | ||||
| ></script> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| $(function() { | ||||
|   $("#playerNamesTable").tablesorter({ | ||||
|     theme: "bootstrap" | ||||
|   }); | ||||
|   $("#playerSessionsTable").tablesorter({ | ||||
|     theme: "bootstrap" | ||||
|   }); | ||||
| }); | ||||
| </script> | ||||
|  | ||||
| </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user