From 8fc13b46725dc4d923bc345baecf93c564f645e0 Mon Sep 17 00:00:00 2001 From: Lukáš Růžička Date: Jul 23 2021 12:08:22 +0000 Subject: Rewrite conditions in textual templates to make more readable. --- diff --git a/autococonut/templates/page.adoc b/autococonut/templates/page.adoc index b2b0e1a..7e342a5 100644 --- a/autococonut/templates/page.adoc +++ b/autococonut/templates/page.adoc @@ -32,21 +32,23 @@ image::{{event.screens[0]}}[] + image::{{event.screens[0]}}[] {% elif event.type == "key combination" and event.subtype == "modifier" and event.action == "press" %} -{% if event.combined %} -. Press and hold the *{{event.combined}}* modifier. +{% if event.combined %} +. Press *{{event.combined}}-{{event.key}}*. +{% else %} +. Press *{{event.key}}*. {% endif %} -. Press *{{event.key}}*. See the modifier release screenshot for the result of the action. {% elif event.type == "key" and event.subtype == "special" and event.action == "press" %} {% if event.combined %} -. Press and hold the *{{event.combined}}* modifier. -{% endif %} -. Press *{{event.key}}*. See the screenshot for the result of the action. +. Press *{{event.combined}}-{{event.key}}*. +{% else %} +. Press *{{event.key}}*. + image::{{event.screens[0]}}[] +{% endif %} {% elif event.type == "typing" %} . Type *{{event.text}}*. {% elif event.type == "key" and event.subtype == "modifier" and event.action == "release"%} -. Release modifier. See the screenshot for the result of the action. +. See the screenshot for the result of the action. + image::{{event.screens[0]}}[] {% elif event.type == "key" and event.subtype == "stop" and event.action == "press" %} diff --git a/autococonut/templates/page.html b/autococonut/templates/page.html index 3902ee9..281f66f 100644 --- a/autococonut/templates/page.html +++ b/autococonut/templates/page.html @@ -48,16 +48,17 @@ area of the click.
Press and hold the {{event.combined}} modifier. +
  • Press {{event.combined}}-{{event.key}} modifier.
  • +{% else %} +
  • Press {{event.key}}.
  • {% endif %} -
  • Press {{event.key}}. See the modifier release screenshot for the result of the action.
  • - {% elif event.type == "key" and event.subtype == "special" and event.action == "press" %} {% if event.combined %} -
  • Press and hold the {{event.combined}} modifier.
  • -{% endif %} +
  • Press {{event.combined}}-{{event.key}} modifier.
  • +{% else %}
  • Press {{event.key}}. See the screenshot for the result of the action.
  • +{% endif %} {% elif event.type == "key" and event.key == "tab" and event.action == "press" %}
  • Press {{event.key}}. See the screenshot for the result of the action.
  • @@ -66,7 +67,7 @@ area of the click.
    Type {{event.text}}. {% elif event.type == "key" and event.subtype == "modifier" and event.action == "release"%} -
  • Release modifier. See the screenshot for the result of the action.
  • +
  • See the screenshot for the result of the action.
  • {% elif event.type == "key" and event.subtype == "stop" and event.action == "press" %}