coloriseur.html 3.53 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" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
9
    <link rel="stylesheet" type="text/css" href="{% static 'styles/kinephones_style_v2.css'%}">
Sylvain Coulange's avatar
Sylvain Coulange committed
10
    <link rel="stylesheet" type="text/css" href="{% static 'styles/styles.css'%}">
11
    <!-- <link rel="stylesheet" type="text/css" href="{% static 'styles/kinephones_style.css'%}"> -->
Sylvain Coulange's avatar
Sylvain Coulange committed
12
13
</head>
<body>
14
15
16
17
18
    {% 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
19

Sylvain Coulange's avatar
Sylvain Coulange committed
20
21
    <div class="inputDiv">
        <form action="/app/" method="post">{% csrf_token %}
Sylvain Coulange's avatar
Sylvain Coulange committed
22
23
24
25
            <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
26
27
28
            <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
29
            <button formaction="/app/0">Effacer</button>
Sylvain Coulange's avatar
Sylvain Coulange committed
30
31
32
        </form>
    </div>

33
34
35
36
    <div id="outputDiv" class="win-black outputMainDiv">
        <div class="outputParam" onclick="bg2white()">
            <span class="glyphicon glyphicon-adjust" aria-hidden="true" title="Changer la couleur du fond"></span>
        </div>
Sylvain Coulange's avatar
Sylvain Coulange committed
37
        <h2>Résultat :</h2>
38
        <div id="output" class="output">
39
40
            {% 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>
41
42
    </div>

Sylvain Coulange's avatar
Sylvain Coulange committed
43
    <div>
44
        <form method="POST">{% csrf_token %}
Sylvain Coulange's avatar
Sylvain Coulange committed
45
46
47
48
            <button formaction="/app/dico/">Éditer le dictionnaire</button>
        </form>
    </div>

49
    {% include 'footer.html' %}
50

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

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


Sylvain Coulange's avatar
Sylvain Coulange committed
72
73
</body>
</html>