|
|
@@ -0,0 +1,680 @@ |
|
|
|
import { Teaser, getTeaserTemplate } from "/assets/js/teaser.js"; |
|
|
|
|
|
|
|
const mockTopNews = { |
|
|
|
status: "ok", |
|
|
|
totalResults: 34, |
|
|
|
articles: [ |
|
|
|
{ |
|
|
|
source: { id: null, name: "Www.br.de" }, |
|
|
|
author: "Christine Kerler, Kathrin Unverdorben, BR24 Redaktion", |
|
|
|
title: "Weiter angespannte Hochwasserlage in Bayern - BR24", |
|
|
|
description: |
|
|
|
"Nach dem Dauerregen im Süden von Bayern bleibt die Hochwasserlage angespannt. Für das niederbayerische Passau gibt es eine Hochwasserwarnung. In den Oberläufen sind die Scheitel überschritten und die Wasserstände bereits gefallen.", |
|
|
|
url: |
|
|
|
"https://www.br.de/nachrichten/bayern/weiter-angespannte-hochwasserlage-in-bayern,S6jIcod", |
|
|
|
urlToImage: |
|
|
|
"https://img.br.de/a4a93712-850f-44bc-b2c8-94d181f33524.jpeg?q=80&rect=0,400,4030,2265&w=1600&h=900", |
|
|
|
publishedAt: "2020-08-05T06:10:00Z", |
|
|
|
content: |
|
|
|
"Für die Drei-Flüsse-Stadt Passau hat der Hochwassernachrichtendienst (HND) Bayern am Mittwochmorgen eine gewisse Entwarnung signalisiert. Das zuständige Wasserwirtschaftsamt Deggendorf geht davon aus… [+2484 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "DIE WELT" }, |
|
|
|
author: "WELT", |
|
|
|
title: |
|
|
|
"Libanon: Gewaltige Explosion erschüttert Beirut - Dutzende Tote, Tausende Verletzte - WELT", |
|
|
|
description: |
|
|
|
"In der libanesischen Hauptstadt Beirut ist ein großes Lagerhaus explodiert. Ganze Straßenzüge wurden verwüstet, eine riesige Rauchwolke stieg auf. Es gab Dutzende Tote und Tausende Verletzte, darunter Mitarbeiter der deutschen Botschaft.", |
|
|
|
url: |
|
|
|
"https://www.welt.de/vermischtes/article212892088/Libanon-Gewaltige-Explosion-erschuettert-Beirut-Dutzende-Tote-Tausende-Verletzte.html", |
|
|
|
urlToImage: |
|
|
|
"https://www.welt.de/img/vermischtes/mobile212913196/5131351897-ci16x9-w1200/134509570-jpg.jpg", |
|
|
|
publishedAt: "2020-08-05T06:09:00Z", |
|
|
|
content: |
|
|
|
"Bei einer gewaltigen Explosion in der libanesischen Hauptstadt Beirut sind am Dienstag mindestens 100 Menschen getötet und 4000 Menschen verletzt worden. Das erklärte das Libanesische Rote Kreuz. Nac… [+4544 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "merkur.de" }, |
|
|
|
author: null, |
|
|
|
title: |
|
|
|
"BMW rauscht in die roten Zahlen - Verlust schlimmer als befürchtet - Merkur.de", |
|
|
|
description: |
|
|
|
"Die Corona-Krise macht dem Münchner Autobauer BMW stark zu schaffen. Im abgelaufenen zweiten Quartal wies der Konzern einen operativen Verlust von 666 Millionen Euro aus nach einem Vorjahresgewinn von 2,2 Milliarden Euro. Beim Umsatz ging es von April bis Jun…", |
|
|
|
url: |
|
|
|
"https://www.merkur.de/wirtschaft/bmw-verlust-quartalszahlen-autobauer-muenchen-news-oliver-zipse-90017767.html", |
|
|
|
urlToImage: |
|
|
|
"https://www.merkur.de/bilder/2020/08/04/90017767/21941610-bmw-ag-group-muenchen-autobauer-2uOLkF2DVCef.jpg", |
|
|
|
publishedAt: "2020-08-05T06:06:00Z", |
|
|
|
content: |
|
|
|
"Die Corona-Krise macht dem Münchner Autobauer BMW stark zu schaffen. Im abgelaufenen zweiten Quartal wies der Konzern einen operativen Verlust von 666 Millionen Euro aus nach einem Vorjahresgewinn vo… [+4506 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "spiegel-online", name: "Spiegel Online" }, |
|
|
|
author: "DER SPIEGEL", |
|
|
|
title: |
|
|
|
"Bilder einer zerstörten Stadt: Die Katastrophe von Beirut - DER SPIEGEL", |
|
|
|
description: |
|
|
|
"Dutzende Tote und Tausende Verletzte, verwüstete Gebäude und Straßen: Die Explosionen haben den Hafen von Beirut verwüstet. Die Bilder.", |
|
|
|
url: |
|
|
|
"https://www.spiegel.de/politik/ausland/beirut-bilder-der-zerstoerung-nach-den-verheerenden-explosionen-a-2f9baa76-91b1-4020-bbcf-7d3434317d87", |
|
|
|
urlToImage: |
|
|
|
"https://cdn.prod.www.spiegel.de/images/313ae8b3-45a1-4a8d-b8fc-f72cba39d548_w1280_r1.77_fpx61.87_fpy55.01.jpg", |
|
|
|
publishedAt: "2020-08-05T06:05:28Z", |
|
|
|
content: |
|
|
|
"8 / 10Ein Verletzter wartet auf Hilfe: Die Folgen der Explosionen sind dramatisch. Augenzeugen sprachen von Leichen auf den Straßen und Menschen, die unter Trümmern verborgen seien. Die Armee half, V… [+79 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "N-tv.de" }, |
|
|
|
author: "n-tv NACHRICHTEN", |
|
|
|
title: |
|
|
|
"Der Börsen-Tag:08:07 BMW mit Milliardenverlust im Autogeschäft im 2. Quartal - n-tv NACHRICHTEN", |
|
|
|
description: "", |
|
|
|
url: |
|
|
|
"https://www.n-tv.de/wirtschaft/der_boersen_tag/Der-Boersen-Tag-am-Mittwoch-den-05-August-2020-article21952689.html", |
|
|
|
urlToImage: |
|
|
|
"https://bilder4.n-tv.de/img/Bilder_dpa_Import/crop21851215/1421325775-cImg_16_9-w1200/Eine-Flagge-mit-dem-Logo-der-DHL-und-der-Deutschen-Post-steht-auf-einemTisch.jpg", |
|
|
|
publishedAt: "2020-08-05T06:00:00Z", |
|
|
|
content: |
|
|
|
"Der Dax wird Berechnungen von Banken und Brokerhäusern zufolge höher starten. Am Dienstag war er 0,4 Prozent schwächer bei 12.600,87 Punkten aus dem Handel gegangen. Hauptthema für die Börsianer blei… [+937 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "N-tv.de" }, |
|
|
|
author: "n-tv NACHRICHTEN", |
|
|
|
title: |
|
|
|
'Augenzeugin berichtet aus Beirut:"Dieses Chaos kann man sich nicht vorstellen" - n-tv NACHRICHTEN', |
|
|
|
description: |
|
|
|
"Die Deutsche Sina-Maria Scheikle arbeitet für eine deutsche Stiftung in Beirut. Als die gewaltige Explosion die Stadt erschüttert, ist sie gerade zu Hause. Im Video berichtet sie von der gewaltigen Druckwelle und dem folgenden Chaos.", |
|
|
|
url: |
|
|
|
"https://www.n-tv.de/mediathek/videos/panorama/Dieses-Chaos-kann-man-sich-nicht-vorstellen-article21952769.html", |
|
|
|
urlToImage: |
|
|
|
"https://bilder4.n-tv.de/img/incoming/crop21952819/6851326696-cImg_16_9-w1200/Augenzeugin-Collage.jpg", |
|
|
|
publishedAt: "2020-08-05T05:58:00Z", |
|
|
|
content: null, |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Transfermarkt" }, |
|
|
|
author: "Tobias Picker", |
|
|
|
title: |
|
|
|
"Beschlüsse zur Fan-Rückkehr – Diese Stadien der 1. & 2. Liga haben die meisten Stehplätze - Transfermarkt", |
|
|
|
description: |
|
|
|
"Die Klubs der 1. Und 2. Bundesliga einigen sich auf ein einheitliches Vorgehen zur möglichen Fan-Rückkehr. Auswärtsfans, Alkohol und Stehplätze werden verboten.", |
|
|
|
url: |
|
|
|
"https://www.transfermarkt.de/beschlusse-zur-fan-ruckkehr-ndash-diese-stadien-der-1-amp-2-liga-haben-die-meisten-stehplatze/view/news/367294", |
|
|
|
urlToImage: |
|
|
|
"https://tmssl.akamaized.net/images/foto/big/millerntor-st-pauli-1581000952-31316.jpg", |
|
|
|
publishedAt: "2020-08-05T05:36:00Z", |
|
|
|
content: |
|
|
|
"DFL-Mitgliederversammlung \r\nDie Klubs der 1. Und 2. Bundesliga einigen sich auf ein einheitliches Vorgehen zur möglichen Rückkehr der Zuschauer. Auswärtsfans müssen verzichten, es gibt keinen Alkohol… [+5851 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Vogel.de" }, |
|
|
|
author: "Christian Lüttmann", |
|
|
|
title: "Was den Anstieg des Blutzuckerspiegels verzögert - Laborpraxis", |
|
|
|
description: |
|
|
|
"Der Zuckerspiegel im Blut geht rauf und runter. Ihn zu regeln, ist eine komplexe Stoffwechsel-Aufgabe, die noch dazu mit Verzögerung geschieht. Denn wie ein internationales Forscherteam nun herausfand, sorgt eine Art Bruchstelle in einem beteiligten Hormonrez…", |
|
|
|
url: |
|
|
|
"https://www.laborpraxis.vogel.de/was-den-anstieg-des-blutzuckerspiegels-verzoegert-a-953940/", |
|
|
|
urlToImage: null, |
|
|
|
publishedAt: "2020-08-05T05:26:00Z", |
|
|
|
content: |
|
|
|
"Der Zuckerspiegel im Blut geht rauf und runter. Ihn zu regeln, ist eine komplexe Stoffwechsel-Aufgabe, die noch dazu mit Verzögerung geschieht. Denn wie ein internationales Forscherteam nun herausfan… [+3462 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "sport.de" }, |
|
|
|
author: "sport.de", |
|
|
|
title: |
|
|
|
"FC Bayern | Boateng-Zukunft spaltet die Bosse - Disput um Süle - sport.de", |
|
|
|
description: |
|
|
|
"Während die Führungsriege des FC Bayern München seit Wochen öffentlich darum kämpft, dass David Alaba seinen im Sommer 2021 endenden Vertrag verlängert, schlägt der deutsche Rekordmeister bezüglich Jérôme Boateng ruhigere Töne an. Vieles deutet darauf hin, d…", |
|
|
|
url: |
|
|
|
"https://www.sport.de/news/ne4123649/fc-bayern--boateng-zukunft-spaltet-die-bosse---disput-um-suele/", |
|
|
|
urlToImage: "https://s.hs-data.com/picmon/26/3i2x_a039TL_l.jpg", |
|
|
|
publishedAt: "2020-08-05T05:25:00Z", |
|
|
|
content: |
|
|
|
"Während die Führungsriege des FC Bayern München seit Wochen öffentlich darum kämpft, dass David Alaba seinen im Sommer 2021 endenden Vertrag verlängert, schlägt der deutsche Rekordmeister bezüglich … [+2954 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "WEB.DE News" }, |
|
|
|
author: null, |
|
|
|
title: |
|
|
|
"Promi Big Brother: Diese Kandidatin steigt vor Beginn der Show aus - wer stattdessen teilnimmt - WEB.DE News", |
|
|
|
description: |
|
|
|
'Showdown in der Star-WG: Ab Freitagabend kämpfen zwölf Prominente bei "Promi Big Brother" um den Sieg. Noch vor dem großen Show-Auftakt steigt eine Kandidatin aber schon wieder aus.', |
|
|
|
url: |
|
|
|
"https://web.de/magazine/unterhaltung/tv-film/promi-big-brother/promi-big-brother-kandidatin-beginn-show-teilnimmt-34954400", |
|
|
|
urlToImage: |
|
|
|
"https://i0.web.de/image/452/34954452,pd=3,f=opengraph/saskia-beecks.jpg", |
|
|
|
publishedAt: "2020-08-05T05:19:02Z", |
|
|
|
content: |
|
|
|
'Showdown in der Star-WG: Ab Freitagabend kämpfen zwölf Prominente bei "Promi Big Brother" um den Sieg. Noch vor dem großen Show-Auftakt steigt eine Kandidatin aber schon wieder aus: Saskia Beecks ver… [+2334 chars]', |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "bild", name: "Bild" }, |
|
|
|
author: "Bild.de", |
|
|
|
title: |
|
|
|
"RKI-Zahlen zum Coronavirus: Aktive Fälle steigen auf 8200 in Deutschland - BILD", |
|
|
|
description: |
|
|
|
"Wie viele Menschen in Deutschland haben sich mit dem Coronavirus infiziert? Hier geht es zu den aktuellen Zahlen und Fakten.", |
|
|
|
url: |
|
|
|
"https://www.bild.de/ratgeber/2020/ratgeber/coronavirus-aktuell-zahlen-und-fakten-rki-daten-rund-8200-aktive-faelle-in-deutschland-70411860.bild.html", |
|
|
|
urlToImage: |
|
|
|
"https://bilder.bild.de/fotos/rki-zahlen-zum-coronavirus-aktive-faelle-steigen-auf-8200-in-deutschland-201493100-72206242/Bild/4.bild.jpg", |
|
|
|
publishedAt: "2020-08-05T05:16:00Z", |
|
|
|
content: |
|
|
|
"Die Gesundheitsämter in Deutschland haben nach Angaben des Robert Koch-Instituts (RKI) 741 neue Corona-Infektionen innerhalb eines Tages gemeldet.\r\nDie Zahl der Todesfälle im Zusammenhang mit einer C… [+3916 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Faz.net" }, |
|
|
|
author: "Peter Sturm", |
|
|
|
title: |
|
|
|
"Trumps persönlicher Feldzug - F.A.Z. - Frankfurter Allgemeine Zeitung", |
|
|
|
description: |
|
|
|
"Und wieder hat es Donald Trump geschafft. Er zieht gegen Tiktok zu Felde, auch aus persönlichen Gründen. Und China gibt sich staatsmännisch. Dabei könnte an Trumps Vorwürfen durchaus etwas dran sein.", |
|
|
|
url: |
|
|
|
"https://www.faz.net/aktuell/politik/ausland/trumps-persoenlicher-feldzug-gegen-tiktok-16890011.html", |
|
|
|
urlToImage: |
|
|
|
"https://media1.faz.net/ppmedia/aktuell/3387796664/1.6890013/facebook_teaser/mitten-im-amerikanisch.jpg", |
|
|
|
publishedAt: "2020-08-05T05:01:00Z", |
|
|
|
content: |
|
|
|
"Donald Trump mag Superlative. Jetzt hat der Immobilienkaufmann aus New York und derzeitige Bewohner des Weißen Hauses in Washington wieder etwas geschafft, was ihm so leicht niemand nachmacht. Mit se… [+1223 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Www.ndr.de" }, |
|
|
|
author: "NDR", |
|
|
|
title: "Zahl der Corona-Infektionen in SH steigt um 22 Fälle - NDR.de", |
|
|
|
description: |
|
|
|
"Seit Beginn der Pandemie sind in Schleswig-Holstein 3.516 Coronavirus-Infektionen nachgewiesen worden.", |
|
|
|
url: |
|
|
|
"https://www.ndr.de/nachrichten/schleswig-holstein/coronavirus/Zahl-der-Corona-Infektionen-in-SH-steigt-um-22-Faelle,corona3994.html", |
|
|
|
urlToImage: "https://www.ndr.de/home/corona3892_v-contentxl.jpg", |
|
|
|
publishedAt: "2020-08-05T04:52:00Z", |
|
|
|
content: |
|
|
|
"Stand: 05.08.2020 06:52 Uhr\r\n -\r\nNDR 1 Welle Nord\r\nJeden Tag veröffentlicht das Land Schleswig-Holstein neue Zahlen zur Corona-Pandemie. Laut der Landesmeldestelle, dem Institut für Infektionsmedizin… [+3237 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Www.rtl.de" }, |
|
|
|
author: "RTL Online", |
|
|
|
title: |
|
|
|
"Woher kommt das Coronavirus? Forscher rekonstruieren Ursprung - RTL Online", |
|
|
|
description: |
|
|
|
"Im Forschungslabor, über den Flughund oder doch das Schuppentier: Über den Ursprung von Sars-CoV-2 wird nach wie vor gerätselt. Forscher schauen sich nun...", |
|
|
|
url: |
|
|
|
"https://www.rtl.de/cms/woher-kommt-das-coronavirus-forscher-rekonstruieren-ursprung-4590108.html", |
|
|
|
urlToImage: |
|
|
|
"https://cloudfront-eu-central-1.images.arcpublishing.com/rtl/RMK5WRAWQS7DTH7H2LBDP3R7UI.jpg", |
|
|
|
publishedAt: "2020-08-05T04:33:00Z", |
|
|
|
content: |
|
|
|
"Stammt es nun aus dem Forschungslabor, kam es über die Fledermaus oder ist doch das Schuppentier schuld? Über den Ursprung von Sars-CoV-2 wird nach wie vor gerätselt. Forscher schauten sich nun Gene … [+2339 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "die-zeit", name: "Die Zeit" }, |
|
|
|
author: null, |
|
|
|
title: |
|
|
|
'Beirut: "Mein Land wurde heute in die Luft gesprengt" - ZEIT ONLINE', |
|
|
|
description: "", |
|
|
|
url: |
|
|
|
"https://www.zeit.de/zustimmung?url=https:%2F%2Fwww.zeit.de%2Fpolitik%2Fausland%2F2020-08%2Flibanon-beirut-explosion-ground-zero", |
|
|
|
urlToImage: null, |
|
|
|
publishedAt: "2020-08-05T04:12:48Z", |
|
|
|
content: null, |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Www.ndr.de" }, |
|
|
|
author: "NDR", |
|
|
|
title: "Corona: Beamte des Schulministeriums in Quarantäne - NDR.de", |
|
|
|
description: |
|
|
|
"Mehrere Mitarbeiter des Bildungsministeriums sind in Quarantäne. Eine Kollegin war krank im Büro erschienen, nachdem sie sich mit dem Coronavirus angesteckt hatte.", |
|
|
|
url: |
|
|
|
"https://www.ndr.de/nachrichten/mecklenburg-vorpommern/Corona-Beamte-des-Schulministeriums-in-Quarantaene,coronavirus2812.html", |
|
|
|
urlToImage: |
|
|
|
"https://www.ndr.de/fernsehen/sendungen/nordmagazin/media/nordmagazin4493_v-contentxl.jpg", |
|
|
|
publishedAt: "2020-08-05T03:52:00Z", |
|
|
|
content: |
|
|
|
"Stand: 05.08.2020 05:52 Uhr\r\n -\r\nNDR 1 Radio MV\r\nVon Stefan Ludmann, NDR 1 Radio MV\r\nDas Bildungsministerium ist im ehemaligen Marstall-Gebäude in Schwerin untergebracht.\r\nDas ausgerechnet zum Schuls… [+3440 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Faz.net" }, |
|
|
|
author: "hoe./rtr", |
|
|
|
title: |
|
|
|
"Coronavirus: RKI meldet 741 Neuinfektionen - F.A.Z. - Frankfurter Allgemeine Zeitung", |
|
|
|
description: |
|
|
|
"Das Robert Koch-Institut hat innerhalb eines Tages 741 neue Coronavirus-Fälle registriert. Wer in Nordrhein-Westfalen in Bus und Bahn keine Maske trägt, soll künftig 150 Euro Sofort-Bußgeld bezahlen.", |
|
|
|
url: |
|
|
|
"https://www.faz.net/aktuell/gesellschaft/gesundheit/coronavirus/coronavirus-pandemie-rki-meldet-741-neuinfektionen-16890845.html", |
|
|
|
urlToImage: |
|
|
|
"https://media0.faz.net/ppmedia/aktuell/3841906741/1.6890848/facebook_teaser/eine-mitarbeiterin-des-robert.jpg", |
|
|
|
publishedAt: "2020-08-05T03:43:00Z", |
|
|
|
content: |
|
|
|
"Das Robert Koch-Institut (RKI) meldet 741 neue bestätigte Coronavirus-Infektionen. Die Gesamtzahl der Fälle in Deutschland steigt damit auf 212.022. Die Zahl der Todesfälle legt den Daten zufolge um … [+2571 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "SPORT1" }, |
|
|
|
author: "SPORT1", |
|
|
|
title: |
|
|
|
"Champions League: Neue Regel zu Gelben Karten - Bayern könnte profitieren - SPORT1", |
|
|
|
description: |
|
|
|
"Dem FC Bayern droht vor dem Achtelfina-Rückspiel in der Champions League der Verlust zweier Leistungsträger. Eine Regel-Änderung mindert die Gefahr jedoch.", |
|
|
|
url: |
|
|
|
"https://www.sport1.de/fussball/champions-league/2020/08/champions-league-neue-regel-zu-gelben-karten-bayern-koennte-profitieren", |
|
|
|
urlToImage: |
|
|
|
"https://reshape.sport1.de/c/t/C1D7F69B-7E40-4E4A-8C0C-9C597241FF61/1200x630", |
|
|
|
publishedAt: "2020-08-04T20:14:00Z", |
|
|
|
content: |
|
|
|
"In Zeiten der Pandemie ist nichts, wie es einmal war. \r\nDas gilt auch für die Champions League, die bekanntlich in diesem Jahr in einem neuen Modus stattfinden muss. Das Exekutivkommitee der UEFA hat… [+1150 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "DIE WELT" }, |
|
|
|
author: "Luisa Hofmeier", |
|
|
|
title: |
|
|
|
"Opfer von Hanau: „Werde Anblick nie wieder aus meinem Kopf bekommen“ - WELT", |
|
|
|
description: |
|
|
|
"Im Februar wurde der Sohn von Armin Kurtović bei dem rechtsextremen Anschlag in Hanau ermordet. Hier erzählt der Vater, wie seine Welt zusammenbrach – und warum er der Polizei nicht mehr vertraut. Eine quälende Suche nach Antworten treibt ihn an. Und eine gro…", |
|
|
|
url: |
|
|
|
"https://www.welt.de/politik/deutschland/plus212853252/Opfer-von-Hanau-Werde-Anblick-nie-wieder-aus-meinem-Kopf-bekommen.html", |
|
|
|
urlToImage: |
|
|
|
"https://www.welt.de/img/politik/deutschland/mobile212855866/9061351137-ci16x9-w1200-fnov-fpotl-fpi157750653/Kombo-Kutovic.jpg", |
|
|
|
publishedAt: "2020-08-04T20:05:00Z", |
|
|
|
content: |
|
|
|
"Armin Kurtovi berichtet aus der Nacht, in der sein Sohn starb. Der 46-Jährige erzählt, wie seine Tochter ihm eine SMS schrieb: Es gebe eine Schießerei in der Stadt. Wie er seine drei Söhne kontaktier… [+793 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "watson" }, |
|
|
|
author: "Alina Bähr", |
|
|
|
title: |
|
|
|
'Royals: Biograf urteilt über Harry und Meghan – "Viehfutter für den roten Teppich" - watson', |
|
|
|
description: "watson - das newsportal", |
|
|
|
url: "https://www.watson.de/!602996819", |
|
|
|
urlToImage: |
|
|
|
"https://www.watson.de/imgdb/5aaf/Qx,A,60,39,3238,1820,1572,792,606,404/2555400157477623", |
|
|
|
publishedAt: "2020-08-04T18:17:09Z", |
|
|
|
content: |
|
|
|
'Harry und Meghan bei einem ihrer letzten Auftritte als Senior Royals im März 2020.Bild: imago images / Nils Jorgensen\r\n"Nur Viehfutter für den roten Teppich": Royal-Biograf mit vernichtendem Urteil ü… [+3448 chars]', |
|
|
|
}, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
const mockEvents = { |
|
|
|
status: "ok", |
|
|
|
totalResults: 67816, |
|
|
|
articles: [ |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Joey Hinson", |
|
|
|
title: "TechCrunch talks Virtual Events and Event Technology", |
|
|
|
description: |
|
|
|
"As you may have heard, we’re taking our entire events lineup fully virtual in 2020. This is of course in response to Covid-19. We’re working hard to make sure that, despite limitations, this year’s events will be some of the best we’ve ever produced. To make …", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/16/techcrunch-talks-virtual-events-and-event-technology/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/48844699672_f9cf52b345_k.jpg?w=600", |
|
|
|
publishedAt: "2020-07-16T22:37:22Z", |
|
|
|
content: |
|
|
|
"As you may have heard, were taking our entire events lineup fully virtual in 2020. This is of course in response to Covid-19. Were working hard to make sure that, despite limitations, this years even… [+1898 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Joey Hinson", |
|
|
|
title: |
|
|
|
"Talking virtual events and Disrupt with Hopin founder Johnny Boufarhat", |
|
|
|
description: |
|
|
|
"Register now to attend the event on 8/6 at 10 AM PT. Registered attendees will have the opportunity to ask questions via Slido. Next in our series of talks with virtual event masterminds, we’ll be meeting with Johnny Boufarhat, founder of virtual events platf…", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/30/talking-virtual-events-and-disrupt-with-hopin-founder-johnny-boufarhat/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/Disrupt-2020-Illustration.png?w=764", |
|
|
|
publishedAt: "2020-07-30T16:16:40Z", |
|
|
|
content: |
|
|
|
"Register now to attend the event on 8/6 at 10 AM PT. Registered attendees will have the opportunity to ask questions via Slido.\r\nNext in our series of talks with virtual event masterminds, well be me… [+1308 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Kirsten Korosec", |
|
|
|
title: |
|
|
|
"Everything you need to know about the virtual TC Sessions: Mobility 2020", |
|
|
|
description: |
|
|
|
"You may have heard that we’re taking our events virtual this year. And that means TC Sessions: Mobility is going virtual as well. This won’t just be one long webinar. We have some technical tricks up our sleeves that will bring all of what you’d expect from o…", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/07/everything-you-need-to-know-about-the-virtual-tc-sessions-mobility-2020/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2019/09/disrupt-mobility-roundup.png?w=753", |
|
|
|
publishedAt: "2020-07-07T16:00:44Z", |
|
|
|
content: |
|
|
|
"You may have heard that we’re taking our events virtual this year. And that means TC Sessions: Mobility is going virtual as well.\r\nThis won’t just be one long webinar. We have some technical tricks u… [+2948 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "bbc-news", name: "BBC News" }, |
|
|
|
author: "https://www.facebook.com/bbcnews", |
|
|
|
title: "Coronavirus clouds US 4 July Independence Day events", |
|
|
|
description: |
|
|
|
"Beaches are closed and fireworks cancelled as the US scales back 4 July amid surging Covid cases.", |
|
|
|
url: "https://www.bbc.co.uk/news/world-us-canada-53293542", |
|
|
|
urlToImage: |
|
|
|
"https://ichef.bbci.co.uk/news/1024/branded_news/DA10/production/_113242855_mediaitem113242853.jpg", |
|
|
|
publishedAt: "2020-07-04T17:15:42Z", |
|
|
|
content: |
|
|
|
"Image copyrightGetty ImagesImage caption\r\n Hand sanitiser for restaurant guests in Miami\r\nThe US is marking its Independence Day amid a surge in coronavirus cases, and many events have been cancelled… [+2768 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: null, name: "Lifehacker.com" }, |
|
|
|
author: "Emily Long", |
|
|
|
title: "How to Attend San Diego Comic-Con at Home", |
|
|
|
description: |
|
|
|
"In-person conferences and conventions obviously aren’t happening this year, but San Diego Comic-Con International, which generally takes place in mid-July in San Diego, has taken its whole slate of events virtual—and you can attend from the comfort of your ow…", |
|
|
|
url: |
|
|
|
"https://lifehacker.com/how-to-attend-san-diego-comic-con-at-home-1844480404", |
|
|
|
urlToImage: |
|
|
|
"https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/cmfoxc0vavlkbrwslv8k.jpg", |
|
|
|
publishedAt: "2020-07-23T17:30:00Z", |
|
|
|
content: |
|
|
|
"In-person conferences and conventions obviously arent happening this year, but San Diego Comic-Con International, which generally takes place in mid-July in San Diego, has taken its whole slate of ev… [+3886 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "bbc-news", name: "BBC News" }, |
|
|
|
author: "https://www.facebook.com/bbcnews", |
|
|
|
title: "Johnny Depp and Amber Heard: Court hears details of birthday row", |
|
|
|
description: |
|
|
|
'The actor tells a libel hearing events after Amber Heard\'s 30th birthday were a "fitting end" to their marriage.', |
|
|
|
url: "https://www.bbc.co.uk/news/uk-53363900", |
|
|
|
urlToImage: |
|
|
|
"https://ichef.bbci.co.uk/news/1024/branded_news/D1EE/production/_113324735_13bc433f-6dbc-4ae2-8e08-773b6fef6422.jpg", |
|
|
|
publishedAt: "2020-07-10T12:40:57Z", |
|
|
|
content: |
|
|
|
"Image copyrightEPA\r\nDetails of arguments between Johnny Depp and his ex-wife have been relayed to London's High Court, as the actor's libel claim against the Sun continues.\r\nMr Depp, 57, told the cou… [+4399 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "cnn", name: "CNN" }, |
|
|
|
author: "Paul LeBlanc, CNN", |
|
|
|
title: |
|
|
|
"Trump to hold outdoor campaign rally in New Hampshire on Saturday", |
|
|
|
description: |
|
|
|
"President Donald Trump plans to hold an outdoor campaign rally in New Hampshire on Saturday as he continues his push for in-person events amid the coronavirus pandemic.", |
|
|
|
url: |
|
|
|
"https://www.cnn.com/2020/07/05/politics/trump-campaign-rally-new-hampshire-coronavirus/index.html", |
|
|
|
urlToImage: |
|
|
|
"https://cdn.cnn.com/cnnnext/dam/assets/200625154351-102-trump-tulsa-0620-super-tease.jpg", |
|
|
|
publishedAt: "2020-07-05T20:26:47Z", |
|
|
|
content: null, |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Jordan Crook", |
|
|
|
title: "PopShop Live gets $3 million to bring live streaming to shopping", |
|
|
|
description: |
|
|
|
"Streaming video has become a huge part of our lives, whether it’s watching your favorite shows on Netflix or getting live TV through Hulu or YouTube or checking out your favorite gamers on Twitch. But streaming is trickling into other facets of our lives, too…", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/08/popshop-live-gets-3-million-to-bring-live-streaming-to-shopping/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/Screen-Shot-2020-07-08-at-9.14.27-AM.png?w=573", |
|
|
|
publishedAt: "2020-07-08T15:00:42Z", |
|
|
|
content: |
|
|
|
"Streaming video has become a huge part of our lives, whether it’s watching your favorite shows on Netflix or getting live TV through Hulu or YouTube or checking out your favorite gamers on Twitch. Bu… [+3535 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Kirsten Korosec", |
|
|
|
title: |
|
|
|
"SaaS startup Swoop raises $3.2M to modernize mom-and-pop transportation companies", |
|
|
|
description: |
|
|
|
"Chauffeured group transportation — the vehicles used for corporate outings, special events, and even weddings — is a fragmented industry with hundreds of small operators that rely on analog systems to book customers. Now in this era of COVID-19, these operato…", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/24/saas-startup-swoop-raises-3-2m-to-modernize-mom-and-pop-transportation-companies/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/SwoopGetThereTogether.png?w=600", |
|
|
|
publishedAt: "2020-07-24T20:26:34Z", |
|
|
|
content: |
|
|
|
"Chauffeured group transportation the vehicles used for corporate outings, special events, and even weddings is a fragmented industry with hundreds of small operators that rely on analog systems to bo… [+2984 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Alexandra Ames", |
|
|
|
title: |
|
|
|
"Ready, set, network! CrunchMatch is now open for Early Stage 2020", |
|
|
|
description: |
|
|
|
"Call it what you will — startup bootcamp, founders’ masterclass or the mother of all how-to events — we’re just days away from TC Early Stage 2020. But you don’t have to wait another minute to start making essential connections. CrunchMatch, our AI-powered ne…", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/17/ready-set-network-crunchmatch-is-now-open-for-early-stage-2020/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/Early-Stage-Post-Image-Online.png?w=571", |
|
|
|
publishedAt: "2020-07-17T15:43:59Z", |
|
|
|
content: |
|
|
|
"Call it what you will startup bootcamp, founders masterclass or the mother of all how-to events were just days away from TC Early Stage 2020. But you dont have to wait another minute to start making … [+2091 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Natasha Mascarenhas", |
|
|
|
title: "A recapitalization reckoning", |
|
|
|
description: |
|
|
|
"If you’re an angel who invested in a startup that was meant to go public in 2014, you might be getting a little bit impatient. High-risk, high-reward investing has lost its shine in this environment: the stock market is a mess these days, and you want your ca…", |
|
|
|
url: "http://techcrunch.com/2020/07/10/a-recapitalization-reckoning/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2015/05/toothpaste-squeeze.jpg?w=533", |
|
|
|
publishedAt: "2020-07-10T18:18:20Z", |
|
|
|
content: |
|
|
|
"If youre an angel who invested in a startup that was meant to go public in 2014, you might be getting a little bit impatient. High-risk, high-reward investing has lost its shine in this environment: … [+1464 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Sarah Perez", |
|
|
|
title: |
|
|
|
"Study: U.S. adults who mostly rely on social media for news are less informed, exposed to more conspiracies", |
|
|
|
description: |
|
|
|
"A new report from Pew Research makes an attempt to better understand U.S. adults who get their news largely from social media platforms, and compare their understanding of current events and political knowledge to those who use other sources, like TV, radio, …", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/30/study-u-s-adults-who-mostly-rely-on-social-media-for-news-are-less-informed-exposed-to-more-conspiracies/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2018/01/gettyimages-86002803.jpg?w=683", |
|
|
|
publishedAt: "2020-07-30T18:41:16Z", |
|
|
|
content: |
|
|
|
"A new report from Pew Research makes an attempt to better understand U.S. adults who get their news largely from social media platforms, and compare their understanding of current events and politica… [+6324 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "techcrunch", name: "TechCrunch" }, |
|
|
|
author: "Brian Heater", |
|
|
|
title: "Samsung will reveal the next Galaxy Note on August 5", |
|
|
|
description: |
|
|
|
"Samsung’s next big Unpacked event is scheduled for August 5. As is the trend these days, the unveiling will be online-only, following in the footsteps of big virtual events from the likes of. Microsoft and Apple. It’s Samsung’s first crack at the format. The …", |
|
|
|
url: |
|
|
|
"http://techcrunch.com/2020/07/07/samsung-will-reveal-the-next-galaxy-note-on-august-5/", |
|
|
|
urlToImage: |
|
|
|
"https://techcrunch.com/wp-content/uploads/2020/07/samsung-unpacked-2020.jpg?w=764", |
|
|
|
publishedAt: "2020-07-07T23:01:36Z", |
|
|
|
content: |
|
|
|
"Samsungs next big Unpacked event is scheduled for August 5. As is the trend these days, the unveiling will be online-only, following in the footsteps of big virtual events from the likes of. Microsof… [+1491 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "bbc-news", name: "BBC News" }, |
|
|
|
author: null, |
|
|
|
title: "Boxing faces big decisions despite UK return - Warren", |
|
|
|
description: |
|
|
|
"As boxing gets set to return to the UK sporting calendar, Frank Warren warns of difficult decisions if events stay behind closed doors.", |
|
|
|
url: "https://www.bbc.co.uk/sport/boxing/53331979", |
|
|
|
urlToImage: |
|
|
|
"https://ichef.bbci.co.uk/live-experience/cps/624/cpsprodpb/184DC/production/_113284599_frankwarren.jpg", |
|
|
|
publishedAt: "2020-07-09T09:27:43Z", |
|
|
|
content: |
|
|
|
'Warren (left) wants to find a way for fighters like WBC heavyweight champion Tyson Fury to return to action in a viable manner\r\nPromoter Frank Warren says boxing may need to make "serious decisions" … [+3187 chars]', |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "reuters", name: "Reuters" }, |
|
|
|
author: "Reuters Editorial", |
|
|
|
title: |
|
|
|
"Bulgaria closes night clubs, bans spectators at sports events - Reuters", |
|
|
|
description: |
|
|
|
"Bulgarian night clubs and indoor discos will close, spectators will be banned at all sports events and public gatherings will be limited to 30 people as new cases of the coronavirus have surged, Health Minister Kiril Ananiev said.", |
|
|
|
url: |
|
|
|
"https://www.reuters.com/article/us-health-coronavirus-bulgaria-idUSKBN24A1JJ", |
|
|
|
urlToImage: |
|
|
|
"https://s4.reutersmedia.net/resources_v2/images/rcom-default.png", |
|
|
|
publishedAt: "2020-07-09T11:00:00Z", |
|
|
|
content: |
|
|
|
"SOFIA (Reuters) - Bulgarian night clubs and indoor discos will close, spectators will be banned at all sports events and public gatherings will be limited to 30 people as new cases of the coronavirus… [+1518 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "reuters", name: "Reuters" }, |
|
|
|
author: "Reuters Editorial", |
|
|
|
title: "PGA Tour events continue without fans rest of season - Reuters", |
|
|
|
description: |
|
|
|
"The PGA Tour's three playoff events will be played without spectators, closing the door on opportunities for fans to attend Tour events the rest of the season.", |
|
|
|
url: |
|
|
|
"https://www.reuters.com/article/us-golf-pga-no-fans-coronavirus-idUSKCN24E2EO", |
|
|
|
urlToImage: |
|
|
|
"https://s4.reutersmedia.net/resources_v2/images/rcom-default.png", |
|
|
|
publishedAt: "2020-07-13T17:19:00Z", |
|
|
|
content: |
|
|
|
"The PGA Tour’s three playoff events will be played without spectators, closing the door on opportunities for fans to attend Tour events the rest of the season. \r\nThe Northern Trust, BMW Championship … [+2005 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "reuters", name: "Reuters" }, |
|
|
|
author: "Reuters Editorial", |
|
|
|
title: |
|
|
|
"WTA adds Prague, Lexington events to provisional calendar - Reuters", |
|
|
|
description: |
|
|
|
"The WTA on Thursday confirmed the addition of events in Prague, Czech Republic and Lexington, United States, to its provisional calendar which now features 21 tournaments.", |
|
|
|
url: "https://www.reuters.com/article/us-tennis-wta-idUSKBN24A2YZ", |
|
|
|
urlToImage: |
|
|
|
"https://s4.reutersmedia.net/resources_v2/images/rcom-default.png", |
|
|
|
publishedAt: "2020-07-09T18:38:00Z", |
|
|
|
content: |
|
|
|
"(Reuters) - The WTA on Thursday confirmed the addition of events in Prague, Czech Republic and Lexington, United States, to its provisional calendar which now features 21 tournaments. \r\nThe WTA Tour,… [+972 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "reuters", name: "Reuters" }, |
|
|
|
author: "Sudipto Ganguly", |
|
|
|
title: |
|
|
|
"ATP, WTA cancel China events, including Shenzen Finals - Reuters India", |
|
|
|
description: |
|
|
|
"The two main tennis tours on Friday cancelled all of their remaining tournaments in China for this year, including the flagship WTA Finals, in the wake of the country's ban on international sporting events due to the COVID-19 pandemic.", |
|
|
|
url: |
|
|
|
"https://in.reuters.com/article/health-coronavirus-tennis-china-idINKCN24P052", |
|
|
|
urlToImage: |
|
|
|
"https://s4.reutersmedia.net/resources_v2/images/rcom-default.png", |
|
|
|
publishedAt: "2020-07-24T01:53:00Z", |
|
|
|
content: |
|
|
|
"(Reuters) - The two main tennis tours on Friday cancelled all of their remaining tournaments in China for this year, including the flagship WTA Finals, in the wake of the country’s ban on internation… [+2541 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "reuters", name: "Reuters" }, |
|
|
|
author: "Reuters Editorial", |
|
|
|
title: |
|
|
|
"China cancels international sporting events for rest of 2020 - Reuters", |
|
|
|
description: |
|
|
|
"China will not host any major international sporting events the rest of the year, putting tennis, golf and likely esports events on the shelf.", |
|
|
|
url: |
|
|
|
"https://www.reuters.com/article/us-sports-china-sport-cancelled-idUSKBN24A320", |
|
|
|
urlToImage: |
|
|
|
"https://s4.reutersmedia.net/resources_v2/images/rcom-default.png", |
|
|
|
publishedAt: "2020-07-09T19:18:00Z", |
|
|
|
content: |
|
|
|
"China will not host any major international sporting events the rest of the year, putting tennis, golf and likely esports events on the shelf. \r\nThe General Administration of Sports announced the onl… [+1073 chars]", |
|
|
|
}, |
|
|
|
{ |
|
|
|
source: { id: "bbc-news", name: "BBC News" }, |
|
|
|
author: null, |
|
|
|
title: |
|
|
|
"Eleven ATP and WTA Tour tournaments cancelled in China because of coronavirus pandemic", |
|
|
|
description: |
|
|
|
"Eleven more tournaments across the ATP and WTA Tours are cancelled after China announced it would hold no sporting events for the rest of 2020 due to the coronavirus pandemic.", |
|
|
|
url: "https://www.bbc.co.uk/sport/tennis/53524563", |
|
|
|
urlToImage: |
|
|
|
"https://ichef.bbci.co.uk/live-experience/cps/624/cpsprodpb/9830/production/_113606983_barty2.png", |
|
|
|
publishedAt: "2020-07-24T07:47:49Z", |
|
|
|
content: |
|
|
|
"Ashleigh Barty won the 2019 WTA Finals in Shenzhen\r\nEleven more tournaments across the ATP and WTA Tours have been cancelled after China announced it would hold no sporting events for the rest of 202… [+1223 chars]", |
|
|
|
}, |
|
|
|
], |
|
|
|
}; |
|
|
|
|
|
|
|
const containerIdSuffix = "container"; |
|
|
|
|
|
|
|
// Tab Defintion |
|
|
|
var tabs = { |
|
|
|
current: { |
|
|
|
// status is tab active |
|
|
|
active: false, |
|
|
|
}, |
|
|
|
events: { |
|
|
|
// status is tab active |
|
|
|
active: false, |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Trigger Tab by name |
|
|
|
* @param {string} tabName |
|
|
|
*/ |
|
|
|
function triggerTab(tabName) { |
|
|
|
unsetTabs(); |
|
|
|
if (!(tabName in tabs)) { |
|
|
|
throw new Error(`Tab ${tabName} unknown!`); |
|
|
|
} |
|
|
|
if (tabs[tabName].active) { |
|
|
|
disableTab(tabName); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!tabs[tabName].active) { |
|
|
|
activeTab(tabName); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {string} tabName |
|
|
|
*/ |
|
|
|
var activeTab = function (tabName) { |
|
|
|
if (!(tabName in tabs)) { |
|
|
|
throw new Error(`Tab ${tabName} unknown!`); |
|
|
|
} |
|
|
|
var tab = $(`#${tabName}`)[0]; |
|
|
|
tabs[tabName].active = false; |
|
|
|
tab.classList.remove("inactive"); |
|
|
|
tab.classList.add("active"); |
|
|
|
var tabContainer = $(`#${tabName}-${containerIdSuffix}`)[0]; |
|
|
|
tabContainer.hidden = false; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {string} tabName |
|
|
|
*/ |
|
|
|
var disableTab = function (tabName) { |
|
|
|
if (!(tabName in tabs)) { |
|
|
|
throw new Error(`Tab ${tabName} unknown!`); |
|
|
|
} |
|
|
|
var tab = $(`#${tabName}`)[0]; |
|
|
|
tabs[tabName].active = false; |
|
|
|
tab.classList.remove("active"); |
|
|
|
tab.classList.add("inactive"); |
|
|
|
var tabContainer = $(`#${tabName}-${containerIdSuffix}`)[0]; |
|
|
|
tabContainer.hidden = true; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Reset Tab status |
|
|
|
*/ |
|
|
|
var unsetTabs = function () { |
|
|
|
for (const tabName in tabs) { |
|
|
|
disableTab(tabName); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", function () { |
|
|
|
$("#current").on("click", function () { |
|
|
|
triggerTab("current"); |
|
|
|
}); |
|
|
|
$("#events").on("click", function () { |
|
|
|
triggerTab("events"); |
|
|
|
}); |
|
|
|
// Radomizer for Initial Active Tab |
|
|
|
var tabIndex = Math.floor(Math.random() * Object.keys(tabs).length); |
|
|
|
var tabName = Object.keys(tabs)[tabIndex]; |
|
|
|
triggerTab(tabName); |
|
|
|
for (const topArticle of mockTopNews.articles) { |
|
|
|
var template = getTeaserTemplate(topArticle); |
|
|
|
$("#current-dashboard").append(template); |
|
|
|
} |
|
|
|
for (const eventArticle of mockEvents.articles) { |
|
|
|
var template = getTeaserTemplate(eventArticle); |
|
|
|
$("#event-dashboard").append(template); |
|
|
|
} |
|
|
|
}); |