From 772c7372e004457f89f066fbf02114088149536b Mon Sep 17 00:00:00 2001 From: Melro Serdoura Daniel Date: Fri, 15 Dec 2023 16:25:52 +0100 Subject: [PATCH] commit de fin de journe --- css/global.css | 32 +++++++++++++++++++++++++------- js/main.js | 32 ++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/css/global.css b/css/global.css index 4d66e51..485e9ce 100644 --- a/css/global.css +++ b/css/global.css @@ -1,4 +1,4 @@ -/* Copyright © 2023 Entreprise SkamCraft */ +/*Copyright © 2023 Entreprise SkamCraft */ * { font-family: "Inter", sans-serif; @@ -52,7 +52,20 @@ button:hover { } main { + flex: 1; + overflow-y: scroll; + display: flex; + justify-content: left; + flex-wrap: wrap; + padding-left: 30px; +} + + +.spacer { + margin-bottom: 35px; + margin-left: 100px; + margin-right: 100px; } #credits { @@ -80,15 +93,20 @@ footer p { #exampleModal { color: white; - background-color: rgba(255, 255, 255, 0.1); + background-color: rgba(255, 255, 255, 0.1) } #modal-footer { background-color: #272727; } -canvas { - width: 100%; - height: 600px; - border: 2px solid black; - border-radius: 5px; + +#status-onhold { + color: orange; +} + +#status-accepted{ + color: greenyellow; } +#revenu { + color: white +} \ No newline at end of file diff --git a/js/main.js b/js/main.js index a8532f1..e699ff3 100644 --- a/js/main.js +++ b/js/main.js @@ -79,17 +79,18 @@ async function contract() { async function ship() { const token = localStorage.getItem("token"); const ships = await SpaceTraders.Ships.list(token); + console.log(ships) $("main").empty(); ships.forEach((ship) => { let img = "/img/Skamkraft.png"; const card = ` -
+
-
${ship}
+
${ship.symbol}

Location : ${ship.nav.waypointSymbol}

Status : ${ship.nav.status}

- +
`; @@ -97,29 +98,32 @@ async function ship() { $("#btn-infos").on("click", async function () { const token = localStorage.getItem("token"); - const contrat = await SpaceTraders.Contract.get( - $(this).attr("contratID"), - token - ); + const ships = await SpaceTraders.Ships.get(token,$(this).attr('data-ships-id')); + console.log("info") const modal = ` -