From dbce63b3b9babce5198b9655554c7b69c754d6dd Mon Sep 17 00:00:00 2001 From: Hugo Kerstens <hugokk@hotmail.nl> Date: Thu, 25 Apr 2019 23:04:45 +0200 Subject: [PATCH] Only show make live button if there is editable code --- theme/main.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/theme/main.html b/theme/main.html index 3c063c6c..35f8d044 100644 --- a/theme/main.html +++ b/theme/main.html @@ -41,5 +41,9 @@ {% endblock %} {% block content %} +{% if 'thebelab-code' in super() %} {{ super() | replace('</h1>', '</h1> <button id="thebelab-activate-button" class="thebelab-button" onclick="initThebelab()">Make live</button>', count=1) }} +{% else %} +{{ super() }} +{% endif %} {% endblock %} \ No newline at end of file -- GitLab