Advertisement
Armaritto

Untitled

Nov 9th, 2023
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.36 KB | None | 0 0
  1. <template>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>TournaMate - Swiss Tournament</title>
  5. </head>
  6. <body>
  7. <div :style="{ width: playerWidth + 'px' }">
  8. <img src="..\Logo.jpeg" alt="logo" id="tournamatelogo" style="padding-left:70px;width:120px;height:120px;position:absolute" class="img-fluid">
  9. <br>
  10. <br>
  11. <div class="header">
  12. <a class="logo">TournaMate</a>
  13. <div class="header-right header-rightHovered">
  14. <lord-icon class = "icon"
  15. src="https://cdn.lordicon.com/kthelypq.json"
  16. trigger="hover"
  17. style="width:50px;height:50px">
  18. </lord-icon>
  19. </div>
  20. <div class="header-right header-rightHovered">
  21. <div class="active">
  22. About
  23. </div>
  24. </div>
  25. </div>
  26. <hr style="margin-top: 100px">
  27. <div class="title">
  28. Lorem Ipsum
  29. </div>
  30. <div class="content">
  31. <table class="my-table">
  32. <thead>
  33. <tr>
  34. <th>Rank</th>
  35. <th>Team Name</th>
  36. <th>Points</th>
  37. <th>Win</th>
  38. <th>Draw</th>
  39. <th>Lose</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <tr v-for="(team, index) in teams" :key="index">
  44. <td>{{ index + 1 }}</td>
  45. <td>{{ team.name }}</td>
  46. <td>{{ team.points }}</td>
  47. <td>{{ team.win }}</td>
  48. <td>{{ team.draw }}</td>
  49. <td>{{ team.lose }}</td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. </body>
  56. </template>
  57.  
  58.  
  59. <script>
  60. import lottie from "lottie-web";
  61. import { defineElement } from "@lordicon/element";
  62. import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
  63. let screenWidth = ref(window.innerWidth);
  64.  
  65. computed(() => {
  66. if (screenWidth.value <= 3840) {
  67. return screenWidth.value - 10;
  68. } else {
  69. return 3840;
  70. }
  71. });
  72.  
  73. function handleResize() {
  74. screenWidth.value = window.innerWidth;
  75. }
  76.  
  77. onMounted(() => {
  78. window.addEventListener('resize', handleResize);
  79. });
  80.  
  81. onBeforeUnmount(() => {
  82. window.removeEventListener('resize', handleResize);
  83. });
  84. // define "lord-icon" custom element with default properties
  85. defineElement(lottie.loadAnimation);
  86.  
  87. let helloMsg = '';
  88. export default {
  89. name: 'TournamentGenerator',
  90. data(){
  91. return{
  92. roomName: '',
  93. fantasyScore: '',
  94. teams: [
  95. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  96. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  97. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  98. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  99. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  100. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  101. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  102. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  103. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  104. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  105. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  106. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  107. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  108. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  109. {name: 'Team E', points: 25, win: 20, draw: 5, lose: 0 },
  110. ],
  111. screenWidth: window.innerWidth,
  112. }
  113. },
  114. methods:{
  115.  
  116. action(n){
  117. helloMsg = n
  118. callBackend();
  119. function callBackend(){
  120. fetch("/api/messages/backend", {
  121. method: 'POST',
  122. body: JSON.stringify({
  123. msg: helloMsg
  124. }),
  125. headers: {
  126. 'Content-type': 'application/json; charset=UTF-8',
  127. }
  128. })
  129. .then(function(response){
  130. return response.json()})
  131. .then(function(data){
  132. console.log(data)
  133. document.getElementById('board').innerHTML = data.msg;
  134. })
  135. }
  136. },
  137. }
  138. }
  139. </script>
  140.  
  141. <style>
  142. @font-face {
  143. font-family: ubuntu-bold;
  144. src: url("../../Ubuntu/Ubuntu-Bold.ttf");
  145. }
  146. @font-face {
  147. font-family: ubuntu-bold-italic;
  148. src: url("../../Ubuntu/Ubuntu-BoldItalic.ttf");
  149. }
  150. @font-face {
  151. font-family: ubuntu-italic;
  152. src: url("../../Ubuntu/Ubuntu-Italic.ttf");
  153. }
  154. @font-face {
  155. font-family: ubuntu-light;
  156. src: url("../../Ubuntu/Ubuntu-Light.ttf");
  157. }
  158. @font-face {
  159. font-family: ubuntu-lightItalic;
  160. src: url("../../Ubuntu/Ubuntu-LightItalic.ttf");
  161. }
  162. @font-face {
  163. font-family: ubuntu-medium;
  164. src: url("../../Ubuntu/Ubuntu-Medium.ttf");
  165. }
  166. @font-face {
  167. font-family: ubuntu-medium-italic;
  168. src: url("../../Ubuntu/Ubuntu-MediumItalic.ttf");
  169. }
  170. @font-face {
  171. font-family: ubuntu-regular;
  172. src: url("../../Ubuntu/Ubuntu-Regular.ttf");
  173. }
  174. body {
  175. font-family: ubuntu-regular;
  176. }
  177. #tournamatelogo{
  178. font-size: small;
  179. }
  180. .title{
  181. font-size: 50px;
  182. color: #095f59;
  183. font-family: ubuntu-bold;
  184. display: flex;
  185. justify-content: center;
  186. padding-top: 20px;
  187. padding-bottom: 40px;
  188. }
  189. ////////////////////////////
  190. .header {
  191. position: relative;
  192. overflow: hidden;
  193. padding: 20px 10px;
  194. max-width: 200px;
  195. display: grid;
  196. }
  197. .header a {
  198. float: left;
  199. text-align: center;
  200. padding: 12px;
  201. font-size: 18px;
  202. line-height: 25px;
  203. border-radius: 4px;
  204. font-family: ubuntu-bold;
  205. color: #081234;
  206. }
  207. .header a.logo {
  208. font-size: 320%;
  209. font-weight: bold;
  210. padding-left: 210px;
  211. }
  212. .active{
  213. padding: 20px;
  214. }
  215. .header-right {
  216. float: right;
  217. margin-right: 70px;
  218. border-radius: 7px;
  219. color: #686762;
  220. }
  221. .header-rightHovered:hover{
  222. background: #f6f3eb;
  223. }
  224. .content{
  225. padding-top: 20px;
  226. padding-bottom: 70px;
  227. display: flex;
  228. justify-content: center;
  229. overflow: hidden;
  230. }
  231. .content table {
  232. width: 70%;
  233. border-collapse: separate;
  234. border:solid #095F59FF 4px;
  235. align-content: center;
  236. border-radius: 20px;
  237. overflow: hidden;
  238. }
  239. .content th, .content td {
  240. border: 2px solid #095f59;
  241. text-align: center;
  242. padding-top: 0;
  243. }
  244. .content td{
  245. background-color: #fdcf6e;
  246. align-content: center;
  247. font-size: 20px;
  248. }
  249. .content th {
  250. background-color: #095f59;
  251. border-top: none;
  252. color: #fdcf6e;
  253. align-content: center;
  254. font-size: 20px;
  255. }
  256. @media(max-width: 700px) {
  257. test{
  258. grid-template-columns: minmax(100px,1fr);
  259. }
  260. }
  261. </style>
  262.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement