#11 - basic layout
This commit is contained in:
parent
262d37d862
commit
6c36fac3df
@ -12,6 +12,15 @@ class HandleInertiaRequests extends Middleware
|
||||
public function share(Request $request): array
|
||||
{
|
||||
return array_merge(parent::share($request), [
|
||||
"auth" => fn() => [
|
||||
"user" => [
|
||||
"name" => 'Chelsea Hagon',
|
||||
"email" => 'chelseahagon@example.com',
|
||||
"role" => 'Human Resources Manager',
|
||||
"imageUrl" =>
|
||||
'https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
],
|
||||
],
|
||||
"flash" => fn() => [
|
||||
"success" => $request->session()->get("success"),
|
||||
"error" => $request->session()->get("error"),
|
||||
|
BIN
public/img/logo.png
Normal file
BIN
public/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
109
public/img/logo.svg
Normal file
109
public/img/logo.svg
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg869"
|
||||
xml:space="preserve"
|
||||
width="360"
|
||||
height="360"
|
||||
viewBox="0 0 359.99999 359.99999"
|
||||
sodipodi:docname="logo.svg"
|
||||
inkscape:export-filename="/home/krzysztof/Downloads/Logo 2.pdf.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
|
||||
id="metadata875"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs873"><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath885"><path
|
||||
d="M 0,595.28 H 841.89 V 0 H 0 Z"
|
||||
id="path883"
|
||||
inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1050"
|
||||
id="namedview871"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="0.77596678"
|
||||
inkscape:cx="111.10522"
|
||||
inkscape:cy="122.06922"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g877" /><g
|
||||
id="g877"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Logo 2"
|
||||
transform="matrix(1.3333333,0,0,-1.3333333,-366.4341,748.19966)"><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.75"
|
||||
id="rect965"
|
||||
width="103.17775"
|
||||
height="89.162971"
|
||||
x="381.62784"
|
||||
y="-471.16714"
|
||||
transform="scale(1,-1)" /><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.75"
|
||||
id="rect967"
|
||||
width="33.587135"
|
||||
height="64.516289"
|
||||
x="464.50833"
|
||||
y="-490.49786"
|
||||
transform="scale(1,-1)" /><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.80593318"
|
||||
id="rect961"
|
||||
width="147.88005"
|
||||
height="50.259884"
|
||||
x="338.61697"
|
||||
y="-510.5535"
|
||||
transform="scale(1,-1)" /><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:1.23402977"
|
||||
id="rect953"
|
||||
width="60.943722"
|
||||
height="168.44383"
|
||||
x="325.42218"
|
||||
y="-485.50528"
|
||||
transform="scale(1,-1)" /><rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.72613114"
|
||||
id="rect957"
|
||||
width="106.80226"
|
||||
height="70.798813"
|
||||
x="388.87683"
|
||||
y="-391.42789"
|
||||
transform="scale(1,-1)" /><path
|
||||
d="m 329.04669,322.13574 h 51.52 v 152.496 l -25.398,26.923 -26.122,-26.99001 z m 60.85899,-18.684 h -70.19899 c -5.16,0 -9.342,4.184 -9.342,9.342 v 165.55 c 0,2.423 0.944,4.754 2.629,6.49399 l 35.551,36.73401 c 1.775,1.835 4.2,2.81299 6.772,2.84599 2.551,-0.018 4.984,-1.07599 6.734,-2.93099 l 34.652,-36.73301 c 1.634,-1.73199 2.544,-4.02499 2.544,-6.40999 v -165.55 c 0,-5.158 -4.18101,-9.342 -9.34101,-9.342"
|
||||
style="fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994"
|
||||
id="path915"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="M 501.79469,303.49704 H 389.75168 c -5.15799,0 -9.341,4.17999 -9.341,9.33799 v 160.93401 c 0,5.158 4.18301,9.34199 9.341,9.34199 5.16001,0 9.34201,-4.18399 9.34201,-9.34199 v -151.594 h 93.359 v 56.119 l -23.605,23.85099 c -1.763,1.783 -2.737,4.19601 -2.699,6.70401 0.034,2.50399 1.075,4.89099 2.889,6.621 l 23.415,22.347 v 42.214 c 0,5.15999 4.183,9.34199 9.342,9.34199 5.16,0 9.34,-4.182 9.34,-9.34199 v -46.21 c 0,-2.553 -1.042,-4.99601 -2.89,-6.75701 l -19.427,-18.54 19.616,-19.81799 c 1.731,-1.75001 2.701,-4.11101 2.701,-6.57101 v -69.3 c 0,-5.158 -4.18,-9.33799 -9.34,-9.33799"
|
||||
style="fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994"
|
||||
id="path919"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 501.80059,470.69134 c -2.711,0 -5.401,1.173 -7.249,3.443 l -27.255,33.474 -109.97,-0.139 h -0.012 c -5.155,0 -9.332,4.171 -9.341,9.328 -0.007,5.156 4.171,9.342 9.329,9.35 l 114.414,0.15 h 0.016 c 2.803,0 5.466,-1.266 7.239,-3.445 l 30.064,-36.92 c 3.259,-4.004 2.658,-9.886 -1.341,-13.144 -1.735,-1.411 -3.824,-2.097 -5.894,-2.097"
|
||||
style="fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994"
|
||||
id="path923"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 472.51929,507.46924 h -115.205 c -5.16,0 -9.341,4.181 -9.341,9.34 v 17.868 c 0,5.159 4.181,9.342 9.341,9.342 h 115.205 c 5.15801,0 9.338,-4.183 9.338,-9.342 v -17.868 c 0,-5.159 -4.17999,-9.34 -9.338,-9.34"
|
||||
style="fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994"
|
||||
id="path927"
|
||||
inkscape:connector-curvature="0" /></g></svg>
|
After Width: | Height: | Size: 5.3 KiB |
@ -1,262 +1,5 @@
|
||||
<template>
|
||||
<div class="min-h-full">
|
||||
<Popover
|
||||
v-slot="{ open }"
|
||||
as="header"
|
||||
class="pb-24 bg-gradient-to-r from-sky-800 to-cyan-600"
|
||||
>
|
||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div class="relative flex flex-wrap items-center justify-center lg:justify-between">
|
||||
<!-- Logo -->
|
||||
<div class="absolute left-0 py-5 flex-shrink-0 lg:static">
|
||||
<a href="#">
|
||||
<span class="sr-only">Workflow</span>
|
||||
<img
|
||||
class="h-8 w-auto"
|
||||
src="https://tailwindui.com/img/logos/workflow-mark-cyan-200.svg"
|
||||
alt="Workflow"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Right section on desktop -->
|
||||
<div class="hidden lg:ml-4 lg:flex lg:items-center lg:py-5 lg:pr-0.5">
|
||||
<button
|
||||
type="button"
|
||||
class="flex-shrink-0 p-1 text-cyan-200 rounded-full hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
|
||||
>
|
||||
<span class="sr-only">View notifications</span>
|
||||
<BellIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<!-- Profile dropdown -->
|
||||
<Menu
|
||||
as="div"
|
||||
class="ml-4 relative flex-shrink-0"
|
||||
>
|
||||
<div>
|
||||
<MenuButton
|
||||
class="bg-white rounded-full flex text-sm ring-2 ring-white ring-opacity-20 focus:outline-none focus:ring-opacity-100"
|
||||
>
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img
|
||||
class="h-8 w-8 rounded-full"
|
||||
:src="user.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</MenuButton>
|
||||
</div>
|
||||
<transition
|
||||
leave-active-class="transition ease-in duration-75"
|
||||
leave-from-class="transform opacity-100 scale-100"
|
||||
leave-to-class="transform opacity-0 scale-95"
|
||||
>
|
||||
<MenuItems
|
||||
class="origin-top-right z-40 absolute -right-2 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
||||
>
|
||||
<MenuItem
|
||||
v-for="item in userNavigation"
|
||||
:key="item.name"
|
||||
v-slot="{ active }"
|
||||
>
|
||||
<a
|
||||
:href="item.href"
|
||||
:class="[active ? 'bg-gray-100' : '', 'block px-4 py-2 text-sm text-gray-700']"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</MenuItem>
|
||||
</MenuItems>
|
||||
</transition>
|
||||
</Menu>
|
||||
</div>
|
||||
|
||||
<div class="w-full py-5 lg:border-t lg:border-white lg:border-opacity-20">
|
||||
<div class="lg:grid lg:grid-cols-3 lg:gap-8 lg:items-center">
|
||||
<!-- Left nav -->
|
||||
<div class="hidden lg:block lg:col-span-2">
|
||||
<nav class="flex space-x-4">
|
||||
<a
|
||||
v-for="item in navigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
:class="[item.current ? 'text-white' : 'text-cyan-100', 'text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10']"
|
||||
:aria-current="item.current ? 'page' : undefined"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="px-12 lg:px-0">
|
||||
<!-- Search -->
|
||||
<div class="max-w-xs mx-auto w-full lg:max-w-md">
|
||||
<label
|
||||
for="search"
|
||||
class="sr-only"
|
||||
>Search</label>
|
||||
<div class="relative text-white focus-within:text-gray-600">
|
||||
<div
|
||||
class="pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center"
|
||||
>
|
||||
<SearchIcon
|
||||
class="h-5 w-5"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
id="search"
|
||||
class="block w-full text-white bg-white bg-opacity-20 py-2 pl-10 pr-3 border border-transparent rounded-md leading-5 focus:text-gray-900 placeholder-white focus:outline-none focus:bg-opacity-100 focus:border-transparent focus:placeholder-gray-500 focus:ring-0 sm:text-sm"
|
||||
placeholder="Search"
|
||||
type="search"
|
||||
name="search"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Menu button -->
|
||||
<div class="absolute right-0 flex-shrink-0 lg:hidden">
|
||||
<!-- Mobile menu button -->
|
||||
<PopoverButton
|
||||
class="bg-transparent p-2 rounded-md inline-flex items-center justify-center text-cyan-200 hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
|
||||
>
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<MenuIcon
|
||||
v-if="!open"
|
||||
class="block h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<XIcon
|
||||
v-else
|
||||
class="block h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</PopoverButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TransitionRoot
|
||||
as="template"
|
||||
:show="open"
|
||||
>
|
||||
<div class="lg:hidden">
|
||||
<TransitionChild
|
||||
as="template"
|
||||
enter="duration-150 ease-out"
|
||||
enter-from="opacity-0"
|
||||
enter-to="opacity-100"
|
||||
leave="duration-150 ease-in"
|
||||
leave-from="opacity-100"
|
||||
leave-to="opacity-0"
|
||||
>
|
||||
<PopoverOverlay class="z-20 fixed inset-0 bg-black bg-opacity-25" />
|
||||
</TransitionChild>
|
||||
|
||||
<TransitionChild
|
||||
as="template"
|
||||
enter="duration-150 ease-out"
|
||||
enter-from="opacity-0 scale-95"
|
||||
enter-to="opacity-100 scale-100"
|
||||
leave="duration-150 ease-in"
|
||||
leave-from="opacity-100 scale-100"
|
||||
leave-to="opacity-0 scale-95"
|
||||
>
|
||||
<PopoverPanel
|
||||
focus
|
||||
class="z-30 absolute top-0 inset-x-0 max-w-3xl mx-auto w-full p-2 transition transform origin-top"
|
||||
>
|
||||
<div
|
||||
class="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 bg-white divide-y divide-gray-200"
|
||||
>
|
||||
<div class="pt-3 pb-2">
|
||||
<div class="flex items-center justify-between px-4">
|
||||
<div>
|
||||
<img
|
||||
class="h-8 w-auto"
|
||||
src="https://tailwindui.com/img/logos/workflow-mark-cyan-600.svg"
|
||||
alt="Workflow"
|
||||
>
|
||||
</div>
|
||||
<div class="-mr-2">
|
||||
<PopoverButton
|
||||
class="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500"
|
||||
>
|
||||
<span class="sr-only">Close menu</span>
|
||||
<XIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</PopoverButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 px-2 space-y-1">
|
||||
<a
|
||||
v-for="item in navigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
class="block rounded-md px-3 py-2 text-base text-gray-900 font-medium hover:bg-gray-100 hover:text-gray-800"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-4 pb-2">
|
||||
<div class="flex items-center px-5">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="h-10 w-10 rounded-full"
|
||||
:src="user.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="ml-3 min-w-0 flex-1">
|
||||
<div class="text-base font-medium text-gray-800 truncate">
|
||||
{{ user.name }}
|
||||
</div>
|
||||
<div class="text-sm font-medium text-gray-500 truncate">
|
||||
{{ user.email }}
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="ml-auto flex-shrink-0 bg-white p-1 text-gray-400 rounded-full hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500"
|
||||
>
|
||||
<span class="sr-only">View notifications</span>
|
||||
<BellIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-3 px-2 space-y-1">
|
||||
<a
|
||||
v-for="item in userNavigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
class="block rounded-md px-3 py-2 text-base text-gray-900 font-medium hover:bg-gray-100 hover:text-gray-800"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PopoverPanel>
|
||||
</TransitionChild>
|
||||
</div>
|
||||
</TransitionRoot>
|
||||
</Popover>
|
||||
<main class="-mt-24 pb-8">
|
||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<h1 class="sr-only">
|
||||
Profile
|
||||
</h1>
|
||||
<!-- Main 3 column grid -->
|
||||
<InertiaHead title="Strona główna" />
|
||||
<div class="grid grid-cols-1 gap-4 items-start lg:grid-cols-3 lg:gap-8">
|
||||
<!-- Left column -->
|
||||
<div class="grid grid-cols-1 gap-4 lg:col-span-2">
|
||||
@ -292,12 +35,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 flex justify-center sm:mt-0">
|
||||
<a
|
||||
<InertiaLink
|
||||
href="#"
|
||||
class="flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View profile
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -346,7 +89,7 @@
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
<h3 class="text-lg font-medium">
|
||||
<a
|
||||
<InertiaLink
|
||||
:href="action.href"
|
||||
class="focus:outline-none"
|
||||
>
|
||||
@ -356,7 +99,7 @@
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ action.name }}
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-2 text-sm text-gray-500">
|
||||
Doloribus dolores nostrum quia qui natus officia quod et dolorem. Sit
|
||||
@ -373,7 +116,9 @@
|
||||
fill="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path d="M20 4h1a1 1 0 00-1-1v1zm-1 12a1 1 0 102 0h-2zM8 3a1 1 0 000 2V3zM3.293 19.293a1 1 0 101.414 1.414l-1.414-1.414zM19 4v12h2V4h-2zm1-1H8v2h12V3zm-.707.293l-16 16 1.414 1.414 16-16-1.414-1.414z" />
|
||||
<path
|
||||
d="M20 4h1a1 1 0 00-1-1v1zm-1 12a1 1 0 102 0h-2zM8 3a1 1 0 000 2V3zM3.293 19.293a1 1 0 101.414 1.414l-1.414-1.414zM19 4v12h2V4h-2zm1-1H8v2h12V3zm-.707.293l-16 16 1.414 1.414 16-16-1.414-1.414z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
@ -405,7 +150,7 @@
|
||||
>
|
||||
<div class="relative focus-within:ring-2 focus-within:ring-cyan-500">
|
||||
<h3 class="text-sm font-semibold text-gray-800">
|
||||
<a
|
||||
<InertiaLink
|
||||
:href="announcement.href"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
@ -415,7 +160,7 @@
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ announcement.title }}
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600 line-clamp-2">
|
||||
{{ announcement.preview }}
|
||||
@ -425,12 +170,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<a
|
||||
<InertiaLink
|
||||
href="#"
|
||||
class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View all
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -473,89 +218,48 @@
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
<InertiaLink
|
||||
:href="person.href"
|
||||
class="inline-flex items-center shadow-sm px-2.5 py-0.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<a
|
||||
<InertiaLink
|
||||
href="#"
|
||||
class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View all
|
||||
</a>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 lg:max-w-7xl">
|
||||
<div class="border-t border-gray-200 py-8 text-sm text-gray-500 text-center sm:text-left">
|
||||
<span
|
||||
class="block sm:inline"
|
||||
>© 2021 Tailwind Labs Inc.</span> <span class="block sm:inline">All rights reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
Popover,
|
||||
PopoverButton,
|
||||
PopoverOverlay,
|
||||
PopoverPanel,
|
||||
TransitionChild,
|
||||
TransitionRoot,
|
||||
} from '@headlessui/vue';
|
||||
import {
|
||||
AcademicCapIcon,
|
||||
BadgeCheckIcon,
|
||||
BellIcon,
|
||||
CashIcon,
|
||||
ClockIcon,
|
||||
MenuIcon,
|
||||
ReceiptRefundIcon,
|
||||
UsersIcon,
|
||||
XIcon,
|
||||
} from '@heroicons/vue/outline';
|
||||
import {SearchIcon} from '@heroicons/vue/solid';
|
||||
import {computed} from 'vue';
|
||||
import {usePage} from '@inertiajs/inertia-vue3';
|
||||
|
||||
const user = {
|
||||
name: 'Chelsea Hagon',
|
||||
email: 'chelseahagon@example.com',
|
||||
role: 'Human Resources Manager',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
};
|
||||
const navigation = [
|
||||
{name: 'Home', href: '#', current: true},
|
||||
{name: 'Profile', href: '#', current: false},
|
||||
{name: 'Resources', href: '#', current: false},
|
||||
{name: 'Company Directory', href: '#', current: false},
|
||||
{name: 'Openings', href: '#', current: false},
|
||||
];
|
||||
const userNavigation = [
|
||||
{name: 'Your Profile', href: '#'},
|
||||
{name: 'Settings', href: '#'},
|
||||
{name: 'Sign out', href: '#'},
|
||||
];
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
setup() {
|
||||
const user = computed(() => usePage().props.value.auth.user);
|
||||
const stats = [
|
||||
{label: 'Vacation days left', value: 12},
|
||||
{label: 'Sick days left', value: 4},
|
||||
@ -583,7 +287,13 @@ const actions = [
|
||||
iconForeground: 'text-sky-700',
|
||||
iconBackground: 'bg-sky-50',
|
||||
},
|
||||
{icon: CashIcon, name: 'Payroll', href: '#', iconForeground: 'text-yellow-700', iconBackground: 'bg-yellow-50'},
|
||||
{
|
||||
icon: CashIcon,
|
||||
name: 'Payroll',
|
||||
href: '#',
|
||||
iconForeground: 'text-yellow-700',
|
||||
iconBackground: 'bg-yellow-50'
|
||||
},
|
||||
{
|
||||
icon: ReceiptRefundIcon,
|
||||
name: 'Submit an expense',
|
||||
@ -653,29 +363,8 @@ const announcements = [
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
Popover,
|
||||
PopoverButton,
|
||||
PopoverOverlay,
|
||||
PopoverPanel,
|
||||
TransitionChild,
|
||||
TransitionRoot,
|
||||
BellIcon,
|
||||
MenuIcon,
|
||||
SearchIcon,
|
||||
XIcon,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
user,
|
||||
navigation,
|
||||
userNavigation,
|
||||
stats,
|
||||
actions,
|
||||
recentHires,
|
||||
|
19
resources/js/Shared/Layout.vue
Normal file
19
resources/js/Shared/Layout.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="min-h-full">
|
||||
<MainMenu />
|
||||
<main class="-mt-24 pb-8">
|
||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<slot />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MainMenu from '@/Shared/MainMenu';
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
components: {MainMenu},
|
||||
};
|
||||
</script>
|
285
resources/js/Shared/MainMenu.vue
Normal file
285
resources/js/Shared/MainMenu.vue
Normal file
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<Popover
|
||||
v-slot="{ open }"
|
||||
as="header"
|
||||
class="pb-24 bg-gradient-to-r from-blumilk-500 to-blumilk-600"
|
||||
>
|
||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div class="relative flex flex-wrap items-center justify-center lg:justify-between">
|
||||
<!-- Logo -->
|
||||
<div class="absolute left-0 py-5 flex-shrink-0 lg:static">
|
||||
<InertiaLink href="/">
|
||||
<img
|
||||
class="h-8 w-auto bg-gray-50 p-1 rounded-full"
|
||||
src="/img/logo.svg"
|
||||
alt="Workflow"
|
||||
>
|
||||
</InertiaLink>
|
||||
</div>
|
||||
|
||||
<!-- Right section on desktop -->
|
||||
<div class="hidden lg:ml-4 lg:flex lg:items-center lg:py-5 lg:pr-0.5">
|
||||
<button
|
||||
type="button"
|
||||
class="flex-shrink-0 p-1 text-cyan-200 rounded-full hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
|
||||
>
|
||||
<span class="sr-only">View notifications</span>
|
||||
<BellIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<!-- Profile dropdown -->
|
||||
<Menu
|
||||
as="div"
|
||||
class="ml-4 relative flex-shrink-0"
|
||||
>
|
||||
<div>
|
||||
<MenuButton
|
||||
class="bg-white rounded-full flex text-sm ring-2 ring-white ring-opacity-20 focus:outline-none focus:ring-opacity-100"
|
||||
>
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img
|
||||
class="h-8 w-8 rounded-full"
|
||||
:src="user.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</MenuButton>
|
||||
</div>
|
||||
<transition
|
||||
leave-active-class="transition ease-in duration-75"
|
||||
leave-from-class="transform opacity-100 scale-100"
|
||||
leave-to-class="transform opacity-0 scale-95"
|
||||
>
|
||||
<MenuItems
|
||||
class="origin-top-right z-40 absolute -right-2 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
||||
>
|
||||
<MenuItem
|
||||
v-for="item in userNavigation"
|
||||
:key="item.name"
|
||||
v-slot="{ active }"
|
||||
>
|
||||
<InertiaLink
|
||||
:href="item.href"
|
||||
:class="[active ? 'bg-gray-100' : '', 'block px-4 py-2 text-sm text-gray-700']"
|
||||
>
|
||||
{{ item.name }}
|
||||
</InertiaLink>
|
||||
</MenuItem>
|
||||
</MenuItems>
|
||||
</transition>
|
||||
</Menu>
|
||||
</div>
|
||||
|
||||
<div class="w-full py-5 lg:border-t lg:border-white lg:border-opacity-20">
|
||||
<div class="lg:items-center">
|
||||
<div class="hidden lg:block">
|
||||
<nav class="flex space-x-4">
|
||||
<InertiaLink
|
||||
v-for="item in navigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
:class="[item.current ? 'text-white' : 'text-cyan-100', 'text-sm font-medium rounded-md bg-white bg-opacity-0 px-3 py-2 hover:bg-opacity-10']"
|
||||
:aria-current="item.current ? 'page' : undefined"
|
||||
>
|
||||
{{ item.name }}
|
||||
</InertiaLink>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Menu button -->
|
||||
<div class="absolute right-0 flex-shrink-0 lg:hidden">
|
||||
<!-- Mobile menu button -->
|
||||
<PopoverButton
|
||||
class="bg-transparent p-2 rounded-md inline-flex items-center justify-center text-cyan-200 hover:text-white hover:bg-white hover:bg-opacity-10 focus:outline-none focus:ring-2 focus:ring-white"
|
||||
>
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<MenuIcon
|
||||
v-if="!open"
|
||||
class="block h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<XIcon
|
||||
v-else
|
||||
class="block h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</PopoverButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TransitionRoot
|
||||
as="template"
|
||||
:show="open"
|
||||
>
|
||||
<div class="lg:hidden">
|
||||
<TransitionChild
|
||||
as="template"
|
||||
enter="duration-150 ease-out"
|
||||
enter-from="opacity-0"
|
||||
enter-to="opacity-100"
|
||||
leave="duration-150 ease-in"
|
||||
leave-from="opacity-100"
|
||||
leave-to="opacity-0"
|
||||
>
|
||||
<PopoverOverlay class="z-20 fixed inset-0 bg-black bg-opacity-25" />
|
||||
</TransitionChild>
|
||||
|
||||
<TransitionChild
|
||||
as="template"
|
||||
enter="duration-150 ease-out"
|
||||
enter-from="opacity-0 scale-95"
|
||||
enter-to="opacity-100 scale-100"
|
||||
leave="duration-150 ease-in"
|
||||
leave-from="opacity-100 scale-100"
|
||||
leave-to="opacity-0 scale-95"
|
||||
>
|
||||
<PopoverPanel
|
||||
focus
|
||||
class="z-30 absolute top-0 inset-x-0 max-w-3xl mx-auto w-full p-2 transition transform origin-top"
|
||||
>
|
||||
<div
|
||||
class="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 bg-white divide-y divide-gray-200"
|
||||
>
|
||||
<div class="pt-3 pb-2">
|
||||
<div class="flex items-center justify-between px-4">
|
||||
<div>
|
||||
<img
|
||||
class="h-8 w-auto"
|
||||
src="https://tailwindui.com/img/logos/workflow-mark-cyan-600.svg"
|
||||
alt="Workflow"
|
||||
>
|
||||
</div>
|
||||
<div class="-mr-2">
|
||||
<PopoverButton
|
||||
class="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500"
|
||||
>
|
||||
<span class="sr-only">Close menu</span>
|
||||
<XIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</PopoverButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 px-2 space-y-1">
|
||||
<InertiaLink
|
||||
v-for="item in navigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
class="block rounded-md px-3 py-2 text-base text-gray-900 font-medium hover:bg-gray-100 hover:text-gray-800"
|
||||
>
|
||||
{{ item.name }}
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-4 pb-2">
|
||||
<div class="flex items-center px-5">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="h-10 w-10 rounded-full"
|
||||
:src="user.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="ml-3 min-w-0 flex-1">
|
||||
<div class="text-base font-medium text-gray-800 truncate">
|
||||
{{ user.name }}
|
||||
</div>
|
||||
<div class="text-sm font-medium text-gray-500 truncate">
|
||||
{{ user.email }}
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="ml-auto flex-shrink-0 bg-white p-1 text-gray-400 rounded-full hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500"
|
||||
>
|
||||
<span class="sr-only">View notifications</span>
|
||||
<BellIcon
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-3 px-2 space-y-1">
|
||||
<InertiaLink
|
||||
v-for="item in userNavigation"
|
||||
:key="item.name"
|
||||
:href="item.href"
|
||||
class="block rounded-md px-3 py-2 text-base text-gray-900 font-medium hover:bg-gray-100 hover:text-gray-800"
|
||||
>
|
||||
{{ item.name }}
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PopoverPanel>
|
||||
</TransitionChild>
|
||||
</div>
|
||||
</TransitionRoot>
|
||||
</Popover>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
Popover,
|
||||
PopoverButton,
|
||||
PopoverOverlay,
|
||||
PopoverPanel,
|
||||
TransitionChild,
|
||||
TransitionRoot
|
||||
} from '@headlessui/vue';
|
||||
import {BellIcon, MenuIcon, XIcon} from '@heroicons/vue/outline';
|
||||
import {computed} from 'vue';
|
||||
import {usePage} from '@inertiajs/inertia-vue3';
|
||||
|
||||
export default {
|
||||
name: 'MainMenu',
|
||||
components: {
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
Popover,
|
||||
PopoverButton,
|
||||
PopoverOverlay,
|
||||
PopoverPanel,
|
||||
TransitionChild,
|
||||
TransitionRoot,
|
||||
BellIcon,
|
||||
MenuIcon,
|
||||
XIcon,
|
||||
},
|
||||
setup() {
|
||||
const user = computed(() => usePage().props.value.auth.user);
|
||||
const navigation = [
|
||||
{name: 'Home', href: '/', current: true},
|
||||
{name: 'Profile', href: '#', current: false},
|
||||
{name: 'Resources', href: '#', current: false},
|
||||
{name: 'Company Directory', href: '#', current: false},
|
||||
{name: 'Openings', href: '#', current: false},
|
||||
];
|
||||
const userNavigation = [
|
||||
{name: 'Your Profile', href: '#'},
|
||||
{name: 'Settings', href: '#'},
|
||||
{name: 'Sign out', href: '#'},
|
||||
];
|
||||
|
||||
return {
|
||||
user,
|
||||
navigation,
|
||||
userNavigation,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -1,14 +1,24 @@
|
||||
import {createApp, h} from 'vue';
|
||||
import {createInertiaApp} from '@inertiajs/inertia-vue3';
|
||||
import {createInertiaApp, Head, Link} from '@inertiajs/inertia-vue3';
|
||||
import {InertiaProgress} from '@inertiajs/progress';
|
||||
import Layout from '@/Shared/Layout';
|
||||
|
||||
createInertiaApp({
|
||||
resolve: name => require(`./Pages/${name}`),
|
||||
resolve: name => {
|
||||
const page = require(`./Pages/${name}`).default;
|
||||
|
||||
page.layout = page.layout || Layout;
|
||||
|
||||
return page;
|
||||
},
|
||||
setup({el, App, props, plugin}) {
|
||||
createApp({render: () => h(App, props)})
|
||||
.use(plugin)
|
||||
.component('InertiaLink', Link)
|
||||
.component('InertiaHead', Head)
|
||||
.mount(el);
|
||||
},
|
||||
title: title => `${title} - Toby`,
|
||||
});
|
||||
|
||||
InertiaProgress.init();
|
||||
|
@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
|
||||
<link rel="icon" href="/img/logo.png">
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link href="{{ asset('/css/app.css') }}" rel="stylesheet"/>
|
||||
<script src="{{ asset('/js/app.js') }}" defer></script>
|
||||
|
@ -9,6 +9,20 @@ module.exports = {
|
||||
fontFamily: {
|
||||
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
||||
},
|
||||
colors: {
|
||||
'blumilk': {
|
||||
'50': '#D5DFEE',
|
||||
'100': '#C7D4E9',
|
||||
'200': '#AABDDD',
|
||||
'300': '#8CA7D1',
|
||||
'400': '#6F90C6',
|
||||
'500': '#527ABA',
|
||||
'600': '#3C5F97',
|
||||
'700': '#2C466F',
|
||||
'800': '#1C2D47',
|
||||
'900': '#0C141F'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user