From 6bd89ac0b6bb0c3b9a25a2f4f0452812523b4bc3 Mon Sep 17 00:00:00 2001 From: BlackTesseract Date: Thu, 4 Aug 2022 17:32:44 +0200 Subject: [PATCH] =?UTF-8?q?Rollen=20F=C3=A4higkeiten=20Armor=20#19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 15 +++++++++++++++ templates/Dashboards/Dash_Armor.html | 16 ++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 6af9b595..fe4a634f 100644 --- a/app.py +++ b/app.py @@ -183,7 +183,22 @@ def kill_player(name_kill): return(render_template('Dashboards/Dash_Dorfbewohner.html')) +@app.route("//Armor_aktion//") #player auswahl +def armor_player(player1, player2, name): + rolle = "Armor" + wort = name+" = "+rolle # create a string with the name and the role + file = open('rollen_log.txt', "r") # open the log file + players_vorhanden = file.read() # read the log file + + if wort in players_vorhanden: + lover_one = player1 + lover_two = player2 + + print(lover_one+" LIEBT "+lover_two) + + return(render_template('Dashboards/Dash_Armor.html')) + ##Übersicht der Spieler diff --git a/templates/Dashboards/Dash_Armor.html b/templates/Dashboards/Dash_Armor.html index da0547aa..d0f3ceca 100644 --- a/templates/Dashboards/Dash_Armor.html +++ b/templates/Dashboards/Dash_Armor.html @@ -11,12 +11,16 @@

Hallo, {{name}}


@@ -27,14 +31,18 @@

Hallo, {{name}}


//name/rolle/partner1/partner2 - + console.log("test") console.log("{{el}}"); var text = "{{el}}"; if (text.includes("Erzaehler")==false) { - document.write("

  • "); + document.write("

  • "); btn = document.getElementById(text); + btn.addEventListener("click", function() { + console.log("{{el}}"); + addToLink("{{el}}"); + }); }