fleetCatalogue/resources/views/components/keyboard.blade.php

19 lines
3.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@props(['keys'])
@php
$layout = [
0 => ['ESC' => ['ESC'],'F1' => ['F1', 'ml-[2.5rem] w-[2.5rem]'],'F2' => ['F2'],'F3' => ['F3'],'F4' => ['F4'],'F5' => ['F5', 'ml-[1rem] w-[2.5rem]'],'F6' => ['F6'],'F7' => ['F7'],'F8' => ['F8'],'F9' => ['F9', 'ml-[1rem] w-[2.5rem]'],'F10' => ['F10'],'F11' => ['F11'],'F12' => ['F12'], 'DRUCK' => ['DRUCK', 'ml-[1rem] w-[3rem] text-sm'], 'ROLLEN' => ['ROLLEN', 'w-[3rem] text-sm'], 'PAUSE' => ['PAUSE', 'w-[3rem] text-sm'], 'CAL' => ['CAL', 'ml-[1rem] w-[2.5rem]'], 'SPEAKER' => ['🔈'], 'SPEAKER_LOW' => ['🔉'], 'SPEAKER_HIGH' => ['🔊']],
1 => ['^' => ['^'], '1' => ['1'], '2' => ['2'], '3' => ['3'], '4' => ['4'], '5' => ['5'], '6' => ['6'], '7' => ['7'], '8' => ['8'], '9' => ['9'], '0' => ['0'], 'ß' => ['ß'], '´' => ['´'], 'BACKSPACE' => ['←', 'w-[4.2rem]'], 'EINFG' => ['EINFG', 'ml-[1rem] w-[3rem] text-sm'], 'POS1' => ['POS1', 'w-[3rem] text-sm'], 'BILD▲' => ['BILD▲', 'w-[3rem] text-sm'], 'NUM' => ['NUM', 'ml-[1rem] w-[2.5rem]'], 'NUM÷' => ['÷'], 'NUM*' => ['*'], 'NUM-' => ['-']],
2 => ['TAB' => ['⇄', 'w-[3.2rem]'], 'Q' => ['Q'], 'W' => ['W'], 'E' => ['E'], 'R' => ['R'], 'T' => ['T'], 'Z' => ['Z'], 'U' => ['U'], 'I' => ['I'], 'O' => ['O'], 'P' => ['P'], 'Ü' => ['Ü'], '+' => ['+'], 'RETURN' => ['↵', 'w-[3.5rem]'], 'ENTF' => ['ENTF', 'ml-[1rem] w-[3rem] text-sm'], 'ENDE' => ['ENDE', 'w-[3rem] text-sm'], 'BILD▼' => ['BILD▼', 'w-[3rem] text-sm'], 'NUM7' => ['7', 'ml-[1rem] w-[2.5rem]'], 'NUM8' => ['8'], 'NUM9' => ['9'], 'NUM+' => ['+']],
3 => ['CAPS' => ['⇓', 'w-[4.2rem]'], 'A' => ['A'], 'S' => ['S'], 'D' => ['D'], 'F' => ['F'], 'G' => ['G'], 'H' => ['H'], 'J' => ['J'], 'K' => ['K'], 'L' => ['L'], 'Ö' => ['Ö'], 'Ä' => ['Ä'], '#' => ['#', 'mr-[13.5rem] w-[2.5rem]'], 'NUM4' => ['4', 'ml-[1rem] w-[2.5rem]'], 'NUM5' => ['5'], 'NUM6' => ['6', 'mr-[2.74rem] w-[2.5rem]']],
4 => ['SHIFT' => ['⇧', 'w-[3rem]'], '<' => ['<'], 'Y' => ['Y'], 'X' => ['X'], 'C' => ['C'], 'V' => ['V'], 'B' => ['B'], 'N' => ['N'], 'M' => ['M'], ',' => [','], '.' => ['.'], '-' => ['-'], 'RSHIFT' => ['⇧', 'w-[6.5rem]'], 'UP' => ['▲', 'mr-[3.25rem] ml-[4.25rem] w-[3rem]'], 'NUM1' => ['1', 'ml-[1rem] w-[2.5rem]'], 'NUM2' => ['2'], 'NUM3' => ['3'], 'NUM↵' => ['↵']],
5 => ['CTRL' => ['CTRL', 'w-[3rem]'], 'HOME' => ['⌘', 'w-[3rem]'], 'ALT' => ['ALT', 'w-[3rem]'], 'SPACE' => ['SPACE', 'w-[17.2rem]'], 'ALTGR' => ['ALTGR', 'w-[3rem]'], 'RHOME' => ['⌘', 'w-[3rem]'], 'FN' => ['FN', 'w-[3rem]'], 'RCTRL' => ['CTRL', 'w-[3rem]'], 'LEFT' => ['◀︎', 'ml-[1rem] w-[3rem]'], 'DOWN' => ['▼', 'w-[3rem]'], 'RIGHT' => ['▶', 'w-[3rem]'], 'NUM0' => ['0', 'ml-[1rem] w-[5.2rem]'], 'NUM.' => ['.', 'mr-[2.75rem] w-[2.5rem]']],
]
@endphp
@foreach($layout as $row)
<div class="flex justify-center gap-1 my-1 w-full">
@foreach($row as $dbString => $key)
<kbd
class="kbd border-{{ env('ACCENT_COLOR') }} {{ in_array($dbString, $keys, true) ? ' bg-zinc-700' : ' bg-zinc-800' }} {{ $key[1] ?? 'w-[2.5rem]' }}">{{ $key[0] }}</kbd>
@endforeach
</div>
@endforeach