2018-04-03 11:35:25 +08:00
|
|
|
{{--
|
|
|
|
|
|
|
|
If you want to edit this, you can reference the CheckWX API docs:
|
|
|
|
https://api.checkwx.com/#metar-decoded
|
|
|
|
|
|
|
|
--}}
|
|
|
|
@if(!$metar)
|
2018-05-18 06:03:30 +08:00
|
|
|
<p>@lang('frontend.widgets.weather.metarnotretrieved')</p>
|
2018-04-03 11:35:25 +08:00
|
|
|
@else
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-striped">
|
2018-04-03 11:35:25 +08:00
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.conditions')</td>
|
2018-04-03 11:35:25 +08:00
|
|
|
<td>
|
2018-04-07 22:05:06 +08:00
|
|
|
{{ $metar['category'] }}
|
2018-04-08 09:52:12 +08:00
|
|
|
{{ $metar['temperature'][$unit_temp] }}
|
2018-04-07 22:05:06 +08:00
|
|
|
°{{strtoupper($unit_temp)}}
|
|
|
|
@if($metar['visibility'])
|
2018-05-18 06:03:30 +08:00
|
|
|
, @lang('frontend.widgets.weather.visibility') {{ $metar['visibility'][$unit_dist] }} {{$unit_dist}}
|
2018-04-07 22:05:06 +08:00
|
|
|
@endif
|
|
|
|
@if($metar['humidity'])
|
2018-05-18 06:03:30 +08:00
|
|
|
, {{ $metar['humidity'] }}% @lang('frontend.widgets.weather.humidity')
|
2018-04-07 22:05:06 +08:00
|
|
|
@endif
|
2018-04-08 09:52:12 +08:00
|
|
|
@if($metar['dew_point'])
|
2018-05-18 06:03:30 +08:00
|
|
|
, @lang('frontend.widgets.weather.dewpoint')
|
2018-04-08 09:52:12 +08:00
|
|
|
{{ $metar['dew_point'][$unit_temp] }}
|
|
|
|
°{{strtoupper($unit_temp)}}
|
|
|
|
@endif
|
2018-04-03 11:35:25 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.barometer')</td>
|
2018-04-03 11:35:25 +08:00
|
|
|
<td>
|
2018-05-16 14:47:31 +08:00
|
|
|
{{ number_format($metar['barometer'], 2) }} hPa
|
|
|
|
/ {{ number_format($metar['barometer_in'], 2) }} inHg
|
2018-04-03 11:35:25 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2018-04-07 22:05:06 +08:00
|
|
|
@if($metar['clouds'])
|
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.clouds')</td>
|
2018-04-07 22:05:06 +08:00
|
|
|
<td>
|
|
|
|
@if($unit_alt === 'ft')
|
|
|
|
{{$metar['clouds_report_ft']}}
|
|
|
|
@else
|
|
|
|
{{ $metar['clouds_report'] }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2018-04-03 11:35:25 +08:00
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.wind')</td>
|
2018-04-03 11:35:25 +08:00
|
|
|
<td>
|
2018-05-18 06:03:30 +08:00
|
|
|
{{$metar['wind_speed']}} kts @lang('frontend.global.from') {{$metar['wind_direction_label']}}
|
2018-04-07 22:05:06 +08:00
|
|
|
({{$metar['wind_direction']}}°)
|
|
|
|
@if($metar['wind_gust_speed'])
|
2018-05-16 14:47:31 +08:00
|
|
|
@lang('frontend.widgets.weather.guststo') {{ $metar['wind_gust_speed'] }}
|
2018-04-03 11:35:25 +08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.global.metar')</td>
|
2018-04-03 11:35:25 +08:00
|
|
|
<td>
|
|
|
|
<div style="line-height:1.5em;min-height: 3em;">
|
2018-04-07 22:05:06 +08:00
|
|
|
{{ $metar['raw'] }}
|
2018-04-03 11:35:25 +08:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-04-07 22:05:06 +08:00
|
|
|
@if($metar['remarks'])
|
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.remarks')</td>
|
2018-04-07 22:05:06 +08:00
|
|
|
<td>
|
|
|
|
{{ $metar['remarks'] }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2018-04-03 11:35:25 +08:00
|
|
|
<tr>
|
2018-05-18 06:03:30 +08:00
|
|
|
<td>@lang('frontend.widgets.weather.updated')</td>
|
2018-04-07 22:05:06 +08:00
|
|
|
<td>{{$metar['observed_time']}} ({{$metar['observed_age']}})</td>
|
2018-04-03 11:35:25 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
@endif
|