forked from cartoon-battle/cartoon-battle.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcards.html
More file actions
57 lines (54 loc) · 2.07 KB
/
Copy pathcards.html
File metadata and controls
57 lines (54 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: Cards
weight: 8
---
<p class="alert alert-info">
<a href="#usage">Did you know you can embed those cards on your site? (click to see how!)</a>
</p>
<hr>
<style type="text/css">cb-card { font-size: 22%; float: left }</style>
<div id="cards" class=row></div>
<script type="text/javascript">require(['cartoon-battle', 'cartoon-battle/util'], function (getCards, util) {
getCards(function (cards) {
var deck = document.getElementById('cards');
cards.getCards().sort(function (alpha, bravo) {
return alpha.name.localeCompare(bravo.name);
}).forEach(function (card) {
deck.appendChild(
document.createElement('a').appendChild(
cards.forLevel(card, card.levels.length).node
).parentNode
).href = "/recipes?" + util.slugify(card.name);
})
});
});
</script>
<style type="text/css">pre {font-size: 80%;}</style>
<h2 id="usage" style="padding-top: 4em;">Usage</h2>
<div class="row">
<div class="col-md-9">
<p>You can embed those cards on your site using an iframe:</p>
<pre><code><iframe src="{{ site.url }}/embed?Leela"/></code></pre>
</div>
<div class="col-md-3">
<iframe src="/embed?Leela#ignore-ga" width="170" height="240" frameborder="0"></iframe>
</div>
</div>
<div class="row">
<div class="col-md-9">
<p>Just use <code>/embed?</code> address and the card name and optional level:</p>
<pre><code><iframe src="{{ site.url }}/embed?Leela 5*"/></code></pre>
</div>
<div class="col-md-3">
<iframe src="/embed?Leela 5*#ignore-ga" width="170" height="240" frameborder="0"></iframe>
</div>
</div>
<div class="row">
<div class="col-md-9">
<p>You can also make combos by combining two cards using <code>+</code> sign:</p>
<pre><code><iframe src="{{ site.url }}/embed?Leela 5* + Rifle 5**"/></code></pre>
</div>
<div class="col-md-3">
<iframe src="/embed?Leela 5* + Rifle 5**#ignore-ga" width="170" height="240" frameborder="0"></iframe>
</div>
</div>