<commit_before><!DOCTYPE html>
<!-- <html xmlns="http://www.w3.org/1999/xhtml" > -->
<html xmlns:py="http://genshi.edgewall.org/">
<head>
    <link rel='stylesheet' type='text/css' href="${ url_for('static', filename='main.css') }"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Schildergenerator</title>
</head>
<body>
    <py:with vars="messages = get_flashed_messages(with_categories=True)">
        <ul class="flashes" py:if="messages">
            <li class="${ category }" py:for="category,message in messages" tabindex="0">${ message }</li>
        </ul>
    </py:with>
    <a href="${ url_for('index') }">Liste der fertigen Schilder</a>
    
    <form method="post" action="${ url_for('create') }" enctype="multipart/form-data">
        <div class="box">
           <label for="form:template">Wähle eine TeX-Vorlage:</label>
           <ul py:attrs="{'class':'collapsed'} if defined('form') else {}">
                <li py:for="textemplate in templates">
                    <input type="radio" name="textemplate" id="tpl:${textemplate}" value="${textemplate}" py:attrs="{'checked':'checked', 'onfocus':'this.parentElement.parentElement.className=\'\';'} if defined('form') and textemplate == form.textemplate else {}"/>
                    <label for="tpl:${textemplate}"><img src="${ url_for('tplthumbnail', tplname=textemplate, maxgeometry=80) }" alt="${textemplate}" title="${textemplate}"/></label>
                </li>
                <li class="onlywhencollapsed">
                    <button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
                </li>
           </ul>
        </div><br/>
        <div class="box">
            <label for="form:headline">Überschrift</label>
            <textarea name="headline" id="form:headline" cols="35" rows="5"><py:if test="defined('form')">${form.headline}</py:if></textarea>
        </div>
        <div class="box">
           <label for="form:text">Text</label>
           <select name="markup">
                <option value="latex" py:attrs="{'selected':'True'} if not defined('form') or form.markup == 'rst' or form.markup == '' else {}">LaTeX</option>
                <option value="rst" py:attrs="{'selected':'True'} if defined('form') and form.markup == 'latex' else {}">Wiki (reStructuredText)</option>
           </select>
           <textarea name="text" id="form:text" cols="35" rows="5"><py:if test="defined('form')">${form.text}</py:if></textarea><commit_msg>Arghs. Can't believe I swapped these two conditions m)<commit_after><!DOCTYPE html>
<!-- <html xmlns="http://www.w3.org/1999/xhtml" > -->
<html xmlns:py="http://genshi.edgewall.org/">
<head>
    <link rel='stylesheet' type='text/css' href="${ url_for('static', filename='main.css') }"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Schildergenerator</title>
</head>
<body>
    <py:with vars="messages = get_flashed_messages(with_categories=True)">
        <ul class="flashes" py:if="messages">
            <li class="${ category }" py:for="category,message in messages" tabindex="0">${ message }</li>
        </ul>
    </py:with>
    <a href="${ url_for('index') }">Liste der fertigen Schilder</a>
    
    <form method="post" action="${ url_for('create') }" enctype="multipart/form-data">
        <div class="box">
           <label for="form:template">Wähle eine TeX-Vorlage:</label>
           <ul py:attrs="{'class':'collapsed'} if defined('form') else {}">
                <li py:for="textemplate in templates">
                    <input type="radio" name="textemplate" id="tpl:${textemplate}" value="${textemplate}" py:attrs="{'checked':'checked', 'onfocus':'this.parentElement.parentElement.className=\'\';'} if defined('form') and textemplate == form.textemplate else {}"/>
                    <label for="tpl:${textemplate}"><img src="${ url_for('tplthumbnail', tplname=textemplate, maxgeometry=80) }" alt="${textemplate}" title="${textemplate}"/></label>
                </li>
                <li class="onlywhencollapsed">
                    <button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
                </li>
           </ul>
        </div><br/>
        <div class="box">
            <label for="form:headline">Überschrift</label>
            <textarea name="headline" id="form:headline" cols="35" rows="5"><py:if test="defined('form')">${form.headline}</py:if></textarea>
        </div>
        <div class="box">
           <label for="form:text">Text</label>
           <select name="markup">
                <option value="latex" py:attrs="{'selected':'True'} if defined('form') and form.markup == 'latex' else {}">LaTeX</option>
                <option value="rst" py:attrs="{'selected':'True'} if not defined('form') or form.markup == 'rst' or form.markup == '' else {}">Wiki (reStructuredText)</option>
           </select>
           <textarea name="text" id="form:text" cols="35" rows="5"><py:if test="defined('form')">${form.text}</py:if></textarea>
{'fraction_non_alphanumeric': 0.2059572800313541, 'fraction_numerical': 0.005878894767783657, 'mean_word_length': 3.354948805460751, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1833562', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1565, 'n_words': 297}