diff --git a/print/start.py b/print/start.py index 111bf3a..db30c1c 100644 --- a/print/start.py +++ b/print/start.py @@ -51,14 +51,21 @@ def index(): @APP.route('/print/', methods=['GET', 'POST']) def print(): - txt = request.args.get('printing', '') + txt_normal = request.args.get('normal', '') + txt_big = request.args.get('big', '') img = request.files.get('img') - if txt: + if txt_normal: source = 'TeleVex' - txt, date = televex.preprocess(txt, type='txt') - televex.update_db(db, db_path, txt, source, date) - televex.print_now(txt, lp=lp, type='txt') + txt, date = televex.preprocess(txt_normal, type='txt') + televex.update_db(db, db_path, txt_normal, source, date) + televex.print_now(txt_normal, lp=lp, type='txt', size='normal') + return flask.redirect(flask.url_for('print')) + elif txt_big: + source = 'TeleVex' + txt_big, date = televex.preprocess(txt_big, type='txt') + televex.update_db(db, db_path, txt_big, source, date) + televex.print_now(txt_big, lp=lp, type='txt', size='big') return flask.redirect(flask.url_for('print')) elif img: source = 'TeleVex' diff --git a/print/static/stylesheet.css b/print/static/stylesheet.css index 1ec8f8b..c69cad0 100644 --- a/print/static/stylesheet.css +++ b/print/static/stylesheet.css @@ -21,3 +21,23 @@ div.msg pre{ word-break: break-word; white-space: pre-wrap; } +hr{ + margin: 4em 0; +} +form{ + display: inline-block; +} +textarea{ + height: 600px; + border: 1px solid black; +} +textarea#normal{ + line-height: 1.5; +} +textarea#big{ + background-color: black; + color: white; + font-size: 72px; + line-height: 1; + word-break: break-all; +} \ No newline at end of file diff --git a/print/templates/print.html b/print/templates/print.html index d63d2ec..5cea897 100644 --- a/print/templates/print.html +++ b/print/templates/print.html @@ -13,12 +13,20 @@