Hide sidebar widget if no url provided

This commit is contained in:
Alexandre Iooss 2020-10-04 11:57:42 +02:00
parent db0937dd1a
commit 3c16c11f38
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 4 additions and 0 deletions

View File

@ -29,15 +29,19 @@
<rect width="4" height="14" x="11" y="1" rx="1"/>
</svg>
{{if .WidgetURL}}
<a href="#" id="sideWidgetToggle" class="ml-1" title="Cacher/Afficher le chat">»</a>
{{end}}
</p>
</div>
{{if .WidgetURL}}
<!-- Chat -->
<div class="col-chat" id="sideWidget">
<iframe src="{{.WidgetURL}}"
title="Chat" sandbox="allow-scripts allow-forms allow-same-origin"></iframe>
</div>
{{end}}
</div>
<script src="/static/js/sideWidget.js"></script>