From 0b6834452a6d5311120c06a7a9dac55873a6dee7 Mon Sep 17 00:00:00 2001 From: Tilman Date: Fri, 30 Jun 2023 14:34:05 +0200 Subject: [PATCH] commit --- index.twig | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/index.twig b/index.twig index 469c39a..3d65e9c 100644 --- a/index.twig +++ b/index.twig @@ -64,7 +64,7 @@
Hören! - Mehr erfahren + Mehr erfahren
@@ -194,21 +194,6 @@ return; } - -/**/ - response.text().then(function(data) { //console.log(data); @@ -216,14 +201,15 @@ var lines = data.split('\n'); for (var i = 0;i < lines.length;i++) { - let podcastInfo = lines[i].split(';'); - - const node = document.createElement('div'); - node.classList.add('col-sm-12', 'col-lg-6', 'col-xl-4', 'my-2'); - node.innerHTML = '
' + podcastInfo[0] + '

' + podcastInfo[1] + '

'; - - //node.appendChild(podcastTitle); - podcastDiv.appendChild(node); + if (lines[i].length > 3) { + let podcastInfo = lines[i].split(';'); + + const node = document.createElement('div'); + node.classList.add('col-sm-12', 'col-lg-6', 'col-xl-4', 'my-2'); + node.innerHTML = '
' + podcastInfo[0] + '

' + podcastInfo[1] + '

'; + + podcastDiv.appendChild(node); + } } });