Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulma v1 #1198

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/Models/Traits/HasKd.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public function getKdaAttribute(float $value): string
public function getKdColor(): string
{
return $this->kd >= 1
? 'has-background-success-light'
: 'has-background-danger-light';
? 'has-background-success-soft'
: 'has-background-danger-soft';
}

public function getKdaColor(): string
{
return $this->kda >= 1
? 'has-background-success-light'
: 'has-background-danger-light';
? 'has-background-success-soft'
: 'has-background-danger-soft';
}
}
12 changes: 6 additions & 6 deletions app/Models/Traits/HasPerformance.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public function getExpectedKillsColor(): string
}

return match (true) {
$this->kills > $this->expected_kills => 'has-background-success-light',
$this->kills < $this->expected_kills => 'has-background-danger-light',
$this->kills === $this->expected_kills => 'has-background-primary-light',
$this->kills > $this->expected_kills => 'has-background-success-soft',
$this->kills < $this->expected_kills => 'has-background-danger-soft',
$this->kills === $this->expected_kills => 'has-background-primary-soft',
default => ''
};
}
Expand All @@ -27,9 +27,9 @@ public function getExpectedDeathsColor(): string
}

return match (true) {
$this->deaths > $this->expected_deaths => 'has-background-danger-light',
$this->deaths < $this->expected_deaths => 'has-background-success-light',
$this->deaths === $this->expected_deaths => 'has-background-primary-light',
$this->deaths > $this->expected_deaths => 'has-background-danger-soft',
$this->deaths < $this->expected_deaths => 'has-background-success-soft',
$this->deaths === $this->expected_deaths => 'has-background-primary-soft',
default => ''
};
}
Expand Down
6 changes: 3 additions & 3 deletions app/Models/Traits/HasScoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public function getFormattedScoreAttribute(): string
public function getVictoryColor(): string
{
if ($this->outcome->is(Outcome::WIN())) {
return 'has-background-success-light';
return 'has-background-success-soft';
}

if ($this->outcome->is(Outcome::LOSS())) {
return 'has-background-warning-light';
return 'has-background-warning-soft';
}

if ($this->outcome->is(Outcome::LEFT())) {
return 'has-background-danger-light';
return 'has-background-danger-soft';
}

return '';
Expand Down
259 changes: 131 additions & 128 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@creativebulma/bulma-tooltip": "^1.2.0",
"@erbelion/vite-plugin-laravel-purgecss": "^0.2.3",
"@fortawesome/fontawesome-free": "^6.5.1",
"bulma": "^0.9.4",
"bulma": "^1.0.0",
"bulma-ribbon": "^0.1.1",
"laravel-vite-plugin": "^1.0",
"resolve-url-loader": "^5.0.0",
Expand Down
12 changes: 0 additions & 12 deletions resources/sass/_variables.scss

This file was deleted.

47 changes: 43 additions & 4 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
@import 'variables';
@import 'progressbar';
@charset "utf-8";

$orange: #ff8606;
$purple: #9400ff;

$my-colors: (
"orange": $orange,
"purple": $purple
);

@use 'bulma/sass' with (
$custom-colors: $my-colors,
$footer-padding: 3rem 1.5rem 2rem,
);

// HACK - Specify global colors from Bulma to work with < v1 plugins.
@use "sass:map";
@use "bulma/sass" as bulma;

$family-primary: bulma.$family-primary;

$colors: ("white": (bulma.$white, bulma.$black), "black": (bulma.$black, bulma.$white), "light": (bulma.$light, bulma.$dark), "dark": (bulma.$dark, bulma.$light), "info": (bulma.$info, bulma.$light));
$grey: bulma.$grey;
$grey-dark: bulma.$grey-dark;
$grey-darker: bulma.$grey-darker;
$grey-lighter: bulma.$grey-lighter;
$white: bulma.$white;

$size-7: bulma.$size-7;
$size-small: bulma.$size-small;
$size-normal: bulma.$size-normal;
$size-medium: bulma.$size-medium;
$size-large: bulma.$size-large;

$border: bulma.$border;

$weight-semibold: bulma.$weight-semibold;

$radius-small: bulma.$radius-small;

@import 'bulma/bulma';
@import '@creativebulma/bulma-divider';
@import '@creativebulma/bulma-tooltip';
//@import '@creativebulma/bulma-tooltip';
@import 'bulma-ribbon/src/sass/index';

// End Hack
@import 'progressbar';

html {
height: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<td class="{{ $game->personal->getKdaColor() }}">
{{ $game->personal->kda }}
</td>
<td class="has-background-{{ $game->personal->accuracy_color }}-light">
<td class="has-background-{{ $game->personal->accuracy_color }}-soft">
{{ $game->personal->accuracy }}%
</td>
<td>{{ $game->personal->rank }}</td>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/game-history-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<td class="{{ $game->personal->getKdaColor() }}">
{{ $game->personal->kda }}
</td>
<td class="has-background-{{ $game->personal->accuracy_color }}-light">
<td class="has-background-{{ $game->personal->accuracy_color }}-soft">
{{ $game->personal->accuracy }}%
</td>
<td>{{ $game->personal->rank }}</td>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/game-lan-history-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<td class="{{ $game->personal->getKdaColor() }}">
{{ $game->personal->kda }}
</td>
<td class="has-background-{{ $game->personal->accuracy_color }}-light">
<td class="has-background-{{ $game->personal->accuracy_color }}-soft">
{{ $game->personal->accuracy }}%
</td>
<td>{{ $game->personal->rank }}</td>
Expand Down
66 changes: 34 additions & 32 deletions resources/views/livewire/medals-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,42 @@
@if ($player->is_private)
@include('partials.global.account_private')
@else
@foreach ($medals as $medal)
<article class="tile is-flex">
<figure class="media-left">
<p class="image is-48x48">
<img
class="{{ $medal->count === 0 ? 'is-greyscale' : '' }}"
src="{{ $medal->image }}"
alt="{{ $medal->name }}"
/>
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<a
href="{{ route('medalLeaderboard', [$medal]) }}"
class="{{ $medal->text_color }}"
>
<strong style="white-space: nowrap">
{{ $medal->name }}
</strong>
</a>
<br>
{{ $medal->description }}
<div class="fixed-grid has-1-cols">
@foreach ($medals as $medal)
<article class="cell media">
<figure class="media-left">
<p class="image is-48x48">
<img
class="{{ $medal->count === 0 ? 'is-greyscale' : '' }}"
src="{{ $medal->image }}"
alt="{{ $medal->name }}"
/>
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<a
href="{{ route('medalLeaderboard', [$medal]) }}"
class="{{ $medal->text_color }}"
>
<strong style="white-space: nowrap">
{{ $medal->name }}
</strong>
</a>
<br>
{{ $medal->description }}
</p>
</div>
</div>
</div>
<div class="media-right">
<span class="tag {{ $medal->count === 0 ? 'is-light' : 'is-dark' }}">
{{ number_format($medal->count) }}
</span>
</div>
</article>
@endforeach
<div class="media-right">
<span class="tag {{ $medal->count === 0 ? 'is-light' : 'is-dark' }}">
{{ number_format($medal->count) }}
</span>
</div>
</article>
@endforeach
</div>
@endif
@endif
</div>
4 changes: 2 additions & 2 deletions resources/views/livewire/medals-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<tbody>
@foreach ($medals as $medal)
<tr>
<td>
<article class="tile is-flex">
<td class="grid">
<article class="cell is-flex">
<figure class="media-left">
<p class="image is-48x48">
<img src="{{ $medal->image }}" alt="{{ $medal->name }}" />
Expand Down
10 changes: 6 additions & 4 deletions resources/views/livewire/overview-page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
<div>
<div class="notification is-warning">
<p>
No record was found for this user for this specific season: <strong>{{ $season->name ?? 'n/a' }}</strong>.
No record was found for this user for this specific season:
<strong>{{ $season->name ?? 'n/a' }}</strong>.
</p>
<br /><br />
<br/><br/>
<p class="is-size-7">
If this is not intended - just click "Request Stat Update"
</p>
Expand All @@ -33,12 +34,13 @@
<div>
@if ($mode->is(\App\Enums\Mode::MATCHMADE_RANKED()) && !$isAllSeasons)
<div class="notification is-warning">
We currently cannot pull filtered data (ie ranked) from a specific season. If you have data it's from an older Leaf that could.
We currently cannot pull filtered data (ie ranked) from a specific season. If you have data it's
from an older Leaf that could.
</div>
@endif
@include('partials.player.stats')
@if ($serviceRecord->medals)
@include('partials.player.medal-groups')
@include('partials.player.medals')
@endif
</div>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/livewire/player-card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
?>
<div>
@if ($player->is_bot)
<div class="card has-background-grey-light mb-2">
<div class="card has-background-grey-soft mb-2">
<div class="card-content">
<h1 class="title is-4">
<span class="tag is-dark">BOT</span>&nbsp;{{ $player->gamertag }}
Expand All @@ -12,7 +12,7 @@
</div>
</div>
@else
<div class="card {{ $player->is_cheater ? 'has-background-danger-light' : 'has-background-success-light' }} mb-2"
<div class="card {{ $player->is_cheater ? 'has-background-danger-soft' : 'has-background-success-soft' }} mb-2"
style="background-image: url({{ $player->backdrop_url }}); background-repeat: no-repeat; background-position: center top;"
>
@if ($player->rank?->largeIcon)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/scrim-players.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<td class="{{ $gamePlayer->getKdaColor() }}">
{{ $gamePlayer->kda }}
</td>
<td class="has-background-{{ $gamePlayer->accuracy_color }}-light">
<td class="has-background-{{ $gamePlayer->accuracy_color }}-soft">
{{ number_format($gamePlayer->accuracy, 2) }}%
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/game/team-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class="has-tooltip-arrow {{ $gamePlayer->team->tooltip_color ?? '' }}"
<td class="{{ $gamePlayer->getKdaColor() }}">
{{ $gamePlayer->kda }}
</td>
<td class="has-background-{{ $gamePlayer->accuracy_color }}-light">
<td class="has-background-{{ $gamePlayer->accuracy_color }}-soft">
{{ $gamePlayer->accuracy }}%
</td>
<td>{{ $gamePlayer->formatted_score }}</td>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/hcs/bracket_table/4v4.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</thead>
<tbody>
@foreach ($matchups as $matchup)
<tr class="{{ $matchup->isCancelled() ? 'has-background-danger-light' : null }}">
<tr class="{{ $matchup->isCancelled() ? 'has-background-danger-soft' : null }}">
<td style="opacity: {{ $matchup->team1?->id === $matchup->loser?->id ? '40%' : '100%' }}">
<article class="media">
<figure class="media-left">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/hcs/team_snippet/4v4.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
@endif
@foreach ($team->players as $player)
<div class="card has-background-{{ $color }}-light">
<div class="card has-background-{{ $color }}-soft">
<div class="card-content">
<div class="media">
<div class="media-left">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/hcs/team_snippet/ffa.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
?>
@foreach ($matchup->matchupTeams->sortBy('points') as $matchupTeam)
<?php $player = $matchupTeam->getPlayer(); ?>
<div class="card has-background-{{ $matchupTeam->isWinner() ? 'success' : 'dark' }}-light">
<div class="card has-background-{{ $matchupTeam->isWinner() ? 'success' : 'dark' }}-soft">
<div class="card-content">
<div class="media">
<div class="media-left">
Expand Down
6 changes: 0 additions & 6 deletions resources/views/partials/player/medal-groups.blade.php

This file was deleted.

Loading