@Zavexeon/

prototype

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
index.html
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
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>

<!--(C)Zavexeon-->

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>

    <!--
      below div is for the roll history 
      automatically scrolls to bottom 
    -->
    <div id="rollLogBox">
      <p id="rollHistoryHead" style="text-align: center; font-size: 20px; font-weight: bold">Roll History</p>

      <div id="loggedRolls">
        <!--fills with logged rolls-->
      </div>
    </div>


    <div id="rollResult">0</div>


    
    <div class="buttonGroup">

      <!--container for the default rolls buttons-->

      <input title="Times To Roll" id="timesToRoll" type="number" min="1" max="100" value="1">

      <span style="font-size: 15px;">X<span/>

      <button onClick="rollAndLog(2)">d2</button>
      <button onClick="rollAndLog(4)">d4</button>
      <button onClick="rollAndLog(6)">d6</button>
      <button onClick="rollAndLog(8)">d8</button>
      <button onClick="rollAndLog(10)">d10</button>
      <button onClick="rollAndLog(12)">d12</button>
      <button onClick="rollAndLog(18)">d18</button>
      <button onClick="rollAndLog(20)">d20</button>
      <button onClick="rollAndLog(100)">d100</button>

    </div>


    <br><br>
    <div class="buttonGroup">

      <div id="customRolls">
        <!--fills up with custom roll buttons-->
      </div>

      <button onClick="addRoll" title="Add Custom Roll"style="font-weight: bold; font-size: 36px;">+</button>

      <div class="popup"></div>
    </div>



    <script src="script.js"></script>
  </body>
</html>
result
console