From 6bb27ec34f32cfbda8395f9a0df8a65310e19fdd Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 6 Nov 2023 09:24:51 +0100 Subject: [PATCH 1/5] h1 center --- includes/styles.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/styles.css b/includes/styles.css index 06af36f..0add64b 100644 --- a/includes/styles.css +++ b/includes/styles.css @@ -70,14 +70,24 @@ header, main, footer { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } -header h1, section h2 { +header h1 { border-bottom: 1px solid white; margin-bottom: 10px; padding-bottom: 5px; - font-family: 'Bungee Spice' - + font-family: 'Bungee Spice'; + text-align: center; /* Centers the text horizontally */ + margin-left: auto; + margin-right: auto; } +section h2 { + border-bottom: 1px solid white; + margin-bottom: 10px; + padding-bottom: 5px; + font-family: 'Bungee Spice'; +} + + footer { text-align: center; } From 2a119c795b91f8535247f7a2b8ed4719a075b18d Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 6 Nov 2023 09:26:35 +0100 Subject: [PATCH 2/5] center --- includes/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/styles.css b/includes/styles.css index 0add64b..ddd46dc 100644 --- a/includes/styles.css +++ b/includes/styles.css @@ -63,7 +63,7 @@ header .banner { header, main, footer { max-width: 1200px; min-width: 800px; - margin: 5px 5px; + margin: 5px auto; padding: 10px; border: 1px solid rgb(255, 255, 255); border-radius: 10px; From cdefef46daab3217cada3693523bfbed588a11e2 Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 6 Nov 2023 09:28:02 +0100 Subject: [PATCH 3/5] h2 center --- includes/styles.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/styles.css b/includes/styles.css index ddd46dc..794135a 100644 --- a/includes/styles.css +++ b/includes/styles.css @@ -85,9 +85,13 @@ section h2 { margin-bottom: 10px; padding-bottom: 5px; font-family: 'Bungee Spice'; + text-align: center; /* Centers the text horizontally */ + margin-left: auto; + margin-right: auto; } + footer { text-align: center; } From 6e9617e9e05233f89820ad057e8bac907b34a6b1 Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 6 Nov 2023 09:53:41 +0100 Subject: [PATCH 4/5] save killstats --- update/matchparser.ps1 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index aa548fc..5592a35 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -47,10 +47,12 @@ function get-killstats { } } # Get the latest file in the directory by last modification time -try { $latestFile = Get-ChildItem -Path "$scriptroot/../data/archive/" -File -ErrorAction Stop | Sort-Object LastWriteTime -Descending | Select-Object -First 1 -Write-Output "Found file $($latestFile.FullName)" +try { + $latestFile = Get-ChildItem -Path "$scriptroot/../data/archive/" -File -ErrorAction Stop | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + Write-Output "Found file $($latestFile.FullName)" -} catch { +} +catch { $latestFile = @() } @@ -70,7 +72,7 @@ $all_player_matches = get-content "$scriptroot/../data/player_matches.json" | c $killstats = @() $i = 0 -foreach ($player in ($all_player_matches)) { +foreach ($player in $all_player_matches) { if ($player.psobject.properties.name -eq 'new_win_matches') { continue } @@ -96,7 +98,16 @@ foreach ($player in ($all_player_matches)) { } write-output "Analyzing for player $player_name telemetry: $($match.telemetry_url)" - $killstats += get-killstats -player_name $player_name -telemetry ($telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' }) -gameMode $match.gameMode -matchType $match.matchType + $killstat = get-killstats -player_name $player_name -telemetry ($telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' }) -gameMode $match.gameMode -matchType $match.matchType + $killstats += $killstat + if ($save) { + $savekillstats = @{ + matchid = $match.id + created = $match.createdAt + stats = $killstats + } + $savekillstats | ConvertTo-Json | out-file "$scriptroot/../data/killstats/$($match.id).json" + } } } From dde514a3cfad0c9ca109b04bea410c0a18d6bd1b Mon Sep 17 00:00:00 2001 From: Lanta Date: Mon, 6 Nov 2023 09:57:51 +0100 Subject: [PATCH 5/5] save killstats --- update/matchparser.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index 5592a35..66a20ac 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -100,11 +100,11 @@ foreach ($player in $all_player_matches) { write-output "Analyzing for player $player_name telemetry: $($match.telemetry_url)" $killstat = get-killstats -player_name $player_name -telemetry ($telemetry | where-object { $_._T -eq 'LOGPLAYERKILLV2' }) -gameMode $match.gameMode -matchType $match.matchType $killstats += $killstat - if ($save) { + if ($true) { $savekillstats = @{ matchid = $match.id created = $match.createdAt - stats = $killstats + stats = $killstat } $savekillstats | ConvertTo-Json | out-file "$scriptroot/../data/killstats/$($match.id).json" }