coloriseur.html 5.14 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
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
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/popup.css'%}">
11
12
    <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
    
Sylvain Coulange's avatar
Sylvain Coulange committed
13
14
</head>
<body>
15
16
17
18
19
    {% 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
20

Sylvain Coulange's avatar
Sylvain Coulange committed
21
22
    <div class="inputDiv">
        <form action="/app/" method="post">{% csrf_token %}
Sylvain Coulange's avatar
Sylvain Coulange committed
23
            <div class="param">
Sylvain Coulange's avatar
Sylvain Coulange committed
24
25
                <input id="swcolor" type="radio" name="colorType" value="sw" {%if data.colorType == "sw" %}checked{% endif %}> <label for="swcolor">Silent Way</label><br/>
                <input id="bicolor" type="radio" name="colorType" value="bi" {%if data.colorType == "bi" %}checked{% endif %}> <label for="bicolor">Bicolor</label>
26
                <input type="hidden" id="defaultBg" name="defaultBg" value="{{ data.defaultBg }}"/>
Sylvain Coulange's avatar
Sylvain Coulange committed
27
            </div>
Sylvain Coulange's avatar
Sylvain Coulange committed
28
29
30
            <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
31
            <button formaction="/app/0">Effacer</button>
Sylvain Coulange's avatar
Sylvain Coulange committed
32
33
34
        </form>
    </div>

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

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

52
53
54
55
56
57
58
59
60
    <!-- Modal PopUp qui apparaît lors de l'enregistrement -->
    <div id="myModal" class="modal">
        <!-- Modal content -->
        <div class="modal-content">
        <div class="modal-header">
            <span class="close">&times;</span>
            <h2>Copier/coller le résultat</h2>
        </div>
        <div class="modal-body">
Sylvain Coulange's avatar
Sylvain Coulange committed
61
            <p>Le texte ci-dessous peut être copié-collé dans Word, LibreOffice ou dans un email, par exemple.</p>
62
63
            <div id="pLienDiv" contenteditable="true" class="pLienDiv" style="background-color: #000000; font-weight: bold;"></div>
            <div class="copyButton">
Sylvain Coulange's avatar
Sylvain Coulange committed
64
                <button onclick="toClipBoard('pLienDiv','myTooltip')" onmouseout="outFunc()"><span class="copyButtonText" id="myTooltip">Copier</span>Copier</button>
65
66
67
            </div>
            <div id="pLienDivWhite" contenteditable="true" class="pLienDiv" style="font-weight: bold;-webkit-text-stroke-width: 0.5px;-webkit-text-stroke-color: #000000;"></div>
            <div class="copyButton">
Sylvain Coulange's avatar
Sylvain Coulange committed
68
                <button onclick="toClipBoard('pLienDivWhite', 'myTooltipWhite')" onmouseout="outFuncWhite()"><span class="copyButtonText" id="myTooltipWhite">Copier</span>Copier</button>
69
70
71
72
73
74
75
76
77
            </div>
        </div>
        <div class="modal-footer">
            <h3>WikiColor</h3>
        </div>
        </div>
    </div>


78
    {% include 'footer.html' %}
79

80
81
82
    <script type="text/javascript">
        var dicoTok = {
            {% for token in data.pphh %}
83
            {% if token != "§" %}
Sylvain Coulange's avatar
Sylvain Coulange committed
84
                'tok{{ forloop.counter }}' : [{% for trans in token %}'{% for entree in trans %}<span class="phon {{entree.phon}}">{{entree.graph}}</span>{% endfor %}',{% endfor %}],
85
            {% endif %}
86
87
88
89
90
            {% endfor %}
        };

        var dicoId = {
            {% for token in data.pphh %}
91
            {% if token != "§" %}
92
                'tok{{ forloop.counter }}' : 0, 
93
            {% endif %}
94
            {% endfor %}
95
        };
Sylvain Coulange's avatar
Sylvain Coulange committed
96
    
97
    </script>
Sylvain Coulange's avatar
Sylvain Coulange committed
98
    <script src="{% static 'scripts/main.js' %}"></script>
99
100


Sylvain Coulange's avatar
Sylvain Coulange committed
101
102
</body>
</html>