From 8b4289d3c4e03048166cba5b59c51d3430525929 Mon Sep 17 00:00:00 2001
From: tvluke <tvluke@chaotikum.org>
Date: Sun, 7 Jan 2024 16:15:29 +0100
Subject: [PATCH] no download link for unpublished stuff

---
 _layouts/video.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/_layouts/video.html b/_layouts/video.html
index 6af36970..d8503004 100644
--- a/_layouts/video.html
+++ b/_layouts/video.html
@@ -75,16 +75,16 @@ layout: default
 				{% endif -%}
 			{% endfor -%}
 		{% endfor -%}
+		{% capture release_date %}{{page.release_date | date: '%s'}}{% endcapture -%}
 		<div class="mediaflex1" style="display: flex; margin-top: 5px; min-width: 100%; position: relative;">
 			<div ><img src="{{logo}}" alt="" class="gravatar"> </div>
 			<div style="padding-left: 20px; min-height: 50px; max-width: 65%; padding-top: 15px"> von <b>{{persons}}</b></div>
 				{% if page.file and page.file != ''-%}
 					<div style="color:000000; background-color:#eeeeee; border-radius: 10px; margin-left: 10px; padding: 5px; position: absolute; right: 0; max-width: 20%">
-						<a href="{{ page.file}}" style="color:000000;"><spann class="fa fa-download" aria-hidden="true"></spann> Download</a>
+						{% if release_date < nowunix and page.optout != true %}<a href="{{ page.file}}" style="color:000000;"><spann class="fa fa-download" aria-hidden="true"></spann> Download</a>{% endif %}	
 					</div>
 				{% endif %}
 		</div>
-	    {% capture release_date %}{{page.release_date | date: '%s'}}{% endcapture -%}
 		{% if release_date < nowunix and page.optout != true %}
 			{% if page.file and page.file  != ''-%}
 <p style="color:000000; margin-top: 10px; min-width: 100%; justify-content: center;">Schaue das Video auf</p>
-- 
GitLab