coloriseur.html 3.11 KB
Newer Older
Sylvain Coulange's avatar
Sylvain Coulange committed
1
2
3
4
5
6
{% load static %}
<!DOCTYPE html>
<html>
<head>
    <title>Coloriseur phonographémique</title>
    <meta charset="utf-8">
7
    <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
8
    <link rel="stylesheet" type="text/css" href="{% static 'styles/kinephones_style_v2.css'%}">
Sylvain Coulange's avatar
Sylvain Coulange committed
9
    <link rel="stylesheet" type="text/css" href="{% static 'styles/styles.css'%}">
10
    <!-- <link rel="stylesheet" type="text/css" href="{% static 'styles/kinephones_style.css'%}"> -->
Sylvain Coulange's avatar
Sylvain Coulange committed
11
12
</head>
<body>
13
14
15
16
17
    {% include 'header.html' %}
    <h2>
            <span class="phon_k">C</span><span class="phon_o_maj">o</span><span class="phon_l">l</span><span class="phon_o_maj">o</span><span class="phon_r_maj">r</span><span class="phon_i">i</span><span class="phon_z">s</span><span class="phon_9">eu</span><span class="phon_r_maj">r</span>
            <span> </span><span class="phon_f">Ph</span><span class="phon_o_maj">o</span><span class="phon_n">n</span><span class="phon_o_maj">o</span><span class="phon_g">g</span><span class="phon_r_maj">r</span><span class="phon_a">a</span><span class="phon_f">ph</span><span class="phon_e">é</span><span class="phon_m">m</span><span class="phon_i">i</span><span class="phon_k">que</span>
    </h2>
Sylvain Coulange's avatar
Sylvain Coulange committed
18

Sylvain Coulange's avatar
Sylvain Coulange committed
19
20
    <div class="inputDiv">
        <form action="/app/" method="post">{% csrf_token %}
Sylvain Coulange's avatar
Sylvain Coulange committed
21
22
23
24
            <div class="param">
                <input id="swcolor" type="radio" name="colorType" value="sw" {%if data.colorType == "sw" %}checked{% endif %}> Silent Way<br/>
                <input id="bicolor" type="radio" name="colorType" value="bi" {%if data.colorType == "bi" %}checked{% endif %}> Bicolor
            </div>
Sylvain Coulange's avatar
Sylvain Coulange committed
25
26
27
            <h2>Entrer du texte à coloriser :</h2>
            <textarea name="inText">{{ data.text }}</textarea><br/>
            <input type="submit" value="Coloriser"/>
Sylvain Coulange's avatar
Sylvain Coulange committed
28
            <button formaction="/app/0">Effacer</button>
Sylvain Coulange's avatar
Sylvain Coulange committed
29
30
31
        </form>
    </div>

32
    <div class="win-black outputMainDiv">
Sylvain Coulange's avatar
Sylvain Coulange committed
33
        <h2>Résultat :</h2>
34
35
36
        <div class="output">
            {% for token in data.pphh %}{% if token == "§" %}<br/>{% elif token in ",.)]}%>"|make_list %}<span class="phon_neutre">{{ token }}</span>{% else %}<span> </span><span class="tokens" id='tok{{ forloop.counter }}' onclick="changeAlign(this.id)"></span>{% endif %}{% endfor %}
        </div>
37
38
    </div>

Sylvain Coulange's avatar
Sylvain Coulange committed
39
    <div>
40
        <form method="POST">{% csrf_token %}
Sylvain Coulange's avatar
Sylvain Coulange committed
41
42
43
44
            <button formaction="/app/dico/">Éditer le dictionnaire</button>
        </form>
    </div>

45
    {% include 'footer.html' %}
46

47
48
49
    <script type="text/javascript">
        var dicoTok = {
            {% for token in data.pphh %}
50
            {% if token != "§" %}
Sylvain Coulange's avatar
Sylvain Coulange committed
51
                'tok{{ forloop.counter }}' : [{% for trans in token %}'{% for entree in trans %}<span class="phon {{entree.phon}}">{{entree.graph}}</span>{% endfor %}',{% endfor %}],
52
            {% endif %}
53
54
55
56
57
            {% endfor %}
        };

        var dicoId = {
            {% for token in data.pphh %}
58
            {% if token != "§" %}
59
                'tok{{ forloop.counter }}' : 0, 
60
            {% endif %}
61
62
            {% endfor %}
        }
Sylvain Coulange's avatar
Sylvain Coulange committed
63
    
64
    </script>
Sylvain Coulange's avatar
Sylvain Coulange committed
65
    <script src="{% static 'scripts/main.js' %}"></script>
66
67


Sylvain Coulange's avatar
Sylvain Coulange committed
68
69
</body>
</html>