From 24797d71438592647bd6f759536adf6d58e76b66 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 13 Nov 2020 17:35:35 +0100 Subject: [PATCH] Add basic deck print view. --- views/cards_print.tpl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 views/cards_print.tpl diff --git a/views/cards_print.tpl b/views/cards_print.tpl new file mode 100644 index 0000000..a649ac6 --- /dev/null +++ b/views/cards_print.tpl @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html> +<style> + .card { + page-break-before: always; + box-sizing: border-box; + border: 30px solid #aaaaaa; + width: 200px; + height: 400px; } +</style> +<body> +% for card in cards: + <div class="card"> + <h1 class="title">{{ card["title"] }}</h1> + <p class="prompt">{{ card["prompt"] }}</p> + <ul class="answers"> + % for answer in card["answers"]: + <li>{{ answer }}</li> + % end + <ul/> + </div> +% end +</body> +</html> -- 2.30.2