aboutsummaryrefslogtreecommitdiff
path: root/motus/index.html
blob: d5347be6d284a45da2ba068024c81eb02bc067fe (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<title>SUTOM Solver</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/fontawesome.css">
<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/brands.css">
<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/solid.css">


<style>
* {
  box-sizing: border-box;
}

/* Style the body */
body {
  font-family: Arial;
  margin: 0;
}

/* Header/logo Title */
.header {
  padding: 50px;
  text-align: center;
  color: white;
  background-color: #333;
}

/* Column container */
.row {  
  display: flex;
  flex-wrap: wrap;
}

.side {
  flex: 30%;
  padding: 20px;
}

/* Main column */
.main {
  flex: 70%;
  background-color: white;
  padding: 20px;
}

input[type='text'] { font-size: 24px; }

fieldset {
  display: table;
}
fieldset div {
  display: table-row;
}

fieldset label {
 display: table-cell;
 padding-right: 20px;
 vertical-align: middle;
}

table tr td input { width: 2em; text-align: center}
table tr td input.wellplaced { background-color: lightgreen;}
table tr td input.misplaced { background-color: gold;}
tr:first-child { outline: thin solid; }

/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 700px) {
  .row, .navbar {   
    flex-direction: column;
  }
}
</style>
</head>
<body>

<!-- Header -->
<div class="header">
  <h1>SUTOM Solver</h1>
</div>

<!-- The flexible grid (content) -->
<div class="row">
  <div class="main">
    <div>
      <noscript>Sorry, you need to enable JavaScript to see this page.</noscript>
        <script id="lib" type="text/javascript" defer="defer" src="js/motus.js"></script>
      <script>
        var script = document.getElementById('lib');
        script.addEventListener('load', function() {
          lib.run("length"
                 , "send"
                 , "dictonnary"
                 , "proposition"
                 , "side_list"
                 , "table"
                 , "next_btn"
                 , "reload");
        });
      </script>
    </div>
    <fieldset>
      <div>
        <label for="source">Lettres</label>
        <input type="number" id="length" name="source" value="7"/>
      </div>
      <div>
        <label>Proposition initiale</label>
        <div id="proposition"/></div>
      </div>
      <div>
        <label for="dictonnary">Dictionnaire</label>
        <select id="dictonnary">
          <option value="english">Anglais / Americain (61 580 mots)</option>
          <option selected value="french">Français (240 135 mots)</option>
        </select>
      </div>
      <input id="send" type="submit" value="Charger"/>
    </fieldset> 
    <h2>Grille d’analyse</h2>


    <button  style="float:right;" id="reload"><i class="fa fa-redo-alt"></i></button>
    <table id="table" style="margin: 0 auto">
    </table>
    <button id="next_btn" hidden="true">Suivant</button>

  </div>
  <div class="side">
    <h2>Règles actives</h2>
    <ul id="side_list">
    </ul>
  </div>
</div>
</body>
</html>