Silver calculator
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
var calculator = new Vue({
|
||||||
|
el : '#calculator',
|
||||||
|
data : {
|
||||||
|
//guilds: new Array(10)
|
||||||
|
guilds: [
|
||||||
|
'',
|
||||||
|
'Pyro',
|
||||||
|
'Knights',
|
||||||
|
'Confectioners',
|
||||||
|
'Family',
|
||||||
|
'Sofa',
|
||||||
|
'Twisted',
|
||||||
|
'Trium',
|
||||||
|
'Atomic',
|
||||||
|
'Black',
|
||||||
|
'Vagabunden',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// Helps render enemy teams in order by power level
|
||||||
|
orderedEnemies: function () {
|
||||||
|
return orderByPower(this.map.enemySlots);
|
||||||
|
},
|
||||||
|
// Helps render allied teams in order by power level
|
||||||
|
orderedAllies: function () {
|
||||||
|
return orderByPower(this.map.ourSlots);
|
||||||
|
},
|
||||||
|
// Renders total team powers: hero, titan, total
|
||||||
|
getAllyPower: function () {
|
||||||
|
return getTotalPower(this.map.ourSlots);
|
||||||
|
},
|
||||||
|
// Renders total enemy team powers: hero, titan, total
|
||||||
|
getEnemyPower: function () {
|
||||||
|
return getTotalPower(this.map.enemySlots);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
"modules/war",
|
"modules/war",
|
||||||
"modules/hamburger",
|
"modules/hamburger",
|
||||||
"modules/header",
|
"modules/header",
|
||||||
|
"modules/calculator",
|
||||||
|
|
||||||
// Print
|
// Print
|
||||||
"base/print"
|
"base/print"
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
.calculator {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
table {
|
||||||
|
margin: 80px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #261CD1;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
border: 0;
|
||||||
|
padding: 15px 20px;
|
||||||
|
width: calc(100% / 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr {
|
||||||
|
&:nth-child(odd) td {
|
||||||
|
background: #FAFAFC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: 0;
|
||||||
|
font: inherit;
|
||||||
|
font-weight: 600;
|
||||||
|
background: none;
|
||||||
|
outline: 0;
|
||||||
|
cursor: text;
|
||||||
|
color: #261CD1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<script src="{{ "/assets/js/app.js" | relative_url }}"></script>
|
<script src="{{ "/assets/js/app.js" | relative_url }}"></script>
|
||||||
<script src="{{ "/assets/js/localstorage.js" | relative_url }}"></script>
|
<script src="{{ "/assets/js/localstorage.js" | relative_url }}"></script>
|
||||||
<script src="{{ "/assets/js/hamburger.js" | relative_url }}"></script>
|
<script src="{{ "/assets/js/hamburger.js" | relative_url }}"></script>
|
||||||
|
<script src="{{ "/assets/js/calculator.js" | relative_url }}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- / _includes/partials/scripts.html -->
|
<!-- / _includes/partials/scripts.html -->
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" data-baseurl="{{site.baseurl}}">
|
||||||
|
{% include svg.html %}
|
||||||
|
|
||||||
|
{% include head.html %}
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<main class="wrapper">
|
||||||
|
{% raw %}
|
||||||
|
<div id="calculator" class="calculator">
|
||||||
|
<h1>Silver League Calculator</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>Monday</td>
|
||||||
|
<td>Tuesday</td>
|
||||||
|
<td>Wednesday</td>
|
||||||
|
<td>Thursday</td>
|
||||||
|
<td>Friday</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(guild, index) in guilds" v-if="index > 0">
|
||||||
|
<td>
|
||||||
|
<input type="text" v-model="guilds[index]" />
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- Odd guilds -->
|
||||||
|
<template v-if="index % 2">
|
||||||
|
<td>{{ guilds[(index + 3) % 10 || 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 5) % 10 || 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 7) % 10 || 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 9) % 10 || 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 11) % 10 || 10] }}</td>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Even guilds -->
|
||||||
|
<template v-else>
|
||||||
|
<td>{{ guilds[(index + 10 - 3) % 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 10 - 5) % 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 10 - 7) % 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 10 - 9) % 10] }}</td>
|
||||||
|
<td>{{ guilds[(index + 10 - 11) % 10] }}</td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% endraw %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{% include footer.html %}
|
||||||
|
|
||||||
|
{% include scripts.html %}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
layout: war-calculator
|
||||||
|
title: ''
|
||||||
|
meta_description: ''
|
||||||
|
meta_image: ''
|
||||||
|
---
|
||||||
Reference in New Issue
Block a user