Newer
Older
@extends('layouts.app')
@section('content')
<style>
div.rack {
position: relative;
width: 100%;
border: 1px solid rgba(0, 0, 0, 0.1);
}
div.server {
position: absolute;
width: 100%;
padding: 0.2rem;
display: flex;
flex-direction: column;
word-wrap: break-word;
background-color: white;
border: 1px solid rgba(0, 0, 0, 0.1);
}
div.size-3u {
height: 6rem;
}
div.size-4u {
height: 8rem;
}
div.slot {
position: absolute;
width: 100%;
height: 2rem;
padding: 0.2rem;
display: flex;
flex-direction: column;
word-wrap: break-word;
background-color: rgba(0, 0, 0, 0.01);
border: 1px solid rgba(0, 0, 0, 0.05);
<div class="slot" style="bottom: {{ 2*$i }}rem">
{{ $i + 1 }}
</div>
@foreach ($organization->servers as $server)
@if ($server->size == 0)
@continue
@endif
<div class="server size-{{ $server->size }}u"
<p>
<a href="{{ $server->getUrlAttribute() }}"
class="text-decoration-none">
{{ $server->name }}
</a>
{!! $server->status()->badge() !!}
</p>