Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Seznam slovníků</title>
- <style>
- .hidden { display: none; }
- .collapsible { cursor: pointer; text-decoration: underline; color: blue; }
- .container { display: flex; justify-content: space-between; }
- .column { width: 45%; }
- </style>
- <script>
- function toggleVisibility(id) {
- var element = document.getElementById(id);
- if (element.classList.contains('hidden')) {
- element.classList.remove('hidden');
- } else {
- element.classList.add('hidden');
- }
- }
- </script>
- </head>
- <body>
- <h1>Seznam slovníků</h1>
- <div class="container">
- <div class="column">
- <h2>Překlad z angličtiny do češtiny</h2>
- <form method="post" action="/">
- <input type="hidden" name="direction" value="en_cz">
- <label for="term">Zadejte termín:</label>
- <input type="text" id="term" name="term">
- <button type="submit">Hledat</button>
- </form>
- {% if en_cz_translations %}
- <ul>
- {% for term, data in en_cz_translations %}
- <li>
- <span class="collapsible" onclick="toggleVisibility('en_cz_translations-{{ loop.index0 }}')">Výsledky pro "{{ term }}":</span>
- <div id="en_cz_translations-{{ loop.index0 }}" class="hidden">
- <ul>
- {% for item in data %}
- <li>
- <ul>
- {% for sens in item %}
- <li>
- <h2 class="Box-header-title"><span>{{ sens.morf|default('Neznámý druh')|safe }}</span></h2>
- <strong>{{ sens.desc|default('Bez popisu')|safe }}</strong> - {{ sens.note|default('')|safe }}
- <ul>
- {% if sens.trans %}
- <li><strong>Překlad:</strong> {{ sens.trans|join(', ')|safe }}</li>
- {% endif %}
- {% if sens.coll2 %}
- <li><strong>Kolokace:</strong>
- <ul>
- {% for coll in sens.coll2 %}
- <li>{{ coll|safe }}</li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- {% if sens.samples %}
- <li><strong>Příklady:</strong>
- <ul>
- {% for sample in sens.samples %}
- <li>{{ sample|safe }}</li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- </ul>
- </li>
- {% endfor %}
- </ul>
- </li>
- {% endfor %}
- </ul>
- </div>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- <div class="column">
- <h2>Překlad z češtiny do angličtiny</h2>
- <form method="post" action="/">
- <input type="hidden" name="direction" value="cz_en">
- <label for="term">Zadejte termín:</label>
- <input type="text" id="term" name="term">
- <button type="submit">Hledat</button>
- </form>
- {% if cz_en_translations %}
- <ul>
- {% for term, data in cz_en_translations %}
- <li>
- <span class="collapsible" onclick="toggleVisibility('cz_en_translations-{{ loop.index0 }}')">Výsledky pro "{{ term }}":</span>
- <div id="cz_en_translations-{{ loop.index0 }}" class="hidden">
- <ul>
- {% for item in data %}
- <li>
- <ul>
- {% for sens in item %}
- <li>
- <h2 class="Box-header-title"><span>{{ sens.morf|default('Neznámý druh')|safe }}</span></h2>
- <strong>{{ sens.desc|default('Bez popisu')|safe }}</strong> - {{ sens.note|default('')|safe }}
- <ul>
- {% if sens.trans %}
- <li><strong>Překlad:</strong> {{ sens.trans|join(', ')|safe }}</li>
- {% endif %}
- {% if sens.coll2 %}
- <li><strong>Kolokace:</strong>
- <ul>
- {% for coll in sens.coll2 %}
- <li>{{ coll|safe }}</li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- {% if sens.samples %}
- <li><strong>Příklady:</strong>
- <ul>
- {% for sample in sens.samples %}
- <li>{{ sample|safe }}</li>
- {% endfor %}
- </ul>
- </li>
- {% endif %}
- </ul>
- </li>
- {% endfor %}
- </ul>
- </li>
- {% endfor %}
- </ul>
- </div>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- </div>
- {% if error %}
- <p>{{ error }}</p>
- {% endif %}
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement